private void fullScreenToolStripMenuItem_Click(object sender, EventArgs e) { _isFullScreen = !_isFullScreen; if (_isFullScreen) //switch to full screen { this.fullScreenToolStripMenuItem.Text = "Restore"; this.setupToolStripMenuItem.Visible = false; this.WindowState = FormWindowState.Normal; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; this.Bounds = System.Windows.Forms.Screen.FromControl(this).Bounds; this.mapAreaPanelHQ.PixelsPerFoot = 18; } else //set back to defaults { this.fullScreenToolStripMenuItem.Text = "Full Screen"; FormMapHQ FormCMS = new FormMapHQ(); this.FormBorderStyle = FormCMS.FormBorderStyle; this.Size = FormCMS.Size; this.CenterToScreen(); this.setupToolStripMenuItem.Visible = true; this.mapAreaPanelHQ.PixelsPerFoot = 17; } }
private void butMapPhones_Click(object sender,EventArgs e) { if(formMapHQ==null || formMapHQ.IsDisposed) { formMapHQ=new FormMapHQ(); formMapHQ.Show(); formMapHQ.BringToFront(); } else { formMapHQ.Show(); formMapHQ.BringToFront(); } }
private void fullScreenToolStripMenuItem_Click(object sender,EventArgs e) { _isFullScreen=!_isFullScreen; if(_isFullScreen) { //switch to full screen this.fullScreenToolStripMenuItem.Text="Restore"; this.setupToolStripMenuItem.Visible=false; this.WindowState=FormWindowState.Normal; this.FormBorderStyle=System.Windows.Forms.FormBorderStyle.None; this.Bounds=System.Windows.Forms.Screen.FromControl(this).Bounds; this.mapAreaPanelHQ.PixelsPerFoot=18; } else { //set back to defaults this.fullScreenToolStripMenuItem.Text="Full Screen"; FormMapHQ FormCMS=new FormMapHQ(); this.FormBorderStyle=FormCMS.FormBorderStyle; this.Size=FormCMS.Size; this.CenterToScreen(); this.setupToolStripMenuItem.Visible=true; this.mapAreaPanelHQ.PixelsPerFoot=17; } }