Esempio n. 1
1
	public MainForm ()
	{
		components = new Container ();
		ComponentResourceManager resources = new ComponentResourceManager (typeof (MainForm));
		menuStrip = new MenuStrip ();
		fileMenu = new ToolStripMenuItem ();
		openToolStripMenuItem = new ToolStripMenuItem ();
		reopenToolStripMenuItem = new ToolStripMenuItem ();
		closeToolStripMenuItem = new ToolStripMenuItem ();
		snipperToolStripMenuItem = new ToolStripMenuItem ();
		toolStripSeparator4 = new ToolStripSeparator ();
		exitToolStripMenuItem = new ToolStripMenuItem ();
		copyToolStripMenuItem = new ToolStripMenuItem ();
		viewMenu = new ToolStripMenuItem ();
		editMenu = new ToolStripMenuItem ();
		toolBarToolStripMenuItem = new ToolStripMenuItem ();
		statusBarToolStripMenuItem = new ToolStripMenuItem ();
		sourceViewToolStripMenuItem = new ToolStripMenuItem ();
		timeZoneToolStripMenuItem = new ToolStripMenuItem ();
		timeZoneMyLocalToolStripMenuItem = new ToolStripMenuItem ();
		timeZoneLogLocalToolStripMenuItem = new ToolStripMenuItem ();
		timeZoneUniversalToolStripMenuItem = new ToolStripMenuItem ();
		timeZoneCycleToolStripMenuItem = new ToolStripMenuItem ();
		toolsMenu = new ToolStripMenuItem ();
		optionsToolStripMenuItem = new ToolStripMenuItem ();
		traceConfigToolStripMenuItem = new ToolStripMenuItem ();
		windowsMenu = new ToolStripMenuItem ();
		cascadeToolStripMenuItem = new ToolStripMenuItem ();
		tileVerticalToolStripMenuItem = new ToolStripMenuItem ();
		tileHorizontalToolStripMenuItem = new ToolStripMenuItem ();
		closeAllToolStripMenuItem = new ToolStripMenuItem ();
		arrangeIconsToolStripMenuItem = new ToolStripMenuItem ();
		helpMenu = new ToolStripMenuItem ();
		contentsToolStripMenuItem = new ToolStripMenuItem ();
		indexToolStripMenuItem = new ToolStripMenuItem ();
		searchToolStripMenuItem = new ToolStripMenuItem ();
		toolStripSeparator8 = new ToolStripSeparator ();
		aboutToolStripMenuItem = new ToolStripMenuItem ();
		toolStrip = new ToolStrip ();
		newToolStripButton = new ToolStripButton ();
		openToolStripButton = new ToolStripButton ();
		saveToolStripButton = new ToolStripButton ();
		toolStripSeparator1 = new ToolStripSeparator ();
		printToolStripButton = new ToolStripButton ();
		printPreviewToolStripButton = new ToolStripButton ();
		helpToolStripButton = new ToolStripButton ();
		statusStrip = new StatusStrip ();
		toolStripStatusLabel = new ToolStripStatusLabel ();
		menuStrip.SuspendLayout ();
		toolStrip.SuspendLayout ();
		statusStrip.SuspendLayout ();
		SuspendLayout ();
		// 
		// menuStrip
		// 
		menuStrip.Items.AddRange (new ToolStripItem [] {
			fileMenu,
			editMenu,
			viewMenu,
			toolsMenu,
			windowsMenu,
			helpMenu});
		menuStrip.Location = new Point (0, 0);
		menuStrip.MdiWindowListItem = windowsMenu;
		menuStrip.Size = new Size (632, 24);
		menuStrip.TabIndex = 0;
		menuStrip.Text = "MenuStrip";
		// 
		// fileMenu
		// 
		fileMenu.DropDownItems.AddRange (new ToolStripItem [] {
			openToolStripMenuItem,
			reopenToolStripMenuItem,
			closeToolStripMenuItem,
			snipperToolStripMenuItem,
			toolStripSeparator4,
			exitToolStripMenuItem});
		fileMenu.ImageTransparentColor = SystemColors.ActiveBorder;
		fileMenu.Size = new Size (35, 20);
		fileMenu.MergeAction = MergeAction.Append;
		fileMenu.MergeIndex = 1;
		fileMenu.Text = "&File";
		// 
		// openToolStripMenuItem
		// 
		openToolStripMenuItem.Image = ((Image) (resources.GetObject ("openToolStripMenuItem.Image")));
		openToolStripMenuItem.ImageTransparentColor = Color.Black;
		openToolStripMenuItem.ShortcutKeys = ((Keys) ((Keys.Control | Keys.O)));
		openToolStripMenuItem.Size = new Size (151, 22);
		openToolStripMenuItem.Text = "&Open";
		openToolStripMenuItem.Click += new System.EventHandler (OpenFile);
		openToolStripMenuItem.MergeAction = MergeAction.Append;
		openToolStripMenuItem.MergeIndex = 2;
		// 
		// reopenToolStripMenuItem
		// 
		reopenToolStripMenuItem.Image = ((Image) (resources.GetObject ("openToolStripMenuItem.Image")));
		reopenToolStripMenuItem.ImageTransparentColor = Color.Black;
		reopenToolStripMenuItem.Size = new Size (151, 22);
		reopenToolStripMenuItem.Text = "&Reopen";
		reopenToolStripMenuItem.MergeAction = MergeAction.Append;
		reopenToolStripMenuItem.MergeIndex = 3;
		// 
		// closeToolStripMenuItem
		// 
		//is.closeToolStripMenuItem.Image = ((Image)(resources.GetObject("saveToolStripMenuItem.Image")));
		closeToolStripMenuItem.ImageTransparentColor = Color.Black;
		//is.closeToolStripMenuItem.ShortcutKeys = ((Keys)((Keys.Control | Keys.S)));
		closeToolStripMenuItem.Size = new Size (151, 22);
		closeToolStripMenuItem.Text = "&Close";
		closeToolStripMenuItem.MergeAction = MergeAction.Append;
		closeToolStripMenuItem.MergeIndex = 5;
		// 
		// snipperToolStripMenuItem
		// 
		snipperToolStripMenuItem.Size = new Size (151, 22);
		snipperToolStripMenuItem.Text = "Snip/Merge Log File(s)...";
		snipperToolStripMenuItem.MergeAction = MergeAction.Append;
		snipperToolStripMenuItem.MergeIndex = 6;
		// 
		// toolStripSeparator4
		// 
		toolStripSeparator4.Size = new Size (148, 6);
		toolStripSeparator4.MergeAction = MergeAction.Append;
		toolStripSeparator4.MergeIndex = 7;
		// 
		// exitToolStripMenuItem
		// 
		exitToolStripMenuItem.Size = new Size (151, 22);
		exitToolStripMenuItem.Text = "E&xit";
		exitToolStripMenuItem.Click += new System.EventHandler (ExitToolsStripMenuItem_Click);
		exitToolStripMenuItem.MergeAction = MergeAction.Append;
		exitToolStripMenuItem.MergeIndex = 11;
		// 
		// editMenu
		// 
		editMenu.DropDownItems.Add (copyToolStripMenuItem);
		editMenu.Size = new Size (41, 20);
		editMenu.Text = "&Edit";
		editMenu.MergeAction = MergeAction.Append;
		// 
		// copyToolStripMenuItem
		// 
		copyToolStripMenuItem.MergeAction = MergeAction.Append;
		copyToolStripMenuItem.MergeIndex = 1;
		copyToolStripMenuItem.Size = new Size (190, 22);
		copyToolStripMenuItem.Text = "Copy";
		copyToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+C";
		copyToolStripMenuItem.ShowShortcutKeys = true;
		copyToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.C;
		// 
		// viewMenu
		// 
		viewMenu.DropDownItems.AddRange (new ToolStripItem [] {
			toolBarToolStripMenuItem,
			statusBarToolStripMenuItem,
			sourceViewToolStripMenuItem,
			timeZoneToolStripMenuItem});
		viewMenu.Size = new Size (41, 20);
		viewMenu.Text = "&View";
		viewMenu.MergeAction = MergeAction.Append;
		// 
		// toolBarToolStripMenuItem
		// 
		toolBarToolStripMenuItem.Checked = true;
		toolBarToolStripMenuItem.CheckOnClick = true;
		toolBarToolStripMenuItem.CheckState = CheckState.Checked;
		toolBarToolStripMenuItem.Size = new Size (135, 22);
		toolBarToolStripMenuItem.Text = "&Toolbar";
		toolBarToolStripMenuItem.Click += new System.EventHandler (ToolBarToolStripMenuItem_Click);
		toolBarToolStripMenuItem.MergeAction = MergeAction.Append;
		toolBarToolStripMenuItem.MergeIndex = 68;
		// 
		// statusBarToolStripMenuItem
		// 
		statusBarToolStripMenuItem.Checked = true;
		statusBarToolStripMenuItem.CheckOnClick = true;
		statusBarToolStripMenuItem.CheckState = CheckState.Checked;
		statusBarToolStripMenuItem.Size = new Size (135, 22);
		statusBarToolStripMenuItem.Text = "&Status Bar";
		statusBarToolStripMenuItem.Click += new System.EventHandler (StatusBarToolStripMenuItem_Click);
		statusBarToolStripMenuItem.MergeAction = MergeAction.Append;
		statusBarToolStripMenuItem.MergeIndex = 99;
		// 
		// sourceViewToolStripMenuItem
		// 
		sourceViewToolStripMenuItem.Checked = true;
		sourceViewToolStripMenuItem.CheckOnClick = true;
		sourceViewToolStripMenuItem.CheckState = CheckState.Checked;
		sourceViewToolStripMenuItem.Size = new Size (135, 22);
		sourceViewToolStripMenuItem.Text = "Source &View";
		sourceViewToolStripMenuItem.MergeAction = MergeAction.Append;
		sourceViewToolStripMenuItem.MergeIndex = 100;
		//
		// timeZoneToolStripMenuItem
		//
		timeZoneToolStripMenuItem.DropDownItems.AddRange (new ToolStripItem [] {
			timeZoneMyLocalToolStripMenuItem,
			timeZoneLogLocalToolStripMenuItem,
			timeZoneUniversalToolStripMenuItem,
			timeZoneCycleToolStripMenuItem});
		timeZoneToolStripMenuItem.Size = new Size (41, 20);
		timeZoneToolStripMenuItem.Text = "Time Zone Setting";
		timeZoneToolStripMenuItem.MergeAction = MergeAction.Append;
		timeZoneToolStripMenuItem.MergeIndex = 10;
		//
		// timeZoneMyLocalToolStripMenuItem
		//
		timeZoneMyLocalToolStripMenuItem.Size = new Size (135, 22);
		timeZoneMyLocalToolStripMenuItem.Text = "My &Local Time Zone";
		timeZoneMyLocalToolStripMenuItem.MergeAction = MergeAction.Append;
		timeZoneMyLocalToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+Shift+T";
		timeZoneMyLocalToolStripMenuItem.ShowShortcutKeys = true;
		timeZoneMyLocalToolStripMenuItem.ShortcutKeys = Keys.None;
		//
		// timeZoneLogLocalToolStripMenuItem
		//
		timeZoneLogLocalToolStripMenuItem.Size = new Size (135, 22);
		timeZoneLogLocalToolStripMenuItem.Text = "Log &Creator's Time Zone";
		timeZoneLogLocalToolStripMenuItem.MergeAction = MergeAction.Append;
		timeZoneLogLocalToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+Shift+T";
		timeZoneLogLocalToolStripMenuItem.ShowShortcutKeys = true;
		timeZoneLogLocalToolStripMenuItem.ShortcutKeys = Keys.None;
		//
		// timeZoneUniversalToolStripMenuItem
		//
		timeZoneUniversalToolStripMenuItem.Size = new Size (135, 22);
		timeZoneUniversalToolStripMenuItem.Text = "&Universal Coordinated Time";
		timeZoneUniversalToolStripMenuItem.MergeAction = MergeAction.Append;
		timeZoneUniversalToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+Shift+T";
		timeZoneUniversalToolStripMenuItem.ShowShortcutKeys = true;
		timeZoneUniversalToolStripMenuItem.ShortcutKeys = Keys.None;
		//
		// timeZoneCycleToolStripMenuItem 
		//
		timeZoneCycleToolStripMenuItem.Size = new Size (135, 22);
		timeZoneCycleToolStripMenuItem.Text = "Cycle Time Zones";
		timeZoneCycleToolStripMenuItem.MergeAction = MergeAction.Append;
		timeZoneCycleToolStripMenuItem.Visible = false;
		timeZoneCycleToolStripMenuItem.ShortcutKeyDisplayString = "Ctrl+Shift+T";
		timeZoneCycleToolStripMenuItem.ShowShortcutKeys = true;
		timeZoneCycleToolStripMenuItem.ShortcutKeys = Keys.Control | Keys.Shift | Keys.T;
		// 
		// toolsMenu
		// 
		toolsMenu.DropDownItems.AddRange (new ToolStripItem [] {
			optionsToolStripMenuItem,
			traceConfigToolStripMenuItem});
		toolsMenu.Size = new Size (44, 20);
		toolsMenu.Text = "&Tools";
		// 
		// optionsToolStripMenuItem
		// 
		optionsToolStripMenuItem.Size = new Size (122, 22);
		optionsToolStripMenuItem.Text = "&Options...";
		// 
		// traceConfigToolStripMenuItem
		// 
		traceConfigToolStripMenuItem.Size = new Size (122, 22);
		traceConfigToolStripMenuItem.Text = "Launch Trace&Config";
		// 
		// windowsMenu
		// 
		windowsMenu.DropDownItems.AddRange (new ToolStripItem [] {
			cascadeToolStripMenuItem,
			tileVerticalToolStripMenuItem,
			tileHorizontalToolStripMenuItem,
			closeAllToolStripMenuItem,
			arrangeIconsToolStripMenuItem});
		windowsMenu.Size = new Size (62, 20);
		windowsMenu.Text = "&Windows";
		// 
		// cascadeToolStripMenuItem
		// 
		cascadeToolStripMenuItem.Size = new Size (153, 22);
		cascadeToolStripMenuItem.Text = "&Cascade";
		cascadeToolStripMenuItem.Click += new System.EventHandler (CascadeToolStripMenuItem_Click);
		// 
		// tileVerticalToolStripMenuItem
		// 
		tileVerticalToolStripMenuItem.Size = new Size (153, 22);
		tileVerticalToolStripMenuItem.Text = "Tile &Vertical";
		// 
		// tileHorizontalToolStripMenuItem
		// 
		tileHorizontalToolStripMenuItem.Size = new Size (153, 22);
		tileHorizontalToolStripMenuItem.Text = "Tile &Horizontal";
		tileHorizontalToolStripMenuItem.Click += new System.EventHandler (TileHorizontalToolStripMenuItem_Click);
		// 
		// closeAllToolStripMenuItem
		// 
		closeAllToolStripMenuItem.Size = new Size (153, 22);
		closeAllToolStripMenuItem.Text = "C&lose All";
		closeAllToolStripMenuItem.Click += new System.EventHandler (CloseAllToolStripMenuItem_Click);
		// 
		// arrangeIconsToolStripMenuItem
		// 
		arrangeIconsToolStripMenuItem.Size = new Size (153, 22);
		arrangeIconsToolStripMenuItem.Text = "&Arrange Icons";
		arrangeIconsToolStripMenuItem.Click += new System.EventHandler (ArrangeIconsToolStripMenuItem_Click);
		// 
		// helpMenu
		// 
		helpMenu.DropDownItems.AddRange (new ToolStripItem [] {
			contentsToolStripMenuItem,
			indexToolStripMenuItem,
			searchToolStripMenuItem,
			toolStripSeparator8,
			aboutToolStripMenuItem});
		helpMenu.Size = new Size (40, 20);
		helpMenu.Text = "&Help";
		// 
		// contentsToolStripMenuItem
		// 
		contentsToolStripMenuItem.ShortcutKeys = ((Keys) ((Keys.Control | Keys.F1)));
		contentsToolStripMenuItem.Size = new Size (173, 22);
		contentsToolStripMenuItem.Text = "&Contents";
		// 
		// indexToolStripMenuItem
		// 
		indexToolStripMenuItem.Image = ((Image) (resources.GetObject ("indexToolStripMenuItem.Image")));
		indexToolStripMenuItem.ImageTransparentColor = Color.Black;
		indexToolStripMenuItem.Size = new Size (173, 22);
		indexToolStripMenuItem.Text = "&Index";
		// 
		// searchToolStripMenuItem
		// 
		searchToolStripMenuItem.Image = ((Image) (resources.GetObject ("searchToolStripMenuItem.Image")));
		searchToolStripMenuItem.ImageTransparentColor = Color.Black;
		searchToolStripMenuItem.Size = new Size (173, 22);
		searchToolStripMenuItem.Text = "&Search";
		// 
		// toolStripSeparator8
		// 
		toolStripSeparator8.Size = new Size (170, 6);
		// 
		// aboutToolStripMenuItem
		// 
		aboutToolStripMenuItem.Size = new Size (173, 22);
		aboutToolStripMenuItem.Text = "&About ...";
		// 
		// toolStrip
		// 
		toolStrip.Items.AddRange (new ToolStripItem [] {
			newToolStripButton,
			openToolStripButton,
			saveToolStripButton,
			toolStripSeparator1,
			printToolStripButton,
			printPreviewToolStripButton,
			helpToolStripButton});
		toolStrip.Location = new Point (0, 24);
		toolStrip.Size = new Size (632, 25);
		toolStrip.TabIndex = 1;
		toolStrip.Text = "ToolStrip";
		// 
		// newToolStripButton
		// 
		newToolStripButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
		newToolStripButton.Image = ((Image) (resources.GetObject ("newToolStripButton.Image")));
		newToolStripButton.ImageTransparentColor = Color.Black;
		newToolStripButton.Text = "New";
		newToolStripButton.Click += new System.EventHandler (ShowNewForm);
		// 
		// openToolStripButton
		// 
		openToolStripButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
		openToolStripButton.Image = ((Image) (resources.GetObject ("openToolStripButton.Image")));
		openToolStripButton.ImageTransparentColor = Color.Black;
		openToolStripButton.Text = "Open";
		openToolStripButton.Click += new System.EventHandler (OpenFile);
		// 
		// saveToolStripButton
		// 
		saveToolStripButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
		saveToolStripButton.Image = ((Image) (resources.GetObject ("saveToolStripButton.Image")));
		saveToolStripButton.ImageTransparentColor = Color.Black;
		saveToolStripButton.Text = "Save";
		// 
		// toolStripSeparator1
		// 

		// 
		// printToolStripButton
		// 
		printToolStripButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
		printToolStripButton.Image = ((Image) (resources.GetObject ("printToolStripButton.Image")));
		printToolStripButton.ImageTransparentColor = Color.Black;
		printToolStripButton.Text = "Print";
		// 
		// printPreviewToolStripButton
		// 
		printPreviewToolStripButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
		printPreviewToolStripButton.Image = ((Image) (resources.GetObject ("printPreviewToolStripButton.Image")));
		printPreviewToolStripButton.ImageTransparentColor = Color.Black;
		printPreviewToolStripButton.Text = "Print Preview";
		// 
		// helpToolStripButton
		// 
		helpToolStripButton.DisplayStyle = ToolStripItemDisplayStyle.Image;
		helpToolStripButton.Image = ((Image) (resources.GetObject ("helpToolStripButton.Image")));
		helpToolStripButton.ImageTransparentColor = Color.Black;
		helpToolStripButton.Text = "Help";
		// 
		// statusStrip
		// 
		statusStrip.Items.Add (toolStripStatusLabel);
		statusStrip.LayoutStyle = ToolStripLayoutStyle.Table;
		statusStrip.Location = new Point (0, 433);
		statusStrip.Size = new Size (632, 20);
		statusStrip.TabIndex = 2;
		statusStrip.Text = "StatusStrip";
		// 
		// toolStripStatusLabel
		// 
		toolStripStatusLabel.Text = "Status";
		// 
		// MainForm
		// 
		AutoScaleDimensions = new SizeF (6F, 13F);
		AutoScaleMode = AutoScaleMode.Font;
		ClientSize = new Size (400, 300);
		Controls.Add (statusStrip);
		Controls.Add (toolStrip);
		Controls.Add (menuStrip);
		IsMdiContainer = true;
		Location = new Point (200, 100);
		MainMenuStrip = menuStrip;
		StartPosition = FormStartPosition.Manual;
		Text = "bug #81477";
		menuStrip.ResumeLayout (false);
		toolStrip.ResumeLayout (false);
		statusStrip.ResumeLayout (false);
		ResumeLayout (false);
		PerformLayout ();
		Load += new EventHandler (MainForm_Load);
	}
Esempio n. 2
0
        private void initControl()
        {
            sB     = new System.Windows.Forms.StatusStrip();
            sB1    = new System.Windows.Forms.ToolStripStatusLabel();
            panel1 = new System.Windows.Forms.Panel();
            sB.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.sB1 });
            sB.Dock = DockStyle.Bottom;
            sB.SuspendLayout();
            panel1.SuspendLayout();
            panel1.Dock     = System.Windows.Forms.DockStyle.Fill;
            panel1.Location = new System.Drawing.Point(0, 0);
            Controls.Add(this.panel1);
            Controls.Add(this.sB);

            grfDept = new C1FlexGrid();

            panel1.Controls.Add(grfDept);

            theme1       = new C1.Win.C1Themes.C1ThemeController();
            theme1.Theme = "Office2013Red";
            theme1.SetTheme(sB, "BeigeOne");
            theme1.SetTheme(panel1, "BeigeOne");

            C1ThemeController.ApplicationTheme = xC.iniC.themeApplication;
            theme1.Theme = C1ThemeController.ApplicationTheme;
            initGrfDept();
            setGrfDeptH();
        }
        public void Layout()
        {
            StatusStrip          ss = new StatusStrip();
            ToolStripStatusLabel label;

            ss.SuspendLayout();
            ss.Items.Add("");
            ss.Items.Add(label = new ToolStripStatusLabel(""));
            ss.Items.Add("");
            ss.ResumeLayout();

            Assert.AreEqual(new Rectangle(0, 0, 200, 22), ss.Bounds);
            Assert.AreEqual(new Rectangle(188, 0, 12, 22), ss.SizeGripBounds);
            Assert.AreEqual(new Size(0, 17), ss.Items[0].Size);
            Assert.AreEqual(new Size(0, 17), label.Size);

            Assert.AreEqual(new Rectangle(1, 3, 0, 17), ss.Items[0].Bounds);
            Assert.AreEqual(new Rectangle(1, 3, 0, 17), ss.Items[1].Bounds);
            Assert.AreEqual(new Rectangle(1, 3, 0, 17), ss.Items[2].Bounds);

            label.Spring = true;

            Assert.AreEqual(new Rectangle(1, 3, 0, 17), ss.Items[0].Bounds);
            Assert.AreEqual(new Rectangle(1, 3, 185, 17), ss.Items[1].Bounds);
            Assert.AreEqual(new Rectangle(186, 3, 0, 17), ss.Items[2].Bounds);
        }
        private void BuildStatusLine()
        {   // 2) set-up GUI-controls:
            statusStrip          = new StatusStrip();
            toolStripStatusLabel = new
                                   ToolStripStatusLabel();
            // freeze layout:
            statusStrip.SuspendLayout();
            SuspendLayout();

            statusStrip.Items.AddRange(
                new ToolStripItem[] {
                toolStripStatusLabel
            });
            statusStrip.Location =
                new Point(0, 248);
            statusStrip.Name     = "statusStrip";
            statusStrip.Size     = new Size(292, 30);
            statusStrip.TabIndex = 0;
            statusStrip.Text     = "statusStrip";

            toolStripStatusLabel.BorderSides = 0;
            toolStripStatusLabel.BorderStyle =
                Border3DStyle.Flat;
            toolStripStatusLabel.IsLink = false;
            toolStripStatusLabel.Name   =
                "toolStripStatusLabel";
            toolStripStatusLabel.Size =
                new Size(246, 28);

            toolStripStatusLabel.Spring = true;
            // fill space
            toolStripStatusLabel.Text      = "";
            toolStripStatusLabel.Alignment =
                ToolStripItemAlignment.Left;
            toolStripStatusLabel.TextAlign =
                ContentAlignment.TopLeft;

            // 3) Insert GUI-control to
            //       Form's ControlCollection
            Controls.Add(statusStrip);
            // defrost layout:
            statusStrip.ResumeLayout(false);
            statusStrip.PerformLayout();

            ResumeLayout(false);
            PerformLayout();
        }
Esempio n. 5
0
 private void LoadStatusStrip()
 {
     statusStrip1          = new System.Windows.Forms.StatusStrip();
     updownLabel           = new System.Windows.Forms.ToolStripStatusLabel();
     toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
     toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
     statusStrip1.SuspendLayout();
     // statusStrip1
     //
     statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
     statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         updownLabel,
         toolStripStatusLabel1,
         toolStripStatusLabel2
     });
     statusStrip1.Location = new System.Drawing.Point(0, 570);
     statusStrip1.Name     = "statusStrip1";
     statusStrip1.Size     = new System.Drawing.Size(471, 25);
     statusStrip1.TabIndex = 44;
     statusStrip1.Text     = "statusStrip1";
     //
     // updownLabel
     //
     updownLabel.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
     updownLabel.ForeColor    = System.Drawing.Color.Gray;
     updownLabel.Name         = "updownLabel";
     updownLabel.Size         = new System.Drawing.Size(173, 20);
     updownLabel.Text         = "▲0KB/s ▼0KB/s";
     //
     // toolStripStatusLabel1
     //
     toolStripStatusLabel1.Name   = "toolStripStatusLabel1";
     toolStripStatusLabel1.Size   = new System.Drawing.Size(51, 20);
     toolStripStatusLabel1.Spring = true;
     //
     // toolStripStatusLabel2
     //
     toolStripStatusLabel2.Font      = new System.Drawing.Font("Microsoft YaHei UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
     toolStripStatusLabel2.ForeColor = System.Drawing.Color.Gray;
     toolStripStatusLabel2.Name      = "toolStripStatusLabel2";
     toolStripStatusLabel2.Size      = new System.Drawing.Size(193, 20);
     toolStripStatusLabel2.Text      = "©Copyright 2020 Krazys. ";
     Controls.Add(statusStrip1);
     statusStrip1.ResumeLayout(false);
     statusStrip1.PerformLayout();
 }
Esempio n. 6
0
 private void InitializeComponent()
 {
     statusStrip1          = new System.Windows.Forms.StatusStrip();
     toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
     statusStrip1.SuspendLayout();
     SuspendLayout();
     //
     // The following code example demonstrates the syntax for setting
     // various StatusStrip properties.
     // <Snippet1>
     statusStrip1.Dock      = System.Windows.Forms.DockStyle.Top;
     statusStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible;
     statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         toolStripStatusLabel1
     });
     statusStrip1.LayoutStyle      = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow;
     statusStrip1.Location         = new System.Drawing.Point(0, 0);
     statusStrip1.Name             = "statusStrip1";
     statusStrip1.ShowItemToolTips = true;
     statusStrip1.Size             = new System.Drawing.Size(292, 22);
     statusStrip1.SizingGrip       = false;
     statusStrip1.Stretch          = false;
     statusStrip1.TabIndex         = 0;
     statusStrip1.Text             = "statusStrip1";
     // </Snippet1>
     //
     // toolStripStatusLabel1
     //
     toolStripStatusLabel1.Name = "toolStripStatusLabel1";
     toolStripStatusLabel1.Size = new System.Drawing.Size(109, 17);
     toolStripStatusLabel1.Text = "toolStripStatusLabel1";
     //
     // Form1
     //
     ClientSize = new System.Drawing.Size(292, 273);
     Controls.Add(statusStrip1);
     Name = "Form1";
     statusStrip1.ResumeLayout(false);
     statusStrip1.PerformLayout();
     ResumeLayout(false);
     PerformLayout();
 }
Esempio n. 7
0
        private void InitializeComponent()
        {
            statusStrip1          = new System.Windows.Forms.StatusStrip();
            toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
            statusStrip1.SuspendLayout();
            SuspendLayout();
            //
            // statusStrip1
            //
            statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
                toolStripStatusLabel1
            });
            statusStrip1.Location = new System.Drawing.Point(0, 248);
            statusStrip1.Name     = "statusStrip1";
            statusStrip1.Size     = new System.Drawing.Size(292, 25);
            statusStrip1.TabIndex = 0;
            statusStrip1.Text     = "statusStrip1";

            //
            // <Snippet1>
            //
            toolStripStatusLabel1.BorderSides = ((System.Windows.Forms.ToolStripStatusLabelBorderSides)((((System.Windows.Forms.ToolStripStatusLabelBorderSides.Left | System.Windows.Forms.ToolStripStatusLabelBorderSides.Top)
                                                                                                          | System.Windows.Forms.ToolStripStatusLabelBorderSides.Right)
                                                                                                         | System.Windows.Forms.ToolStripStatusLabelBorderSides.Bottom)));
            toolStripStatusLabel1.BorderStyle = System.Windows.Forms.Border3DStyle.Raised;
            toolStripStatusLabel1.IsLink      = true;
            toolStripStatusLabel1.Name        = "toolStripStatusLabel1";
            toolStripStatusLabel1.Size        = new System.Drawing.Size(246, 20);
            toolStripStatusLabel1.Spring      = true;
            toolStripStatusLabel1.Text        = "toolStripStatusLabel1";
            toolStripStatusLabel1.Alignment   = ToolStripItemAlignment.Left;
            // </Snippet1>
            // Form1
            //
            ClientSize = new System.Drawing.Size(292, 273);
            Controls.Add(statusStrip1);
            Name = "Form1";
            statusStrip1.ResumeLayout(false);
            statusStrip1.PerformLayout();
            ResumeLayout(false);
            PerformLayout();
        }
Esempio n. 8
0
        private void InitializeComponent()
        {
            _dockedToolStrips = new Dictionary <String, DockedToolStrip>();

            _mainMenuStrip          = new MenuStrip();
            _mainToolStripPanel     = new ToolStripPanel();
            _dockPanel              = new DockPanel();
            _mainStatusStrip        = new StatusStrip();
            _mainStatusStripMessage = new ToolStripStatusLabel();

            _mainStatusStripTimer         = new Timer();
            _mainStatusStripTimer.Enabled = false;
            _mainStatusStripTimer.Tick   +=
                new EventHandler(MainStatusStripTimer_Tick);

            SuspendLayout();
            _mainMenuStrip.SuspendLayout();
            _mainToolStripPanel.SuspendLayout();
            _dockPanel.SuspendLayout();
            _mainStatusStrip.SuspendLayout();

            #region Main Menu

            UI_FILE_MENU                        = new ToolStripMenuItem();
            UI_FILE_MENU_NEW                    = new ToolStripMenuItem();
            UI_FILE_MENU_OPEN                   = new ToolStripMenuItem();
            UI_FILE_MENU_SAVE                   = new ToolStripMenuItem();
            UI_FILE_MENU_SAVE_AS                = new ToolStripMenuItem();
            UI_FILE_MENU_SAVE_ALL               = new ToolStripMenuItem();
            UI_FILE_MENU_RECENT_FILES           = new ToolStripMenuItem();
            UI_FILE_MENU_EXIT                   = new ToolStripMenuItem();
            UI_VIEW_MENU                        = new ToolStripMenuItem();
            UI_VIEW_MENU_TOOLBAR                = new ToolStripMenuItem();
            UI_VIEW_MENU_STATUSBAR              = new ToolStripMenuItem();
            UI_VIEW_MENU_FULLSCREEN             = new ToolStripMenuItem();
            UI_TOOLS_MENU                       = new ToolStripMenuItem();
            UI_TOOLS_MENU_OPTIONS               = new ToolStripMenuItem();
            UI_WINDOW_MENU                      = new ToolStripMenuItem();
            UI_WINDOW_MENU_CLOSE                = new ToolStripMenuItem();
            UI_WINDOW_MENU_CLOSE_ALL            = new ToolStripMenuItem();
            UI_WINDOW_MENU_CLOSE_ALL_BUT_ACTIVE = new ToolStripMenuItem();
            UI_HELP_MENU                        = new ToolStripMenuItem();
            UI_HELP_MENU_ABOUT                  = new ToolStripMenuItem();

            _mainMenuStrip.Location = new Point(0, 0);
            _mainMenuStrip.Name     = "mainMenuStrip";
            _mainMenuStrip.Size     = new Size(692, 24);
            _mainMenuStrip.TabIndex = 0;
            _mainMenuStrip.Text     = "menuStrip1";
            _mainMenuStrip.Items.AddRange(new ToolStripItem[] {
                UI_FILE_MENU,
                UI_VIEW_MENU,
                UI_TOOLS_MENU,
                UI_WINDOW_MENU,
                UI_HELP_MENU
            });

            // UI_FILE_MENU
            UI_FILE_MENU.DropDownItems.AddRange(new ToolStripItem[] {
                UI_FILE_MENU_NEW,
                UI_FILE_MENU_OPEN,
                UI_FILE_MENU_SAVE,
                UI_FILE_MENU_SAVE_AS,
                UI_FILE_MENU_SAVE_ALL
            });

            if (_profile.MRUDocumentListMax > 0)
            {
                UI_FILE_MENU.DropDownItems.Add(UI_FILE_MENU_RECENT_FILES);
            }

            UI_FILE_MENU.DropDownItems.Add(UI_FILE_MENU_EXIT);

            UI_FILE_MENU.Name             = Constants.UI_FILE_MENU;
            UI_FILE_MENU.Text             = Resources.MainFileMenu;
            UI_FILE_MENU.DropDownOpening += new System.EventHandler(UI_FILE_MENU_DropDownOpening);

            // UI_FILE_MENU_NEW
            UI_FILE_MENU_NEW.Image = Resources.New;
            UI_FILE_MENU_NEW.ImageTransparentColor = Color.Fuchsia;
            UI_FILE_MENU_NEW.Name         = Constants.UI_FILE_MENU_NEW;
            UI_FILE_MENU_NEW.ShortcutKeys = ((Keys)((Keys.Control | Keys.N)));
            UI_FILE_MENU_NEW.Text         = Resources.MainFileMenuNew;
            UI_FILE_MENU_NEW.Click       += new System.EventHandler(UI_FILE_MENU_NEW_Click);

            // UI_FILE_MENU_OPEN
            UI_FILE_MENU_OPEN.Image = Resources.Open;
            UI_FILE_MENU_OPEN.ImageTransparentColor = Color.Fuchsia;
            UI_FILE_MENU_OPEN.Name         = Constants.UI_FILE_MENU_OPEN;
            UI_FILE_MENU_OPEN.ShortcutKeys = ((Keys)((Keys.Control | Keys.O)));
            UI_FILE_MENU_OPEN.Text         = Resources.MainFileMenuOpen;
            UI_FILE_MENU_OPEN.Click       += new System.EventHandler(UI_FILE_MENU_OPEN_Click);
            UI_FILE_MENU_OPEN.Tag          = new ToolStripItemTag()
            {
                IncludeSeparator = true
            };

            // UI_FILE_MENU_SAVE
            UI_FILE_MENU_SAVE.Image = Resources.Save;
            UI_FILE_MENU_SAVE.ImageTransparentColor = Color.Fuchsia;
            UI_FILE_MENU_SAVE.Name         = Constants.UI_FILE_MENU_SAVE;
            UI_FILE_MENU_SAVE.ShortcutKeys = ((Keys)((Keys.Control | Keys.S)));
            UI_FILE_MENU_SAVE.Text         = Resources.MainFileMenuSave;
            UI_FILE_MENU_SAVE.Click       += new System.EventHandler(UI_FILE_MENU_SAVE_Click);

            // UI_FILE_MENU_SAVE_AS
            UI_FILE_MENU_SAVE_AS.Name   = Constants.UI_FILE_MENU_SAVE_AS;
            UI_FILE_MENU_SAVE_AS.Text   = Resources.MainFileMenuSaveAs;
            UI_FILE_MENU_SAVE_AS.Click += new System.EventHandler(UI_FILE_MENU_SAVE_AS_Click);

            // UI_FILE_MENU_SAVE_ALL
            UI_FILE_MENU_SAVE_ALL.Image = Resources.SaveAll;
            UI_FILE_MENU_SAVE_ALL.ImageTransparentColor = Color.Fuchsia;
            UI_FILE_MENU_SAVE_ALL.Name         = Constants.UI_FILE_MENU_SAVE_ALL;
            UI_FILE_MENU_SAVE_ALL.ShortcutKeys = ((Keys)(((Keys.Control | Keys.Shift)
                                                          | Keys.S)));
            UI_FILE_MENU_SAVE_ALL.Text   = Resources.MainFileMenuSaveAll;
            UI_FILE_MENU_SAVE_ALL.Click += new System.EventHandler(UI_FILE_MENU_SAVE_ALL_Click);
            UI_FILE_MENU_SAVE_ALL.Tag    = new ToolStripItemTag()
            {
                IncludeSeparator = true
            };

            // UI_FILE_MENU_RECENT_FILES
            UI_FILE_MENU_RECENT_FILES.Name = Constants.UI_FILE_MENU_RECENT_FILES;
            UI_FILE_MENU_RECENT_FILES.Text = Resources.MainFileMenuRecentFiles;
            UI_FILE_MENU_RECENT_FILES.Tag  = new ToolStripItemTag()
            {
                IncludeSeparator = true
            };

            // UI_FILE_MENU_EXIT
            UI_FILE_MENU_EXIT.Name   = Constants.UI_FILE_MENU_EXIT;
            UI_FILE_MENU_EXIT.Text   = Resources.MainFileMenuExit;
            UI_FILE_MENU_EXIT.Click += new System.EventHandler(UI_FILE_MENU_EXIT_Click);
            UI_FILE_MENU_EXIT.Tag    = new ToolStripItemTag()
            {
                IncludeSeparator = true
            };

            // UI_VIEW_MENU
            UI_VIEW_MENU.DropDownItems.AddRange(new ToolStripItem[] {
                UI_VIEW_MENU_TOOLBAR,
                UI_VIEW_MENU_STATUSBAR,
                UI_VIEW_MENU_FULLSCREEN
            });
            UI_VIEW_MENU.Name = Constants.UI_VIEW_MENU;
            UI_VIEW_MENU.Text = Resources.MainViewMenu;

            // UI_VIEW_MENU_TOOLBARS
            UI_VIEW_MENU_TOOLBAR.Name = Constants.UI_VIEW_MENU_TOOLBAR;

            // UI_VIEW_MENU_STATUSBAR
            UI_VIEW_MENU_STATUSBAR.Checked      = true;
            UI_VIEW_MENU_STATUSBAR.CheckOnClick = true;
            UI_VIEW_MENU_STATUSBAR.CheckState   = CheckState.Checked;
            UI_VIEW_MENU_STATUSBAR.Name         = Constants.UI_VIEW_MENU_STATUSBAR;
            UI_VIEW_MENU_STATUSBAR.Text         = Resources.MainViewMenuStatusBar;
            UI_VIEW_MENU_STATUSBAR.Click       += new System.EventHandler(UI_VIEW_MENU_STATUSBAR_Click);
            UI_VIEW_MENU_STATUSBAR.Tag          = new ToolStripItemTag()
            {
                IncludeSeparator = true
            };

            // UI_VIEW_MENU_FULLSCREEN
            UI_VIEW_MENU_FULLSCREEN.Name  = Constants.UI_VIEW_MENU_FULLSCREEN;
            UI_VIEW_MENU_FULLSCREEN.Text  = Resources.MainViewMenuFullScreen;
            UI_VIEW_MENU_FULLSCREEN.Image = Resources.FullScreen;
            UI_VIEW_MENU_FULLSCREEN.ImageTransparentColor = Color.Fuchsia;
            UI_VIEW_MENU_FULLSCREEN.ShortcutKeys          = Keys.F11;
            UI_VIEW_MENU_FULLSCREEN.Click += new System.EventHandler(UI_VIEW_MENU_FULLSCREEN_Click);
            UI_VIEW_MENU_FULLSCREEN.Tag    = new ToolStripItemTag()
            {
                IncludeSeparator = true
            };

            // UI_TOOLS_MENU
            UI_TOOLS_MENU.DropDownItems.AddRange(new ToolStripItem[] {
                UI_TOOLS_MENU_OPTIONS
            });
            UI_TOOLS_MENU.Name = Constants.UI_TOOLS_MENU;
            UI_TOOLS_MENU.Text = Resources.MainToolsMenu;

            // UI_TOOLS_MENU_OPTIONS
            UI_TOOLS_MENU_OPTIONS.Name   = Constants.UI_TOOLS_MENU_OPTIONS;
            UI_TOOLS_MENU_OPTIONS.Text   = Resources.MainToolsMenuOptions;
            UI_TOOLS_MENU_OPTIONS.Click += new System.EventHandler(UI_TOOLS_MENU_OPTIONS_Click);
            UI_TOOLS_MENU_OPTIONS.Tag    = new ToolStripItemTag()
            {
                IncludeSeparator = true
            };

            // UI_WINDOW_MENU
            UI_WINDOW_MENU.DropDownItems.AddRange(new ToolStripItem[] {
                UI_WINDOW_MENU_CLOSE,
                UI_WINDOW_MENU_CLOSE_ALL,
                UI_WINDOW_MENU_CLOSE_ALL_BUT_ACTIVE
            });
            UI_WINDOW_MENU.Name             = Constants.UI_WINDOW_MENU;
            UI_WINDOW_MENU.Text             = Resources.MainWindowMenu;
            UI_WINDOW_MENU.DropDownOpening += new System.EventHandler(UI_WINDOW_MENU_DropDownOpening);

            // UI_WINDOW_MENU_CLOSE
            UI_WINDOW_MENU_CLOSE.Name   = Constants.UI_WINDOW_MENU_CLOSE;
            UI_WINDOW_MENU_CLOSE.Text   = Resources.MainWindowMenuClose;
            UI_WINDOW_MENU_CLOSE.Click += new System.EventHandler(UI_WINDOW_MENU_CLOSE_Click);

            // UI_WINDOW_MENU_CLOSE_ALL
            UI_WINDOW_MENU_CLOSE_ALL.Name   = Constants.UI_WINDOW_MENU_CLOSE_ALL;
            UI_WINDOW_MENU_CLOSE_ALL.Text   = Resources.MainWindowMenuCloseAll;
            UI_WINDOW_MENU_CLOSE_ALL.Click += new System.EventHandler(UI_WINDOW_MENU_CLOSE_ALL_Click);

            // UI_WINDOW_MENU_CLOSE_ALL_BUT_ACTIVE
            UI_WINDOW_MENU_CLOSE_ALL_BUT_ACTIVE.Name   = Constants.UI_WINDOW_MENU_CLOSE_ALL_BUT_ACTIVE;
            UI_WINDOW_MENU_CLOSE_ALL_BUT_ACTIVE.Text   = Resources.MainWindowMenuCloseAllButActive;
            UI_WINDOW_MENU_CLOSE_ALL_BUT_ACTIVE.Click += new System.EventHandler(UI_WINDOW_MENU_CLOSE_ALL_BUT_ACTIVE_Click);
            UI_WINDOW_MENU_CLOSE_ALL_BUT_ACTIVE.Tag    = new ToolStripItemTag()
            {
                IncludeSeparator = true
            };

            // UI_HELP_MENU
            UI_HELP_MENU.DropDownItems.AddRange(new ToolStripItem[] {
                UI_HELP_MENU_ABOUT
            });
            UI_HELP_MENU.Name = Constants.UI_HELP_MENU;
            UI_HELP_MENU.Text = Resources.MainHelpMenu;

            // UI_HELP_MENU_ABOUT
            UI_HELP_MENU_ABOUT.Name   = Constants.UI_HELP_MENU_ABOUT;
            UI_HELP_MENU_ABOUT.Text   = Resources.MainHelpMenuAbout;
            UI_HELP_MENU_ABOUT.Click += new System.EventHandler(UI_HELP_MENU_ABOUT_Click);
            UI_HELP_MENU_ABOUT.Tag    = new ToolStripItemTag()
            {
                IncludeSeparator = true
            };

            #endregion

            #region ToolStrip Panel

            _mainToolStripPanel.Dock = DockStyle.Top;

            #endregion

            #region DockPanel

            DockPanelSkin                   dockPanelSkin1                   = new DockPanelSkin();
            AutoHideStripSkin               autoHideStripSkin1               = new AutoHideStripSkin();
            DockPanelGradient               dockPanelGradient1               = new DockPanelGradient();
            TabGradient                     tabGradient1                     = new TabGradient();
            DockPaneStripSkin               dockPaneStripSkin1               = new DockPaneStripSkin();
            DockPaneStripGradient           dockPaneStripGradient1           = new DockPaneStripGradient();
            TabGradient                     tabGradient2                     = new TabGradient();
            DockPanelGradient               dockPanelGradient2               = new DockPanelGradient();
            TabGradient                     tabGradient3                     = new TabGradient();
            DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient1 = new DockPaneStripToolWindowGradient();
            TabGradient                     tabGradient4                     = new TabGradient();
            TabGradient                     tabGradient5                     = new TabGradient();
            DockPanelGradient               dockPanelGradient3               = new DockPanelGradient();
            TabGradient                     tabGradient6                     = new TabGradient();
            TabGradient                     tabGradient7                     = new TabGradient();

            _dockPanel.ActiveAutoHideContent     = null;
            _dockPanel.AllowEndUserNestedDocking = true;
            _dockPanel.ActiveDocumentChanged    += new System.EventHandler(MainForm_ActiveDocumentChanged);
            _dockPanel.Dock                                          = DockStyle.Fill;
            _dockPanel.DockBackColor                                 = SystemColors.AppWorkspace;
            _dockPanel.Location                                      = new Point(0, 49);
            _dockPanel.Name                                          = "dockPanel";
            _dockPanel.Size                                          = new Size(692, 395);
            dockPanelGradient1.EndColor                              = SystemColors.ControlLight;
            dockPanelGradient1.StartColor                            = SystemColors.ControlLight;
            autoHideStripSkin1.DockStripGradient                     = dockPanelGradient1;
            tabGradient1.EndColor                                    = SystemColors.Control;
            tabGradient1.StartColor                                  = SystemColors.Control;
            tabGradient1.TextColor                                   = SystemColors.ControlDarkDark;
            autoHideStripSkin1.TabGradient                           = tabGradient1;
            dockPanelSkin1.AutoHideStripSkin                         = autoHideStripSkin1;
            tabGradient2.EndColor                                    = SystemColors.ControlLightLight;
            tabGradient2.StartColor                                  = SystemColors.ControlLightLight;
            tabGradient2.TextColor                                   = SystemColors.ControlText;
            dockPaneStripGradient1.ActiveTabGradient                 = tabGradient2;
            dockPanelGradient2.EndColor                              = SystemColors.Control;
            dockPanelGradient2.StartColor                            = SystemColors.Control;
            dockPaneStripGradient1.DockStripGradient                 = dockPanelGradient2;
            tabGradient3.EndColor                                    = SystemColors.ControlLight;
            tabGradient3.StartColor                                  = SystemColors.ControlLight;
            tabGradient3.TextColor                                   = SystemColors.ControlText;
            dockPaneStripGradient1.InactiveTabGradient               = tabGradient3;
            dockPaneStripSkin1.DocumentGradient                      = dockPaneStripGradient1;
            tabGradient4.EndColor                                    = SystemColors.ActiveCaption;
            tabGradient4.LinearGradientMode                          = LinearGradientMode.Vertical;
            tabGradient4.StartColor                                  = SystemColors.GradientActiveCaption;
            tabGradient4.TextColor                                   = SystemColors.ActiveCaptionText;
            dockPaneStripToolWindowGradient1.ActiveCaptionGradient   = tabGradient4;
            tabGradient5.EndColor                                    = SystemColors.Control;
            tabGradient5.StartColor                                  = SystemColors.Control;
            tabGradient5.TextColor                                   = SystemColors.ControlText;
            dockPaneStripToolWindowGradient1.ActiveTabGradient       = tabGradient5;
            dockPanelGradient3.EndColor                              = SystemColors.ControlLight;
            dockPanelGradient3.StartColor                            = SystemColors.ControlLight;
            dockPaneStripToolWindowGradient1.DockStripGradient       = dockPanelGradient3;
            tabGradient6.EndColor                                    = SystemColors.GradientInactiveCaption;
            tabGradient6.LinearGradientMode                          = LinearGradientMode.Vertical;
            tabGradient6.StartColor                                  = SystemColors.GradientInactiveCaption;
            tabGradient6.TextColor                                   = SystemColors.ControlText;
            dockPaneStripToolWindowGradient1.InactiveCaptionGradient = tabGradient6;
            tabGradient7.EndColor                                    = Color.Transparent;
            tabGradient7.StartColor                                  = Color.Transparent;
            tabGradient7.TextColor                                   = SystemColors.ControlDarkDark;
            dockPaneStripToolWindowGradient1.InactiveTabGradient     = tabGradient7;
            dockPaneStripSkin1.ToolWindowGradient                    = dockPaneStripToolWindowGradient1;
            dockPanelSkin1.DockPaneStripSkin                         = dockPaneStripSkin1;
            _dockPanel.Skin                                          = dockPanelSkin1;
            _dockPanel.TabIndex                                      = 3;

            #endregion

            #region Status Bar

            _mainStatusStrip.Location = new Point(0, 444);
            _mainStatusStrip.Name     = "mainStatusStrip";
            _mainStatusStrip.Size     = new Size(692, 22);
            _mainStatusStrip.TabIndex = 1;
            _mainStatusStrip.Text     = "statusStrip1";
            _mainStatusStrip.Items.AddRange(new ToolStripItem[] {
                _mainStatusStripMessage
            });

            _mainStatusStripMessage.Name = "mainStatusBarMessage";
            _mainStatusStripMessage.Size = new Size(0, 17);

            #endregion

            /*
             * MainForm
             */

            AutoScaleDimensions = new SizeF(6F, 13F);
            AutoScaleMode       = AutoScaleMode.Font;
            ClientSize          = new Size(692, 466);
            IsMdiContainer      = true;
            MainMenuStrip       = _mainMenuStrip;
            Name         = "MainForm";
            Text         = "MainForm";
            FormClosing += new FormClosingEventHandler(MainForm_FormClosing);
            AllowDrop    = true;

            if (!_applicationManager.ClientProfile.HaveFlag(
                    ClientFlags.CoreDisableDragAndDropFileOpen))
            {
                DragEnter += new DragEventHandler(MainForm_DragEnter);
                DragDrop  += new DragEventHandler(MainForm_DragDrop);
            }

            // Order is important here
            Controls.Add(_dockPanel);
            Controls.Add(_mainStatusStrip);
            Controls.Add(_mainToolStripPanel);
            Controls.Add(_mainMenuStrip);

            _mainStatusStrip.ResumeLayout(false);
            _mainStatusStrip.PerformLayout();
            _dockPanel.ResumeLayout(false);
            _dockPanel.PerformLayout();
            _mainToolStripPanel.ResumeLayout(false);
            _mainToolStripPanel.PerformLayout();
            _mainMenuStrip.ResumeLayout(false);
            _mainMenuStrip.PerformLayout();

            ResumeLayout(false);
            PerformLayout();
        }
Esempio n. 9
0
 private void InitializeComponent()
 {
     components            = new Container();
     statusStrip1          = new StatusStrip();
     lblStatus             = new ToolStripStatusLabel();
     panel1                = new Panel();
     label1                = new Label();
     contextMenuStrip1     = new ContextMenuStrip(components);
     启用监控ToolStripMenuItem = new ToolStripMenuItem();
     查看日志ToolStripMenuItem = new ToolStripMenuItem();
     查看图表ToolStripMenuItem = new ToolStripMenuItem();
     lvRecords             = new DoubleBufferListView();
     name          = new ColumnHeader();
     value         = new ColumnHeader();
     recordtype    = new ColumnHeader();
     line          = new ColumnHeader();
     status        = new ColumnHeader();
     columnHeader1 = new ColumnHeader();
     columnHeader2 = new ColumnHeader();
     columnHeader3 = new ColumnHeader();
     statusStrip1.SuspendLayout();
     panel1.SuspendLayout();
     contextMenuStrip1.SuspendLayout();
     base.SuspendLayout();
     statusStrip1.Items.AddRange(new ToolStripItem[] { lblStatus });
     statusStrip1.Location = new Point(0, 0x159);
     statusStrip1.Name     = "statusStrip1";
     statusStrip1.Size     = new Size(0x29f, 0x16);
     statusStrip1.TabIndex = 0;
     statusStrip1.Text     = "statusStrip1";
     lblStatus.Name        = "lblStatus";
     lblStatus.Size        = new Size(0x20, 0x11);
     lblStatus.Text        = "就绪";
     panel1.BackColor      = Color.DeepSkyBlue;
     panel1.Controls.Add(label1);
     panel1.Dock      = DockStyle.Top;
     panel1.Location  = new Point(0, 0);
     panel1.Name      = "panel1";
     panel1.Size      = new Size(0x29f, 40);
     panel1.TabIndex  = 6;
     label1.AutoSize  = true;
     label1.Font      = new Font("宋体", 15.75f, FontStyle.Regular, GraphicsUnit.Point, 0);
     label1.ForeColor = Color.White;
     label1.Location  = new Point(12, 9);
     label1.Name      = "label1";
     label1.Size      = new Size(0x5e, 0x15);
     label1.TabIndex  = 1;
     label1.Text      = "宕机监控";
     contextMenuStrip1.Items.AddRange(new ToolStripItem[] { 启用监控ToolStripMenuItem, 查看日志ToolStripMenuItem, 查看图表ToolStripMenuItem });
     contextMenuStrip1.Name       = "contextMenuStrip1";
     contextMenuStrip1.Size       = new Size(0x7d, 70);
     启用监控ToolStripMenuItem.Name   = "启用监控ToolStripMenuItem";
     启用监控ToolStripMenuItem.Size   = new Size(0x7c, 0x16);
     启用监控ToolStripMenuItem.Text   = "启用监控";
     启用监控ToolStripMenuItem.Click += new EventHandler(启用监控ToolStripMenuItem_Click);
     查看日志ToolStripMenuItem.Name   = "查看日志ToolStripMenuItem";
     查看日志ToolStripMenuItem.Size   = new Size(0x7c, 0x16);
     查看日志ToolStripMenuItem.Text   = "查看日志";
     查看日志ToolStripMenuItem.Click += new EventHandler(查看日志ToolStripMenuItem_Click);
     查看图表ToolStripMenuItem.Name   = "查看图表ToolStripMenuItem";
     查看图表ToolStripMenuItem.Size   = new Size(0x7c, 0x16);
     查看图表ToolStripMenuItem.Text   = "查看图表";
     查看图表ToolStripMenuItem.Click += new EventHandler(查看图表ToolStripMenuItem_Click);
     lvRecords.Anchor             = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
     lvRecords.Columns.AddRange(new ColumnHeader[] { name, value, recordtype, line, status, columnHeader1, columnHeader2, columnHeader3 });
     lvRecords.FullRowSelect = true;
     lvRecords.Location      = new Point(0, 0x2a);
     lvRecords.MultiSelect   = false;
     lvRecords.Name          = "lvRecords";
     lvRecords.Size          = new Size(0x29f, 300);
     lvRecords.TabIndex      = 2;
     lvRecords.UseCompatibleStateImageBehavior = false;
     lvRecords.View           = View.Details;
     lvRecords.MouseClick    += new MouseEventHandler(lvRecords_MouseClick);
     name.Text                = "记录名称";
     name.Width               = 100;
     value.Text               = "当前记录值";
     value.Width              = 100;
     recordtype.Text          = "记录类型";
     line.Text                = "线路";
     status.Text              = "状态";
     columnHeader1.Text       = "是否切换";
     columnHeader2.Text       = "备用IP";
     columnHeader2.Width      = 100;
     columnHeader3.Text       = "原始记录值";
     columnHeader3.Width      = 100;
     base.AutoScaleDimensions = new SizeF(6f, 12f);
     base.ClientSize          = new Size(0x29f, 0x16f);
     base.Controls.Add(panel1);
     base.Controls.Add(lvRecords);
     base.Controls.Add(statusStrip1);
     base.Name  = "FMonitor";
     Text       = "宕机监控-DNSPodClientLite";
     base.Load += new EventHandler(FRecordList_Load);
     statusStrip1.ResumeLayout(false);
     statusStrip1.PerformLayout();
     panel1.ResumeLayout(false);
     panel1.PerformLayout();
     contextMenuStrip1.ResumeLayout(false);
     base.ResumeLayout(false);
     base.PerformLayout();
 }
Esempio n. 10
0
        private void Initialize()
        {
            StatusStrip = new StatusStrip();
            MenuStrip   = new MenuStrip();
            LangItem    = new EnumItem <Language>(Language.English);

            StatusStrip.SuspendLayout();
            MenuStrip.SuspendLayout();
            SuspendLayout();


            //
            // StatusStrip
            //
            StatusStrip.Location    = new Point(0, 944);
            StatusStrip.Name        = "StatusStrip";
            StatusStrip.Size        = new Size(1687, 22);
            StatusStrip.TabIndex    = 23;
            StatusStrip.Text        = "StatusStrip";
            StatusStrip.Dock        = DockStyle.Bottom;
            StatusStrip.Font        = new Font("Microsoft Sans Serif", 9.75F, FontStyle.Bold, GraphicsUnit.Point);
            StatusStrip.LayoutStyle = ToolStripLayoutStyle.HorizontalStackWithOverflow;

            //
            // MenuStrip
            //
            MenuStrip.Location = new Point(0, 0);
            MenuStrip.Name     = "MenuStrip";
            MenuStrip.AutoSize = true;
            MenuStrip.TabIndex = 24;
            MenuStrip.Text     = "MenuStrip";
            MenuStrip.Dock     = DockStyle.Top;
            MenuStrip.Items.Add(LangItem.EnumMenuItem);


            //
            // RegisterForm
            //
            AutoScaleDimensions = new SizeF(7F, 15F);
            AutoScaleMode       = AutoScaleMode.Font;
            MinimumSize         = new Size(500, 500);
            StartPosition       = FormStartPosition.CenterScreen;
            Margin     = new Padding(4, 3, 4, 3);
            AutoScroll = true;

            Controls.Add(StatusStrip);
            Controls.Add(MenuStrip);

            MainMenuStrip = MenuStrip;
            Margin        = new Padding(4, 3, 4, 3);
            Name          = "RegisterForm";
            Text          = "RegisterForm";

            StatusStrip.ResumeLayout(false);
            StatusStrip.PerformLayout();

            MenuStrip.ResumeLayout(false);
            MenuStrip.PerformLayout();

            ResumeLayout(false);
            PerformLayout();
        }
Esempio n. 11
0
 private void InitializeComponent()
 {
     menuStrip1                      = new MenuStrip();
     _fileToolStripMenuItem          = new ToolStripMenuItem();
     _openToolStripMenuItem          = new ToolStripMenuItem();
     _saveToolStripMenuItem          = new ToolStripMenuItem();
     _saveAsToolStripMenuItem        = new ToolStripMenuItem();
     _exitToolStripMenuItem          = new ToolStripMenuItem();
     _optionsToolStripMenuItem       = new ToolStripMenuItem();
     _bookmarksToolStripMenuItem     = new ToolStripMenuItem();
     _writeLogFileToolStripMenuItem  = new ToolStripMenuItem();
     _showNodeTypeToolStripMenuItem  = new ToolStripMenuItem();
     _addBookmarkToolStripMenuItem   = new ToolStripMenuItem();
     _editBookmarkToolStripMenuItem  = new ToolStripMenuItem();
     _bookmarkSeparator              = new ToolStripSeparator();
     _testToolStripMenuItem          = new ToolStripMenuItem();
     _runSingleTestToolStripMenuItem = new ToolStripMenuItem();
     _runTestsStripMenuItem          = new ToolStripMenuItem();
     _helpToolStripMenuItem          = new ToolStripMenuItem();
     _aboutToolStripMenuItem         = new ToolStripMenuItem();
     _statusBar                      = new StatusStrip();
     _progressBar                    = new ToolStripProgressBar();
     _statusLabel                    = new ToolStripStatusLabel();
     _editEsfComponent               = new EditEsfComponent();
     menuStrip1.SuspendLayout();
     _statusBar.SuspendLayout();
     SuspendLayout();
     menuStrip1.Items.AddRange(new ToolStripItem[5]
     {
         _fileToolStripMenuItem,
         _bookmarksToolStripMenuItem,
         _optionsToolStripMenuItem,
         _testToolStripMenuItem,
         _helpToolStripMenuItem
     });
     menuStrip1.Location = new Point(0, 0);
     menuStrip1.Name     = "menuStrip1";
     menuStrip1.Size     = new Size(789, 24);
     menuStrip1.TabIndex = 1;
     menuStrip1.Text     = "menuStrip1";
     _fileToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[4]
     {
         _openToolStripMenuItem,
         _saveToolStripMenuItem,
         _saveAsToolStripMenuItem,
         _exitToolStripMenuItem
     });
     _fileToolStripMenuItem.Name      = "_fileToolStripMenuItem";
     _fileToolStripMenuItem.Size      = new Size(37, 20);
     _fileToolStripMenuItem.Text      = "File";
     _openToolStripMenuItem.Name      = "_openToolStripMenuItem";
     _openToolStripMenuItem.Size      = new Size(123, 22);
     _openToolStripMenuItem.Text      = "Open";
     _openToolStripMenuItem.Click    += new EventHandler(openToolStripMenuItem_Click);
     _saveToolStripMenuItem.Enabled   = false;
     _saveToolStripMenuItem.Name      = "_saveToolStripMenuItem";
     _saveToolStripMenuItem.Size      = new Size(123, 22);
     _saveToolStripMenuItem.Text      = "Save";
     _saveToolStripMenuItem.Click    += new EventHandler(saveToolStripMenuItem1_Click);
     _saveAsToolStripMenuItem.Enabled = false;
     _saveAsToolStripMenuItem.Name    = "_saveAsToolStripMenuItem";
     _saveAsToolStripMenuItem.Size    = new Size(123, 22);
     _saveAsToolStripMenuItem.Text    = "Save As...";
     _saveAsToolStripMenuItem.Click  += new EventHandler(saveToolStripMenuItem_Click);
     _exitToolStripMenuItem.Name      = "_exitToolStripMenuItem";
     _exitToolStripMenuItem.Size      = new Size(123, 22);
     _exitToolStripMenuItem.Text      = "Exit";
     _exitToolStripMenuItem.Click    += new EventHandler(exitToolStripMenuItem_Click);
     _bookmarksToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[3]
     {
         _addBookmarkToolStripMenuItem,
         _editBookmarkToolStripMenuItem,
         _bookmarkSeparator
     });
     _bookmarksToolStripMenuItem.Name       = "_bookmarksToolStripMenuItem";
     _bookmarksToolStripMenuItem.Size       = new Size(61, 20);
     _bookmarksToolStripMenuItem.Text       = "Bookmarks";
     _addBookmarkToolStripMenuItem.Enabled  = false;
     _addBookmarkToolStripMenuItem.Name     = "_addBookmarkToolStripMenuItem";
     _addBookmarkToolStripMenuItem.Size     = new Size(164, 22);
     _addBookmarkToolStripMenuItem.Text     = "Add Bookmark";
     _addBookmarkToolStripMenuItem.Click   += new EventHandler(AddBookmark_Click);
     _editBookmarkToolStripMenuItem.Enabled = true;
     _editBookmarkToolStripMenuItem.Name    = "_editBookmarkToolStripMenuItem";
     _editBookmarkToolStripMenuItem.Size    = new Size(164, 22);
     _editBookmarkToolStripMenuItem.Text    = "Edit Bookmarks";
     _editBookmarkToolStripMenuItem.Click  += new EventHandler(EditBookmarks_Click);
     _optionsToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[2]
     {
         _writeLogFileToolStripMenuItem,
         _showNodeTypeToolStripMenuItem
     });
     _optionsToolStripMenuItem.Name = "_optionsToolStripMenuItem";
     _optionsToolStripMenuItem.Size = new Size(61, 20);
     _optionsToolStripMenuItem.Text = "Options";
     _writeLogFileToolStripMenuItem.CheckOnClick = true;
     _writeLogFileToolStripMenuItem.Name         = "_writeLogFileToolStripMenuItem";
     _writeLogFileToolStripMenuItem.Size         = new Size(164, 22);
     _writeLogFileToolStripMenuItem.Text         = "Write Log File";
     _showNodeTypeToolStripMenuItem.CheckOnClick = true;
     _showNodeTypeToolStripMenuItem.Enabled      = false;
     _showNodeTypeToolStripMenuItem.Name         = "_showNodeTypeToolStripMenuItem";
     _showNodeTypeToolStripMenuItem.Size         = new Size(164, 22);
     _showNodeTypeToolStripMenuItem.Text         = "Show Node Type";
     _showNodeTypeToolStripMenuItem.Click       += new EventHandler(showNodeTypeToolStripMenuItem_Click);
     _testToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[2]
     {
         _runSingleTestToolStripMenuItem,
         _runTestsStripMenuItem
     });
     _testToolStripMenuItem.Name            = "_testToolStripMenuItem";
     _testToolStripMenuItem.Size            = new Size(46, 20);
     _testToolStripMenuItem.Text            = "Tests";
     _testToolStripMenuItem.Visible         = false;
     _runSingleTestToolStripMenuItem.Name   = "_runSingleTestToolStripMenuItem";
     _runSingleTestToolStripMenuItem.Size   = new Size(178, 22);
     _runSingleTestToolStripMenuItem.Text   = "Run Load/Save Test";
     _runSingleTestToolStripMenuItem.Click += new EventHandler(runSingleTestToolStripMenuItem_Click);
     _runTestsStripMenuItem.Name            = "_runTestsStripMenuItem";
     _runTestsStripMenuItem.Size            = new Size(178, 22);
     _runTestsStripMenuItem.Text            = "Multiple Tests";
     _runTestsStripMenuItem.Click          += new EventHandler(runTestsToolStripMenuItem_Click);
     _helpToolStripMenuItem.Alignment       = ToolStripItemAlignment.Right;
     _helpToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[1]
     {
         _aboutToolStripMenuItem
     });
     _helpToolStripMenuItem.Name    = "_helpToolStripMenuItem";
     _helpToolStripMenuItem.Size    = new Size(44, 20);
     _helpToolStripMenuItem.Text    = "Help";
     _aboutToolStripMenuItem.Name   = "_aboutToolStripMenuItem";
     _aboutToolStripMenuItem.Size   = new Size(107, 22);
     _aboutToolStripMenuItem.Text   = "About";
     _aboutToolStripMenuItem.Click += new EventHandler(aboutToolStripMenuItem_Click);
     _statusBar.Items.AddRange(new ToolStripItem[2]
     {
         _progressBar,
         _statusLabel
     });
     _statusBar.Location        = new Point(0, 769);
     _statusBar.Name            = "_statusBar";
     _statusBar.Size            = new Size(789, 22);
     _statusBar.TabIndex        = 2;
     _progressBar.Name          = "_progressBar";
     _progressBar.Size          = new Size(100, 16);
     _statusLabel.Name          = "_statusLabel";
     _statusLabel.Size          = new Size(86, 17);
     _statusLabel.Text          = "No File Loaded";
     _editEsfComponent.Dock     = DockStyle.Fill;
     _editEsfComponent.Location = new Point(0, 24);
     _editEsfComponent.Name     = "_editEsfComponent";
     _editEsfComponent.RootNode = null;
     _editEsfComponent.ShowCode = false;
     _editEsfComponent.Size     = new Size(789, 745);
     _editEsfComponent.TabIndex = 3;
     base.AutoScaleDimensions   = new SizeF(6f, 13f);
     base.AutoScaleMode         = AutoScaleMode.Font;
     base.ClientSize            = new Size(789, 791);
     base.Controls.Add(_editEsfComponent);
     base.Controls.Add(_statusBar);
     base.Controls.Add(menuStrip1);
     base.MainMenuStrip = menuStrip1;
     base.Name          = "EditSF";
     Text = "EditSF";
     menuStrip1.ResumeLayout(false);
     menuStrip1.PerformLayout();
     _statusBar.ResumeLayout(false);
     _statusBar.PerformLayout();
     ResumeLayout(false);
     PerformLayout();
 }
Esempio n. 12
0
        private void InitializeComponent()
        {
            var manager = new ComponentResourceManager(typeof(PreviewScreenshot));

            menuStrip1 = new MenuStrip();
            uploadToolStripMenuItem   = new ToolStripMenuItem();
            discardToolStripMenuItem1 = new ToolStripMenuItem();
            pictureBox1           = new PictureBox();
            statusStrip1          = new StatusStrip();
            toolStripProgressBar1 = new ToolStripProgressBar();
            menuStrip1.SuspendLayout();
            ((ISupportInitialize)pictureBox1).BeginInit();
            statusStrip1.SuspendLayout();
            base.SuspendLayout();
            menuStrip1.Items.AddRange(new ToolStripItem[] { uploadToolStripMenuItem, discardToolStripMenuItem1 });
            menuStrip1.Location              = new Point(0, 0);
            menuStrip1.Name                  = "menuStrip1";
            menuStrip1.Size                  = new Size(0x173, 0x18);
            menuStrip1.TabIndex              = 1;
            menuStrip1.Text                  = "menuStrip1";
            uploadToolStripMenuItem.Name     = "uploadToolStripMenuItem";
            uploadToolStripMenuItem.Size     = new Size(0x39, 20);
            uploadToolStripMenuItem.Text     = "Upload";
            uploadToolStripMenuItem.Click   += uploadToolStripMenuItem_Click;
            discardToolStripMenuItem1.Name   = "discardToolStripMenuItem1";
            discardToolStripMenuItem1.Size   = new Size(0x3a, 20);
            discardToolStripMenuItem1.Text   = "Discard";
            discardToolStripMenuItem1.Click += discardToolStripMenuItem1_Click;
            pictureBox1.Dock                 = DockStyle.Fill;
            pictureBox1.Location             = new Point(0, 0x18);
            pictureBox1.Name                 = "pictureBox1";
            pictureBox1.Size                 = new Size(0x173, 0xeb);
            pictureBox1.SizeMode             = PictureBoxSizeMode.CenterImage;
            pictureBox1.TabIndex             = 0;
            pictureBox1.TabStop              = false;
            statusStrip1.Items.AddRange(new ToolStripItem[] { toolStripProgressBar1 });
            statusStrip1.Location       = new Point(0, 0xed);
            statusStrip1.Name           = "statusStrip1";
            statusStrip1.Size           = new Size(0x173, 0x16);
            statusStrip1.TabIndex       = 2;
            statusStrip1.Text           = "statusStrip1";
            toolStripProgressBar1.Name  = "toolStripProgressBar1";
            toolStripProgressBar1.Size  = new Size(100, 0x10);
            toolStripProgressBar1.Style = ProgressBarStyle.Continuous;
            base.AutoScaleDimensions    = new SizeF(6f, 13f);
            base.AutoScaleMode          = AutoScaleMode.Font;
            base.ClientSize             = new Size(0x173, 0x103);
            base.Controls.Add(statusStrip1);
            base.Controls.Add(pictureBox1);
            base.Controls.Add(menuStrip1);
            base.FormBorderStyle = FormBorderStyle.FixedToolWindow;
            base.Icon            = (Icon)manager.GetObject("$this.Icon");
            base.MainMenuStrip   = menuStrip1;
            base.Name            = "PreviewScreenshot";
            Text = "Screenshot Preview";
            menuStrip1.ResumeLayout(false);
            menuStrip1.PerformLayout();
            ((ISupportInitialize)pictureBox1).EndInit();
            statusStrip1.ResumeLayout(false);
            statusStrip1.PerformLayout();
            base.ResumeLayout(false);
            base.PerformLayout();
        }
Esempio n. 13
0
        public FormMain(string[] args)
        {
            _logger = Logger.Get(nameof(FormMain));
            _logger.Trace("constructing the main window...");

            // コントロールのインスタンス生成
            _logger.Trace("creating controls...");
            _mdi_tab       = new MdiChildrenTab();
            _main_menu     = new MenuStrip();
            _tool_menu     = new ToolStrip();
            _status_bar    = new StatusStrip();
            _explorer      = new FileTreeBox(this);
            _terminal      = new TabControlEx();
            _splitter_vert = new Splitter();
            _splitter_hori = new Splitter();

            // レイアウト停止
            _logger.Trace("suspending the control layouts...");
            this.SuspendLayout();
            _mdi_tab.SuspendLayout();
            _main_menu.SuspendLayout();
            _tool_menu.SuspendLayout();
            _status_bar.SuspendLayout();
            _explorer.SuspendLayout();
            _terminal.SuspendLayout();
            _splitter_vert.SuspendLayout();
            _splitter_hori.SuspendLayout();

            {             // MDI親ウィンドウとして設定
                _logger.Trace($"setting the main window as MDI parent...");
                this.IsMdiContainer = true;
                for (int i = 0; i < this.Controls.Count; ++i)
                {
                    if (this.Controls[i] is MdiClient mc)
                    {
                        _mdi_client = mc;
                        break;
                    }
                }
            }

            {             // _mdi_tab
                _logger.Trace($"setting {nameof(_mdi_tab)}...");
                _mdi_tab.Name      = nameof(_mdi_tab);
                _mdi_tab.Dock      = DockStyle.Top;
                _mdi_tab.Size      = new Size(192, 32);
                _mdi_tab.MdiClient = _mdi_client;
                _mdi_tab.Font      = SystemFonts.IconTitleFont;
            }

            this.BuildMenus();
            this.BuildMainMenuItems();
            this.BuildToolMenuItems();
            this.BuildStatusLabels();

            {             // _explorer
                _logger.Trace($"setting {nameof(_explorer)}...");
                _explorer.Name        = nameof(_explorer);
                _explorer.Dock        = DockStyle.Left;
                _explorer.Size        = new Size(200, 200);
                _explorer.BorderStyle = BorderStyle.Fixed3D;
            }

            {             // _terminal
                _logger.Trace($"setting {nameof(_terminal)}...");
                _terminal.Name = nameof(_terminal);
                _terminal.Dock = DockStyle.Bottom;
                _terminal.Size = new Size(200, 200);
            }

            {             // _splitter_vert
                _logger.Trace($"setting {nameof(_splitter_vert)}...");
                _splitter_vert.Name = nameof(_splitter_vert);
                _splitter_vert.Dock = DockStyle.Left;
            }

            {             // _splitter_hori
                _logger.Trace($"setting {nameof(_splitter_hori)}...");
                _splitter_hori.Name = nameof(_splitter_hori);
                _splitter_hori.Dock = DockStyle.Bottom;
            }

            {             // FormMain
                _logger.Trace($"setting {nameof(FormMain)}...");
                this.Name        = nameof(FormMain);
                this.Text        = $"{ASMINFO.Caption} {ASMINFO.Edition}";
                this.Icon        = Libosdev.GetIcon(FormMainRes.Icon);
                this.MinimumSize = new Size(600, 450);
                this.ClientSize  = SettingManager.System.MainWindowPosition.Size;

                if (SettingManager.System.MainWindowPosition.X > -1 &&
                    SettingManager.System.MainWindowPosition.Y > -1)
                {
                    this.StartPosition = FormStartPosition.Manual;
                    this.Location      = SettingManager.System.MainWindowPosition.Location;
                }
            }

            // ToolStrip系コントロールに関する設定
            ToolStripManager.Renderer = new ToolStripRendererEx(new ToolStripColorTable());

            // コントロール登録
            _logger.Trace($"adding controls...");
            this.Controls.Add(_mdi_tab);
            this.Controls.Add(_splitter_hori);
            this.Controls.Add(_splitter_vert);
            this.Controls.Add(_terminal);
            this.Controls.Add(_explorer);
            this.Controls.Add(_status_bar);
            this.Controls.Add(_tool_menu);
            this.Controls.Add(_main_menu);
            this.MainMenuStrip = _main_menu;

            // レイアウト再開
            _logger.Trace("resuming the control layouts...");
            _splitter_hori.ResumeLayout(false);            _splitter_hori.PerformLayout();
            _splitter_vert.ResumeLayout(false);            _splitter_vert.PerformLayout();
            _terminal.ResumeLayout(false);            _terminal.PerformLayout();
            _explorer.ResumeLayout(false);            _explorer.PerformLayout();
            _status_bar.ResumeLayout(false);            _status_bar.PerformLayout();
            _tool_menu.ResumeLayout(false);            _tool_menu.PerformLayout();
            _main_menu.ResumeLayout(false);            _main_menu.PerformLayout();
            _mdi_tab.ResumeLayout(false);            _mdi_tab.PerformLayout();
            this.ResumeLayout(false);            this.PerformLayout();

            _logger.Trace("constructed the main window");
        }
Esempio n. 14
0
 private void InitializeComponent()
 {
     buttonGetData        = new Button();
     textBoxPassword      = new TextBox();
     labelPassword        = new Label();
     textBoxUserName      = new TextBox();
     labelUserName        = new Label();
     textBoxIpAddress     = new TextBox();
     labelIpAddress       = new Label();
     buttonOK             = new Button();
     buttonCancel         = new Button();
     statusStrip          = new StatusStrip();
     toolStripStatusLabel = new ToolStripStatusLabel();
     buttonDetectBoxType  = new Button();
     labelTimeout         = new Label();
     numericUpDownTimeout = new NumericUpDown();
     labelMilliseconds    = new Label();
     statusStrip.SuspendLayout();
     ((ISupportInitialize)(numericUpDownTimeout)).BeginInit();
     SuspendLayout();
     //
     // buttonGetData
     //
     buttonGetData.Anchor   = (((AnchorStyles.Bottom | AnchorStyles.Left)));
     buttonGetData.Location = new Point(8, 112);
     buttonGetData.Name     = "buttonGetData";
     buttonGetData.Size     = new Size(104, 24);
     buttonGetData.TabIndex = 6;
     buttonGetData.Text     = "Get channel list";
     buttonGetData.UseVisualStyleBackColor = true;
     buttonGetData.Click += buttonGetData_Click;
     //
     // textBoxPassword
     //
     textBoxPassword.Anchor = ((((AnchorStyles.Top | AnchorStyles.Left)
                                 | AnchorStyles.Right)));
     textBoxPassword.Location = new Point(88, 56);
     textBoxPassword.Name     = "textBoxPassword";
     textBoxPassword.Size     = new Size(176, 20);
     textBoxPassword.TabIndex = 5;
     //
     // labelPassword
     //
     labelPassword.Location  = new Point(8, 56);
     labelPassword.Name      = "labelPassword";
     labelPassword.Size      = new Size(80, 20);
     labelPassword.TabIndex  = 4;
     labelPassword.Text      = "Password:"******"textBoxUserName";
     textBoxUserName.Size     = new Size(176, 20);
     textBoxUserName.TabIndex = 3;
     //
     // labelUserName
     //
     labelUserName.Location  = new Point(8, 32);
     labelUserName.Name      = "labelUserName";
     labelUserName.Size      = new Size(80, 20);
     labelUserName.TabIndex  = 2;
     labelUserName.Text      = "User name:";
     labelUserName.TextAlign = ContentAlignment.MiddleLeft;
     //
     // textBoxIpAddress
     //
     textBoxIpAddress.Anchor = ((((AnchorStyles.Top | AnchorStyles.Left)
                                  | AnchorStyles.Right)));
     textBoxIpAddress.Location = new Point(88, 8);
     textBoxIpAddress.Name     = "textBoxIpAddress";
     textBoxIpAddress.Size     = new Size(176, 20);
     textBoxIpAddress.TabIndex = 1;
     //
     // labelIpAddress
     //
     labelIpAddress.Location  = new Point(8, 8);
     labelIpAddress.Name      = "labelIpAddress";
     labelIpAddress.Size      = new Size(80, 20);
     labelIpAddress.TabIndex  = 0;
     labelIpAddress.Text      = "IP address:";
     labelIpAddress.TextAlign = ContentAlignment.MiddleLeft;
     //
     // buttonOK
     //
     buttonOK.Anchor   = (((AnchorStyles.Bottom | AnchorStyles.Right)));
     buttonOK.Location = new Point(128, 144);
     buttonOK.Name     = "buttonOK";
     buttonOK.Size     = new Size(64, 24);
     buttonOK.TabIndex = 7;
     buttonOK.Text     = "OK";
     buttonOK.UseVisualStyleBackColor = true;
     buttonOK.Click += buttonOK_Click;
     //
     // buttonCancel
     //
     buttonCancel.Anchor                  = (((AnchorStyles.Bottom | AnchorStyles.Right)));
     buttonCancel.DialogResult            = DialogResult.Cancel;
     buttonCancel.Location                = new Point(200, 144);
     buttonCancel.Name                    = "buttonCancel";
     buttonCancel.Size                    = new Size(64, 24);
     buttonCancel.TabIndex                = 8;
     buttonCancel.Text                    = "Cancel";
     buttonCancel.UseVisualStyleBackColor = true;
     buttonCancel.Click                  += buttonCancel_Click;
     //
     // statusStrip
     //
     statusStrip.Items.AddRange(new ToolStripItem[]
     {
         toolStripStatusLabel
     });
     statusStrip.Location = new Point(0, 177);
     statusStrip.Name     = "statusStrip";
     statusStrip.Size     = new Size(272, 22);
     statusStrip.TabIndex = 9;
     //
     // toolStripStatusLabel
     //
     toolStripStatusLabel.Name = "toolStripStatusLabel";
     toolStripStatusLabel.Size = new Size(0, 17);
     //
     // buttonDetectBoxType
     //
     buttonDetectBoxType.Anchor   = (((AnchorStyles.Bottom | AnchorStyles.Left)));
     buttonDetectBoxType.Location = new Point(8, 144);
     buttonDetectBoxType.Name     = "buttonDetectBoxType";
     buttonDetectBoxType.Size     = new Size(104, 24);
     buttonDetectBoxType.TabIndex = 10;
     buttonDetectBoxType.Text     = "Redetect box";
     buttonDetectBoxType.UseVisualStyleBackColor = true;
     buttonDetectBoxType.Click += buttonDetectBoxType_Click;
     //
     // labelTimeout
     //
     labelTimeout.Location  = new Point(8, 80);
     labelTimeout.Name      = "labelTimeout";
     labelTimeout.Size      = new Size(80, 20);
     labelTimeout.TabIndex  = 11;
     labelTimeout.Text      = "Timeout:";
     labelTimeout.TextAlign = ContentAlignment.MiddleLeft;
     //
     // numericUpDownTimeout
     //
     numericUpDownTimeout.Anchor = ((((AnchorStyles.Top | AnchorStyles.Left)
                                      | AnchorStyles.Right)));
     numericUpDownTimeout.Increment = new decimal(new int[]
     {
         500,
         0,
         0,
         0
     });
     numericUpDownTimeout.Location = new Point(88, 80);
     numericUpDownTimeout.Maximum  = new decimal(new int[]
     {
         60000,
         0,
         0,
         0
     });
     numericUpDownTimeout.Minimum = new decimal(new int[]
     {
         1000,
         0,
         0,
         0
     });
     numericUpDownTimeout.Name      = "numericUpDownTimeout";
     numericUpDownTimeout.Size      = new Size(144, 20);
     numericUpDownTimeout.TabIndex  = 12;
     numericUpDownTimeout.TextAlign = HorizontalAlignment.Center;
     numericUpDownTimeout.Value     = new decimal(new int[]
     {
         2000,
         0,
         0,
         0
     });
     //
     // labelMilliseconds
     //
     labelMilliseconds.Anchor    = (((AnchorStyles.Top | AnchorStyles.Right)));
     labelMilliseconds.Location  = new Point(232, 80);
     labelMilliseconds.Name      = "labelMilliseconds";
     labelMilliseconds.Size      = new Size(32, 20);
     labelMilliseconds.TabIndex  = 13;
     labelMilliseconds.Text      = "ms";
     labelMilliseconds.TextAlign = ContentAlignment.MiddleCenter;
     //
     // SetupForm
     //
     ClientSize = new Size(272, 199);
     Controls.Add(labelMilliseconds);
     Controls.Add(numericUpDownTimeout);
     Controls.Add(labelTimeout);
     Controls.Add(buttonDetectBoxType);
     Controls.Add(statusStrip);
     Controls.Add(buttonGetData);
     Controls.Add(buttonCancel);
     Controls.Add(buttonOK);
     Controls.Add(labelIpAddress);
     Controls.Add(textBoxIpAddress);
     Controls.Add(labelUserName);
     Controls.Add(textBoxUserName);
     Controls.Add(textBoxPassword);
     Controls.Add(labelPassword);
     FormBorderStyle = FormBorderStyle.FixedSingle;
     MinimizeBox     = false;
     MinimumSize     = new Size(278, 200);
     Name            = "SetupForm";
     ShowIcon        = false;
     StartPosition   = FormStartPosition.CenterScreen;
     Text            = "Dbox Tuner Setup";
     statusStrip.ResumeLayout(false);
     statusStrip.PerformLayout();
     ((ISupportInitialize)(numericUpDownTimeout)).EndInit();
     ResumeLayout(false);
     PerformLayout();
 }
Esempio n. 15
0
 private void InitializeComponent()
 {
     components         = new Container();
     txtPath            = new TextBox();
     btnBrwDic          = new Button();
     fbdSelect          = new FolderBrowserDialog();
     btnRefresh         = new Button();
     btnFlash           = new Button();
     devicelist         = new ListView();
     clnID              = new ColumnHeader();
     clnDevice          = new ColumnHeader();
     clnProgress        = new ColumnHeader();
     clnTime            = new ColumnHeader();
     clnStatus          = new ColumnHeader();
     clnResult          = new ColumnHeader();
     txtLog             = new RichTextBox();
     timer_updateStatus = new System.Windows.Forms.Timer(components);
     statusStrp         = new StatusStrip();
     statusLblMsg       = new ToolStripStatusLabel();
     statusTab          = new ToolStripStatusLabel();
     rdoCleanAll        = new RadioStripItem();
     rdoSaveUserData    = new RadioStripItem();
     rdoCleanAllAndLock = new RadioStripItem();
     lblMD5             = new Label();
     menuStrip1         = new MenuStrip();
     miConfiguration    = new ToolStripMenuItem();
     miFlashConfigurationToolStripMenuItem = new ToolStripMenuItem();
     statusStrp.SuspendLayout();
     menuStrip1.SuspendLayout();
     SuspendLayout();
     //
     // txtPath
     //
     txtPath.Anchor = (((AnchorStyles.Top | AnchorStyles.Bottom)
                        | AnchorStyles.Left)
                       | AnchorStyles.Right);
     txtPath.Location = new Point(98, 33);
     txtPath.Name     = "txtPath";
     txtPath.Size     = new Size(668, 20);
     txtPath.TabIndex = 0;
     //
     // btnBrwDic
     //
     btnBrwDic.Location = new Point(21, 31);
     btnBrwDic.Name     = "btnBrwDic";
     btnBrwDic.Size     = new Size(75, 23);
     btnBrwDic.TabIndex = 1;
     btnBrwDic.Text     = "Pilih";
     btnBrwDic.UseVisualStyleBackColor = true;
     btnBrwDic.Click += new EventHandler(btnBrwDic_Click);
     //
     // fbdSelect
     //
     fbdSelect.Description = "Pilih Folder SW";
     //
     // btnRefresh
     //
     btnRefresh.Anchor   = (AnchorStyles.Top | AnchorStyles.Right);
     btnRefresh.Location = new Point(831, 29);
     btnRefresh.Name     = "btnRefresh";
     btnRefresh.Size     = new Size(75, 23);
     btnRefresh.TabIndex = 2;
     btnRefresh.Text     = "Refresh";
     btnRefresh.UseVisualStyleBackColor = true;
     btnRefresh.Click += new EventHandler(btnRefresh_Click);
     //
     // btnFlash
     //
     btnFlash.Anchor   = (AnchorStyles.Top | AnchorStyles.Right);
     btnFlash.Location = new Point(951, 28);
     btnFlash.Name     = "btnFlash";
     btnFlash.Size     = new Size(75, 23);
     btnFlash.TabIndex = 3;
     btnFlash.Text     = "flash";
     btnFlash.UseVisualStyleBackColor = true;
     btnFlash.Click += new EventHandler(btnFlash_Click);
     //
     // devicelist
     //
     devicelist.Anchor = (AnchorStyles.Top | AnchorStyles.Bottom
                          | AnchorStyles.Left
                          | AnchorStyles.Right);
     devicelist.Columns.AddRange(new ColumnHeader[] {
         clnID,
         clnDevice,
         clnProgress,
         clnTime,
         clnStatus,
         clnResult
     });
     devicelist.GridLines = true;
     devicelist.Location  = new Point(21, 86);
     devicelist.Name      = "devicelist";
     devicelist.Size      = new Size(1005, 316);
     devicelist.TabIndex  = 4;
     devicelist.UseCompatibleStateImageBehavior = false;
     devicelist.View = View.Details;
     devicelist.ColumnWidthChanging += new ColumnWidthChangingEventHandler(devicelist_ColumnWidthChanging);
     //
     // clnID
     //
     clnID.Text = "ID";
     //
     // clnDevice
     //
     clnDevice.Text  = "Kenzo";
     clnDevice.Width = 90;
     //
     // clnProgress
     //
     clnProgress.Text  = "Progres";
     clnProgress.Width = 107;
     //
     // clnTime
     //
     clnTime.Text = "Waktu";
     //
     // clnStatus
     //
     clnStatus.Text  = "Status";
     clnStatus.Width = 500;
     //
     // clnResult
     //
     clnResult.Text  = "Hasil";
     clnResult.Width = 126;
     //
     // txtLog
     //
     txtLog.Location = new Point(37, 421);
     txtLog.Name     = "txtLog";
     txtLog.Size     = new Size(949, 65);
     txtLog.TabIndex = 6;
     txtLog.Text     = "";
     txtLog.Visible  = false;
     //
     // timer_updateStatus
     //
     timer_updateStatus.Interval = 1000;
     timer_updateStatus.Tick    += new EventHandler(timer_updateStatus_Tick);
     //
     // statusStrp
     //
     statusStrp.Items.AddRange(new ToolStripItem[] {
         statusLblMsg,
         statusTab,
         rdoCleanAll,
         rdoSaveUserData,
         rdoCleanAllAndLock
     });
     statusStrp.Location = new Point(0, 422);
     statusStrp.Name     = "statusStrp";
     statusStrp.Size     = new Size(1094, 22);
     statusStrp.TabIndex = 7;
     statusStrp.Text     = "statusStrip1";
     //
     // statusLblMsg
     //
     statusLblMsg.Name = "statusLblMsg";
     statusLblMsg.Size = new System.Drawing.Size(0, 17);
     //
     // statusTab
     //
     statusTab.Name   = "statusTab";
     statusTab.Size   = new System.Drawing.Size(708, 17);
     statusTab.Spring = true;
     //
     // rdoCleanAll
     //
     rdoCleanAll.IsChecked = false;
     rdoCleanAll.Name      = "rdoCleanAll";
     rdoCleanAll.Size      = new System.Drawing.Size(98, 20);
     rdoCleanAll.Text      = "Hapus Semua";
     //
     // rdoSaveUserData
     //
     rdoSaveUserData.IsChecked = true;
     rdoSaveUserData.Name      = "rdoSaveUserData";
     rdoSaveUserData.Size      = new System.Drawing.Size(118, 20);
     rdoSaveUserData.Text      = "Simpan Data User";
     //
     // rdoCleanAllAndLock
     //
     rdoCleanAllAndLock.IsChecked = false;
     rdoCleanAllAndLock.Name      = "rdoCleanAllAndLock";
     rdoCleanAllAndLock.Size      = new System.Drawing.Size(155, 20);
     rdoCleanAllAndLock.Text      = "Hapus Semua Dan Kunci";
     //
     // lblMD5
     //
     lblMD5.AutoSize = true;
     lblMD5.Location = new System.Drawing.Point(96, 68);
     lblMD5.Name     = "lblMD5";
     lblMD5.Size     = new System.Drawing.Size(0, 13);
     lblMD5.TabIndex = 8;
     //
     // menuStrip1
     //
     menuStrip1.BackColor = SystemColors.ControlLight;
     menuStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Visible;
     menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
         miConfiguration
     });
     menuStrip1.Location   = new System.Drawing.Point(0, 0);
     menuStrip1.Name       = "menuStrip1";
     menuStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
     menuStrip1.Size       = new System.Drawing.Size(1094, 24);
     menuStrip1.TabIndex   = 9;
     menuStrip1.Text       = "menuStrip1";
     //
     // miConfiguration
     //
     miConfiguration.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
         miFlashConfigurationToolStripMenuItem
     });
     miConfiguration.Name = "miConfiguration";
     miConfiguration.Size = new System.Drawing.Size(93, 20);
     miConfiguration.Text = "Configuration";
     //
     // miFlashConfigurationToolStripMenuItem
     //
     miFlashConfigurationToolStripMenuItem.Name   = "miFlashConfigurationToolStripMenuItem";
     miFlashConfigurationToolStripMenuItem.Size   = new Size(178, 22);
     miFlashConfigurationToolStripMenuItem.Text   = "Konfigurasi MiFlash";
     miFlashConfigurationToolStripMenuItem.Click += new EventHandler(miFlashConfigurationToolStripMenuItem_Click);
     //
     // MainFrm
     //
     ClientSize = new Size(1094, 444);
     Controls.Add(lblMD5);
     Controls.Add(statusStrp);
     Controls.Add(menuStrip1);
     Controls.Add(txtLog);
     Controls.Add(devicelist);
     Controls.Add(btnFlash);
     Controls.Add(btnRefresh);
     Controls.Add(btnBrwDic);
     Controls.Add(txtPath);
     MainMenuStrip = menuStrip1;
     Name          = "MainFrm";
     StartPosition = FormStartPosition.CenterScreen;
     Text          = "XiaoMiFlash(Beta)";
     FormClosing  += new FormClosingEventHandler(MainFrm_FormClosing);
     FormClosed   += new FormClosedEventHandler(MainFrm_FormClosed);
     Load         += new EventHandler(MainFrm_Load);
     statusStrp.ResumeLayout(false);
     statusStrp.PerformLayout();
     menuStrip1.ResumeLayout(false);
     menuStrip1.PerformLayout();
     ResumeLayout(false);
     PerformLayout();
 }
Esempio n. 16
0
        private void InitializeComponent()
        {
            this.components = new Container();
            ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(MainForm));

            this.toolStripStatusAlarm = new ToolStripStatusLabel();
            this.MainMenuOpTool       = new MainMenu(this.components);
            this.menuItem1            = new MenuItem();
            this.MenuItemAboutMe      = new MenuItem();
            this.menuItem3            = new MenuItem();
            this.MenuItemClose        = new MenuItem();
            this.menuItem5            = new MenuItem();
            this.MenuItemUser         = new MenuItem();
            this.menuItem4            = new MenuItem();
            this.MenuItemHelp         = new MenuItem();
            this.imageListToolIcon    = new ImageList(this.components);
            this.toolStrip            = new ToolStrip();
            this.TSBUser   = new ToolStripButton();
            this.TSBServer = new ToolStripButton();
            StatusStrip          statusStrip          = new StatusStrip();
            ToolStripStatusLabel toolStripStatusLabel = new ToolStripStatusLabel();

            statusStrip.SuspendLayout();
            this.toolStrip.SuspendLayout();
            base.SuspendLayout();
            statusStrip.Items.AddRange(new ToolStripItem[]
            {
                toolStripStatusLabel,
                this.toolStripStatusAlarm
            });
            statusStrip.Location                            = new Point(0, 678);
            statusStrip.Name                                = "statusStrip";
            statusStrip.Size                                = new Size(1016, 22);
            statusStrip.TabIndex                            = 2;
            statusStrip.Text                                = "statusStrip1";
            toolStripStatusLabel.Name                       = "toolStripStatusLabel1";
            toolStripStatusLabel.Size                       = new Size(985, 17);
            toolStripStatusLabel.Spring                     = true;
            this.toolStripStatusAlarm.BorderStyle           = Border3DStyle.SunkenInner;
            this.toolStripStatusAlarm.DisplayStyle          = ToolStripItemDisplayStyle.Image;
            this.toolStripStatusAlarm.Image                 = Properties.Resources.alarmon;
            this.toolStripStatusAlarm.ImageTransparentColor = Color.White;
            this.toolStripStatusAlarm.Name                  = "toolStripStatusAlarm";
            this.toolStripStatusAlarm.Size                  = new Size(16, 17);
            this.toolStripStatusAlarm.Text                  = "alarm";
            this.toolStripStatusAlarm.ToolTipText           = "Turn the alarm on or off.";
            this.toolStripStatusAlarm.Click                += new EventHandler(this.toolStripStatusAlarm_Click);
            this.MainMenuOpTool.MenuItems.AddRange(new MenuItem[]
            {
                this.menuItem1,
                this.menuItem5,
                this.menuItem4
            });
            this.menuItem1.Index = 0;
            this.menuItem1.MenuItems.AddRange(new MenuItem[]
            {
                this.MenuItemAboutMe,
                this.menuItem3,
                this.MenuItemClose
            });
            this.menuItem1.Text         = "File (F)";
            this.MenuItemAboutMe.Index  = 0;
            this.MenuItemAboutMe.Text   = "My info (A)";
            this.MenuItemAboutMe.Click += new EventHandler(this.MenuItemAboutMe_Click);
            this.menuItem3.Index        = 1;
            this.menuItem3.Text         = "-";
            this.MenuItemClose.Index    = 2;
            this.MenuItemClose.Text     = "Exit(X)";
            this.MenuItemClose.Click   += new EventHandler(this.MenuItemClose_Click);
            this.menuItem5.Index        = 1;
            this.menuItem5.MenuItems.AddRange(new MenuItem[]
            {
                this.MenuItemUser
            });
            this.menuItem5.Text      = "Management(M)";
            this.MenuItemUser.Index  = 0;
            this.MenuItemUser.Text   = "Operation tool user management(U)";
            this.MenuItemUser.Click += new EventHandler(this.MenuItemUser_Click);
            this.menuItem4.Index     = 2;
            this.menuItem4.MenuItems.AddRange(new MenuItem[]
            {
                this.MenuItemHelp
            });
            this.menuItem4.Text        = "Help(H)";
            this.MenuItemHelp.Index    = 0;
            this.MenuItemHelp.Shortcut = Shortcut.F1;
            this.MenuItemHelp.Text     = "Help(H)";
            this.MenuItemHelp.Click   += new EventHandler(this.MenuItemHelp_Click);

            this.imageListToolIcon.ImageStream      = imageListToolIcon.ImageStream;
            this.imageListToolIcon.TransparentColor = Color.White;
            //this.imageListToolIcon.Images.SetKeyName(0, "RCSControl.bmp");
            //this.imageListToolIcon.Images.SetKeyName(1, "UserMonitor.bmp");
            this.toolStrip.BackColor = SystemColors.Control;
            this.toolStrip.GripStyle = ToolStripGripStyle.Hidden;
            this.toolStrip.Items.AddRange(new ToolStripItem[]
            {
                this.TSBServer,
                this.TSBUser
            });
            this.toolStrip.Location            = new Point(0, 0);
            this.toolStrip.Name                = "toolStrip";
            this.toolStrip.Size                = new Size(1016, 25);
            this.toolStrip.TabIndex            = 4;
            this.toolStrip.Text                = "toolStrip1";
            this.TSBUser.AutoSize              = false;
            this.TSBUser.BackColor             = SystemColors.Control;
            this.TSBUser.Image                 = Properties.Resources.TSBUser_Image;
            this.TSBUser.ImageTransparentColor = Color.White;
            this.TSBUser.Name                    = "TSBUser";
            this.TSBUser.Size                    = new Size(83, 22);
            this.TSBUser.Text                    = "User situation";
            this.TSBUser.Click                  += new EventHandler(this.TSBUser_Click);
            this.TSBServer.AutoSize              = false;
            this.TSBServer.BackColor             = SystemColors.Control;
            this.TSBServer.Image                 = Properties.Resources.TSBServer_Image;
            this.TSBServer.ImageTransparentColor = Color.White;
            this.TSBServer.Name                  = "TSBServer";
            this.TSBServer.Size                  = new Size(83, 22);
            this.TSBServer.Text                  = "Server status";
            this.TSBServer.Click                += new EventHandler(this.TSBServer_Click);
            this.AutoScaleBaseSize               = new Size(6, 14);
            base.ClientSize = new Size(1016, 700);
            base.Controls.Add(this.toolStrip);
            base.Controls.Add(statusStrip);
            base.Icon              = Properties.Resources.this_Icon;
            base.IsMdiContainer    = true;
            base.Menu              = this.MainMenuOpTool;
            base.Name              = "MainForm";
            this.Text              = "Hero War Operation Tool";
            base.MdiChildActivate += new EventHandler(this.MainForm_MdiChildActivate);
            base.Closing          += new CancelEventHandler(this.MainForm_Closing);
            statusStrip.ResumeLayout(false);
            statusStrip.PerformLayout();
            this.toolStrip.ResumeLayout(false);
            this.toolStrip.PerformLayout();
            base.ResumeLayout(false);
            base.PerformLayout();
        }
Esempio n. 17
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(離線列印Client程式.frmMain));
     SS_Status               = new System.Windows.Forms.StatusStrip();
     lblStatus               = new System.Windows.Forms.ToolStripStatusLabel();
     pbStatus                = new System.Windows.Forms.ToolStripProgressBar();
     menuStrip1              = new System.Windows.Forms.MenuStrip();
     伺服器ToolStripMenuItem    = new System.Windows.Forms.ToolStripMenuItem();
     列印ToolStripMenuItem     = new System.Windows.Forms.ToolStripMenuItem();
     menuItemVersion         = new System.Windows.Forms.ToolStripMenuItem();
     參數設定ToolStripMenuItem   = new System.Windows.Forms.ToolStripMenuItem();
     lblProducerName         = new System.Windows.Forms.Label();
     清除歷史資料ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     SS_Status.SuspendLayout();
     menuStrip1.SuspendLayout();
     SuspendLayout();
     SS_Status.Items.AddRange(new System.Windows.Forms.ToolStripItem[2]
     {
         lblStatus,
         pbStatus
     });
     SS_Status.Location     = new System.Drawing.Point(0, 430);
     SS_Status.Name         = "SS_Status";
     SS_Status.Size         = new System.Drawing.Size(747, 22);
     SS_Status.TabIndex     = 1;
     SS_Status.Text         = "statusStrip1";
     lblStatus.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
     lblStatus.Name         = "lblStatus";
     lblStatus.RightToLeft  = System.Windows.Forms.RightToLeft.No;
     lblStatus.Size         = new System.Drawing.Size(0, 17);
     lblStatus.TextAlign    = System.Drawing.ContentAlignment.MiddleRight;
     pbStatus.Name          = "pbStatus";
     pbStatus.Size          = new System.Drawing.Size(200, 16);
     menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[5]
     {
         伺服器ToolStripMenuItem,
         列印ToolStripMenuItem,
         menuItemVersion,
         參數設定ToolStripMenuItem,
         清除歷史資料ToolStripMenuItem
     });
     menuStrip1.Location            = new System.Drawing.Point(0, 0);
     menuStrip1.Name                = "menuStrip1";
     menuStrip1.Size                = new System.Drawing.Size(747, 24);
     menuStrip1.TabIndex            = 2;
     menuStrip1.Text                = "menuStrip1";
     伺服器ToolStripMenuItem.Name      = "伺服器ToolStripMenuItem";
     伺服器ToolStripMenuItem.Size      = new System.Drawing.Size(101, 20);
     伺服器ToolStripMenuItem.Text      = "取得可列印標籤";
     伺服器ToolStripMenuItem.Click    += new System.EventHandler(伺服器ToolStripMenuItem_Click);
     列印ToolStripMenuItem.Name       = "列印ToolStripMenuItem";
     列印ToolStripMenuItem.Size       = new System.Drawing.Size(65, 20);
     列印ToolStripMenuItem.Text       = "列印標籤";
     列印ToolStripMenuItem.Click     += new System.EventHandler(列印ToolStripMenuItem_Click);
     menuItemVersion.Alignment      = System.Windows.Forms.ToolStripItemAlignment.Right;
     menuItemVersion.Margin         = new System.Windows.Forms.Padding(0, 0, 50, 0);
     menuItemVersion.Name           = "menuItemVersion";
     menuItemVersion.Size           = new System.Drawing.Size(65, 20);
     menuItemVersion.Text           = "版本資訊";
     menuItemVersion.Visible        = false;
     參數設定ToolStripMenuItem.Name     = "參數設定ToolStripMenuItem";
     參數設定ToolStripMenuItem.Size     = new System.Drawing.Size(65, 20);
     參數設定ToolStripMenuItem.Text     = "參數設定";
     參數設定ToolStripMenuItem.Click   += new System.EventHandler(參數設定ToolStripMenuItem_Click);
     lblProducerName.BackColor      = System.Drawing.Color.Transparent;
     lblProducerName.Font           = new System.Drawing.Font("標楷體", 20.25f, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 136);
     lblProducerName.Location       = new System.Drawing.Point(410, 172);
     lblProducerName.Name           = "lblProducerName";
     lblProducerName.Size           = new System.Drawing.Size(283, 122);
     lblProducerName.TabIndex       = 3;
     lblProducerName.Text           = "廠商名…";
     清除歷史資料ToolStripMenuItem.Name   = "清除歷史資料ToolStripMenuItem";
     清除歷史資料ToolStripMenuItem.Size   = new System.Drawing.Size(89, 20);
     清除歷史資料ToolStripMenuItem.Text   = "清除歷史資料";
     清除歷史資料ToolStripMenuItem.Click += new System.EventHandler(清除歷史資料ToolStripMenuItem_Click);
     base.AutoScaleDimensions       = new System.Drawing.SizeF(6f, 12f);
     base.AutoScaleMode             = System.Windows.Forms.AutoScaleMode.Font;
     BackgroundImage                = 離線列印Client程式.Properties.Resources.login_bg;
     base.ClientSize                = new System.Drawing.Size(747, 452);
     base.Controls.Add(lblProducerName);
     base.Controls.Add(SS_Status);
     base.Controls.Add(menuStrip1);
     base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
     base.Icon            = (System.Drawing.Icon)resources.GetObject("$this.Icon");
     base.MainMenuStrip   = menuStrip1;
     base.MaximizeBox     = false;
     base.Name            = "frmMain";
     base.SizeGripStyle   = System.Windows.Forms.SizeGripStyle.Hide;
     base.StartPosition   = System.Windows.Forms.FormStartPosition.CenterScreen;
     Text        = "行政院農委會 產銷履歷標籤列印程式";
     base.Load  += new System.EventHandler(frmMain_Load);
     base.Shown += new System.EventHandler(frmMain_Shown);
     SS_Status.ResumeLayout(false);
     SS_Status.PerformLayout();
     menuStrip1.ResumeLayout(false);
     menuStrip1.PerformLayout();
     ResumeLayout(false);
     PerformLayout();
 }
Esempio n. 18
0
        private void InitializeComponent()
        {
            components = new Container();
            ComponentResourceManager resources = new ComponentResourceManager(typeof(MainWindow));

            #region CreateNewItems
            //MainWindow
            panelMain       = new Panel();
            menuBar         = new StatusStrip();
            btnWorkMode     = new ToolStripDropDownButton();
            miCameraCapture = new ToolStripMenuItem();
            miVideoCapture  = new ToolStripMenuItem();
            miImageCapture  = new ToolStripMenuItem();
            //TabControl
            tabCtrlMain     = new TabControl();
            tpHomePage      = new TabPage();
            tpCameraCapture = new TabPage();
            tpVideoCapture  = new TabPage();
            tpImageCapture  = new TabPage();
            //CameraPage
            btnCameraCapture         = new Button();
            checkBoxRecordCamVideo   = new CheckBox();
            labelRecordCamVideo      = new Label();
            stripCameraCapture       = new StatusStrip();
            labelCameraCaptureStatus = new ToolStripStatusLabel();
            labelCameraFrameCounter  = new ToolStripStatusLabel();
            labelStopCameraCapture   = new ToolStripStatusLabel();
            imageBoxCameraCapture    = new ImageBox();
            //VideoPage
            btnVideoCapture         = new Button();
            stripVideoCapture       = new StatusStrip();
            labelOpenVideoFile      = new ToolStripStatusLabel();
            labelStopVideoCapture   = new ToolStripStatusLabel();
            labelVideoFPS           = new ToolStripStatusLabel();
            labelVideoFrameCounter  = new ToolStripStatusLabel();
            labelVideoCaptureStatus = new ToolStripStatusLabel();
            progressBarVideoCapture = new ProgressBar();
            imageBoxVideoCapture    = new ImageBox();
            //ImagePage
            /////
            //ResultPage
            tpResultPage   = new TabPage();
            imageBoxResult = new ImageBox();
            //
            #endregion

            #region SuspendLayouts
            //////
            //SuspendLayout
            panelMain.SuspendLayout();
            menuBar.SuspendLayout();
            tabCtrlMain.SuspendLayout();
            tpHomePage.SuspendLayout();
            tpCameraCapture.SuspendLayout();
            btnCameraCapture.SuspendLayout();
            checkBoxRecordCamVideo.SuspendLayout();
            labelRecordCamVideo.SuspendLayout();
            stripCameraCapture.SuspendLayout();
            ((ISupportInitialize)(imageBoxCameraCapture)).BeginInit();
            tpVideoCapture.SuspendLayout();
            btnVideoCapture.SuspendLayout();
            stripVideoCapture.SuspendLayout();
            progressBarVideoCapture.SuspendLayout();
            ((ISupportInitialize)(imageBoxVideoCapture)).BeginInit();
            tpImageCapture.SuspendLayout();
            tpResultPage.SuspendLayout();
            ((ISupportInitialize)(imageBoxResult)).BeginInit();
            SuspendLayout();
            #endregion

            #region PanelMain
            // panelMain
            panelMain.Name     = "panelMain";
            panelMain.Location = new Point(0, 0);
            panelMain.Dock     = DockStyle.Fill;
            panelMain.Controls.Add(menuBar);
            panelMain.Controls.Add(tabCtrlMain);
            #endregion

            #region MenuBar
            // menuBar
            menuBar.Name     = "menuBar";
            menuBar.Text     = "menuBar";
            menuBar.Location = new Point(0, 0);
            menuBar.Dock     = DockStyle.Top;
            menuBar.Items.AddRange(new ToolStripItem[] { btnWorkMode });
            // btnWorkMode
            btnWorkMode.Name = "btnWorkMode";
            btnWorkMode.Text = "WorkMode";
            btnWorkMode.Size = new Size(120, 25); //按钮宽和高
            //btnWorkMode.Image = ((Image)(resources.GetObject("btnWorkMode.Image")));
            btnWorkMode.ImageTransparentColor = Color.Magenta;
            btnWorkMode.DropDownItems.AddRange(
                new ToolStripItem[] {
                miCameraCapture,
                miVideoCapture,
                miImageCapture
            });

            //menuItem
            miCameraCapture.Name = "miCameraCapture";
            miCameraCapture.Text = "CameraCapture";
            miCameraCapture.Size = new Size(120, 25);
            //menuItem
            miVideoCapture.Name = "miVideoCapture";
            miVideoCapture.Text = "VideoCapture";
            miVideoCapture.Size = new Size(120, 25);
            //menuItem
            miImageCapture.Name = "miImageCapture";
            miImageCapture.Text = "ImageCapture";
            miImageCapture.Size = new Size(120, 25);
            #endregion

            #region TabControl
            // tabCtrlMain
            tabCtrlMain.Name     = "tabCtrlMain";
            tabCtrlMain.Location = new Point(0, 25);
            tabCtrlMain.Anchor   = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom;
            tabCtrlMain.Controls.Add(tpHomePage);
            tabCtrlMain.Controls.Add(tpCameraCapture);
            tabCtrlMain.Controls.Add(tpVideoCapture);
            tabCtrlMain.Controls.Add(tpImageCapture);
            tabCtrlMain.Controls.Add(tpResultPage);
            tabCtrlMain.SelectedIndex = 0;
            #endregion

            #region HomePage
            // tpHomePage
            tpHomePage.Name      = "HomePage";
            tpHomePage.Text      = "Home";
            tpHomePage.Location  = new Point(5, 25);
            tpHomePage.Padding   = new Padding(3);
            tpHomePage.BackColor = Color.LightBlue;
            #endregion

            #region CameraPage
            // tpCameraCapture
            tpCameraCapture.Name              = "CameraCapture";
            tpCameraCapture.Text              = "Camera";
            tpCameraCapture.Location          = new Point(5, 25);
            tpCameraCapture.Padding           = new Padding(3);
            tpCameraCapture.AutoScroll        = true;
            tpCameraCapture.AutoScrollMinSize = new Size(800, 600);
            tpCameraCapture.BackColor         = Color.SkyBlue;
            tpCameraCapture.Controls.Add(btnCameraCapture);
            tpCameraCapture.Controls.Add(checkBoxRecordCamVideo);
            tpCameraCapture.Controls.Add(labelRecordCamVideo);
            tpCameraCapture.Controls.Add(stripCameraCapture);
            tpCameraCapture.Controls.Add(imageBoxCameraCapture);
            // btnCameraCapture
            btnCameraCapture.Name     = "btnCameraCapture";
            btnCameraCapture.Text     = "Start";
            btnCameraCapture.Location = new Point(10, 5);
            btnCameraCapture.Size     = new Size(80, 25);
            btnCameraCapture.Anchor   = AnchorStyles.Left | AnchorStyles.Top;
            btnCameraCapture.UseVisualStyleBackColor = true;
            btnCameraCapture.ForeColor = Color.DarkBlue;
            btnCameraCapture.TabIndex  = 0;
            //
            checkBoxRecordCamVideo.Name     = "cbRecordCamVideo";
            checkBoxRecordCamVideo.Location = new Point(165, 7);
            checkBoxRecordCamVideo.Size     = new Size(16, 16);
            checkBoxRecordCamVideo.Checked  = false;
            checkBoxRecordCamVideo.Anchor   = AnchorStyles.Left | AnchorStyles.Top;
            labelRecordCamVideo.Name        = "labelRecordCamVideo";
            labelRecordCamVideo.Location    = new Point(180, 10);
            labelRecordCamVideo.Size        = new Size(80, 20);
            labelRecordCamVideo.Text        = "RecordVideo";
            labelRecordCamVideo.Anchor      = AnchorStyles.Left | AnchorStyles.Top;
            // stripCameraCapture
            stripCameraCapture.Name      = "stripCameraCapture";
            stripCameraCapture.Text      = "stripCameraCapture";
            stripCameraCapture.Location  = new Point(600, 5);
            stripCameraCapture.Size      = new Size(160, 25);
            stripCameraCapture.Anchor    = AnchorStyles.Top | AnchorStyles.Right;
            stripCameraCapture.BackColor = Color.LightGreen;
            stripCameraCapture.Items.AddRange(
                new ToolStripItem[] {
                labelCameraCaptureStatus,
                labelCameraFrameCounter,
                labelStopCameraCapture
            });
            // labelCameraCaptureStatus
            labelCameraCaptureStatus.Name = "labelCameraCaptureStatus";
            labelCameraCaptureStatus.Text = "Ready";
            labelCameraCaptureStatus.Size = new Size(50, 25);
            // labelCameraFrameCounter
            labelCameraFrameCounter.Name = "labelCameraFrameCounter";
            labelCameraFrameCounter.Text = "Frame:0";
            labelCameraFrameCounter.Size = new Size(100, 25);
            // labelStopCameraCapture
            labelStopCameraCapture.Name      = "labelStopCameraCapture";
            labelStopCameraCapture.Text      = "Stop";
            labelStopCameraCapture.Size      = new Size(50, 25);
            labelStopCameraCapture.BackColor = Color.Pink;
            labelStopCameraCapture.IsLink    = true;
            // imageBoxCameraCapture
            imageBoxCameraCapture.Name     = "imageBoxCameraCapture";
            imageBoxCameraCapture.Location = new Point(5, 40);
            imageBoxCameraCapture.Size     = new Size(780, 520);
            imageBoxCameraCapture.Anchor   =
                AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
            imageBoxCameraCapture.BackColor = Color.Silver;
            imageBoxCameraCapture.SizeMode  = PictureBoxSizeMode.CenterImage;
            imageBoxCameraCapture.TabStop   = false;
            #endregion

            #region VideoPage
            // tpVideoCapture
            tpVideoCapture.Name              = "tpVideoCapture";
            tpVideoCapture.Text              = "Video";
            tpVideoCapture.Location          = new Point(5, 25);
            tpVideoCapture.Padding           = new Padding(3);
            tpVideoCapture.AutoScroll        = true;
            tpVideoCapture.AutoScrollMinSize = new Size(800, 600);
            tpVideoCapture.BackColor         = Color.SkyBlue;
            tpVideoCapture.Controls.Add(btnVideoCapture);
            tpVideoCapture.Controls.Add(stripVideoCapture);
            //
            tpVideoCapture.Controls.Add(progressBarVideoCapture);
            //
            tpVideoCapture.Controls.Add(imageBoxVideoCapture);
            // btnVideoCapture
            btnVideoCapture.Name     = "btnVideoCapture";
            btnVideoCapture.Text     = "Start";
            btnVideoCapture.Location = new Point(10, 5);
            btnVideoCapture.Size     = new Size(80, 25);
            btnVideoCapture.Anchor   = AnchorStyles.Top | AnchorStyles.Left;
            btnVideoCapture.UseVisualStyleBackColor = true;
            btnVideoCapture.ForeColor = Color.DarkBlue;
            // stripVideoCapture
            stripVideoCapture.Name      = "stripVideoCapture";
            stripVideoCapture.Text      = "stripVideoCapture";
            stripVideoCapture.Location  = new Point(590, 5);
            stripVideoCapture.Size      = new Size(170, 25);
            stripVideoCapture.Anchor    = AnchorStyles.Top | AnchorStyles.Right;
            stripVideoCapture.BackColor = Color.LightGreen;
            stripVideoCapture.Items.AddRange(
                new ToolStripItem[] {
                labelVideoCaptureStatus,
                labelVideoFPS,
                labelVideoFrameCounter,
                labelOpenVideoFile,
                labelStopVideoCapture
            });
            // labelVideoCaptureStatus
            labelVideoCaptureStatus.Name = "labelVideoCaptureStatus";
            labelVideoCaptureStatus.Text = "Ready";
            labelVideoCaptureStatus.Size = new Size(50, 25);
            // labelVideoFPS
            labelVideoFPS.Name = "labelVideoFPS";
            labelVideoFPS.Size = new Size(30, 25);
            labelVideoFPS.Text = "FPS:0";
            // labelVideoFrameCounter
            labelVideoFrameCounter.Name = "labelVideoFrameCounter";
            labelVideoFrameCounter.Size = new Size(100, 25);
            labelVideoFrameCounter.Text = "Frame:0";
            // labelOpenVideoFile
            labelOpenVideoFile.Name      = "labelOpenVideoFile";
            labelOpenVideoFile.Text      = "Open";
            labelOpenVideoFile.Size      = new Size(50, 25);
            labelOpenVideoFile.BackColor = Color.Lime;
            labelOpenVideoFile.IsLink    = true;
            // labelStopVideoCapture
            labelStopVideoCapture.Name      = "labelStopVideoCapture";
            labelStopVideoCapture.Text      = "Stop";
            labelStopVideoCapture.Size      = new Size(50, 25);
            labelStopVideoCapture.BackColor = Color.Pink;
            labelStopVideoCapture.IsLink    = true;
            ///
            //
            progressBarVideoCapture.Name     = "progressBarVideoCapture";
            progressBarVideoCapture.Location = new Point(5, 32);
            progressBarVideoCapture.Size     = new Size(780, 7);
            progressBarVideoCapture.Anchor   = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
            // imageBoxVideoCapture
            imageBoxVideoCapture.Name     = "imageBoxVideoCapture";
            imageBoxVideoCapture.Location = new Point(5, 40);
            imageBoxVideoCapture.Size     = new Size(780, 520);
            imageBoxVideoCapture.Anchor   =
                AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom;
            imageBoxVideoCapture.BackColor = Color.Silver;
            imageBoxVideoCapture.SizeMode  = PictureBoxSizeMode.CenterImage;
            imageBoxVideoCapture.TabStop   = false;
            #endregion

            #region ImagePage
            // tpImageCapture
            tpImageCapture.Name      = "tpImageCapture";
            tpImageCapture.Text      = "Image";
            tpImageCapture.Location  = new Point(5, 25);
            tpImageCapture.Padding   = new Padding(3);
            tpImageCapture.Size      = new Size(800, 600);
            tpImageCapture.BackColor = Color.SkyBlue;
            #endregion

            #region ResultPage
            tpResultPage.Name              = "tpResultPage";
            tpResultPage.Text              = "Result";
            tpResultPage.Location          = new Point(5, 25);
            tpResultPage.Padding           = new Padding(3);
            tpResultPage.AutoScroll        = true;
            tpResultPage.AutoScrollMinSize = new Size(800, 600);
            tpResultPage.BackColor         = Color.SkyBlue;
            tpResultPage.Controls.Add(imageBoxResult);
            imageBoxResult.Name     = "imageBoxResult";
            imageBoxResult.Location = new Point(5, 40);
            imageBoxResult.Size     = new Size(780, 520);
            imageBoxResult.Anchor   =
                AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom;
            imageBoxResult.BackColor = Color.Silver;
            imageBoxResult.SizeMode  = PictureBoxSizeMode.CenterImage;
            imageBoxResult.TabStop   = false;
            #endregion

            #region PerformLayouts
            // MainForm
            Name                = "MainWindow";
            Text                = "FrameCapture";
            StartPosition       = FormStartPosition.CenterScreen;
            ClientSize          = new Size(880, 620);
            AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            AutoScaleMode       = AutoScaleMode.Font;
            Controls.Add(this.panelMain);

            panelMain.ResumeLayout(false);
            panelMain.PerformLayout();
            menuBar.ResumeLayout(false);
            menuBar.PerformLayout();
            tabCtrlMain.ResumeLayout(false);
            tpHomePage.ResumeLayout(false);
            tpHomePage.PerformLayout();
            tpCameraCapture.ResumeLayout(false);
            tpCameraCapture.PerformLayout();
            btnCameraCapture.ResumeLayout(false);
            btnCameraCapture.PerformLayout();
            checkBoxRecordCamVideo.ResumeLayout(false);
            checkBoxRecordCamVideo.PerformLayout();
            labelRecordCamVideo.ResumeLayout(false);
            labelRecordCamVideo.PerformLayout();
            stripCameraCapture.ResumeLayout(false);
            stripCameraCapture.PerformLayout();
            ((ISupportInitialize)(imageBoxCameraCapture)).EndInit();
            tpVideoCapture.ResumeLayout(false);
            tpVideoCapture.PerformLayout();
            btnVideoCapture.ResumeLayout(false);
            btnVideoCapture.PerformLayout();
            stripVideoCapture.ResumeLayout(false);
            stripVideoCapture.PerformLayout();
            progressBarVideoCapture.ResumeLayout(false);
            progressBarVideoCapture.PerformLayout();
            ((ISupportInitialize)(imageBoxVideoCapture)).EndInit();
            tpImageCapture.ResumeLayout(false);
            tpImageCapture.PerformLayout();
            tpResultPage.ResumeLayout(false);
            tpResultPage.PerformLayout();
            ((ISupportInitialize)(imageBoxResult)).EndInit();
            ResumeLayout(false);
            #endregion
        }
Esempio n. 19
0
            /// <summary>
            /// 【第一步、调用函数 SetUIInChinese 或者 SetUIInUKEnglish】;
            /// 【第二步、调用函数 ChangeLanguageOfUI】;
            /// ------------------------------------------------------------------------
            /// 修改UI界面语言,请先执行设置语言的函数,然后再执行此函数来调用对应的资源来更新UI:
            /// 特别注意:调用此函数后,窗体会恢复到初始状态,还需要根据情况再次设置界面的具体内容,例如 visible/enable等属性;
            /// </summary>
            /// <param name="TargetSource"目标窗体对应的组件资源对象,
            /// 请使用此格式来实例化对象:ComponentResourceManager resource = new ComponentResourceManager(typeof(目标窗体类名称));
            /// 例如:ComponentResourceManager resource = new ComponentResourceManager(typeof(Form1));></param>
            /// <param name="TargetControl">目标控件,可以是窗体(this)或者其它 Control 类型,这里只需要 this 就会自动将窗体里面所有的 Control 更新为对应语言的资源</param>
            public void ChangeLanguageOfUI(ComponentResourceManager TargetSource, Control TargetControl)
            {
                try
                {
                    TargetSource.ApplyResources(TargetControl, TargetControl.Name);
                    TargetControl.ResumeLayout();
                    //TargetControl.Update();
                    TargetControl.Refresh();

                    if (TargetControl is MenuStrip)
                    {
                        //菜单
                        MenuStrip tempMenu = TargetControl as MenuStrip;
                        tempMenu.SuspendLayout();
                        foreach (ToolStripMenuItem item in tempMenu.Items)
                        {
                            if (null != item)
                            {
                                TargetSource.ApplyResources(item, item.Name);
                                if (null != item.DropDownItems && item.DropDownItems.Count > 0)
                                {
                                    foreach (ToolStripMenuItem subitem in item.DropDownItems)
                                    {
                                        if (null != subitem)
                                        {
                                            TargetSource.ApplyResources(subitem, subitem.Name);
                                        }
                                    } 
                                }
                            }
                        }
                        tempMenu.ResumeLayout();
                        tempMenu.Update();
                        tempMenu.Refresh();
                    }
                    else if (TargetControl is StatusStrip)
                    {
                        //状态栏
                        StatusStrip tempStatusStrip = TargetControl as StatusStrip;
                        tempStatusStrip.SuspendLayout();
                        foreach (ToolStripStatusLabel item in tempStatusStrip.Items)
                        {
                            if (null != item)
                            {
                                TargetSource.ApplyResources(item, item.Name);
                            }
                        }
                        tempStatusStrip.ResumeLayout();
                        tempStatusStrip.Update();
                        tempStatusStrip.Refresh();
                    }
                    else if (TargetControl is ToolStrip)//如果传入的控件是StatusStrip,这里的判断条件也是 true,这可能是因为继承的关系
                    {
                        //工具栏按钮
                        ToolStrip tempToolStrip = TargetControl as ToolStrip;
                        tempToolStrip.SuspendLayout();
                        foreach (ToolStripButton item in tempToolStrip.Items)
                        {
                            if (null != item)
                            {
                                TargetSource.ApplyResources(item, item.Name);
                            }
                        }
                        tempToolStrip.ResumeLayout();
                        tempToolStrip.Update();
                        tempToolStrip.Refresh();
                    }
                    else if (TargetControl is Form)
                    {
                        //窗体
                        TargetSource.ApplyResources(TargetControl, "$this");
                        foreach (Control item in TargetControl.Controls)
                        {
                            if (null != item)
                            {
                                ChangeLanguageOfUI(TargetSource, item);
                            }
                        }
                        TargetControl.ResumeLayout();
                        TargetControl.Update();
                        TargetControl.Refresh();
                    }
                    else if (TargetControl is DataGridView)
                    {
                        //DataGridView
                        DataGridView tempDataGridView = TargetControl as DataGridView;
                        foreach (DataGridViewColumn item in tempDataGridView.Columns)
                        {
                            if (null != item)
                            {
                                TargetSource.ApplyResources(item, item.Name);
                            }
                        }
                        //tempDataGridView.Update();
                        tempDataGridView.Refresh();
                    }
                    else if (TargetControl is TreeView)
                    {
                        //TreeView
                        TreeView tempTreeView = TargetControl as TreeView;
                        if (tempTreeView.Nodes.Count > 0)
                        {
                            tempTreeView.SuspendLayout();
                            TreeNode[] tempTreeNodes = new TreeNode[tempTreeView.Nodes.Count];
                            for (int i = 0; i < tempTreeView.Nodes.Count; i++)
                            {
                                if (i == 0)
                                {
                                    tempTreeNodes[i] = (TreeNode)TargetSource.GetObject(tempTreeView.Name + ".Nodes");
                                }
                                else
                                {
                                    tempTreeNodes[i] = (TreeNode)TargetSource.GetObject(tempTreeView.Name + ".Nodes" + i.ToString());
                                }
                            }

                            tempTreeView.Nodes.Clear();
                            tempTreeView.Nodes.AddRange(tempTreeNodes);
                            tempTreeView.ResumeLayout();
                        }
                    }
                    else if (TargetControl is CheckedListBox)
                    {
                        //CheckedListBox
                        CheckedListBox tempCheckedListBox = TargetControl as CheckedListBox;
                        if (tempCheckedListBox.Items.Count > 0)
                        {
                            object[] tempCheckedListBoxItems = new object[tempCheckedListBox.Items.Count];
                            for (int i = 0; i < tempCheckedListBox.Items.Count; i++)
                            {
                                if (i == 0)
                                {
                                    tempCheckedListBoxItems[i] = TargetSource.GetString(tempCheckedListBox.Name + ".Items");
                                }
                                else
                                {
                                    tempCheckedListBoxItems[i] = TargetSource.GetString(tempCheckedListBox.Name + ".Items" + i.ToString());
                                }
                            }

                            tempCheckedListBox.Items.Clear();
                            tempCheckedListBox.Items.AddRange(tempCheckedListBoxItems);

                            tempCheckedListBox.ResumeLayout();
                            tempCheckedListBox.Update();
                            tempCheckedListBox.Refresh();
                        }
                    }
                    else if (TargetControl is ListBox)
                    {
                        //ListBox
                        ListBox tempListBox = TargetControl as ListBox;
                        if (tempListBox.Items.Count > 0)
                        {
                            object[] tempListBoxItems = null;// new object[tempListBox.Items.Count];
                            int iItemIndexCount = 0;
                            string TempItem = "";

                            //发生错误:值不能为 null。
                            //参数名: item;    在 System.Windows.Forms.ListBox.ObjectCollection.AddInternal(Object item)

                            for (int i = 0; i < tempListBox.Items.Count; i++)
                            {
                                if (i == 0)
                                {
                                    TempItem = TargetSource.GetString(tempListBox.Name + ".Items");
                                    if (null != TempItem && TempItem != "")
                                    {
                                        tempListBoxItems = new object[1];
                                        //Array.Resize<object>(ref tempListBoxItems, iItemIndexCount + 1);
                                        tempListBoxItems[iItemIndexCount] = TempItem;
                                        iItemIndexCount++;
                                    }
                                }
                                else
                                {
                                    TempItem = TargetSource.GetString(tempListBox.Name + ".Items" + i.ToString());
                                    if (null != TempItem && TempItem != "")
                                    {
                                        Array.Resize<object>(ref tempListBoxItems, iItemIndexCount + 1);
                                        tempListBoxItems[iItemIndexCount] = TempItem;
                                        iItemIndexCount++;
                                    }
                                }
                            }

                            if (null != tempListBoxItems)
                            {
                                tempListBox.Items.Clear();
                                tempListBox.Items.AddRange(tempListBoxItems);

                                tempListBox.ResumeLayout();
                                tempListBox.Update();
                                tempListBox.Refresh();
                            }
                            else
                            {
                                ErrorMessage.Enqueue("窗体 " + TargetControl.FindForm().Name + " 的ListBox控件 " + TargetControl.Name + " 子项为空或者没有建立多语言版本的资源");
                            }
                        }
                    }
                    else if (TargetControl is ListView)
                    {
                        //ListView
                        ListView tempListView = TargetControl as ListView;
                        if (tempListView.Items.Count > 0)
                        {
                            ListViewItem[] tempTreeNodes = new ListViewItem[tempListView.Items.Count];
                            for (int i = 0; i < tempListView.Items.Count; i++)
                            {
                                if (i == 0)
                                {
                                    tempTreeNodes[i] = (ListViewItem)TargetSource.GetObject(tempListView.Name + ".Items");
                                }
                                else
                                {
                                    tempTreeNodes[i] = (ListViewItem)TargetSource.GetObject(tempListView.Name + ".Items" + i.ToString());
                                }
                            }

                            tempListView.Items.Clear();
                            tempListView.Items.AddRange(tempTreeNodes);
                        }

                        if (tempListView.Columns.Count > 0)
                        {
                            for (int i = 0; i < tempListView.Columns.Count; i++)
                            {
                                TargetSource.ApplyResources(tempListView.Columns[i], "columnHeader" + (i + 1).ToString());
                            }
                        }

                        tempListView.ResumeLayout();
                        tempListView.Update();
                        tempListView.Refresh();
                    }
                    else if (TargetControl is ComboBox)
                    {
                        //ComboBox
                        ComboBox tempComboBox = TargetControl as ComboBox;
                        
                        if (tempComboBox.Items.Count > 0)
                        {
                            tempComboBox.SuspendLayout();
                            object[] AllItems = null;// new object[1];//tempComboBox.Items.Count
                            int iItemIndexCount = 0;
                            string TempItem = "";

                            // 发生错误:值不能为 null。
                            // 参数名: item;    在 System.Windows.Forms.ComboBox.ObjectCollection.AddInternal(Object item)
                            
                            for (int i = 0; i < tempComboBox.Items.Count; i++)
                            {
                                if (iItemIndexCount == 0)
                                {
                                    //Array.Resize<object>(ref AllItems, iItemIndexCount + 1);
                                    TempItem = TargetSource.GetString(tempComboBox.Name + ".Items");
                                    if (null != TempItem && TempItem != "")
                                    {
                                        AllItems = new object[1];
                                        AllItems[iItemIndexCount] = TempItem;
                                        iItemIndexCount++;
                                    }
                                    //
                                }
                                else
                                {
                                    TempItem = TargetSource.GetString(tempComboBox.Name + ".Items" + i.ToString());
                                    if (null != TempItem && TempItem != "")
                                    {
                                        Array.Resize<object>(ref AllItems, iItemIndexCount + 1);
                                        AllItems[iItemIndexCount] = TempItem;
                                        iItemIndexCount++;
                                    }
                                }
                            }

                            if (null != AllItems)
                            {
                                tempComboBox.Items.Clear();
                                tempComboBox.Items.AddRange(AllItems);
                                tempComboBox.SelectedIndex = 0;

                                tempComboBox.ResumeLayout();
                                //tempComboBox.Update();
                                tempComboBox.Refresh();
                            }
                            else
                            {
                                ErrorMessage.Enqueue("窗体 " + TargetControl.FindForm().Name + " 的ComboBox控件 " + TargetControl.Name + " 子项为空或者没有建立多语言版本的资源");
                            }
                        }
                    }
                    else
                    {
                        if (TargetControl.HasChildren == true)
                        {
                            foreach (Control item in TargetControl.Controls)
                            {
                                if (null != item)
                                {
                                    ChangeLanguageOfUI(TargetSource, item);
                                }
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    //throw ex;
                    ErrorMessage.Enqueue(DateTime.Now.ToString() + "*-*" + "发生错误:" + ex.Message + "; " + ex.StackTrace);
                }
            }
Esempio n. 20
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Form                 form = new Form();
            FlowLayoutPanel      flowLayoutPanelTop;
            RadioButton          radioButtonText;
            RadioButton          radioButtonNumber;
            ComboBox             comboBox;
            Panel                panelFill;
            TextBox              textBoxInput;
            TextBox              textBoxOutput;
            StatusStrip          statusStrip;
            ToolStripStatusLabel statusLabel;

            // 布局
            {
                flowLayoutPanelTop = new FlowLayoutPanel();
                radioButtonText    = new RadioButton();
                radioButtonNumber  = new RadioButton();
                comboBox           = new ComboBox();
                panelFill          = new Panel();
                textBoxInput       = new TextBox();
                textBoxOutput      = new TextBox();
                statusStrip        = new StatusStrip();
                statusLabel        = new ToolStripStatusLabel();
                flowLayoutPanelTop.SuspendLayout();
                panelFill.SuspendLayout();
                statusStrip.SuspendLayout();
                form.SuspendLayout();
                //
                // flowLayoutPanel1
                //
                flowLayoutPanelTop.Controls.Add(radioButtonText);
                flowLayoutPanelTop.Controls.Add(radioButtonNumber);
                flowLayoutPanelTop.Controls.Add(comboBox);
                flowLayoutPanelTop.Dock     = DockStyle.Top;
                flowLayoutPanelTop.Location = new Point(0, 0);
                flowLayoutPanelTop.Name     = "flowLayoutPanel1";
                flowLayoutPanelTop.Size     = new Size(363, 30);
                flowLayoutPanelTop.TabIndex = 0;
                //
                // radioButton1
                //
                radioButtonText.AutoSize = true;
                radioButtonText.Location = new Point(3, 3);
                radioButtonText.Name     = "radioButton1";
                radioButtonText.Size     = new Size(47, 16);
                radioButtonText.TabIndex = 0;
                radioButtonText.TabStop  = true;
                radioButtonText.Text     = "文本";
                radioButtonText.UseVisualStyleBackColor = true;
                //
                // radioButton2
                //
                radioButtonNumber.AutoSize = true;
                radioButtonNumber.Location = new Point(56, 3);
                radioButtonNumber.Name     = "radioButton2";
                radioButtonNumber.Size     = new Size(47, 16);
                radioButtonNumber.TabIndex = 0;
                radioButtonNumber.TabStop  = true;
                radioButtonNumber.Text     = "数字";
                radioButtonNumber.UseVisualStyleBackColor = true;
                //
                // comboBox1
                //
                comboBox.FormattingEnabled = true;
                comboBox.Location          = new Point(109, 3);
                comboBox.Name     = "comboBox1";
                comboBox.Size     = new Size(121, 20);
                comboBox.TabIndex = 1;

                comboBox.AutoCompleteSource = AutoCompleteSource.ListItems;
                comboBox.AutoCompleteMode   = AutoCompleteMode.Suggest;
                //
                // panel1
                //
                panelFill.Controls.Add(textBoxOutput);
                panelFill.Controls.Add(textBoxInput);
                panelFill.Dock     = DockStyle.Fill;
                panelFill.Location = new Point(0, 30);
                panelFill.Name     = "panel1";
                panelFill.Size     = new Size(363, 230);
                panelFill.TabIndex = 1;
                //
                // textBox1
                //
                textBoxInput.Dock      = DockStyle.Top;
                textBoxInput.Location  = new Point(0, 0);
                textBoxInput.Multiline = true;
                textBoxInput.Name      = "textBox1";
                textBoxInput.Size      = new Size(363, 74);
                textBoxInput.TabIndex  = 0;
                //
                // textBox2
                //
                textBoxOutput.Dock      = DockStyle.Bottom;
                textBoxOutput.Location  = new Point(0, 80);
                textBoxOutput.Multiline = true;
                textBoxOutput.Name      = "textBox2";
                textBoxOutput.ReadOnly  = true;
                textBoxOutput.Size      = new Size(363, 150);
                textBoxOutput.TabIndex  = 1;
                //
                // statusStrip1
                //
                statusStrip.Items.AddRange(new ToolStripItem[] { statusLabel });
                statusStrip.Location = new Point(0, 238);
                statusStrip.Name     = "statusStrip1";
                statusStrip.Size     = new Size(363, 22);
                statusStrip.TabIndex = 2;
                statusStrip.Text     = "statusStrip1";
                //
                // toolStripStatusLabel1
                //
                statusLabel.Name      = "toolStripStatusLabel1";
                statusLabel.Size      = new Size(29, 17);
                statusLabel.Spring    = true;
                statusLabel.TextAlign = ContentAlignment.MiddleLeft;
                //
                // Form1
                //
                form.AutoScaleDimensions = new SizeF(6F, 12F);
                form.AutoScaleMode       = AutoScaleMode.Font;
                form.ClientSize          = new Size(363, 260);
                form.Controls.Add(statusStrip);
                form.Controls.Add(panelFill);
                form.Controls.Add(flowLayoutPanelTop);
                form.Name          = "Form1";
                form.Text          = "二进制打印";
                form.StartPosition = FormStartPosition.CenterScreen;
                form.ImeMode       = ImeMode.On;
                flowLayoutPanelTop.ResumeLayout(false);
                flowLayoutPanelTop.PerformLayout();
                panelFill.ResumeLayout(false);
                panelFill.PerformLayout();
                statusStrip.ResumeLayout(false);
                statusStrip.PerformLayout();
                form.ResumeLayout(false);
                form.PerformLayout();
            }

            radioButtonText.Click += (o, e) =>
            {
                textBoxInput.Text  = "";
                textBoxOutput.Text = "";

                var commonUse = new List <string>();
                commonUse.Add(Encoding.Unicode.WebName);
                commonUse.Add(Encoding.UTF8.WebName);
                commonUse.Add(Encoding.Default.WebName);
                commonUse.Add(Encoding.UTF7.WebName);
                commonUse.Add(Encoding.UTF32.WebName);

                var fullList = Encoding.GetEncodings().Select(i => i.GetEncoding().WebName);

                comboBox.DataSource = commonUse.Concat(fullList.Except(commonUse)).ToArray();
            };

            radioButtonNumber.Click += (o, e) =>
            {
                textBoxInput.Text  = "";
                textBoxOutput.Text = "";

                comboBox.DataSource = new string[] { "unsigned oct", "signed oct", "hex", };
            };

            radioButtonText.PerformClick();

            Func <byte[], string> formatBytes = bytes =>
            {
                if (bytes == null || bytes.Length == 0)
                {
                    return(string.Empty);
                }

                var buf = new StringBuilder();
                foreach (byte b in bytes)
                {
                    buf.AppendFormat("{0:x2} ", b);
                }
                buf.Remove(buf.Length - 1, 1);
                return(buf.ToString());
            };

            EventHandler intput2output = (o, e) =>
            {
                textBoxOutput.Text = string.Empty;
                if (string.IsNullOrEmpty(textBoxInput.Text))
                {
                    return;
                }

                if (radioButtonText.Checked)
                {
                    try
                    {
                        Encoding encoding = Encoding.GetEncoding(comboBox.Text);
                        textBoxOutput.Text = formatBytes(encoding.GetBytes(textBoxInput.Text));
                    }
                    catch (Exception _e)
                    {
                        statusLabel.Text = _e.Message.Replace("\r\n", "\t");
                    }
                }
                else
                {
                    try
                    {
                        if (comboBox.Text == "hex")
                        {
                            uint i = uint.Parse(textBoxInput.Text, System.Globalization.NumberStyles.HexNumber);
                            textBoxOutput.Text = formatBytes(ToByteArray(i));
                        }
                        else if (comboBox.Text == "signed oct")
                        {
                            int i = int.Parse(textBoxInput.Text);
                            textBoxOutput.Text = formatBytes(ToByteArray(i));
                        }
                        else if (comboBox.Text == "unsigned oct")
                        {
                            uint i = uint.Parse(textBoxInput.Text);
                            textBoxOutput.Text = formatBytes(ToByteArray(i));
                        }
                        else
                        {
                            statusLabel.Text = "未知的格式。";
                        }
                    }
                    catch (Exception _e)
                    {
                        statusLabel.Text = _e.Message.Replace("\r\n", "\t");
                    }
                }
            };

            textBoxInput.TextChanged      += intput2output;
            comboBox.SelectedValueChanged += intput2output;

            textBoxOutput.DoubleClick += (o, e) =>
            {
                if (string.IsNullOrEmpty(textBoxOutput.Text))
                {
                    return;
                }
                textBoxOutput.SelectAll();
                textBoxOutput.Copy();
                statusLabel.Text = "复制到剪贴板。";
            };

            Timer timerCleanStatus = new Timer();

            timerCleanStatus.Interval = 3000;
            timerCleanStatus.Tick    += (o, e) => { statusLabel.Text = ""; };
            timerCleanStatus.Start();

            Application.Run(form);
        }
Esempio n. 21
0
        private void InitializeComponent()
        {
            components = new System.ComponentModel.Container();
            var resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));

            _mnuMain             = new MainMenu(components);
            _mnuStartTest        = new MenuItem();
            _mnuStartTest.Click += new EventHandler(mnuStartTest_Click);
            _mnuClose            = new MenuItem();
            _mnuClose.Click     += new EventHandler(mnuClose_Click);
            _mnuAbout            = new MenuItem();
            _mnuAbout.Click     += new EventHandler(mnuAbout_Click);
            _sbrMain             = new StatusStrip();
            _lblStatus           = new ToolStripStatusLabel();
            _lblActivity         = new ToolStripStatusLabel();
            _txtMain             = new TextBox();
            _tmrPoll             = new System.Windows.Forms.Timer(components);
            _tmrPoll.Tick       += new EventHandler(tmrPoll_Tick);
            _sbrMain.SuspendLayout();
            SuspendLayout();
            //
            // mnuMain
            //
            _mnuMain.MenuItems.AddRange(new MenuItem[] { _mnuStartTest, _mnuClose, _mnuAbout });
            //
            // mnuStartTest
            //
            _mnuStartTest.Index = 0;
            _mnuStartTest.Text  = "Start-test";
            //
            // mnuClose
            //
            _mnuClose.Index = 1;
            _mnuClose.Text  = "Close";
            //
            // mnuAbout
            //
            _mnuAbout.Index = 2;
            _mnuAbout.Text  = "About";
            //
            // sbrMain
            //
            _sbrMain.Items.AddRange(new ToolStripItem[] { _lblStatus, _lblActivity });
            _sbrMain.Location = new Point(0, 318);
            _sbrMain.Name     = "_sbrMain";
            _sbrMain.Size     = new Size(664, 22);
            _sbrMain.TabIndex = 9;
            //
            // lblStatus
            //
            _lblStatus.Name = "_lblStatus";
            _lblStatus.Size = new Size(84, 17);
            _lblStatus.Text = "Ready to test...";
            //
            // lblActivity
            //
            _lblActivity.Name = "_lblActivity";
            _lblActivity.Size = new Size(0, 17);
            //
            // txtMain
            //
            _txtMain.Dock       = DockStyle.Fill;
            _txtMain.Font       = new Font("Microsoft Sans Serif", 9.0F, FontStyle.Regular, GraphicsUnit.Point, Convert.ToByte(0));
            _txtMain.Location   = new Point(0, 0);
            _txtMain.Multiline  = true;
            _txtMain.Name       = "_txtMain";
            _txtMain.ScrollBars = ScrollBars.Vertical;
            _txtMain.Size       = new Size(664, 318);
            _txtMain.TabIndex   = 10;
            _txtMain.WordWrap   = false;
            //
            // tmrPoll
            //
            //
            // Main
            //
            AutoScaleBaseSize = new Size(5, 13);
            BackColor         = SystemColors.ButtonFace;
            ClientSize        = new Size(664, 340);
            Controls.Add(_txtMain);
            Controls.Add(_sbrMain);
            Icon          = (Icon)resources.GetObject("$this.Icon");
            MaximizeBox   = false;
            Menu          = _mnuMain;
            MinimumSize   = new Size(0, 100);
            Name          = "Main";
            StartPosition = FormStartPosition.CenterScreen;
            Text          = "RMS Link Test";
            _sbrMain.ResumeLayout(false);
            _sbrMain.PerformLayout();
            ResumeLayout(false);
            PerformLayout();
        }
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            int    i;
            String fname = "CreativeModePlus.res.Minecraft-Icon.ico";
            Stream file  = Asm.exe.GetManifestResourceStream(fname);
            Bitmap icon  = new Bitmap(file);

            menuStrip1            = new MenuStrip();
            fileToolStripMenuItem = new ToolStripMenuItem();
            openMenu              = new ToolStripMenuItem();
            exportMenu            = new ToolStripMenuItem();
            toolStripSeparator1   = new ToolStripSeparator();
            exitMenu              = new ToolStripMenuItem();
            editToolStripMenuItem = new ToolStripMenuItem();
            undoMenu              = new ToolStripMenuItem();
            redoMenu              = new ToolStripMenuItem();
            toolStripSeparator2   = new ToolStripSeparator();
            deselMenu             = new ToolStripMenuItem();
            toolStripSeparator3   = new ToolStripSeparator();
            copyMenu              = new ToolStripMenuItem();
            cutMenu               = new ToolStripMenuItem();
            pasteMenu             = new ToolStripMenuItem();
            viewToolStripMenuItem = new ToolStripMenuItem();
            toolsMenu             = new ToolStripMenuItem();
            mapToolStripMenuItem  = new ToolStripMenuItem();
            regionMenu            = new ToolStripMenuItem();
            helpToolStripMenuItem = new ToolStripMenuItem();
            helpMenu              = new ToolStripMenuItem();
            aboutMenu             = new ToolStripMenuItem();
            mnuScale              = new ToolStripTextBox();
            height                = new ComboBox();
            statusStrip1          = new StatusStrip();
            toolStripStatusLabel1 = new ToolStripStatusLabel();
            mnuLoad               = new ToolStripProgressBar();
            toolStripStatusLabel2 = new ToolStripStatusLabel();
            mnuStatus             = new ToolStripStatusLabel();
            toolStripStatusLabel3 = new ToolStripStatusLabel();
            mnuBlock              = new ToolStripStatusLabel();
            toolStripStatusLabel4 = new ToolStripStatusLabel();
            mnuCoord              = new ToolStripStatusLabel();
            pnlImage              = new Panel();
            mapImage              = new PictureBox();
            cmbBlocks             = new CreativeModePlus.ComboBoxWithIcons();
            cmbPaint              = new CreativeModePlus.ComboBoxWithIcons();
            menuStrip1.SuspendLayout();
            statusStrip1.SuspendLayout();
            pnlImage.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(mapImage)).BeginInit();
            SuspendLayout();
            //
            // menuStrip1
            //
            menuStrip1.BackColor = Color.LightGray;
            menuStrip1.Items.AddRange(new ToolStripItem[] {
                fileToolStripMenuItem,
                editToolStripMenuItem,
                viewToolStripMenuItem,
                mapToolStripMenuItem,
                helpToolStripMenuItem,
                mnuScale
            });
            menuStrip1.Location = new Point(0, 0);
            menuStrip1.Name     = "menuStrip1";
            menuStrip1.Size     = new Size(528, 27);
            menuStrip1.TabIndex = 0;
            menuStrip1.Text     = "menuStrip1";
            //
            // fileToolStripMenuItem
            //
            fileToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] {
                openMenu,
                exportMenu,
                toolStripSeparator1,
                exitMenu
            });
            fileToolStripMenuItem.Name = "fileToolStripMenuItem";
            fileToolStripMenuItem.Size = new Size(37, 23);
            fileToolStripMenuItem.Text = "&File";
            //
            // openMenu
            //
            openMenu.Name         = "openMenu";
            openMenu.ShortcutKeys = ((Keys)((Keys.Control | Keys.O)));
            openMenu.Size         = new Size(182, 22);
            openMenu.Text         = "&Open World";
            openMenu.Click       += new EventHandler(openMenu_Click);
            //
            // exportMenu
            //
            exportMenu.Name         = "exportMenu";
            exportMenu.ShortcutKeys = ((Keys)((Keys.Control | Keys.S)));
            exportMenu.Size         = new Size(182, 22);
            exportMenu.Text         = "&Save";
            exportMenu.Click       += new EventHandler(exportMenu_Click);
            //
            // toolStripSeparator1
            //
            toolStripSeparator1.Name = "toolStripSeparator1";
            toolStripSeparator1.Size = new Size(179, 6);
            //
            // exitMenu
            //
            exitMenu.Name         = "exitMenu";
            exitMenu.ShortcutKeys = ((Keys)((Keys.Alt | Keys.F4)));
            exitMenu.Size         = new Size(182, 22);
            exitMenu.Text         = "E&xit";
            exitMenu.Click       += new EventHandler(exitMenu_Click);
            //
            // editToolStripMenuItem
            //
            editToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] {
                undoMenu,
                redoMenu,
                toolStripSeparator2,
                deselMenu,
                toolStripSeparator3,
                copyMenu,
                cutMenu,
                pasteMenu
            });
            editToolStripMenuItem.Name = "editToolStripMenuItem";
            editToolStripMenuItem.Size = new Size(39, 23);
            editToolStripMenuItem.Text = "&Edit";
            //
            // deselMenu
            //
            deselMenu.Name         = "deselMenu";
            deselMenu.ShortcutKeys = ((Keys)(Keys.Control | Keys.D));
            deselMenu.Size         = new Size(152, 22);
            deselMenu.Text         = "&Deselect";
            deselMenu.Click       += new EventHandler(deselMenu_Click);
            //
            // copyMenu
            //
            copyMenu.Name         = "copyMenu";
            copyMenu.ShortcutKeys = ((Keys)((Keys.Control | Keys.C)));
            copyMenu.Size         = new Size(152, 22);
            copyMenu.Text         = "C&opy";
            copyMenu.Click       += new EventHandler(copyMenu_Click);
            //
            // cutMenu
            //
            cutMenu.Name         = "cutMenu";
            cutMenu.ShortcutKeys = ((Keys)((Keys.Control | Keys.X)));
            cutMenu.Size         = new Size(152, 22);
            cutMenu.Text         = "C&ut";
            cutMenu.Click       += new EventHandler(cutMenu_Click);
            //
            // pasteMenu
            //
            pasteMenu.Name         = "pasteMenu";
            pasteMenu.ShortcutKeys = ((Keys)((Keys.Control | Keys.V)));
            pasteMenu.Size         = new Size(152, 22);
            pasteMenu.Text         = "&Paste";
            pasteMenu.Click       += new EventHandler(pasteMenu_Click);
            //
            // viewToolStripMenuItem
            //
            viewToolStripMenuItem.DropDownItems.Add(toolsMenu);
            viewToolStripMenuItem.Name = "viewToolStripMenuItem";
            viewToolStripMenuItem.Size = new Size(44, 23);
            viewToolStripMenuItem.Text = "&View";
            //
            // toolsMenu
            //
            toolsMenu.Checked         = true;
            toolsMenu.CheckOnClick    = true;
            toolsMenu.CheckState      = CheckState.Checked;
            toolsMenu.Name            = "toolsMenu";
            toolsMenu.Size            = new Size(112, 22);
            toolsMenu.Text            = "Tools";
            toolsMenu.CheckedChanged += new EventHandler(toolsMenu_CheckChanged);
            //
            // mapToolStripMenuItem
            //
            mapToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] {
                regionMenu
            });
            mapToolStripMenuItem.Name = "mapToolStripMenuItem";
            mapToolStripMenuItem.Size = new Size(43, 23);
            mapToolStripMenuItem.Text = "&Map";
            //
            // regionMenu
            //
            regionMenu.Name         = "regionMenu";
            regionMenu.ShortcutKeys = ((Keys)((Keys.Control | Keys.R)));
            regionMenu.Size         = new Size(186, 22);
            regionMenu.Text         = "&Select Region";
            regionMenu.Click       += new EventHandler(regionMenu_Click);
            //
            // helpToolStripMenuItem
            //
            helpToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] {
                helpMenu, aboutMenu
            });
            helpToolStripMenuItem.Name = "helpToolStripMenuItem";
            helpToolStripMenuItem.Size = new Size(44, 23);
            helpToolStripMenuItem.Text = "&Help";
            //
            // helpMenu
            //
            helpMenu.Name         = "helpMenu";
            helpMenu.ShortcutKeys = Keys.F1;
            helpMenu.Size         = new Size(149, 22);
            helpMenu.Text         = "&Help";
            helpMenu.Click       += new EventHandler(helpMenu_Click);
            //
            // aboutMenu
            //
            aboutMenu.Name         = "aboutMenu";
            aboutMenu.ShortcutKeys = ((Keys)((Keys.Control | Keys.A)));
            aboutMenu.Size         = new Size(149, 22);
            aboutMenu.Text         = "&About";
            aboutMenu.Click       += new EventHandler(aboutMenu_Click);
            //
            // mnuScale
            //
            mnuScale.BackColor        = Color.LightGray;
            mnuScale.Name             = "mnuScale";
            mnuScale.Size             = new Size(50, 23);
            mnuScale.Text             = "100%";
            mnuScale.TextBoxTextAlign = HorizontalAlignment.Right;
            //
            // statusStrip1
            //
            statusStrip1.BackColor = Color.LightGray;
            statusStrip1.Items.AddRange(new ToolStripItem[] {
                toolStripStatusLabel1,
                mnuLoad,
                toolStripStatusLabel2,
                mnuStatus,
                toolStripStatusLabel3,
                mnuBlock,
                toolStripStatusLabel4,
                mnuCoord
            });
            statusStrip1.Location = new Point(0, 601);
            statusStrip1.Name     = "statusStrip1";
            statusStrip1.Size     = new Size(528, 22);
            statusStrip1.TabIndex = 3;
            statusStrip1.Text     = "statusStrip1";
            //
            // toolStripStatusLabel1
            //
            toolStripStatusLabel1.BackColor = Color.LightGray;
            toolStripStatusLabel1.Name      = "toolStripStatusLabel";
            toolStripStatusLabel1.Size      = new Size(22, 17);
            toolStripStatusLabel1.Text      = "     ";
            //
            // mnuLoad
            //
            mnuLoad.BackColor = SystemColors.GrayText;
            mnuLoad.ForeColor = SystemColors.GradientActiveCaption;
            mnuLoad.Name      = "mnuLoad";
            mnuLoad.Size      = new Size(100, 16);
            mnuLoad.Style     = ProgressBarStyle.Continuous;
            //
            // toolStripStatusLabel2
            //
            toolStripStatusLabel2.BackColor = Color.LightGray;
            toolStripStatusLabel2.Name      = "toolStripStatusLabel2";
            toolStripStatusLabel2.Size      = new Size(22, 17);
            toolStripStatusLabel2.Text      = "     ";
            //
            // mnuStatus
            //
            mnuStatus.BackColor = Color.LightGray;
            mnuStatus.Name      = "mnuStatus";
            mnuStatus.Size      = new Size(102, 17);
            mnuStatus.Text      = "Not Loading";
            //
            // toolStripStatusLabel3
            //
            toolStripStatusLabel3.BackColor = Color.LightGray;
            toolStripStatusLabel3.Name      = "toolStripStatusLabel3";
            toolStripStatusLabel3.Size      = new Size(22, 17);
            toolStripStatusLabel3.Text      = "     ";
            //
            // mnuBlock
            //
            mnuBlock.BackColor = Color.LightGray;
            mnuBlock.Name      = "mnuBlock";
            mnuBlock.Size      = new Size(102, 17);
            mnuBlock.Text      = "Block Information";
            //
            // toolStripStatusLabel4
            //
            toolStripStatusLabel3.BackColor = Color.LightGray;
            toolStripStatusLabel3.Name      = "toolStripStatusLabel4";
            toolStripStatusLabel3.Size      = new Size(22, 17);
            toolStripStatusLabel3.Text      = "     ";
            //
            // mnuCoord
            //
            mnuCoord.BackColor = Color.LightGray;
            mnuCoord.Name      = "mnuBlock";
            mnuCoord.Size      = new Size(102, 17);
            mnuCoord.Text      = "( X, Y )";
            //
            // pnlImage
            //
            pnlImage.Anchor = ((AnchorStyles)((((AnchorStyles.Top | AnchorStyles.Bottom)
                                                | AnchorStyles.Left)
                                               | AnchorStyles.Right)));
            pnlImage.AutoScroll = true;
            pnlImage.BackColor  = SystemColors.Desktop;
            pnlImage.Controls.Add(mapImage);
            pnlImage.Location    = new Point(0, 48);
            pnlImage.Name        = "pnlImage";
            pnlImage.Size        = new Size(528, 550);
            pnlImage.TabIndex    = 4;
            pnlImage.MouseWheel += new MouseEventHandler(pnlImage_Wheel);
            //
            // mapImage
            //
            mapImage.Location    = new Point(0, 0);
            mapImage.Name        = "mapImage";
            mapImage.Size        = new Size(512, 512);
            mapImage.SizeMode    = PictureBoxSizeMode.Zoom;
            mapImage.TabIndex    = 0;
            mapImage.TabStop     = false;
            mapImage.MouseClick += new MouseEventHandler(mapImage_Click);
            mapImage.MouseDown  += new MouseEventHandler(mapImage_Down);
            mapImage.MouseEnter += new EventHandler(mapImage_MouseEnter);
            mapImage.MouseLeave += new EventHandler(mapImage_MouseLeave);
            mapImage.MouseMove  += new MouseEventHandler(mapImage_MouseMove);
            mapImage.MouseUp    += new MouseEventHandler(mapImage_Up);
            //
            // height
            //
            height.DropDownStyle         = ComboBoxStyle.DropDownList;
            height.FlatStyle             = FlatStyle.Flat;
            height.Location              = new Point(380, 27);
            height.Name                  = "height";
            height.Size                  = new Size(100, 21);
            height.TabIndex              = 2;
            height.SelectedIndexChanged += new EventHandler(height_ValueChanged);
            //
            // cmbBlocks
            //
            cmbBlocks.DrawMode          = DrawMode.OwnerDrawFixed;
            cmbBlocks.DropDownStyle     = ComboBoxStyle.DropDownList;
            cmbBlocks.FlatStyle         = FlatStyle.Flat;
            cmbBlocks.FormattingEnabled = true;
            cmbBlocks.Location          = new Point(0, 27);
            cmbBlocks.Name     = "cmbBlocks";
            cmbBlocks.Size     = new Size(187, 21);
            cmbBlocks.TabIndex = 5;
            for (i = 0; i < 256; i++)
            {
                height.Items.Add("" + (i + 1));
            }
            cmbBlocks.SelectedIndexChanged += new EventHandler(cmbBlocks_SelectedIndexChanged);
            //
            // cmbPaint
            //
            cmbPaint.DrawMode          = DrawMode.OwnerDrawFixed;
            cmbPaint.DropDownStyle     = ComboBoxStyle.DropDownList;
            cmbPaint.FlatStyle         = FlatStyle.Flat;
            cmbPaint.FormattingEnabled = true;
            cmbPaint.Location          = new Point(190, 27);
            cmbPaint.Name                  = "cmbPaint";
            cmbPaint.Size                  = new Size(187, 21);
            cmbPaint.TabIndex              = 5;
            cmbPaint.SelectedIndexChanged += new EventHandler(cmbPaint_SelectedIndexChanged);
            //
            // toolStripSeparator2
            //
            toolStripSeparator2.Name = "toolStripSeparator2";
            toolStripSeparator2.Size = new Size(149, 6);
            //
            // undoMenu
            //
            undoMenu.Name         = "undoMenu";
            undoMenu.ShortcutKeys = ((Keys)((Keys.Control | Keys.Z)));
            undoMenu.Size         = new Size(152, 22);
            undoMenu.Text         = "&Undo";
            undoMenu.Click       += new EventHandler(undoMenu_Click);
            //
            // redoMenu
            //
            redoMenu.Name         = "redoMenu";
            redoMenu.ShortcutKeys = ((Keys)((Keys.Control | Keys.Y)));
            redoMenu.Size         = new Size(152, 22);
            redoMenu.Text         = "&Redo";
            redoMenu.Click       += new EventHandler(redoMenu_Click);
            //
            // frmMain
            //
            BackColor  = Color.LightGray;
            ClientSize = new Size(528, 623);
            Controls.Add(cmbBlocks);
            Controls.Add(cmbPaint);
            Controls.Add(statusStrip1);
            Controls.Add(height);
            Controls.Add(menuStrip1);
            Controls.Add(pnlImage);
            FormClosing += new FormClosingEventHandler(frmMain_Closing);
            Icon         = Icon.FromHandle(icon.GetHicon());
            file.Close();
            Location = new Point((Screen.PrimaryScreen.Bounds.Width - Width) / 2,
                                 (Screen.PrimaryScreen.Bounds.Height - Height) / 2);
            MainMenuStrip = menuStrip1;
            Move         += new EventHandler(frmMain_SizeChanged);
            Name          = "frmMain";
            StartPosition = FormStartPosition.Manual;
            Text          = "Creative Mode+";
            SizeChanged  += new EventHandler(frmMain_SizeChanged);
            menuStrip1.ResumeLayout(false);
            menuStrip1.PerformLayout();
            statusStrip1.ResumeLayout(false);
            statusStrip1.PerformLayout();
            pnlImage.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(mapImage)).EndInit();
            ResumeLayout(false);
            PerformLayout();
        }
Esempio n. 23
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(離線列印Client程式.frmClearHistory));
     panelPrint       = new System.Windows.Forms.Panel();
     label2           = new System.Windows.Forms.Label();
     label1           = new System.Windows.Forms.Label();
     dtToClear        = new System.Windows.Forms.DateTimePicker();
     btnCancel        = new System.Windows.Forms.Button();
     btnChangeSetting = new System.Windows.Forms.Button();
     ssDesc           = new System.Windows.Forms.StatusStrip();
     ssLblDesc        = new System.Windows.Forms.ToolStripStatusLabel();
     panelPrint.SuspendLayout();
     ssDesc.SuspendLayout();
     SuspendLayout();
     panelPrint.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     panelPrint.Controls.Add(label2);
     panelPrint.Controls.Add(label1);
     panelPrint.Controls.Add(dtToClear);
     panelPrint.Controls.Add(btnCancel);
     panelPrint.Controls.Add(btnChangeSetting);
     panelPrint.Location = new System.Drawing.Point(2, 3);
     panelPrint.Name     = "panelPrint";
     panelPrint.Size     = new System.Drawing.Size(344, 92);
     panelPrint.TabIndex = 2;
     label2.AutoSize     = true;
     label2.BackColor    = System.Drawing.SystemColors.AppWorkspace;
     label2.Font         = new System.Drawing.Font("新細明體", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 136);
     label2.ForeColor    = System.Drawing.SystemColors.ControlLightLight;
     label2.Location     = new System.Drawing.Point(225, 9);
     label2.MaximumSize  = new System.Drawing.Size(200, 0);
     label2.MinimumSize  = new System.Drawing.Size(80, 0);
     label2.Name         = "label2";
     label2.Padding      = new System.Windows.Forms.Padding(10, 5, 5, 5);
     label2.Size         = new System.Drawing.Size(103, 26);
     label2.TabIndex     = 23;
     label2.Text         = "之前的資料";
     label1.AutoSize     = true;
     label1.BackColor    = System.Drawing.SystemColors.AppWorkspace;
     label1.Font         = new System.Drawing.Font("新細明體", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 136);
     label1.ForeColor    = System.Drawing.SystemColors.ControlLightLight;
     label1.Location     = new System.Drawing.Point(8, 9);
     label1.MaximumSize  = new System.Drawing.Size(200, 0);
     label1.MinimumSize  = new System.Drawing.Size(80, 0);
     label1.Name         = "label1";
     label1.Padding      = new System.Windows.Forms.Padding(10, 5, 5, 5);
     label1.Size         = new System.Drawing.Size(80, 26);
     label1.TabIndex     = 22;
     label1.Text         = "清空";
     dtToClear.Font      = new System.Drawing.Font("新細明體", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 136);
     dtToClear.Format    = System.Windows.Forms.DateTimePickerFormat.Short;
     dtToClear.Location  = new System.Drawing.Point(94, 9);
     dtToClear.Name      = "dtToClear";
     dtToClear.Size      = new System.Drawing.Size(125, 27);
     dtToClear.TabIndex  = 21;
     btnCancel.Font      = new System.Drawing.Font("新細明體", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 136);
     btnCancel.Location  = new System.Drawing.Point(168, 47);
     btnCancel.Name      = "btnCancel";
     btnCancel.Size      = new System.Drawing.Size(80, 31);
     btnCancel.TabIndex  = 20;
     btnCancel.Text      = "取消";
     btnCancel.UseVisualStyleBackColor = true;
     btnCancel.Click          += new System.EventHandler(btnCancel_Click);
     btnChangeSetting.Font     = new System.Drawing.Font("新細明體", 12f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 136);
     btnChangeSetting.Location = new System.Drawing.Point(82, 47);
     btnChangeSetting.Name     = "btnChangeSetting";
     btnChangeSetting.Size     = new System.Drawing.Size(80, 31);
     btnChangeSetting.TabIndex = 19;
     btnChangeSetting.Text     = "確認";
     btnChangeSetting.UseVisualStyleBackColor = true;
     btnChangeSetting.Click += new System.EventHandler(btnChangeSetting_Click);
     ssDesc.Items.AddRange(new System.Windows.Forms.ToolStripItem[1]
     {
         ssLblDesc
     });
     ssDesc.Location          = new System.Drawing.Point(0, 98);
     ssDesc.Name              = "ssDesc";
     ssDesc.Size              = new System.Drawing.Size(351, 22);
     ssDesc.TabIndex          = 3;
     ssDesc.Text              = "statusStrip1";
     ssLblDesc.Name           = "ssLblDesc";
     ssLblDesc.Size           = new System.Drawing.Size(0, 17);
     base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 12f);
     base.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     base.ClientSize          = new System.Drawing.Size(351, 120);
     base.Controls.Add(ssDesc);
     base.Controls.Add(panelPrint);
     base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
     base.Icon            = (System.Drawing.Icon)resources.GetObject("$this.Icon");
     base.MaximizeBox     = false;
     base.MinimizeBox     = false;
     base.Name            = "frmClearHistory";
     base.StartPosition   = System.Windows.Forms.FormStartPosition.CenterScreen;
     Text       = "清除歷史資料";
     base.Load += new System.EventHandler(frmClearHistory_Load);
     panelPrint.ResumeLayout(false);
     panelPrint.PerformLayout();
     ssDesc.ResumeLayout(false);
     ssDesc.PerformLayout();
     ResumeLayout(false);
     PerformLayout();
 }
Esempio n. 24
0
 private void InitializeComponent()
 {
     statusStrip1          = new System.Windows.Forms.StatusStrip();
     toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
     pictureBox1           = new System.Windows.Forms.PictureBox();
     comboBox1             = new System.Windows.Forms.ComboBox();
     button1 = new System.Windows.Forms.Button();
     statusStrip1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
     SuspendLayout();
     statusStrip1.Dock = System.Windows.Forms.DockStyle.Top;
     statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[1]
     {
         toolStripStatusLabel1
     });
     statusStrip1.Location       = new System.Drawing.Point(0, 0);
     statusStrip1.Name           = "statusStrip1";
     statusStrip1.Size           = new System.Drawing.Size(401, 22);
     statusStrip1.TabIndex       = 0;
     statusStrip1.Text           = "statusStrip1";
     toolStripStatusLabel1.Name  = "toolStripStatusLabel1";
     toolStripStatusLabel1.Size  = new System.Drawing.Size(129, 17);
     toolStripStatusLabel1.Text  = "Выберите устройство:";
     pictureBox1.Dock            = System.Windows.Forms.DockStyle.Fill;
     pictureBox1.Location        = new System.Drawing.Point(0, 22);
     pictureBox1.Name            = "pictureBox1";
     pictureBox1.Size            = new System.Drawing.Size(401, 286);
     pictureBox1.TabIndex        = 1;
     pictureBox1.TabStop         = false;
     comboBox1.DropDownStyle     = System.Windows.Forms.ComboBoxStyle.DropDownList;
     comboBox1.FormattingEnabled = true;
     comboBox1.Location          = new System.Drawing.Point(138, 1);
     comboBox1.Name     = "comboBox1";
     comboBox1.Size     = new System.Drawing.Size(121, 21);
     comboBox1.TabIndex = 2;
     button1.Location   = new System.Drawing.Point(282, 1);
     button1.Name       = "button1";
     button1.Size       = new System.Drawing.Size(75, 21);
     button1.TabIndex   = 3;
     button1.Text       = "Старт";
     button1.UseVisualStyleBackColor = true;
     button1.Click           += new System.EventHandler(Button1Click);
     base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
     base.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     base.ClientSize          = new System.Drawing.Size(401, 308);
     base.Controls.Add(button1);
     base.Controls.Add(comboBox1);
     base.Controls.Add(pictureBox1);
     base.Controls.Add(statusStrip1);
     base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
     base.Name            = "WebCamViewer";
     base.StartPosition   = System.Windows.Forms.FormStartPosition.CenterScreen;
     Text              = "Просмотр Веб-Камеры";
     base.FormClosing += new System.Windows.Forms.FormClosingEventHandler(WebCamViewerFormClosing);
     base.FormClosed  += new System.Windows.Forms.FormClosedEventHandler(WebCamViewerFormClosed);
     base.Load        += new System.EventHandler(WebCamViewerLoad);
     statusStrip1.ResumeLayout(false);
     statusStrip1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
     ResumeLayout(false);
     PerformLayout();
 }
Esempio n. 25
0
 private void InitializeComponent()
 {
     CheckAdmin(IsRunAsAdmin());
     components          = new Container();
     _txtPath            = new TextBox();
     _btnBrwDic          = new Button();
     _fbdSelect          = new FolderBrowserDialog();
     _btnRefresh         = new Button();
     _btnFlash           = new Button();
     _devicelist         = new ListView();
     _clnID              = new ColumnHeader();
     _clnDevice          = new ColumnHeader();
     _clnProgress        = new ColumnHeader();
     _clnTime            = new ColumnHeader();
     _clnStatus          = new ColumnHeader();
     _clnResult          = new ColumnHeader();
     _txtLog             = new RichTextBox();
     _timerUpdateStatus  = new Timer(components);
     _statusStrp         = new StatusStrip();
     _statusLblMsg       = new ToolStripStatusLabel();
     _statusTab          = new ToolStripStatusLabel();
     _rdoCleanAll        = new RadioStripItem();
     _rdoSaveUserData    = new RadioStripItem();
     _rdoCleanAllAndLock = new RadioStripItem();
     _lblMD5             = new Label();
     _menuStrip1         = new MenuStrip();
     _miConfiguration    = new ToolStripMenuItem();
     _miFlashConfigurationToolStripMenuItem = new ToolStripMenuItem();
     _miInstallDrivers = new ToolStripMenuItem();
     _statusStrp.SuspendLayout();
     _menuStrip1.SuspendLayout();
     SuspendLayout();
     //
     // txtPath
     //
     _txtPath.Anchor = AnchorStyles.Top | AnchorStyles.Bottom
                       | AnchorStyles.Left
                       | AnchorStyles.Right;
     _txtPath.Location = new Point(98, 33);
     _txtPath.Name     = "_txtPath";
     _txtPath.Size     = new Size(668, 20);
     _txtPath.TabIndex = 0;
     //
     // btnBrwDic
     //
     _btnBrwDic.Location = new Point(21, 31);
     _btnBrwDic.Name     = "_btnBrwDic";
     _btnBrwDic.Size     = new Size(75, 23);
     _btnBrwDic.TabIndex = 1;
     _btnBrwDic.Text     = "Location";
     _btnBrwDic.UseVisualStyleBackColor = true;
     _btnBrwDic.Click += btnBrwDic_Click;
     //
     // fbdSelect
     //
     _fbdSelect.Description = "Fastboot ROM";
     //
     // btnRefresh
     //
     _btnRefresh.Anchor   = AnchorStyles.Top | AnchorStyles.Right;
     _btnRefresh.Location = new Point(831, 29);
     _btnRefresh.Name     = "_btnRefresh";
     _btnRefresh.Size     = new Size(75, 23);
     _btnRefresh.TabIndex = 2;
     _btnRefresh.Text     = "Refresh";
     _btnRefresh.UseVisualStyleBackColor = true;
     _btnRefresh.Click += btnRefresh_Click;
     //
     // btnFlash
     //
     _btnFlash.Anchor   = AnchorStyles.Top | AnchorStyles.Right;
     _btnFlash.Location = new Point(951, 28);
     _btnFlash.Name     = "_btnFlash";
     _btnFlash.Size     = new Size(75, 23);
     _btnFlash.TabIndex = 3;
     _btnFlash.Text     = "flash";
     _btnFlash.UseVisualStyleBackColor = true;
     _btnFlash.Click += btnFlash_Click;
     //
     // devicelist
     //
     _devicelist.Anchor = AnchorStyles.Top | AnchorStyles.Bottom
                          | AnchorStyles.Left
                          | AnchorStyles.Right;
     _devicelist.Columns.AddRange(new[]
     {
         _clnID,
         _clnDevice,
         _clnProgress,
         _clnTime,
         _clnStatus,
         _clnResult
     });
     _devicelist.GridLines = true;
     _devicelist.Location  = new Point(21, 86);
     _devicelist.Name      = "_devicelist";
     _devicelist.Size      = new Size(1005, 316);
     _devicelist.TabIndex  = 4;
     _devicelist.UseCompatibleStateImageBehavior = false;
     _devicelist.View = View.Details;
     _devicelist.ColumnWidthChanging += devicelist_ColumnWidthChanging;
     //
     // clnID
     //
     _clnID.Text = "ID";
     //
     // clnDevice
     //
     _clnDevice.Text  = "Kenzo";
     _clnDevice.Width = 90;
     //
     // clnProgress
     //
     _clnProgress.Text  = "Progres";
     _clnProgress.Width = 107;
     //
     // clnTime
     //
     _clnTime.Text = "Waktu";
     //
     // clnStatus
     //
     _clnStatus.Text  = "Status";
     _clnStatus.Width = 500;
     //
     // clnResult
     //
     _clnResult.Text  = "Hasil";
     _clnResult.Width = 126;
     //
     // txtLog
     //
     _txtLog.Location = new Point(37, 421);
     _txtLog.Name     = "_txtLog";
     _txtLog.Size     = new Size(949, 65);
     _txtLog.TabIndex = 6;
     _txtLog.Text     = "";
     _txtLog.Visible  = false;
     //
     // timer_updateStatus
     //
     _timerUpdateStatus.Interval = 1000;
     _timerUpdateStatus.Tick    += timer_updateStatus_Tick;
     //
     // statusStrp
     //
     _statusStrp.Items.AddRange(new ToolStripItem[]
     {
         _statusLblMsg,
         _statusTab,
         _rdoCleanAll,
         _rdoSaveUserData,
         _rdoCleanAllAndLock
     });
     _statusStrp.Location = new Point(0, 422);
     _statusStrp.Name     = "_statusStrp";
     _statusStrp.Size     = new Size(1094, 22);
     _statusStrp.TabIndex = 7;
     _statusStrp.Text     = "statusStrip1";
     //
     // statusLblMsg
     //
     _statusLblMsg.Name = "_statusLblMsg";
     _statusLblMsg.Size = new Size(0, 17);
     //
     // statusTab
     //
     _statusTab.Name   = "_statusTab";
     _statusTab.Size   = new Size(708, 17);
     _statusTab.Spring = true;
     //
     // rdoCleanAll
     //
     _rdoCleanAll.IsChecked = false;
     _rdoCleanAll.Name      = "_rdoCleanAll";
     _rdoCleanAll.Size      = new Size(98, 20);
     _rdoCleanAll.Text      = "Hapus Semua";
     //
     // rdoSaveUserData
     //
     _rdoSaveUserData.IsChecked = true;
     _rdoSaveUserData.Name      = "_rdoSaveUserData";
     _rdoSaveUserData.Size      = new Size(118, 20);
     _rdoSaveUserData.Text      = "Simpan Data User";
     //
     // rdoCleanAllAndLock
     //
     _rdoCleanAllAndLock.IsChecked = false;
     _rdoCleanAllAndLock.Name      = "_rdoCleanAllAndLock";
     _rdoCleanAllAndLock.Size      = new Size(155, 20);
     _rdoCleanAllAndLock.Text      = "Hapus Semua Dan Kunci";
     //
     // lblMD5
     //
     _lblMD5.AutoSize = true;
     _lblMD5.Location = new Point(96, 68);
     _lblMD5.Name     = "_lblMD5";
     _lblMD5.Size     = new Size(0, 13);
     _lblMD5.TabIndex = 8;
     //
     // menuStrip1
     //
     _menuStrip1.BackColor = SystemColors.ControlLight;
     _menuStrip1.GripStyle = ToolStripGripStyle.Visible;
     _menuStrip1.Items.AddRange(new ToolStripItem[]
     {
         _miConfiguration
     });
     _menuStrip1.Location   = new Point(0, 0);
     _menuStrip1.Name       = "_menuStrip1";
     _menuStrip1.RenderMode = ToolStripRenderMode.System;
     _menuStrip1.Size       = new Size(1094, 24);
     _menuStrip1.TabIndex   = 9;
     _menuStrip1.Text       = "menuStrip1";
     //
     // miConfiguration
     //
     _miConfiguration.DropDownItems.AddRange(new ToolStripItem[]
     {
         _miFlashConfigurationToolStripMenuItem, _miInstallDrivers
     });
     _miConfiguration.Name = "_miConfiguration";
     _miConfiguration.Size = new Size(93, 40);
     _miConfiguration.Text = "Configuration";
     //
     // miFlashConfigurationToolStripMenuItem
     //
     _miFlashConfigurationToolStripMenuItem.Name   = "_miFlashConfigurationToolStripMenuItem";
     _miFlashConfigurationToolStripMenuItem.Size   = new Size(178, 22);
     _miFlashConfigurationToolStripMenuItem.Text   = "Configure MiFlash";
     _miFlashConfigurationToolStripMenuItem.Click += miFlashConfigurationToolStripMenuItem_Click;
     //
     // miInstallDriver
     //
     _miInstallDrivers.Name   = "_miInstallDrivers";
     _miInstallDrivers.Size   = new Size(178, 22);
     _miInstallDrivers.Text   = "Install Drivers";
     _miInstallDrivers.Click += miInstallDrivers_Click;
     //
     // MainFrm
     //
     ClientSize = new Size(1094, 444);
     Controls.Add(_lblMD5);
     Controls.Add(_statusStrp);
     Controls.Add(_menuStrip1);
     Controls.Add(_txtLog);
     Controls.Add(_devicelist);
     Controls.Add(_btnFlash);
     Controls.Add(_btnRefresh);
     Controls.Add(_btnBrwDic);
     Controls.Add(_txtPath);
     MainMenuStrip = _menuStrip1;
     Name          = "MainFrm";
     StartPosition = FormStartPosition.CenterScreen;
     Text          = "QFlashKit (Beta)";
     FormClosing  += MainFrm_FormClosing;
     FormClosed   += MainFrm_FormClosed;
     Load         += MainFrm_Load;
     _statusStrp.ResumeLayout(false);
     _statusStrp.PerformLayout();
     _menuStrip1.ResumeLayout(false);
     _menuStrip1.PerformLayout();
     ResumeLayout(false);
     PerformLayout();
 }
Esempio n. 26
0
        private void InitializeComponent()
        {
            tableLayoutPanel1     = new System.Windows.Forms.TableLayoutPanel();
            webBrowser1           = new System.Windows.Forms.WebBrowser();
            tableLayoutPanel2     = new System.Windows.Forms.TableLayoutPanel();
            groupBox1             = new System.Windows.Forms.GroupBox();
            textBox2              = new System.Windows.Forms.TextBox();
            tableLayoutPanel3     = new System.Windows.Forms.TableLayoutPanel();
            button1               = new System.Windows.Forms.Button();
            button2               = new System.Windows.Forms.Button();
            groupBox2             = new System.Windows.Forms.GroupBox();
            tableLayoutPanel4     = new System.Windows.Forms.TableLayoutPanel();
            tableLayoutPanel5     = new System.Windows.Forms.TableLayoutPanel();
            label1                = new System.Windows.Forms.Label();
            label2                = new System.Windows.Forms.Label();
            textBox1              = new System.Windows.Forms.TextBox();
            comboBox1             = new System.Windows.Forms.ComboBox();
            tableLayoutPanel6     = new System.Windows.Forms.TableLayoutPanel();
            button3               = new System.Windows.Forms.Button();
            button4               = new System.Windows.Forms.Button();
            statusStrip1          = new System.Windows.Forms.StatusStrip();
            toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
            toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel();
            toolStripStatusLabel3 = new System.Windows.Forms.ToolStripStatusLabel();
            toolStripStatusLabel4 = new System.Windows.Forms.ToolStripStatusLabel();
            toolStripStatusLabel5 = new System.Windows.Forms.ToolStripStatusLabel();
            tableLayoutPanel1.SuspendLayout();
            tableLayoutPanel2.SuspendLayout();
            groupBox1.SuspendLayout();
            tableLayoutPanel3.SuspendLayout();
            groupBox2.SuspendLayout();
            tableLayoutPanel4.SuspendLayout();
            tableLayoutPanel5.SuspendLayout();
            tableLayoutPanel6.SuspendLayout();
            statusStrip1.SuspendLayout();
            SuspendLayout();
            bgWorker = new System.ComponentModel.BackgroundWorker();
            tableLayoutPanel1.ColumnCount = 1;
            tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100f));
            tableLayoutPanel1.Controls.Add(webBrowser1, 0, 0);
            tableLayoutPanel1.Controls.Add(tableLayoutPanel2, 0, 1);
            tableLayoutPanel1.Dock     = System.Windows.Forms.DockStyle.Fill;
            tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
            tableLayoutPanel1.Margin   = new System.Windows.Forms.Padding(0);
            tableLayoutPanel1.Name     = "tableLayoutPanel1";
            tableLayoutPanel1.RowCount = 2;
            tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 77.77778f));
            tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 22.22222f));
            tableLayoutPanel1.Size     = new System.Drawing.Size(800, 600);
            tableLayoutPanel1.TabIndex = 0;
            webBrowser1.Anchor         = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
            webBrowser1.IsWebBrowserContextMenuEnabled = false;
            webBrowser1.Location          = new System.Drawing.Point(0, 0);
            webBrowser1.Margin            = new System.Windows.Forms.Padding(0);
            webBrowser1.MinimumSize       = new System.Drawing.Size(20, 20);
            webBrowser1.Name              = "webBrowser1";
            webBrowser1.ScrollBarsEnabled = false;
            webBrowser1.Size              = new System.Drawing.Size(800, 466);
            webBrowser1.TabIndex          = 0;
            tableLayoutPanel2.ColumnCount = 3;
            tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 35f));
            tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 15f));
            tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50f));
            tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20f));
            tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20f));
            tableLayoutPanel2.Controls.Add(groupBox1, 0, 0);
            tableLayoutPanel2.Controls.Add(tableLayoutPanel3, 1, 0);
            tableLayoutPanel2.Controls.Add(groupBox2, 2, 0);
            tableLayoutPanel2.Dock     = System.Windows.Forms.DockStyle.Fill;
            tableLayoutPanel2.Location = new System.Drawing.Point(0, 476);
            tableLayoutPanel2.Margin   = new System.Windows.Forms.Padding(0, 10, 0, 0);
            tableLayoutPanel2.Name     = "tableLayoutPanel2";
            tableLayoutPanel2.RowCount = 1;
            tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100f));
            tableLayoutPanel2.Size     = new System.Drawing.Size(800, 124);
            tableLayoutPanel2.TabIndex = 1;
            groupBox1.Anchor           = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
            groupBox1.Controls.Add(textBox2);
            groupBox1.ForeColor           = System.Drawing.SystemColors.HotTrack;
            groupBox1.Location            = new System.Drawing.Point(3, 3);
            groupBox1.Name                = "groupBox1";
            groupBox1.Size                = new System.Drawing.Size(274, 118);
            groupBox1.TabIndex            = 0;
            groupBox1.TabStop             = false;
            groupBox1.Text                = "操作日志";
            groupBox1.Margin              = new System.Windows.Forms.Padding(10, 0, 0, 0);
            textBox2.Dock                 = System.Windows.Forms.DockStyle.Fill;
            textBox2.Location             = new System.Drawing.Point(3, 21);
            textBox2.Multiline            = true;
            textBox2.Name                 = "textBox2";
            textBox2.ReadOnly             = true;
            textBox2.ScrollBars           = System.Windows.Forms.ScrollBars.Vertical;
            textBox2.Size                 = new System.Drawing.Size(268, 94);
            textBox2.TabIndex             = 0;
            tableLayoutPanel3.ColumnCount = 1;
            tableLayoutPanel3.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50f));
            tableLayoutPanel3.Controls.Add(button1, 0, 0);
            tableLayoutPanel3.Controls.Add(button2, 0, 1);
            tableLayoutPanel3.Dock     = System.Windows.Forms.DockStyle.Fill;
            tableLayoutPanel3.Location = new System.Drawing.Point(283, 3);
            tableLayoutPanel3.Name     = "tableLayoutPanel3";
            tableLayoutPanel3.RowCount = 2;
            tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50f));
            tableLayoutPanel3.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50f));
            tableLayoutPanel3.Size     = new System.Drawing.Size(114, 118);
            tableLayoutPanel3.TabIndex = 1;
            button1.Anchor             = System.Windows.Forms.AnchorStyles.None;
            button1.Location           = new System.Drawing.Point(19, 18);
            button1.Name     = "button1";
            button1.Size     = new System.Drawing.Size(75, 23);
            button1.TabIndex = 0;
            button1.Text     = "修改定位";
            button1.UseVisualStyleBackColor = true;
            button1.Click   += new System.EventHandler(button1_Click);
            button2.Anchor   = System.Windows.Forms.AnchorStyles.None;
            button2.Location = new System.Drawing.Point(19, 77);
            button2.Name     = "button2";
            button2.Size     = new System.Drawing.Size(75, 23);
            button2.TabIndex = 1;
            button2.Text     = "还原定位";
            button2.UseVisualStyleBackColor = true;
            button2.Click   += new System.EventHandler(button2_Click);
            groupBox2.Anchor = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
            groupBox2.Controls.Add(tableLayoutPanel4);
            groupBox2.ForeColor           = System.Drawing.SystemColors.HotTrack;
            groupBox2.Location            = new System.Drawing.Point(403, 3);
            groupBox2.Name                = "groupBox2";
            groupBox2.Size                = new System.Drawing.Size(394, 118);
            groupBox2.TabIndex            = 2;
            groupBox2.TabStop             = false;
            groupBox2.Text                = "常用位置";
            tableLayoutPanel4.ColumnCount = 2;
            tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 70f));
            tableLayoutPanel4.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 30f));
            tableLayoutPanel4.Controls.Add(tableLayoutPanel5, 0, 0);
            tableLayoutPanel4.Controls.Add(tableLayoutPanel6, 1, 0);
            tableLayoutPanel4.Dock     = System.Windows.Forms.DockStyle.Fill;
            tableLayoutPanel4.Location = new System.Drawing.Point(3, 21);
            tableLayoutPanel4.Name     = "tableLayoutPanel4";
            tableLayoutPanel4.RowCount = 1;
            tableLayoutPanel4.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100f));
            tableLayoutPanel4.Size        = new System.Drawing.Size(388, 94);
            tableLayoutPanel4.TabIndex    = 0;
            tableLayoutPanel5.Anchor      = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
            tableLayoutPanel5.ColumnCount = 2;
            tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 44.15094f));
            tableLayoutPanel5.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 55.84906f));
            tableLayoutPanel5.Controls.Add(label2, 0, 0);
            tableLayoutPanel5.Controls.Add(label1, 0, 1);
            tableLayoutPanel5.Controls.Add(comboBox1, 1, 1);
            tableLayoutPanel5.Controls.Add(textBox1, 1, 0);
            tableLayoutPanel5.Location = new System.Drawing.Point(3, 3);
            tableLayoutPanel5.Name     = "tableLayoutPanel5";
            tableLayoutPanel5.RowCount = 2;
            tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50f));
            tableLayoutPanel5.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50f));
            tableLayoutPanel5.Size     = new System.Drawing.Size(265, 88);
            tableLayoutPanel5.TabIndex = 0;
            label1.Anchor                   = System.Windows.Forms.AnchorStyles.None;
            label1.AutoSize                 = true;
            label1.ForeColor                = System.Drawing.SystemColors.Desktop;
            label1.Location                 = new System.Drawing.Point(17, 14);
            label1.Name                     = "label1";
            label1.Size                     = new System.Drawing.Size(82, 15);
            label1.TabIndex                 = 0;
            label1.Text                     = "常用位置:";
            label2.Anchor                   = System.Windows.Forms.AnchorStyles.None;
            label2.AutoSize                 = true;
            label2.ForeColor                = System.Drawing.SystemColors.Desktop;
            label2.Location                 = new System.Drawing.Point(17, 58);
            label2.Name                     = "label2";
            label2.Size                     = new System.Drawing.Size(82, 15);
            label2.TabIndex                 = 1;
            label2.Text                     = "位置别名:";
            textBox1.Anchor                 = (System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
            textBox1.Location               = new System.Drawing.Point(119, 53);
            textBox1.Name                   = "textBox1";
            textBox1.Size                   = new System.Drawing.Size(143, 25);
            textBox1.TabIndex               = 2;
            comboBox1.Anchor                = (System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
            comboBox1.FormattingEnabled     = true;
            comboBox1.Location              = new System.Drawing.Point(119, 10);
            comboBox1.Name                  = "comboBox1";
            comboBox1.Size                  = new System.Drawing.Size(143, 23);
            comboBox1.TabIndex              = 3;
            comboBox1.DropDownStyle         = System.Windows.Forms.ComboBoxStyle.DropDownList;
            comboBox1.DisplayMember         = "Key";
            comboBox1.ValueMember           = "Value";
            comboBox1.SelectedIndexChanged += new System.EventHandler(comboBox1_SelectedIndexChanged);
            tableLayoutPanel6.Anchor        = (System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
            tableLayoutPanel6.ColumnCount   = 1;
            tableLayoutPanel6.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50f));
            tableLayoutPanel6.Controls.Add(button3, 0, 0);
            tableLayoutPanel6.Controls.Add(button4, 0, 1);
            tableLayoutPanel6.Location = new System.Drawing.Point(274, 3);
            tableLayoutPanel6.Name     = "tableLayoutPanel6";
            tableLayoutPanel6.RowCount = 2;
            tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50f));
            tableLayoutPanel6.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50f));
            tableLayoutPanel6.Size     = new System.Drawing.Size(111, 88);
            tableLayoutPanel6.TabIndex = 1;
            button3.Anchor             = (System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
            button3.ForeColor          = System.Drawing.SystemColors.Desktop;
            button3.Location           = new System.Drawing.Point(3, 10);
            button3.Name     = "button3";
            button3.Size     = new System.Drawing.Size(105, 23);
            button3.TabIndex = 0;
            button3.Text     = "保存常用位置";
            button3.UseVisualStyleBackColor = true;
            button3.Click    += new System.EventHandler(button3_Click);
            button4.Anchor    = (System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right);
            button4.ForeColor = System.Drawing.SystemColors.Desktop;
            button4.Location  = new System.Drawing.Point(3, 54);
            button4.Name      = "button4";
            button4.Size      = new System.Drawing.Size(105, 23);
            button4.TabIndex  = 1;
            button4.Text      = "删除常用位置";
            button4.UseVisualStyleBackColor = true;
            button4.Click += new System.EventHandler(button4_Click);
            statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
            statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[5]
            {
                toolStripStatusLabel1,
                toolStripStatusLabel2,
                toolStripStatusLabel4,
                toolStripStatusLabel5,
                toolStripStatusLabel3
            });
            statusStrip1.Location        = new System.Drawing.Point(0, 574);
            statusStrip1.Name            = "statusStrip1";
            statusStrip1.Size            = new System.Drawing.Size(800, 36);
            statusStrip1.TabIndex        = 1;
            statusStrip1.Text            = "statusStrip1";
            statusStrip1.SizingGrip      = false;
            toolStripStatusLabel1.Name   = "toolStripStatusLabel1";
            toolStripStatusLabel1.Size   = new System.Drawing.Size(84, 20);
            toolStripStatusLabel1.Text   = "当前设备:";
            toolStripStatusLabel2.Name   = "toolStripStatusLabel2";
            toolStripStatusLabel2.Size   = new System.Drawing.Size(151, 20);
            toolStripStatusLabel2.Text   = "未连接";
            toolStripStatusLabel3.IsLink = true;
            toolStripStatusLabel3.Margin = new System.Windows.Forms.Padding(10, 3, 0, 2);
            toolStripStatusLabel3.Name   = "toolStripStatusLabel3";
            toolStripStatusLabel3.Size   = new System.Drawing.Size(69, 20);
            toolStripStatusLabel3.Text   = "激活卡密";
            toolStripStatusLabel3.Click += new System.EventHandler(toolStripStatusLabel3_Click);
            toolStripStatusLabel4.Name   = "toolStripStatusLabel4";
            toolStripStatusLabel4.Size   = new System.Drawing.Size(54, 20);
            toolStripStatusLabel4.Text   = "到期时间:";
            toolStripStatusLabel5.Name   = "toolStripStatusLabel5";
            toolStripStatusLabel5.Size   = new System.Drawing.Size(54, 20);
            toolStripStatusLabel5.Text   = "卡密已过期";
            bgWorker.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(bgWorker_RunWorkerCompleted);
            base.AutoScaleDimensions     = new System.Drawing.SizeF(8f, 15f);
            base.AutoScaleMode           = System.Windows.Forms.AutoScaleMode.Font;
            int width  = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
            int height = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;

            base.ClientSize    = new System.Drawing.Size(width / 10 * 5, height / 10 * 5);
            base.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            base.Icon          = iFakeLocation.Properties.Resources.logo;
            base.Controls.Add(tableLayoutPanel1);
            base.Name = "MainForm";
            Text      = iFakeLocation.Properties.Resources.name + " v" + iFakeLocation.Properties.Resources.version;
            base.Controls.Add(statusStrip1);
            tableLayoutPanel1.ResumeLayout(false);
            tableLayoutPanel2.ResumeLayout(false);
            groupBox1.ResumeLayout(false);
            groupBox1.PerformLayout();
            tableLayoutPanel3.ResumeLayout(false);
            groupBox2.ResumeLayout(false);
            tableLayoutPanel4.ResumeLayout(false);
            tableLayoutPanel5.ResumeLayout(false);
            tableLayoutPanel5.PerformLayout();
            tableLayoutPanel6.ResumeLayout(false);
            statusStrip1.ResumeLayout(false);
            statusStrip1.PerformLayout();
            ResumeLayout(false);
        }
Esempio n. 27
0
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            components           = new Container();
            statusStrip          = new StatusStrip();
            toolStripProgressBar = new ToolStripProgressBar();
            toolStripStatusLabel = new ToolStripStatusLabel();
            eventLog             = new EventLog();
            notifyIcon           = new NotifyIcon(components);
            bindingSource        = new BindingSource(components);
            panel1 = new Panel();
            statusStrip.SuspendLayout();
            ((ISupportInitialize)(eventLog)).BeginInit();
            ((ISupportInitialize)(bindingSource)).BeginInit();
            panel1.SuspendLayout();
            SuspendLayout();

            //
            // statusStrip
            //
            statusStrip.Font = new Font("Segoe UI", 12F);
            statusStrip.Items.AddRange(new ToolStripItem[] {
                toolStripProgressBar,
                toolStripStatusLabel
            });
            statusStrip.Location = new Point(0, 369);
            statusStrip.Name     = "statusStrip";
            statusStrip.Size     = new Size(614, 26);
            statusStrip.TabIndex = 2;
            statusStrip.Text     = "statusStrip";
            //
            // toolStripProgressBar
            //
            toolStripProgressBar.Font = new Font("Segoe UI", 12F);
            toolStripProgressBar.Name = "toolStripProgressBar";
            toolStripProgressBar.Size = new Size(100, 20);
            //
            // toolStripStatusLabel
            //
            toolStripStatusLabel.Name = "toolStripStatusLabel";
            toolStripStatusLabel.Size = new Size(0, 21);
            //
            // eventLog
            //
            eventLog.SynchronizingObject = this;
            //
            // notifyIcon
            //
            notifyIcon.Text    = "notifyIcon";
            notifyIcon.Visible = true;
            //
            // panel1
            //
            panel1.AutoScroll = true;
            panel1.AutoSize   = true;
            panel1.Dock       = DockStyle.Fill;
            panel1.Location   = new Point(0, 138);
            panel1.Name       = "panel1";
            panel1.Size       = new Size(614, 231);
            panel1.TabIndex   = 4;
            //
            // Form
            //
            AutoScaleDimensions = new SizeF(7F, 17F);
            AutoScaleMode       = AutoScaleMode.Font;
            AutoScroll          = true;
            AutoSize            = true;
            KeyPreview          = true;
            BackColor           = Color.White;
            ClientSize          = new Size(614, 395);
            Controls.Add(panel1);
            Controls.Add(statusStrip);
            Font          = new Font("Segoe UI", 9.75F, FontStyle.Regular, GraphicsUnit.Point, 0);
            KeyPreview    = true;
            Margin        = new Padding(3, 4, 3, 4);
            Name          = "SForm";
            StartPosition = FormStartPosition.CenterScreen;
            Text          = "ESR SOFTWARES";
            statusStrip.ResumeLayout(false);
            statusStrip.PerformLayout();
            ((ISupportInitialize)(eventLog)).EndInit();
            ((ISupportInitialize)(bindingSource)).EndInit();
            panel1.ResumeLayout(false);
            panel1.PerformLayout();
            ResumeLayout(false);
            PerformLayout();
        }
 private void InitializeComponent()
 {
     mainPanel                    = new System.Windows.Forms.Panel();
     listTraces                   = new System.Windows.Forms.ListView();
     dateTimeHeader               = new System.Windows.Forms.ColumnHeader();
     executionHeader              = new System.Windows.Forms.ColumnHeader();
     activityHeader               = new System.Windows.Forms.ColumnHeader();
     actionHeader                 = new System.Windows.Forms.ColumnHeader();
     toHeader                     = new System.Windows.Forms.ColumnHeader();
     statusStrip                  = new System.Windows.Forms.StatusStrip();
     traceCountStatusLabel        = new System.Windows.Forms.ToolStripStatusLabel();
     groupByStripMenu             = new System.Windows.Forms.MenuStrip();
     groupByStripMenuItem         = new System.Windows.Forms.ToolStripMenuItem();
     groupByNoneStripMenuItem     = new System.Windows.Forms.ToolStripMenuItem();
     groupByActivityStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
     groupByProcessStripMenuItem  = new System.Windows.Forms.ToolStripMenuItem();
     groupByInOutStripMenuItem    = new System.Windows.Forms.ToolStripMenuItem();
     mainPanel.SuspendLayout();
     statusStrip.SuspendLayout();
     SuspendLayout();
     mainPanel.Controls.Add(listTraces);
     mainPanel.Controls.Add(groupByStripMenu);
     mainPanel.Dock                = System.Windows.Forms.DockStyle.Fill;
     mainPanel.Location            = new System.Drawing.Point(0, 0);
     mainPanel.Name                = "mainPanel";
     mainPanel.Size                = new System.Drawing.Size(300, 533);
     mainPanel.TabIndex            = 0;
     listTraces.AllowColumnReorder = true;
     listTraces.Columns.AddRange(new System.Windows.Forms.ColumnHeader[5]
     {
         actionHeader,
         dateTimeHeader,
         executionHeader,
         activityHeader,
         toHeader
     });
     listTraces.Dock                  = System.Windows.Forms.DockStyle.Fill;
     listTraces.FullRowSelect         = true;
     listTraces.Location              = new System.Drawing.Point(0, 25);
     listTraces.MultiSelect           = false;
     listTraces.Name                  = "listTraces";
     listTraces.ShowItemToolTips      = true;
     listTraces.Size                  = new System.Drawing.Size(300, 486);
     listTraces.TabIndex              = 2;
     listTraces.HideSelection         = false;
     listTraces.View                  = System.Windows.Forms.View.Details;
     listTraces.SelectedIndexChanged += new System.EventHandler(listTraces_SelectedIndexChanged);
     listTraces.DoubleClick          += new System.EventHandler(listTraces_DoubleClick);
     listTraces.ColumnClick          += new System.Windows.Forms.ColumnClickEventHandler(listTraces_ColumnClick);
     listTraces.RetrieveVirtualItem  += new System.Windows.Forms.RetrieveVirtualItemEventHandler(listTraces_RetrieveVirtualItem);
     dateTimeHeader.Text              = Microsoft.Tools.ServiceModel.TraceViewer.SR.GetString("MsgView_Header0");
     dateTimeHeader.Width             = 150;
     executionHeader.Text             = Microsoft.Tools.ServiceModel.TraceViewer.SR.GetString("MsgView_Header1");
     executionHeader.Width            = 120;
     activityHeader.Text              = Microsoft.Tools.ServiceModel.TraceViewer.SR.GetString("MsgView_Header2");
     activityHeader.Width             = 100;
     actionHeader.Text                = Microsoft.Tools.ServiceModel.TraceViewer.SR.GetString("MsgView_Header3");
     actionHeader.Width               = 150;
     toHeader.Text = Microsoft.Tools.ServiceModel.TraceViewer.SR.GetString("MsgView_Header4");
     statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[1]
     {
         traceCountStatusLabel
     });
     statusStrip.LayoutStyle                  = System.Windows.Forms.ToolStripLayoutStyle.Table;
     statusStrip.Location                     = new System.Drawing.Point(0, 511);
     statusStrip.Name                         = "statusStrip";
     statusStrip.ShowItemToolTips             = true;
     statusStrip.Size                         = new System.Drawing.Size(300, 22);
     statusStrip.SizingGrip                   = false;
     statusStrip.TabStop                      = false;
     traceCountStatusLabel.Name               = "traceCountStatusLabel";
     traceCountStatusLabel.ToolTipText        = Microsoft.Tools.ServiceModel.TraceViewer.SR.GetString("MsgView_CountTip");
     groupByNoneStripMenuItem.Name            = "groupMessageByNoneStripMenuItem";
     groupByNoneStripMenuItem.Text            = Microsoft.Tools.ServiceModel.TraceViewer.SR.GetString("MainFrm_GNone");
     groupByNoneStripMenuItem.Click          += new System.EventHandler(groupByNoneStripMenuItem_Click);
     groupByNoneStripMenuItem.ToolTipText     = Microsoft.Tools.ServiceModel.TraceViewer.SR.GetString("MainFrm_GroupByNoneTip");
     groupByActivityStripMenuItem.Name        = "groupMessageByActivityStripMenuItem";
     groupByActivityStripMenuItem.Text        = Microsoft.Tools.ServiceModel.TraceViewer.SR.GetString("MainFrm_GActivity");
     groupByActivityStripMenuItem.Click      += new System.EventHandler(groupByActivityStripMenuItem_Click);
     groupByActivityStripMenuItem.ToolTipText = Microsoft.Tools.ServiceModel.TraceViewer.SR.GetString("MainFrm_GroupByActivityTip");
     groupByProcessStripMenuItem.Name         = "groupByProcessStripMenuItem";
     groupByProcessStripMenuItem.Text         = Microsoft.Tools.ServiceModel.TraceViewer.SR.GetString("MainFrm_GProcess");
     groupByProcessStripMenuItem.Click       += new System.EventHandler(groupByProcessStripMenuItem_Click);
     groupByProcessStripMenuItem.ToolTipText  = Microsoft.Tools.ServiceModel.TraceViewer.SR.GetString("MainFrm_GroupByProcessTip");
     groupByInOutStripMenuItem.Name           = "groupByInOutStripMenuItem";
     groupByInOutStripMenuItem.Text           = Microsoft.Tools.ServiceModel.TraceViewer.SR.GetString("MainFrm_GIO");
     groupByInOutStripMenuItem.Click         += new System.EventHandler(groupByInOutStripMenuItem_Click);
     groupByInOutStripMenuItem.ToolTipText    = Microsoft.Tools.ServiceModel.TraceViewer.SR.GetString("MainFrm_GroupByInOutTip");
     groupByStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[4]
     {
         groupByNoneStripMenuItem,
         groupByActivityStripMenuItem,
         groupByProcessStripMenuItem,
         groupByInOutStripMenuItem
     });
     groupByStripMenuItem.Name        = "groupMessageByStripMenuItem";
     groupByStripMenuItem.Text        = Microsoft.Tools.ServiceModel.TraceViewer.SR.GetString("MainFrm_GroupBy");
     groupByStripMenuItem.ToolTipText = Microsoft.Tools.ServiceModel.TraceViewer.SR.GetString("MainFrm_GroupByTip");
     groupByStripMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[1]
     {
         groupByStripMenuItem
     });
     groupByStripMenu.Location         = new System.Drawing.Point(0, 0);
     groupByStripMenu.Name             = "groupMessageByStripMenu";
     groupByStripMenu.Size             = new System.Drawing.Size(636, 24);
     groupByStripMenu.TabIndex         = 1;
     groupByStripMenu.ShowItemToolTips = true;
     base.AutoScaleDimensions          = new System.Drawing.SizeF(6f, 13f);
     base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     base.Controls.Add(mainPanel);
     base.Name = "MessageViewControl";
     base.Size = new System.Drawing.Size(300, 533);
     mainPanel.ResumeLayout(performLayout: false);
     mainPanel.PerformLayout();
     statusStrip.ResumeLayout(performLayout: false);
     ResumeLayout(performLayout: false);
 }
Esempio n. 29
0
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(AlexBot.RemoteDesktop));
     pictureBox1           = new System.Windows.Forms.PictureBox();
     statusStrip1          = new System.Windows.Forms.StatusStrip();
     toolStripSplitButton1 = new System.Windows.Forms.ToolStripSplitButton();
     toolStripMenuItem_0   = new System.Windows.Forms.ToolStripMenuItem();
     saveFileDialog1       = new System.Windows.Forms.SaveFileDialog();
     checkBox1             = new System.Windows.Forms.CheckBox();
     checkBox2             = new System.Windows.Forms.CheckBox();
     ((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
     statusStrip1.SuspendLayout();
     SuspendLayout();
     pictureBox1.Location = new System.Drawing.Point(0, 0);
     pictureBox1.Name     = "pictureBox1";
     pictureBox1.Size     = new System.Drawing.Size(521, 369);
     pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
     pictureBox1.TabIndex = 0;
     pictureBox1.TabStop  = false;
     statusStrip1.Dock    = System.Windows.Forms.DockStyle.Top;
     statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[1]
     {
         toolStripSplitButton1
     });
     statusStrip1.Location = new System.Drawing.Point(0, 0);
     statusStrip1.Name     = "statusStrip1";
     statusStrip1.Size     = new System.Drawing.Size(554, 22);
     statusStrip1.TabIndex = 1;
     statusStrip1.Text     = "statusStrip1";
     toolStripSplitButton1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
     toolStripSplitButton1.DisplayStyle          = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
     toolStripSplitButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[1]
     {
         toolStripMenuItem_0
     });
     toolStripSplitButton1.Image                 = (System.Drawing.Image)resources.GetObject("toolStripSplitButton1.Image");
     toolStripSplitButton1.ImageScaling          = System.Windows.Forms.ToolStripItemImageScaling.None;
     toolStripSplitButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
     toolStripSplitButton1.Name              = "toolStripSplitButton1";
     toolStripSplitButton1.Size              = new System.Drawing.Size(78, 20);
     toolStripSplitButton1.Text              = "Запустить";
     toolStripSplitButton1.TextAlign         = System.Drawing.ContentAlignment.MiddleRight;
     toolStripSplitButton1.TextImageRelation = System.Windows.Forms.TextImageRelation.Overlay;
     toolStripSplitButton1.ButtonClick      += new System.EventHandler(ToolStripSplitButton1ButtonClick);
     toolStripMenuItem_0.Name          = "сохранитьСкриншотToolStripMenuItem";
     toolStripMenuItem_0.Size          = new System.Drawing.Size(191, 22);
     toolStripMenuItem_0.Text          = "Сохранить скриншот";
     toolStripMenuItem_0.Click        += new System.EventHandler(toolStripMenuItem_0_Click);
     checkBox1.Location                = new System.Drawing.Point(102, 2);
     checkBox1.Name                    = "checkBox1";
     checkBox1.Size                    = new System.Drawing.Size(163, 24);
     checkBox1.TabIndex                = 2;
     checkBox1.Text                    = "Использовать мышь";
     checkBox1.UseVisualStyleBackColor = true;
     checkBox2.Location                = new System.Drawing.Point(237, 2);
     checkBox2.Name                    = "checkBox2";
     checkBox2.Size                    = new System.Drawing.Size(163, 24);
     checkBox2.TabIndex                = 3;
     checkBox2.Text                    = "Использовать клавиатуру";
     checkBox2.UseVisualStyleBackColor = true;
     base.AutoScaleDimensions          = new System.Drawing.SizeF(6f, 13f);
     base.AutoScaleMode                = System.Windows.Forms.AutoScaleMode.Font;
     AutoScroll      = true;
     base.ClientSize = new System.Drawing.Size(554, 383);
     base.Controls.Add(checkBox2);
     base.Controls.Add(checkBox1);
     base.Controls.Add(statusStrip1);
     base.Controls.Add(pictureBox1);
     base.Name          = "RemoteDesktop";
     base.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
     Text              = "Удалённый рабочий стол";
     base.FormClosing += new System.Windows.Forms.FormClosingEventHandler(RemoteDesktopFormClosing);
     base.Load        += new System.EventHandler(RemoteDesktopLoad);
     base.KeyPress    += new System.Windows.Forms.KeyPressEventHandler(RemoteDesktopKeyPress);
     ((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
     statusStrip1.ResumeLayout(false);
     statusStrip1.PerformLayout();
     ResumeLayout(false);
     PerformLayout();
 }
Esempio n. 30
0
        private void InitializeComponent2()
        {
            components = new Container();
            ComponentResourceManager resources = new ComponentResourceManager(typeof(FindForm));

            statusStrip1          = new StatusStrip();
            toolStripStatusLabel1 = new ToolStripStatusLabel();
            tableLayoutPanel1     = new TableLayoutPanel();
            panel1                 = new Panel();
            columnSelectButton     = new Button();
            helpButton             = new Button();
            wildcardsComboBox      = new ComboBox();
            lookInComboBox         = new ComboBox();
            label2                 = new Label();
            useCheckBox            = new CheckBox();
            searchUpCheckBox       = new CheckBox();
            matchWholeWordCheckBox = new CheckBox();
            findAllButton          = new Button();
            findNextButton         = new Button();
            cancelButton           = new Button();
            matchCaseCheckBox      = new CheckBox();
            expressionTextBox      = new TextBox();
            label1                 = new Label();
            tableView1             = new Scroll.CompoundScrollableControl();
            statusStrip1.SuspendLayout();
            tableLayoutPanel1.SuspendLayout();
            panel1.SuspendLayout();
            SuspendLayout();
            //
            // statusStrip1
            //
            statusStrip1.Items.AddRange(new ToolStripItem[] { toolStripStatusLabel1 });
            statusStrip1.Location = new Point(0, 196);
            statusStrip1.Name     = "statusStrip1";
            statusStrip1.Size     = new Size(336, 22);
            statusStrip1.TabIndex = 0;
            statusStrip1.Text     = "statusStrip1";
            //
            // toolStripStatusLabel1
            //
            toolStripStatusLabel1.Name = "toolStripStatusLabel1";
            toolStripStatusLabel1.Size = new Size(0, 17);
            //
            // tableLayoutPanel1
            //
            tableLayoutPanel1.ColumnCount = 1;
            tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
            tableLayoutPanel1.Controls.Add(panel1, 0, 0);
            tableLayoutPanel1.Controls.Add(tableView1, 0, 1);
            tableLayoutPanel1.Dock     = DockStyle.Fill;
            tableLayoutPanel1.Location = new Point(0, 0);
            tableLayoutPanel1.Name     = "tableLayoutPanel1";
            tableLayoutPanel1.RowCount = 2;
            tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 196F));
            tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
            tableLayoutPanel1.Size     = new Size(336, 196);
            tableLayoutPanel1.TabIndex = 1;
            //
            // panel1
            //
            panel1.Controls.Add(columnSelectButton);
            panel1.Controls.Add(helpButton);
            panel1.Controls.Add(wildcardsComboBox);
            panel1.Controls.Add(lookInComboBox);
            panel1.Controls.Add(label2);
            panel1.Controls.Add(useCheckBox);
            panel1.Controls.Add(searchUpCheckBox);
            panel1.Controls.Add(matchWholeWordCheckBox);
            panel1.Controls.Add(findAllButton);
            panel1.Controls.Add(findNextButton);
            panel1.Controls.Add(cancelButton);
            panel1.Controls.Add(matchCaseCheckBox);
            panel1.Controls.Add(expressionTextBox);
            panel1.Controls.Add(label1);
            panel1.Dock     = DockStyle.Fill;
            panel1.Location = new Point(3, 3);
            panel1.Name     = "panel1";
            panel1.Size     = new Size(330, 190);
            panel1.TabIndex = 0;
            //
            // columnSelectButton
            //
            columnSelectButton.Anchor   = AnchorStyles.Top | AnchorStyles.Right;
            columnSelectButton.Location = new Point(299, 36);
            columnSelectButton.Name     = "columnSelectButton";
            columnSelectButton.Size     = new Size(22, 21);
            columnSelectButton.TabIndex = 14;
            columnSelectButton.Text     = ">";
            columnSelectButton.UseVisualStyleBackColor = true;
            columnSelectButton.Click += ColumnSelectButtonClick;
            //
            // helpButton
            //
            helpButton.Anchor   = AnchorStyles.Top | AnchorStyles.Right;
            helpButton.Location = new Point(299, 6);
            helpButton.Name     = "helpButton";
            helpButton.Size     = new Size(22, 21);
            helpButton.TabIndex = 13;
            helpButton.Text     = ">";
            helpButton.UseVisualStyleBackColor = true;
            //
            // wildcardsComboBox
            //
            wildcardsComboBox.Anchor            = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
            wildcardsComboBox.FormattingEnabled = true;
            wildcardsComboBox.Items.AddRange(new object[] { "Regular expressions", "Wildcards" });
            wildcardsComboBox.Location = new Point(72, 134);
            wildcardsComboBox.Name     = "wildcardsComboBox";
            wildcardsComboBox.Size     = new Size(249, 21);
            wildcardsComboBox.TabIndex = 12;
            //
            // lookInComboBox
            //
            lookInComboBox.Anchor            = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
            lookInComboBox.DropDownStyle     = ComboBoxStyle.DropDownList;
            lookInComboBox.FormattingEnabled = true;
            lookInComboBox.Location          = new Point(72, 36);
            lookInComboBox.Name     = "lookInComboBox";
            lookInComboBox.Size     = new Size(221, 21);
            lookInComboBox.TabIndex = 11;
            //
            // label2
            //
            label2.AutoSize = true;
            label2.Location = new Point(10, 39);
            label2.Name     = "label2";
            label2.Size     = new Size(45, 13);
            label2.TabIndex = 10;
            label2.Text     = "Look in:";
            //
            // useCheckBox
            //
            useCheckBox.AutoSize = true;
            useCheckBox.Location = new Point(15, 136);
            useCheckBox.Name     = "useCheckBox";
            useCheckBox.Size     = new Size(45, 17);
            useCheckBox.TabIndex = 9;
            useCheckBox.Text     = "Use";
            useCheckBox.UseVisualStyleBackColor = true;
            useCheckBox.CheckedChanged         += UseCheckBoxCheckedChanged;
            //
            // searchUpCheckBox
            //
            searchUpCheckBox.AutoSize = true;
            searchUpCheckBox.Location = new Point(15, 113);
            searchUpCheckBox.Name     = "searchUpCheckBox";
            searchUpCheckBox.Size     = new Size(75, 17);
            searchUpCheckBox.TabIndex = 8;
            searchUpCheckBox.Text     = "Search up";
            searchUpCheckBox.UseVisualStyleBackColor = true;
            //
            // matchWholeWordCheckBox
            //
            matchWholeWordCheckBox.AutoSize = true;
            matchWholeWordCheckBox.Location = new Point(15, 90);
            matchWholeWordCheckBox.Name     = "matchWholeWordCheckBox";
            matchWholeWordCheckBox.Size     = new Size(113, 17);
            matchWholeWordCheckBox.TabIndex = 7;
            matchWholeWordCheckBox.Text     = "Match whole word";
            matchWholeWordCheckBox.UseVisualStyleBackColor = true;
            //
            // findAllButton
            //
            findAllButton.Anchor   = AnchorStyles.Bottom | AnchorStyles.Right;
            findAllButton.Location = new Point(165, 161);
            findAllButton.Name     = "findAllButton";
            findAllButton.Size     = new Size(75, 23);
            findAllButton.TabIndex = 5;
            findAllButton.Text     = "Find all";
            findAllButton.UseVisualStyleBackColor = true;
            findAllButton.Click += FindAllButtonClick;
            //
            // findNextButton
            //
            findNextButton.Anchor   = AnchorStyles.Bottom | AnchorStyles.Right;
            findNextButton.Location = new Point(84, 161);
            findNextButton.Name     = "findNextButton";
            findNextButton.Size     = new Size(75, 23);
            findNextButton.TabIndex = 4;
            findNextButton.Text     = "Find next";
            findNextButton.UseVisualStyleBackColor = true;
            findNextButton.Click += FindNextButtonClick;
            //
            // cancelButton
            //
            cancelButton.Anchor                  = AnchorStyles.Bottom | AnchorStyles.Right;
            cancelButton.DialogResult            = DialogResult.Cancel;
            cancelButton.Location                = new Point(246, 161);
            cancelButton.Name                    = "cancelButton";
            cancelButton.Size                    = new Size(75, 23);
            cancelButton.TabIndex                = 3;
            cancelButton.Text                    = "Cancel";
            cancelButton.UseVisualStyleBackColor = true;
            cancelButton.Click                  += CancelButtonClick;
            //
            // matchCaseCheckBox
            //
            matchCaseCheckBox.AutoSize = true;
            matchCaseCheckBox.Location = new Point(15, 67);
            matchCaseCheckBox.Name     = "matchCaseCheckBox";
            matchCaseCheckBox.Size     = new Size(82, 17);
            matchCaseCheckBox.TabIndex = 2;
            matchCaseCheckBox.Text     = "Match case";
            matchCaseCheckBox.UseVisualStyleBackColor = true;
            //
            // expressionTextBox
            //
            expressionTextBox.Anchor   = (AnchorStyles.Top | AnchorStyles.Left) | AnchorStyles.Right;
            expressionTextBox.Location = new Point(72, 7);
            expressionTextBox.Name     = "expressionTextBox";
            expressionTextBox.Size     = new Size(221, 20);
            expressionTextBox.TabIndex = 1;
            //
            // label1
            //
            label1.AutoSize = true;
            label1.Location = new Point(10, 10);
            label1.Name     = "label1";
            label1.Size     = new Size(56, 13);
            label1.TabIndex = 0;
            label1.Text     = "Find what:";
            //
            // tableView1
            //
            tableView1.ColumnHeaderHeight = 26;
            tableView1.Dock           = DockStyle.Fill;
            tableView1.Location       = new Point(3, 199);
            tableView1.Name           = "tableView1";
            tableView1.RowHeaderWidth = 70;
            tableView1.Size           = new Size(330, 1);
            tableView1.TabIndex       = 1;
            tableView1.VisibleX       = 0;
            tableView1.VisibleY       = 0;
            //
            // FindForm
            //
            AutoScaleDimensions = new SizeF(6F, 13F);
            AutoScaleMode       = AutoScaleMode.Font;
            CancelButton        = cancelButton;
            ClientSize          = new Size(336, 218);
            Controls.Add(tableLayoutPanel1);
            Controls.Add(statusStrip1);
            Icon        = ((Icon)(resources.GetObject("$this.Icon")));
            MaximizeBox = false;
            MinimizeBox = false;
            MinimumSize = new Size(276, 256);
            Name        = "FindForm";
            Text        = Loc.Find;
            statusStrip1.ResumeLayout(false);
            statusStrip1.PerformLayout();
            tableLayoutPanel1.ResumeLayout(false);
            panel1.ResumeLayout(false);
            panel1.PerformLayout();
            ResumeLayout(false);
            PerformLayout();
        }
Esempio n. 31
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     canvas            = new PictureBox();
     canvas.Size       = new Size(530, 528);
     viewport          = new CentricView(canvas.Width, canvas.Height, 0, 0, 1);
     invoker           = new PreviousViewports();
     viewChangeButtons = new WmsViewer.ViewChangeButtons(viewport, invoker, canvas);
     newWmsButton      = new Button();
     layerSettings     = new WmsViewer.LayerSettings(canvas);
     wmsSettings       = new WmsViewer.WmsSettings(canvas);
     layers            = new TreeView();
     statusBar         = new StatusStrip();
     coordinatesLabel  = new ToolStripStatusLabel();
     ((ISupportInitialize)canvas).BeginInit();
     statusBar.SuspendLayout();
     SuspendLayout();
     //
     // canvas
     //
     canvas.Anchor = (AnchorStyles)(((AnchorStyles.Top | AnchorStyles.Bottom)
                                     | AnchorStyles.Left) | AnchorStyles.Right);
     canvas.BackColor   = Color.White;
     canvas.Location    = new Point(0, 0);
     canvas.Name        = "canvas";
     canvas.TabIndex    = 0;
     canvas.TabStop     = false;
     canvas.Paint      += new PaintEventHandler(CanvasRedraw);
     canvas.MouseClick += new MouseEventHandler(CanvasMouseClick);
     canvas.MouseEnter += new EventHandler(CanvasEnter);
     canvas.MouseDown  += new MouseEventHandler(CanvasMouseDown);
     canvas.MouseUp    += new MouseEventHandler(CanvasMouseUp);
     canvas.MouseWheel += new MouseEventHandler(CanvasMouseWheel);
     canvas.Resize     += new EventHandler(CanvasResize);
     //
     // viewChangeButtons
     //
     viewChangeButtons.Anchor   = (AnchorStyles)(AnchorStyles.Top | AnchorStyles.Right);
     viewChangeButtons.Location = new Point(532, 4);
     viewChangeButtons.Name     = "viewChangeButtons1";
     viewChangeButtons.Size     = new Size(150, 36);
     viewChangeButtons.TabIndex = 8;
     viewChangeButtons.Text     = string.Empty;
     //
     // newWmsButton
     //
     newWmsButton.Anchor   = (AnchorStyles)(AnchorStyles.Top | AnchorStyles.Right);
     newWmsButton.Location = new Point(686, 11);
     newWmsButton.Name     = "newWmsButton";
     newWmsButton.Size     = new Size(73, 23);
     newWmsButton.TabIndex = 4;
     newWmsButton.Text     = Properties.Resources.NewWms;
     newWmsButton.Click   += new EventHandler(NewWmsButtonClick);
     //
     // layerSettings
     //
     layerSettings.Anchor      = (AnchorStyles)(AnchorStyles.Top | AnchorStyles.Right);
     layerSettings.BorderStyle = BorderStyle.FixedSingle;
     layerSettings.Enabled     = false;
     layerSettings.Location    = new Point(531, 216);
     layerSettings.MinimumSize = new Size(228, 236);
     layerSettings.Name        = "layerSettings";
     layerSettings.Size        = new Size(228, 236);
     layerSettings.TabIndex    = 6;
     //
     // wmsSettings
     //
     wmsSettings.Anchor      = (AnchorStyles)(AnchorStyles.Top | AnchorStyles.Right);
     wmsSettings.BorderStyle = BorderStyle.FixedSingle;
     wmsSettings.Enabled     = false;
     wmsSettings.Location    = new Point(531, 46);
     wmsSettings.MinimumSize = new Size(228, 164);
     wmsSettings.Name        = "wmsSettings";
     wmsSettings.Size        = new Size(228, 164);
     wmsSettings.TabIndex    = 5;
     //
     // layers
     //
     layers.Anchor       = (AnchorStyles)((AnchorStyles.Top | AnchorStyles.Bottom) | AnchorStyles.Right);
     layers.CheckBoxes   = true;
     layers.Location     = new Point(531, 458);
     layers.Name         = "layers";
     layers.Size         = new Size(228, 68);
     layers.TabIndex     = 7;
     layers.AfterCheck  += new TreeViewEventHandler(LayersNodeChecked);
     layers.AfterSelect += new TreeViewEventHandler(LayersSelectChanged);
     layers.KeyDown     += new KeyEventHandler(LayersKeyDown);
     //
     // statusBar
     //
     statusBar.Items.AddRange(new ToolStripItem[] {
         coordinatesLabel
     });
     statusBar.Location = new Point(0, 527);
     statusBar.Name     = "statusBar";
     statusBar.Size     = new Size(760, 22);
     statusBar.TabIndex = 0;
     //
     // coordinatesLabel
     //
     coordinatesLabel.Name = "coordinatesLabel";
     coordinatesLabel.Size = new Size(0, 17);
     //
     // ViewerWindow
     //
     AutoScaleDimensions = new SizeF(6F, 13F);
     AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     ClientSize          = new Size(760, 549);
     Controls.Add(statusBar);
     Controls.Add(layers);
     Controls.Add(layerSettings);
     Controls.Add(wmsSettings);
     Controls.Add(viewChangeButtons);
     Controls.Add(newWmsButton);
     Controls.Add(canvas);
     Icon         = Properties.Resources.Main;
     KeyPreview   = true;
     MinimumSize  = new Size(768, 576);
     Name         = "ViewerWindow";
     Text         = Properties.Resources.ApplicationTitle;
     FormClosing += new FormClosingEventHandler(ViewerWindowClosing);
     KeyDown     += new KeyEventHandler(ViewerWindowKeyDown);
     Load        += new EventHandler(ViewerWindowInit);
     ((ISupportInitialize)canvas).EndInit();
     statusBar.ResumeLayout(false);
     statusBar.PerformLayout();
     ResumeLayout(false);
     PerformLayout();
 }