示例#1
0
 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;
     }
 }
示例#2
0
		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();
			}
		}
示例#3
0
文件: FormMapHQ.cs 项目: mnisl/OD
		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;
			}
		}