Esempio n. 1
0
        private void pictureBox2_Click(object sender, EventArgs e)
        {
            //显示大窗体
            //Program.frmSelect.Left = this.Left;
            //Program.frmSelect.Top = this.Top;
            //Program.frmSelect.Show();
            //this.Hide();
            //Program.frmCheck.Show();
            frmCheckInit startCheck = new frmCheckInit();

            startCheck.ShowDialog();
        }
        public frmSelectCheckRecord(frmCheckInit frmCheckInit)
        {
            InitializeComponent();
            this.frmCheckInit = frmCheckInit;
            try
            {
                DataTable dt = CheckCtl.getAllCheckRecord();
                this.dgv1.DataSource = dt;

                this.format_dgv(this.dgv1);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message);
            }

            this.dgv1.CellClick += dgv1_CellClick;
        }
Esempio n. 3
0
        public frmFloat()
        {
            #region 控件初始化
            InitializeComponent();

            //this.Width = 50;
            //this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;

            pblst.Add(pictureBox5);
            pblst.Add(pictureBox4);
            pblst.Add(pictureBox3);
            pblst.Add(pictureBox2);
            pblst.Add(pictureBox1);

            pblst2.Add(pictureBox5_1);
            pblst2.Add(pictureBox4_1);
            pblst2.Add(pictureBox3_1);
            pblst2.Add(pictureBox2_1);
            pblst2.Add(pictureBox1_1);

            this.pictureBox5.Image = (Image)global::Carbinet.Properties.Resources.座位1;   //显示座位
            this.pictureBox4.Image = (Image)global::Carbinet.Properties.Resources.打卡1;   //考勤
            this.pictureBox3.Image = (Image)global::Carbinet.Properties.Resources.互动1;   //实时互动
            this.pictureBox2.Image = (Image)global::Carbinet.Properties.Resources.测验1;   //课堂测验
            this.pictureBox1.Image = (Image)global::Carbinet.Properties.Resources.关闭1;   //退出

            this.pictureBox5_1.Image = (Image)global::Carbinet.Properties.Resources.座位2; //显示座位
            this.pictureBox4_1.Image = (Image)global::Carbinet.Properties.Resources.打卡2; //考勤
            this.pictureBox3_1.Image = (Image)global::Carbinet.Properties.Resources.互动2; //实时互动
            this.pictureBox2_1.Image = (Image)global::Carbinet.Properties.Resources.测验2; //课堂测验
            this.pictureBox1_1.Image = (Image)global::Carbinet.Properties.Resources.关闭2; //退出


            PieChart1.ItemStyle.SurfaceAlphaTransparency        = 0.92F;
            PieChart1.FocusedItemStyle.SurfaceAlphaTransparency = 0.92F;
            PieChart1.FocusedItemStyle.SurfaceBrightnessFactor  = 0.3F;
            PieChart1.Inclination = 1.55F;
            PieChart1.AutoSizePie = true;
            PieChart1.Thickness   = 31;
            PieChart1.Rotation    = 0.0F;
            PieChart1.ShowEdges   = false;
            //PieChart1.Radius = 90F;

            PieChart1.MouseEnter += PieChart1_MouseEnter;
            PieChart1.MouseLeave += PieChart1_MouseLeave;
            #endregion

            #region 设置窗体及主要控件位置
            this.lblTip.Text = string.Empty;

            Screen[] screens = System.Windows.Forms.Screen.AllScreens;
            for (int i = 0; i < screens.Length; i++)
            {
                Screen sc = screens[i];
                if (sc.Primary == true)
                {
                    Rectangle rect = sc.WorkingArea;
                    this.Top    = (int)(rect.Height * 0.0);
                    this.Height = rect.Height;
                    this.Left   = 0;
                    this.Width  = 85;

                    // 从高度150开始计算按钮所能使用的空间,然后将其垂直居中
                    resetPbYPos(rect.Height);
                }
            }
            #endregion

            #region 绑定按钮事件


            pictureBox1_1.Click += (sender, e) =>
            {
                Program.closeAllForms();
                this.Close();
            };
            pictureBox2_1.Click += (sender, e) =>
            {
                event_handler = (I_event_handler)(new frmRTTest(this));
                event_handler.prepare_handler();
            };
            pictureBox3_1.Click += (sender, e) =>
            {
                this.setDefaultHandler();
            };
            pictureBox4_1.Click += (sender, e) =>
            {
                frmCheckInit startCheck = new frmCheckInit();
                startCheck.ShowDialog();
            };

            pictureBox5_1.Click += (sender, e) =>
            {
                Program.frmClassRoom.ShowDialog();
            };

            #endregion
            this.initial_popup_menu();

            this.Shown       += frmFloat_Shown;
            this.FormClosing += frmFloat_FormClosing;
        }