예제 #1
0
파일: MainForm.cs 프로젝트: cugni/pds
        public MainForm()
        {
            InitializeComponent();
            //this.Width = Screen.PrimaryScreen.Bounds.Width/ 3;
            //this.Height = Screen.PrimaryScreen.Bounds.Height / 4;
            nextClipboardViewer = (IntPtr)SetClipboardViewer((int)this.Handle);
            this.Left = Screen.PrimaryScreen.WorkingArea.Width - this.Width;
            this.Top = Screen.PrimaryScreen.WorkingArea.Height - this.Height;
            this.setDimensioniParz(50, 50, 500, 500);

            flagVis = 0;

            //alby
            tipoCattura = 1;
            this.setDimensioniParz(50, 50, 500, 500);
            this.setTasti(Keys.Up, Keys.Down);
            _hookID = SetHook(_proc);
            workerObject = new Worker(tipoCattura);
            Application.ApplicationExit += new EventHandler(OnApplicationExit);
            //alby end

            //alby2
            this.AutoSize = true;
            this.MaximizeBox = false;
            //this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
            this.FormBorderStyle = FormBorderStyle.Fixed3D;
            //alby2 end
        }
예제 #2
0
 private void Form_start_Load(object sender, EventArgs e)
 {
     conn = Form_main.Connection;
     comm = new MySqlCommand();
     comm.Connection = conn;
     comm.CommandText = "select bh,xm,mm,qx from worker";
     MySqlDataReader dr = comm.ExecuteReader();
     while(dr.Read())
     {
         Worker w = new Worker();
         w.bh = dr.GetString(0);
         w.xm = dr.GetString(1);
         w.mm = dr.GetString(2);
         w.qx = dr.GetString(3);
         this.comboBox1.Items.Add(w);
     }
     dr.Close();
     if (this.comboBox1.Items.Count > 0)
         this.comboBox1.SelectedIndex = 0;
     else
     {
         MessageBox.Show("无管理员权限!!","警告",MessageBoxButtons.OK,MessageBoxIcon.Warning);
         Application.Exit();
     }
     this.textBox1.Select();
 }
예제 #3
0
파일: Program.cs 프로젝트: KarpaDmytro/Labs
 static void Main(string[] args)
 {
     Worker worker = new Worker(6);
     Listener listener = new Listener();
     Console.WriteLine("Server is initialized,{0}\n==================",DateTime.Now);
     while (true)
     {
         string strData = listener.GetData();
         Console.WriteLine("Recived Request: {0},Time: {1}",strData,DateTime.Now);
         listener.CreateResponse(strData);
         worker.StartWork(Convert.ToInt32(strData));
     }
 }
예제 #4
0
        private void 锁定ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.worker = null;
            this.toolStripStatusLabel1.Text = "当前用户:已注销";
            this.关闭所有窗口ToolStripMenuItem_Click(null, null);

            Form_start f = new Form_start();
            if (f.ShowDialog(this) != DialogResult.OK)
            {
                this.Close();
                return;
            }
            this.toolStripStatusLabel1.Text = "当前操作员:" + this.worker.xm;
            //this.本日时段ToolStripMenuItem_Click(null, null);
        }
예제 #5
0
 private void Form_ygjl_Load(object sender, EventArgs e)
 {
     conn = Form_main.Connection;
     comm = new MySqlCommand();
     comm.Connection = conn;
     comm.CommandText = "select bh,xm from worker";
     MySqlDataReader dr = comm.ExecuteReader();
     while (dr.Read())
     {
         Worker w = new Worker();
         w.bh = dr.GetString(0);
         w.xm = dr.GetString(1);
         this.comboBox1.Items.Add(w);
     }
     dr.Close();
     this.comboBox1.SelectedIndex = 0;
     this._start = this.dateTimePicker1.Value.ToShortDateString();
     this._end = this.dateTimePicker2.Value.ToShortDateString();
 }
예제 #6
0
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     this._worker = this.comboBox1.Items[this.comboBox1.SelectedIndex] as Worker;
 }