Exemple #1
0
        private void btnAddState_Click(object sender, EventArgs e)
        {
            frmState frm = new frmState();

            frm.ShowDialog();

            GenerateDynamicStateTreeView(StateService.lstState, CityService.lstCity);
        }
 private void Main_Maximize_Click(object sender, EventArgs e)
 {
     if (fsFrmState == frmState.Kiosk)
     {
         return;
     }
     if (fsFrmState == frmState.Normal)
     {
         rcFrmSize        = this.Bounds;
         this.Bounds      = Screen.GetWorkingArea(this);
         fsFrmState       = frmState.Full;
         pbResize.Visible = false;
     }
     else
     {
         this.Bounds      = rcFrmSize;
         fsFrmState       = frmState.Normal;
         pbResize.Visible = true;
     }
 }
 void bConKeys_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F11)
     {
         if (fsFrmState == frmState.Normal)
         {
             rcFrmSize = this.Bounds;
         }
         if (fsFrmState != frmState.Kiosk)
         {
             fsFrmState       = frmState.Kiosk;
             this.Bounds      = Screen.GetBounds(this);
             pbDisp.BackColor = Color.FromArgb(0, 0, 0);
             this.Controls.Add(pbDisp);
             pbDisp.BringToFront();
             pbResize.Visible = false;
         }
         else
         {
             this.Bounds      = rcFrmSize;
             fsFrmState       = frmState.Normal;
             pbDisp.BackColor = pnDisp.BackColor;
             pnDisp.Controls.Add(pbDisp);
             pbResize.Visible = true;
         }
     }
     if (e.KeyCode == Keys.Left)
     {
         Footer_cmPrev_Click(new object(), new EventArgs());
     }
     if (e.KeyCode == Keys.Right)
     {
         Footer_cmNext_Click(new object(), new EventArgs());
     }
     this.Text = "";
 }