| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 504 人关注过本帖
标题:C#代码,帮忙解释一下
只看楼主 加入收藏
需要帮助
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2013-6-26
收藏
 问题点数:0 回复次数:0 
C#代码,帮忙解释一下
namespace 机房管理系统
{
    public partial class myForm1 : Form
    {
        public myForm1()
        {
            InitializeComponent();//在每一个窗体生成的时候,都会针对于当前的窗体定义InitializeComponent()方法,该方法实际上是由系统生成的对于窗体界面的定义方法。
        }
        [DllImport("user32")]
        private static extern bool AnimateWindow(IntPtr hwnd, int dwTime, int dwFlags);
        const int AW_HOR_POSITIVE = 0x0001;
        const int AW_HOR_NEGATIVE = 0x0002;
        const int AW_VER_POSITIVE = 0x0004;
        const int AW_VER_NEGATIVE = 0x0008;
        const int AW_CENTER = 0x0010;
        const int AW_HIDE = 0x10000;
        const int AW_ACTIVATE = 0x20000;
        const int AW_SLIDE = 0x40000;
        const int AW_BLEND = 0x80000;

        bool isGuanliyuan = false;
        string str011 = "";
        string str012 = "";
     
        string cmdtext1 = "net use H:  /del ";
        public  string Gname = "";
        private Point mouse_offset;
        own_FClass owfm = new own_FClass();//创建新对象
        string PwdStr = "";
     

        public myForm1(string user)             : this()
        {
            Gname = user; //管理员名

        }

        public myForm1(string m_Str, string _pwd):this()
        {
            richTextBox1.Text += m_Str;
            PwdStr = _pwd;
        }

        #region  光标定位方法
        /// <summary>
        /// 光标定位到文本框末尾
        /// </summary>
        public void mousewh()
        {
            // 让光标定位到文本框末尾
            richTextBox1.Select(richTextBox1.TextLength, 0);

            //然后移动滚动条,使输入点(text entry point)(即光标所在的位置)显示出来
            //这样也可以达到滚动到最下方的目的
            richTextBox1.ScrollToCaret();
        }
        #endregion
        #region 获取中文星期方法
        /// <summary>
        ///获取中文星期,如:星期日
        /// </summary>
        string CaculateWeekDay(DateTime da)
        {
            string[] WeekStr = { "星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六" };
            string week = WeekStr[Convert.ToInt16(da.DayOfWeek)];
            return week;
        }
        #endregion
        //定义获取路径方法
        string Mydirectory(string str)
        {
            string str0 = System.AppDomain.CurrentDomain.BaseDirectory;
            str0 += "flash\\" + str;
            return str0;
        }
      

        public void setUser(string userName) //设置用户
        {
            //用户上机
            textBox2.Text = userName;
            own_FClass owfm = new own_FClass();
            string str01 = "";
            string str02 = "";
            string str001 = "";
            string str002 = "";
         
            int remainTime = 0;
         
            str02 = "select * from 机房上机信息 where 卡号='" + textBox2.Text + "'";
           
            
            str01 = "update 机房上机信息 set 当前状态='上机',上机时间=getDate()  where 卡号='" + textBox2.Text + "'";
搜索更多相关主题的帖子: private 管理系统 public 
2013-06-26 13:23
快速回复:C#代码,帮忙解释一下
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.034295 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved