public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Location = new Point (8, 8); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on start-up:{0}{0}" + "1. The background color of the Form is blue and does not show " + "any distortions.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (330, 120); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #81721"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on start-up:{0}{0}" + "1. The background-color of the top part of the form " + "is blue.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (300, 90); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #328681"; }
public void main_form_loaded() { TabControl TabCtrl = (TabControl)GetControl("tabZoneProperties"); tabWeather = new TabPage("Weather"); tabWeather.UseVisualStyleBackColor = true; TabCtrl.TabPages.Add(tabWeather); MainForm.Controls.Remove(TabCtrl); lblRain = new Label(); lblRain.Text = "Rain Type"; string[] types = {"RAIN_NONE", "RAIN_OUTSIDE", "RAIN_OUTSIDE_DESERT", "RAIN_BUILDING", "RAIN_BUILDING_TOP", "RAIN_BUILDING_BOTTOM", "RAIN_CAVE", "RAIN_MINE", "RAIN_COAST", "RAIN_SEA" }; cmbRain = new ComboBox(); cmbRain.DropDownStyle = ComboBoxStyle.DropDownList; cmbRain.DropDownWidth = 200; cmbRain.Items.AddRange(types); cmbRain.SelectedIndex = -1; tabWeather.Controls.Add(cmbRain); tabWeather.Controls.Add(lblRain); lblRain.Location = new System.Drawing.Point(7, 10); cmbRain.Location = new System.Drawing.Point(65, 7); Load(); }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Excepted result on start-up:{0}{0}" + "1. A column named \"ColumnA\" is displayed.{0}{0}" + "2. An empty data row is displayed.{0}{0}" + "3. A selection column is displayed.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (400, 200); Location = new Point (550, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #80657"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on start-up:{0}{0}" + "1. Part of the text of the Show Modal Form button is visible.{0}{0}" + "2. The text of the button is not wrapped.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (300, 120); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #82272"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on start-up:{0}{0}" + "1. The animation is played without pauzes between " + "each frame.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (300, 100); Location = new Point (650, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #82445"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on start-up:{0}{0}" + "1. The First Name column fills the remainder of the display area " + "of the DataGridView.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (320, 110); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #82219"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on start-up:{0}{0}" + "1. The label is horizontally centered at the bottom " + "of the form.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (300, 100); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #82605"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on start-up:{0}{0}" + "1. An image containing the Stop icon is drawn in the top left " + "corner of the form.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (400, 120); Location = new Point (550, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #80758"; }
protected override int DrawTab (Graphics dc, TabPage page, TabControl tab, Rectangle bounds, bool is_selected) { if (!ShouldPaint (tab)) return base.DrawTab (dc, page, tab, bounds, is_selected); VisualStyleElement element = GetVisualStyleElement (tab, page, is_selected); if (!VisualStyleRenderer.IsElementDefined (element)) return base.DrawTab (dc, page, tab, bounds, is_selected); new VisualStyleRenderer (element).DrawBackground (dc, bounds); bounds.Inflate ( -(tab.Padding.X), -(tab.Padding.Y)); Rectangle text_area = bounds; if (tab.ImageList != null && page.ImageIndex >= 0 && page.ImageIndex < tab.ImageList.Images.Count) { int image_y = bounds.Y + (bounds.Height - tab.ImageList.ImageSize.Height) / 2; tab.ImageList.Draw (dc, new Point (bounds.X, image_y), page.ImageIndex); int image_occupied_space = tab.ImageList.ImageSize.Width + 2; text_area.X += image_occupied_space; text_area.Width -= image_occupied_space; } if (page.Text != null) dc.DrawString (page.Text, tab.Font, SystemBrushes.ControlText, text_area, DefaultFormatting); if (tab.Focused && is_selected && tab.ShowFocusCues) ControlPaint.DrawFocusRectangle (dc, bounds); return 0; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on start-up:{0}{0}" + "1. The DataGridView contains 4 rows.{0}{0}" + "2. The last row is empty, and can be used to insert a new row.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (320, 110); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #82226"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Steps to execute:{0}{0}" + "1. Scroll horizontally to see the complete text of the item.{0}{0}" + "Expected result:{0}{0}" + "1. The text is not blurred.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (360, 150); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #82097"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on startup:{0}{0}" + "1. The URL for www.mono-project.com is displayed " + "as a link.{0}{0}" + "2. Clicking the link opens the URL in a browser.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (300, 140); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #342516"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on start-up:{0}{0}" + "1. The centered and right-aligned text can be " + "selected with the mouse.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (300, 100); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #351881"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on startup:{0}{0}" + "1. A message box is displayed with:{0}{0}" + " * several lines of 'a' characters{0}" + " * a horizontally centered OK button.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (300, 140); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #343364"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on start-up:{0}{0}" + "1. Both parts of the form are identical.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (360, 80); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #81915"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Steps to execute:{0}{0}" + "1. Attempt to change the vertical size of the form.{0}{0}" + "Expected result:{0}{0}" + "1. The vertical size of the form cannot be modified.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (300, 140); Location = new Point (550, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #80689"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Steps to execute:{0}{0}" + "1. Move the mouse cursor over the OK button.{0}{0}" + "2. Wait until the tooltip is displayed.{0}{0}" + "3. Left-click the button and do not release the mouse button.{0}{0}" + "4. Release the mouse button.{0}{0}" + "Expected result:{0}{0}" + "1. On step 3, the tooltip is no longer visible.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // _bugDescriptionText2 // _bugDescriptionText2 = new TextBox (); _bugDescriptionText2.Dock = DockStyle.Fill; _bugDescriptionText2.Multiline = true; _bugDescriptionText2.Text = string.Format (CultureInfo.InvariantCulture, "Steps to execute:{0}{0}" + "1. Move the mouse cursor over the OK button.{0}{0}" + "2. Wait until the tooltip is displayed.{0}{0}" + "3. Right-click the button and do not release the mouse button.{0}{0}" + "4. Release the mouse button.{0}{0}" + "Expected result:{0}{0}" + "1. On step 3, the tooltip is no longer visible.", Environment.NewLine); // // _tabPage2 // _tabPage2 = new TabPage (); _tabPage2.Text = "#2"; _tabPage2.Controls.Add (_bugDescriptionText2); _tabControl.Controls.Add (_tabPage2); // // InstructionsForm // ClientSize = new Size (300, 220); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #82348"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on start-up:{0}{0}" + "1. The left checkbox is a \"normal\" checkbox.{0}{0}" + "1. The right checkbox is a \"button\" checkbox.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (300, 110); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #82657"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Steps to execute:{0}{0}" + "1. Type \"12345\" and the hit the Enter key.{0}{0}" + "Expected result:{0}{0}" + "1. The character \"3\" and the Enter key are ignored.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (300, 155); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #340078"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Steps to execute:{0}{0}" + "1. Select an item in the combobox.{0}{0}" + "Expected result:{0}{0}" + "1. A new form is displayed.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (300, 150); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #352830"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on start-up:{0}{0}" + "1. The text \"2\" is displayed.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (400, 90); Location = new Point (550, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #80792"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on start-up:{0}{0}" + "1. A window measuring 400x600 pixels is displayed at {{X=100,Y=100}}.{0}{0}" + "2. The background is possibly messed-up.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (400, 120); Location = new Point (550, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #80817"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on start-up:{0}{0}" + "1. The form icon and the text \"My Computer\" are " + "displayed as content of the first panel in the " + "StatusBar.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (300, 100); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #82487"; }
public MainForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _tabGeneral // _tabGeneral = new TabPage (); _tabGeneral.TabIndex = 0; _tabGeneral.Text = "General"; _tabControl.Controls.Add (_tabGeneral); // // _tabAlerts // _tabAlerts = new TabPage (); _tabAlerts.TabIndex = 1; _tabAlerts.Text = "Alerts"; _tabControl.Controls.Add (_tabAlerts); // // MainForm // ClientSize = new Size (300, 100); Location = new Point (250, 100); StartPosition = FormStartPosition.Manual; Text = "bug #82229"; Load += new EventHandler (MainForm_Load); }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on startup:{0}{0}" + "1. A star-like shape is drawn.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (310, 100); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #338233"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Steps to execute:{0}{0}" + "1. Press the Alt+F4 key.{0}{0}" + "Expected result:{0}{0}" + "1. The application exits.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (300, 140); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #358340"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on start-up:{0}{0}" + "1. The text in the rectangle is spread over 6 lines.{0}{0}" + "2. The text on each line is centered horizontally.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (330, 110); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #79594"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on start-up:{0}{0}" + "1. The application hardly uses any processor time.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (320, 90); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #79265"; }
public InstructionsForm () { // // _tabControl // _tabControl = new TabControl (); _tabControl.Dock = DockStyle.Fill; Controls.Add (_tabControl); // // _bugDescriptionText1 // _bugDescriptionText1 = new TextBox (); _bugDescriptionText1.Dock = DockStyle.Fill; _bugDescriptionText1.Multiline = true; _bugDescriptionText1.Text = string.Format (CultureInfo.InvariantCulture, "Expected result on start-up:{0}{0}" + "1. The main form is displayed fullscreen, and has no " + "borders or titlebar.", Environment.NewLine); // // _tabPage1 // _tabPage1 = new TabPage (); _tabPage1.Text = "#1"; _tabPage1.Controls.Add (_bugDescriptionText1); _tabControl.Controls.Add (_tabPage1); // // InstructionsForm // ClientSize = new Size (320, 100); Location = new Point (600, 100); StartPosition = FormStartPosition.Manual; Text = "Instructions - bug #349571"; TopMost = true; }
private async Task <bool> RefreshOutput() { if (await AssertHasTargetErrors()) { return(false); } IMigrationSourceUserControl migrationSourceControl = this.MigrationSourceControl; if (migrationSourceControl == null) { throw new ArgumentException("Unable to Refresh Output: NULL MigrationSourceControl Context"); } if (targetAzureContextViewer.ExistingContext == null) { throw new ArgumentException("Unable to Refresh Output: NULL Target Existing Azure Context"); } if (targetAzureContextViewer.ExistingContext.AzureSubscription == null) { throw new ArgumentException("Unable to Refresh Output: NULL Target Existing Azure Context"); } if (this.AzureGenerator == null) { throw new ArgumentException("Unable to Refresh Output: NULL TemplateGenerator"); } if (this.targetAzureContextViewer == null) { throw new ArgumentException("Unable to Refresh Output: NULL TargetAzureContextViewer"); } if (this.targetAzureContextViewer.SelectedAzureContext == null) { throw new ArgumentException("Unable to Refresh Output: NULL SelectedAzureContext on TargetAzureContextViewer"); } if (this.targetAzureContextViewer.SelectedAzureContext.TokenProvider == null) { throw new ArgumentException("Unable to Refresh Output: NULL TokenProvider on SelectedAzureContext"); } if (this.AzureGenerator != null) { this.AzureGenerator.AccessSASTokenLifetimeSeconds = app.Default.AccessSASTokenLifetimeSeconds; this.AzureGenerator.ExportArtifacts = this.targetTreeView1.ExportArtifacts; this.AzureGenerator.OutputDirectory = this.txtDestinationFolder.Text; this.AzureGenerator.TargetAzureTokenProvider = (AzureTokenProvider)this.targetAzureContextViewer.SelectedAzureContext.TokenProvider; await this.AzureGenerator.GenerateStreams(); foreach (TabPage tabPage in tabOutputResults.TabPages) { if (!this.AzureGenerator.TemplateStreams.ContainsKey(tabPage.Name)) { tabOutputResults.TabPages.Remove(tabPage); } } foreach (var templateStream in this.AzureGenerator.TemplateStreams) { TabPage tabPage = null; if (!tabOutputResults.TabPages.ContainsKey(templateStream.Key)) { tabPage = new TabPage(templateStream.Key); tabPage.Name = templateStream.Key; tabOutputResults.TabPages.Add(tabPage); if (templateStream.Key.EndsWith(".html")) { WebBrowser webBrowser = new WebBrowser(); webBrowser.Width = tabOutputResults.Width - 15; webBrowser.Height = tabOutputResults.Height - 30; webBrowser.AllowNavigation = false; webBrowser.ScrollBarsEnabled = true; tabPage.Controls.Add(webBrowser); } else if (templateStream.Key.EndsWith(".json") || templateStream.Key.EndsWith(".ps1")) { TextBox textBox = new TextBox(); textBox.Width = tabOutputResults.Width - 15; textBox.Height = tabOutputResults.Height - 30; textBox.ReadOnly = true; textBox.Multiline = true; textBox.WordWrap = false; textBox.ScrollBars = ScrollBars.Both; tabPage.Controls.Add(textBox); } } else { tabPage = tabOutputResults.TabPages[templateStream.Key]; } if (tabPage.Controls[0].GetType() == typeof(TextBox)) { TextBox textBox = (TextBox)tabPage.Controls[0]; templateStream.Value.Position = 0; textBox.Text = new StreamReader(templateStream.Value).ReadToEnd(); } else if (tabPage.Controls[0].GetType() == typeof(WebBrowser)) { WebBrowser webBrowser = (WebBrowser)tabPage.Controls[0]; templateStream.Value.Position = 0; if (webBrowser.Document == null) { webBrowser.DocumentText = new StreamReader(templateStream.Value).ReadToEnd(); } else { webBrowser.Document.OpenNew(true); webBrowser.Document.Write(new StreamReader(templateStream.Value).ReadToEnd()); } } } if (tabOutputResults.TabPages.Count != this.AzureGenerator.TemplateStreams.Count) { throw new ArgumentException("Count mismatch between tabOutputResults TabPages and Migrator TemplateStreams. Counts should match after addition/removal above. tabOutputResults. TabPages Count: " + tabOutputResults.TabPages.Count + " Migration TemplateStream Count: " + this.AzureGenerator.TemplateStreams.Count); } // Ensure Tabs are in same order as output streams int streamIndex = 0; foreach (string templateStreamKey in this.AzureGenerator.TemplateStreams.Keys) { int rotationCounter = 0; // This while loop is to bubble the tab to the end, as to rotate the tab sequence to ensure they match the order returned from the stream outputs // The addition/removal of Streams may result in order of existing tabPages being "out of order" to the streams generated, so we may need to consider reordering while (tabOutputResults.TabPages[streamIndex].Name != templateStreamKey) { TabPage currentTabpage = tabOutputResults.TabPages[streamIndex]; tabOutputResults.TabPages.Remove(currentTabpage); tabOutputResults.TabPages.Add(currentTabpage); rotationCounter++; if (rotationCounter > this.AzureGenerator.TemplateStreams.Count) { throw new ArgumentException("Rotated through all tabs, unabled to locate tab '" + templateStreamKey + "' while ensuring tab order/sequencing."); } } streamIndex++; } lblLastOutputRefresh.Text = "Last Refresh Completed: " + DateTime.Now.ToString(); btnRefreshOutput.Enabled = false; // post Telemetry Record to ASMtoARMToolAPI if (AppSettingsProvider.AllowTelemetry) { StatusProvider.UpdateStatus("BUSY: saving telemetry information"); _telemetryProvider.PostTelemetryRecord(_AppSessionGuid, this.MigrationSourceControl.MigrationSourceType, targetAzureContextViewer.ExistingContext.AzureSubscription, this.AzureGenerator); } } StatusProvider.UpdateStatus("Ready"); return(true); }
protected override void OnMouseClick(MouseEventArgs e) { Point p = e.Location; int start; if (IgnoreFirst) { start = 1; } else { start = 0; } for (int i = start; i < TabCount; i++) { TabPage tabPage = this.TabPages[i]; if (tabPage is PluginTab) { var pluginTab = tabPage as PluginTab; var tabRect = GetTabRect(i); bool clickedTab = tabRect.Contains(p); if (e.Button == System.Windows.Forms.MouseButtons.Left && clickedTab) { pluginTab.LastTimeClicked = DateTime.Now; } bool shouldDrawX = ((PluginTab)tabPage).DrawX; if (shouldDrawX) { if (e.Button == MouseButtons.Left) { Rectangle r = GetTabRect(i); r.Offset(2, 2); r.Width = 5; r.Height = 5; if (r.Contains(p)) { CloseTab(i); } } else if (e.Button == MouseButtons.Middle) { CloseTab(i); } } if (e.Button == System.Windows.Forms.MouseButtons.Right) { if (clickedTab) { this.SelectedIndex = i; pluginTab.RefreshMoveToCommands(); // not sure why we have to subtract the height, but if we don't then the menu // seems to be offset by the height of the tab pluginTab.ContextMenu.Show(pluginTab, new Point(e.X, e.Y - tabRect.Height)); } } } } }
// Funzione per leggere il file di configurazione XML. /* FILE XML: * inizia con <toupdate> * All'interno di toupdate è possibile inserire qualsiasi script. es: * <Modelli3D> * All'interno di Modelli3D devo specificare: * - <script> : script usato [STRINGA] * - <commandlinearguments> : lo script va eseguito con o senza argomenti? [BOOLEANO] * Se lo script va eseguito con argomenti, bisogna aggiungere: * - <source> : dove vado a prendere i file che dovranno essere selezionati dall'utente? [STRINGA] * E' possibile inserire altri parametri, quali: * - <endswith> : come deve finire il nome del file (es. <endswith> <item>C.obj</item> </endswith>) [LISTA DI STRINGHE] * - <notendswith> : come non può finire il nome del file (es. <notendswith> <item>a.jpg</item><item>b.jpg</item> </notendswith> [LISTA DI STRINGHE] * - <searchrecursively> : i file devono essere ricercati anche nelle sottocartelle? [BOOLEANO] * */ private void ReadXml() { _toSync = new List <ElementToSync>(); XmlDocument xmlDoc = new XmlDocument(); try { //xmlDoc.Load("sincro.xml"); xmlDoc.Load(Path.GetDirectoryName(Application.ExecutablePath) + "\\sincro.xml"); } catch (Exception ex) { MessageBox.Show("Errore apertura file di configurazione XML:\n" + ex); Environment.Exit(5); } foreach (XmlNode i in xmlDoc.ChildNodes) { if (i.LocalName == "toupdate") { foreach (XmlNode item in i.ChildNodes) { string name = item.LocalName, script = "", source = ""; bool commandLineArguments = false, searchRecursively = false; List <string> notEndsWith = new List <string>(); List <string> endsWith = new List <string>(); foreach (XmlNode child in item.ChildNodes) { if (child.LocalName == "script") { script = child.FirstChild.Value; } else if (child.LocalName == "commandlinearguments") { commandLineArguments = Convert.ToBoolean(child.FirstChild.Value); } else if (child.LocalName == "source") { source = child.FirstChild.Value; } else if (child.LocalName == "searchrecursively") { searchRecursively = Convert.ToBoolean(child.FirstChild.Value); } else if (child.LocalName == "endswith") { foreach (XmlNode endsChild in child.ChildNodes) { endsWith.Add(endsChild.FirstChild.Value); } } else if (child.LocalName == "notendswith") { foreach (XmlNode notEndsChild in child.ChildNodes) { notEndsWith.Add(notEndsChild.FirstChild.Value); } } } if (string.IsNullOrEmpty(script)) { MessageBox.Show("Configurazione XML di " + name + ": è necessario inserire l'elemento <script>", "Errore", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { ElementToSync el = new ElementToSync(name, script, commandLineArguments, source, searchRecursively, endsWith, notEndsWith); _toSync.Add(el); } } } } // Creo un nuovo TAB per ogni elemento trovato nel file di configurazione foreach (ElementToSync el in _toSync) { TabPage newTab = new TabPage(el.Name); newTab.BackColor = System.Drawing.Color.WhiteSmoke; ctlTab.TabPages.Add(newTab); } }
public ConnWizardForm(IStoredConnection conn) { InitializeComponent(); m_conn = conn; int top = ClientSize.Height - (btnOk.Top + btnOk.Height); int left = ClientSize.Width - (btnOk.Left + btnOk.Width); int wi = ClientSize.Width - 2 * left; var tun = m_conn as ITunellableStoredConnection; var parent = Controls; TabControl pg = null; if (tun != null) { pg = new TabControl(); var pg1 = new TabPage { Text = Texts.Get("s_connection") }; var pg2 = new TabPage { Text = Texts.Get("s_tunnelling") }; pg.TabPages.Add(pg1); pg.TabPages.Add(pg2); pg.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom; Controls.Add(pg); pg.Top = top; pg.Width = wi; pg.Left = left; m_tunCfg = new TunnelConfigFrame(); m_tunCfg.AllowDirectConnection = tun.AllowDirectConnection; m_tunCfg.SelectedDriver = tun.TunnelDriver; m_tunCfg.SelectedDriverChanged += new EventHandler(m_tunCfg_SelectedDriverChanged); pg2.Controls.Add(m_tunCfg); m_tunCfg.Dock = DockStyle.Fill; parent = pg1.Controls; top = 10; left = 10; wi = pg.Width - 20; pg.SelectedIndexChanged += pg_TabIndexChanged; } m_frame = m_conn.CreateEditor(); parent.Add(m_frame); m_frame.Left = left; m_frame.Top = top; m_frame.Width = wi; m_common = new CommonConnectionEditFrame(conn); parent.Add(m_common); m_common.Left = left; m_common.Top = m_frame.Height + top; m_common.Width = wi; m_common.LinkToSpecific(m_frame); Height = top + Height + m_frame.Height + m_common.Height + (tun != null ? 50 : 0); if (pg != null) { pg.Height = m_frame.Height + m_common.Height + 50; } Text = Texts.Get(m_conn.ConnectionTypeTitle); Translating.TranslateControl(this); btnAdvanced.Enabled = conn.ConnectionSettings != null; btnCtxhelp.Enabled = m_conn.HelpTopic != null; Usage["contype"] = conn.GetType().FullName; m_origHeight = Height; m_origWidth = Width; }
internal void DrawControl(Graphics g) { if (!Visible) { return; } Rectangle TabControlArea = this.ClientRectangle; Rectangle TabArea = this.DisplayRectangle; //---------------------------- // fill client area Brush br = new SolidBrush(_standardBackColour); //(SystemColors.Control); UPDATED g.FillRectangle(br, TabControlArea); br.Dispose(); //---------------------------- //---------------------------- // draw border int nDelta = SystemInformation.Border3DSize.Width; Pen border = new Pen(_borderColour, _borderWidth); TabArea.Inflate(nDelta, nDelta); g.DrawRectangle(border, TabArea); border.Dispose(); //---------------------------- //---------------------------- // clip region for drawing tabs Region rsaved = g.Clip; Rectangle rreg; int nWidth = TabArea.Width + nMargin; // exclude close button control for painting if (_allowCloseButton) { nWidth -= 20; } if (bUpDown) { // exclude updown control for painting if (WIN32.IsWindowVisible(scUpDown.Handle)) { Rectangle rupdown = new Rectangle(); WIN32.GetWindowRect(scUpDown.Handle, ref rupdown); Rectangle rupdown2 = this.RectangleToClient(rupdown); nWidth = rupdown2.X; } } //if top or bottom leave a blank space for Close button or navigator if ((this.Alignment == TabAlignment.Top) || (this.Alignment == TabAlignment.Bottom)) { rreg = new Rectangle(TabArea.Left, TabControlArea.Top, nWidth - nMargin, TabControlArea.Height); } else { rreg = ClientRectangle; } g.SetClip(rreg); // draw tabs for (int i = 0; i < this.TabCount; i++) { DrawTab(g, this.TabPages[i], i); } g.Clip = rsaved; //---------------------------- //---------------------------- // draw background to cover flat border areas if (this.SelectedTab != null) { TabPage tabPage = this.SelectedTab; Color color = tabPage.BackColor; border = new Pen(color); TabArea.Offset(1, 1); TabArea.Width -= 2; TabArea.Height -= 2; g.DrawRectangle(border, TabArea); TabArea.Width -= 1; TabArea.Height -= 1; g.DrawRectangle(border, TabArea); border.Dispose(); } //---------------------------- }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { using (OpenFileDialog of = new OpenFileDialog() { Filter = "Text files (*.txt)|*.txt|All files (*.*)|*.*", Multiselect = false, ValidateNames = true, RestoreDirectory = true, Title = "Browse Text Files", DefaultExt = "txt" }) { if (of.ShowDialog() == DialogResult.OK) { using (StreamReader reader = new StreamReader(of.FileName)) { try { TabPage tabPage = new TabPage(string.Format("new {0}", tabCount)); Scintilla newTab = new Scintilla(); tabControl1.TabPages.Add(tabPage); tabPage.Controls.Add(newTab); newTab.Dock = DockStyle.Fill; init(newTab); ////line numbers //newTab.Margins[0].Width = 16; //// Use margin 2 for fold markers //newTab.Margins[2].Type = MarginType.Symbol; //newTab.Margins[2].Mask = Marker.MaskFolders; //newTab.Margins[2].Sensitive = true; //newTab.Margins[2].Width = 20; // path = of.FileName; // string name1 = System.IO.Path.GetFileName(of.FileName); //// tabControl1.SelectedTab.Text = name1; var document = newTab.Document; newTab.AddRefDocument(document); newTab.Document = Document.Empty; tabPage.Tag = document; tabControl1.SelectedTab = tabPage; tabCount++; //NewDocument(true); path = of.FileName; Task <string> str = reader.ReadToEndAsync(); newTab.Text = str.Result; string name = System.IO.Path.GetFileName(of.FileName); tabControl1.SelectedTab.Text = name; tabname = System.IO.Path.GetFileName(of.FileName); tabControl1.SelectedTab.Text = tabname; } catch (Exception ex) { MessageBox.Show(ex.Message, "Message: ", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } } }
void AdjustStationView() { if (InvokeRequired) { Invoke(new Action(AdjustStationView)); return; } tabControl1.TabPages.Clear(); if (_station == null) { return; } //tabControl1.TabPages.Add() TabPage tabPageDI = new TabPage(); tabPageDI.Text = "DI"; tabPageDI.Name = "DI"; tabControl1.TabPages.Add(tabPageDI); //添加DI界面 UcChnNamesInStation ucDiEdit = new UcChnNamesInStation(); ucDiEdit.SetStationChnType(_station, NamedChnType.Di); ucDiEdit.Dock = DockStyle.Fill; ucDiEdit.Parent = tabPageDI; tabPageDI.Controls.Add(ucDiEdit); TabPage tabPageDO = new TabPage(); tabPageDO.Text = "DO"; tabPageDO.Name = "DO"; tabControl1.TabPages.Add(tabPageDO); //添加DO界面 UcChnNamesInStation ucDoEdit = new UcChnNamesInStation(); ucDoEdit.SetStationChnType(_station, NamedChnType.Do); ucDoEdit.Dock = DockStyle.Fill; ucDoEdit.Parent = tabPageDO; tabPageDO.Controls.Add(ucDoEdit); TabPage tabPageAxis = new TabPage(); tabPageAxis.Text = "Axis"; tabPageAxis.Name = "Axis"; tabControl1.TabPages.Add(tabPageAxis); UcChnNamesInStation ucAxisEdit = new UcChnNamesInStation(); ucAxisEdit.SetStationChnType(_station, NamedChnType.Axis); ucAxisEdit.Dock = DockStyle.Fill; ucAxisEdit.Parent = tabPageAxis; tabPageAxis.Controls.Add(ucAxisEdit); TabPage tabPageCmpTrig = new TabPage(); tabPageCmpTrig.Text = "CmpTrig"; tabPageCmpTrig.Name = "CmpTrig"; tabControl1.TabPages.Add(tabPageCmpTrig); UcChnNamesInStation ucCmpTrigEdit = new UcChnNamesInStation(); ucCmpTrigEdit.SetStationChnType(_station, NamedChnType.CmpTrig); ucCmpTrigEdit.Dock = DockStyle.Fill; ucCmpTrigEdit.Parent = tabPageCmpTrig; tabPageCmpTrig.Controls.Add(ucCmpTrigEdit); TabPage tabPageAI = new TabPage(); tabPageAI.Text = "AI"; tabPageAI.Name = "AI"; tabControl1.TabPages.Add(tabPageAI); UcChnNamesInStation ucAiEdit = new UcChnNamesInStation(); ucAiEdit.SetStationChnType(_station, NamedChnType.Ai); ucAiEdit.Dock = DockStyle.Fill; ucAiEdit.Parent = tabPageAI; tabPageAI.Controls.Add(ucAiEdit); TabPage tabPageAO = new TabPage(); tabPageAO.Text = "AO"; tabPageAO.Name = "AO"; tabControl1.TabPages.Add(tabPageAO); UcChnNamesInStation ucAoEdit = new UcChnNamesInStation(); ucAoEdit.SetStationChnType(_station, NamedChnType.Ao); ucAoEdit.Dock = DockStyle.Fill; ucAoEdit.Parent = tabPageAI; tabPageAO.Controls.Add(ucAoEdit); TabPage tabPageCmr = new TabPage(); tabPageCmr.Text = "Camera"; tabPageCmr.Name = "Camera"; tabControl1.TabPages.Add(tabPageCmr); UcChnNamesInStation ucCmrEdit = new UcChnNamesInStation(); ucCmrEdit.SetStationChnType(_station, NamedChnType.Camera); ucCmrEdit.Dock = DockStyle.Fill; ucCmrEdit.Parent = tabPageCmr; tabPageCmr.Controls.Add(ucCmrEdit); TabPage tabPageLight = new TabPage(); tabPageLight.Text = "Light"; tabPageLight.Name = "Light"; tabControl1.TabPages.Add(tabPageLight); UcChnNamesInStation ucLightEdit = new UcChnNamesInStation(); ucLightEdit.SetStationChnType(_station, NamedChnType.Light); ucLightEdit.Dock = DockStyle.Fill; ucLightEdit.Parent = tabPageLight; tabPageLight.Controls.Add(ucLightEdit); TabPage tabPageTrig = new TabPage(); tabPageTrig.Text = "Trig"; tabPageTrig.Name = "Trig"; tabControl1.TabPages.Add(tabPageTrig); UcChnNamesInStation ucTrigEdit = new UcChnNamesInStation(); ucTrigEdit.SetStationChnType(_station, NamedChnType.Trig); ucTrigEdit.Dock = DockStyle.Fill; ucTrigEdit.Parent = tabPageTrig; tabPageTrig.Controls.Add(ucTrigEdit); TabPage tabPageWorkFlow = new TabPage(); tabPageWorkFlow.Text = "WorkFlow"; tabPageWorkFlow.Name = "WorkFlow"; tabControl1.TabPages.Add(tabPageWorkFlow); UcStationWorkFlowCfg ucWorkFlow = new UcStationWorkFlowCfg(); ucWorkFlow.SetStation(_station); ucWorkFlow.Dock = DockStyle.Fill; ucWorkFlow.Parent = tabPageCmr; tabPageWorkFlow.Controls.Add(ucWorkFlow); TabPage tabPagePosition = new TabPage(); tabPagePosition.Text = "Position"; tabPagePosition.Name = "Position"; tabControl1.TabPages.Add(tabPagePosition); UcStationWorkPositionCfg ucWorkPosition = new UcStationWorkPositionCfg(); ucWorkPosition.SetStation(_station); ucWorkPosition.Dock = DockStyle.Fill; ucWorkPosition.Parent = tabPagePosition; tabPagePosition.Controls.Add(ucWorkPosition); TabPage tpDevChnMapping = new TabPage(); tpDevChnMapping.Text = "DevChn映射表"; tpDevChnMapping.Name = "DevChn映射表"; //tpDevChnMapping.Tag = "" tabControl1.TabPages.Add(tpDevChnMapping); UcStationDevChnNameMapping ucDevChnMapping = new UcStationDevChnNameMapping(); ucDevChnMapping.SetStation(_station); ucDevChnMapping.Dock = DockStyle.Fill; ucDevChnMapping.Parent = tpDevChnMapping; tpDevChnMapping.Controls.Add(ucDevChnMapping); //VisibleChanged += ucDevChnMapping.UcStationDevChnNameMapping_VisibleChanged; TabPage tpSysPoolMapping = new TabPage(); tpSysPoolMapping.Text = "系统数据项映射表"; tpSysPoolMapping.Name = "系统数据项映射表"; //tpDevChnMapping.Tag = "" tabControl1.TabPages.Add(tpSysPoolMapping); UcStationBaseSPAliasEdit ucSPMapping = new UcStationBaseSPAliasEdit(); ucSPMapping.SetStation(_station); ucSPMapping.Dock = DockStyle.Fill; ucSPMapping.Parent = tpSysPoolMapping; tpSysPoolMapping.Controls.Add(ucSPMapping); TabPage tpCfg = new TabPage(); tpCfg.Text = "配置项"; tpCfg.Name = "配置项"; tabControl1.TabPages.Add(tpCfg); //FormStationBaseCfgParam fmCfg = new FormStationBaseCfgParam(); //fmCfg.SetStation(_station); //FormXCfgEdit fmCfg = new FormXCfgEdit(); //fmCfg.SetCfg(_station.Config); FormStationBaseXCfgEdit fmCfg = new FormStationBaseXCfgEdit(); fmCfg.SetStation(_station); fmCfg.FormBorderStyle = FormBorderStyle.None; fmCfg.TopLevel = false; fmCfg.Dock = DockStyle.Fill; fmCfg.Parent = tpCfg; UpdateCfg2View(); //工站自带配置对话框 , 如果Station的自定义配置界面是本类对象,会重复调用 //TabPage tpOwnerCfg = new TabPage(); //tpOwnerCfg.Text = "工站自定义配置界面"; //tpOwnerCfg.Name = "工站自定义配置界面"; //Button btShowStationCfgDialog = new Button(); //btShowStationCfgDialog.AutoSize = true; //btShowStationCfgDialog.Text = "显示工站自定义配置"; //btShowStationCfgDialog.Click += OnBtShowStationCfgDialog; //tabControl1.TabPages.Add(tpOwnerCfg); //btShowStationCfgDialog.Parent = tpOwnerCfg; //tpOwnerCfg.Controls.Add(btShowStationCfgDialog); }
public static void EnableTab(TabPage page, bool enable) { EnableControls(page.Controls, enable); }
private void DrawTab(Graphics g, Rectangle bounds, TabPage tabPage, bool selected, TabPage renamingTabPage) { const int diagramImagePadding = 2; bounds.Inflate(-TabOutsideBorderLength, -TabOutsideBorderLength); // Draw the background (if selected) and border if (selected) { g.FillRectangle(SystemBrushes.Window, bounds); g.DrawRectangle(SystemPens.WindowFrame, bounds); } else { g.DrawRectangle(SystemPens.ControlDark, bounds); } bounds.Inflate(-TabInsideBorderLength, -TabInsideBorderLength); // Draw the image, if any ImageList imageList = base.ImageList; if (imageList != null) { int imageIndex = imageList.Images.IndexOfKey(tabPage.ImageKey); if (imageIndex >= 0) { int imageY = bounds.Y + ((bounds.Height - DiagramImageHeight) / 2); imageList.Draw(g, bounds.X, imageY, imageIndex); bounds.Width -= DiagramImageWidth + diagramImagePadding; bounds.X += DiagramImageWidth + diagramImagePadding; } } // Draw the text box for renaming or the tab name if (tabPage == renamingTabPage) { InlineTabRenameTextBox renamingTextBox = myRenamingTextBox; renamingTextBox.Bounds = bounds; renamingTextBox.Location = bounds.Location; renamingTextBox.MinimumSize = renamingTextBox.MaximumSize = renamingTextBox.Size = bounds.Size; if (!renamingTextBox.Visible) { renamingTextBox.Visible = true; renamingTextBox.Focus(); } renamingTextBox.Invalidate(); } else { const TextFormatFlags textFormatFlags = TextFormatFlags.HorizontalCenter | TextFormatFlags.VerticalCenter | TextFormatFlags.NoPrefix | TextFormatFlags.NoClipping; TextRenderer.DrawText(g, tabPage.Name, base.Font, bounds, SystemColors.WindowText, textFormatFlags); } }
private void DoTabs() { HotkeyTabControl.SuspendLayout(); HotkeyTabControl.TabPages.Clear(); // Buckets var tabs = _config.HotkeyBindings.Select(x => x.TabGroup).Distinct(); foreach (var tab in tabs) { var tb = new TabPage { Name = tab, Text = tab }; var bindings = _config.HotkeyBindings.Where(n => n.TabGroup == tab).OrderBy(n => n.Ordinal).ThenBy(n => n.DisplayName); int x = UIHelper.ScaleX(6); int y = UIHelper.ScaleY(14); int iwOffsetX = UIHelper.ScaleX(110); int iwOffsetY = UIHelper.ScaleY(-4); int iwWidth = UIHelper.ScaleX(120); tb.SuspendLayout(); foreach (var b in bindings) { var l = new Label { Text = b.DisplayName, Location = new Point(x, y), Size = new Size(iwOffsetX - UIHelper.ScaleX(2), UIHelper.ScaleY(15)) }; var w = new InputCompositeWidget(_config.ModifierKeysEffective) { Location = new Point(x + iwOffsetX, y + iwOffsetY), AutoTab = AutoTabCheckBox.Checked, Width = iwWidth, WidgetName = b.DisplayName }; w.SetupTooltip(toolTip1, b.ToolTip); toolTip1.SetToolTip(l, b.ToolTip); w.Bindings = b.Bindings; tb.Controls.Add(l); tb.Controls.Add(w); y += UIHelper.ScaleY(24); if (y > HotkeyTabControl.Height - UIHelper.ScaleY(35)) { x += iwOffsetX + iwWidth + UIHelper.ScaleX(10); y = UIHelper.ScaleY(14); } } if (tab == "TAStudio") { tb.Controls.Add(new Label { Text = "Save States hotkeys operate with branches when TAStudio is engaged.", Location = new Point(x, y), Size = new Size(iwWidth + iwOffsetX, HotkeyTabControl.Height - y) }); } HotkeyTabControl.TabPages.Add(tb); tb.ResumeLayout(); } HotkeyTabControl.ResumeLayout(); }
public void SetTabHeader(TabPage tab, SimplifiedFailureLevels level) { _tabImageIndex[tab.Tag as string + ""] = (int)level;
private void LoadWork(IEnumerable <EventVarGroup> editorWork) { foreach (var g in editorWork) { var tlp = new TableLayoutPanel { Dock = DockStyle.Fill, Name = $"TLP_W{g.Type}", AutoScroll = true }; tlp.SuspendLayout(); int i = 0; foreach (var f in g.Vars.OfType <EventWork <int> >()) { var lbl = new Label { Text = f.Name, Name = constLabelTag + f.RawIndex.ToString("0000"), Margin = Padding.Empty, AutoSize = true, }; var nud = new NumericUpDown { Maximum = int.MaxValue, Minimum = int.MinValue, Value = f.Value, Name = constTag + f.RawIndex.ToString("0000"), Margin = Padding.Empty, Width = 50, }; var cb = new ComboBox { Margin = Padding.Empty, Width = 150, Name = constCBTag + f.RawIndex.ToString("0000"), DropDownStyle = ComboBoxStyle.DropDownList, BindingContext = BindingContext, DropDownWidth = Width + 100, }; cb.InitializeBinding(); cb.DataSource = new BindingSource(f.Options.Select(z => new ComboItem(z.Text, z.Value)).ToList(), null); cb.SelectedValue = f.Value; if (cb.SelectedIndex < 0) { cb.SelectedIndex = 0; } cb.SelectedValueChanged += (s, e) => { if (editing) { return; } var value = (int)cb.SelectedValue; editing = true; var match = f.Options.FirstOrDefault(z => z.Value == value); nud.Enabled = match?.Custom == true; if (!nud.Enabled) { nud.Value = (ushort)value; f.Value = value; } editing = false; }; nud.ValueChanged += (s, e) => { if (editing) { return; } var value = Util.ToInt32(nud.Text); f.Value = value; editing = true; if (f.RawIndex == CB_Stats.SelectedIndex) { NUD_Stat.Text = value.ToString(); } editing = false; }; tlp.Controls.Add(lbl, 0, i); tlp.Controls.Add(cb, 1, i); tlp.Controls.Add(nud, 2, i); { var match = f.Options.FirstOrDefault(z => z.Value == f.Value); if (match != null) { cb.SelectedValue = match.Value; nud.Enabled = false; } } i++; } var tab = new TabPage { Name = $"Tab_W{g.Type}", Text = g.Type.ToString(), }; tab.Controls.Add(tlp); TC_Work.Controls.Add(tab); tlp.ResumeLayout(); } }
//ChangeTab private void ChangeTab(TabPage TabPageName) { tabControl.SelectTab(TabPageName); }
public HarmonicContainerVizualizer(IHarmonicContainerPresentation harmonicContainer, TabPage tabPage, DataGridView tableView) { _harmonicContainer = harmonicContainer; _chart = new Chart { Parent = tabPage, Dock = DockStyle.Fill }; _tableView = tableView; InitializeTable(); }
/// <summary> /// This is the method that actually does the work. /// </summary> /// <param name="DA">The DA object is used to retrieve from inputs and store in outputs.</param> protected override void SolveInstance(IGH_DataAccess DA) { List <string> props = new List <string>(); List <GH_ObjectWrapper> vals = new List <GH_ObjectWrapper>(); List <GH_ObjectWrapper> ctrls = new List <GH_ObjectWrapper>(); List <string> tabs = new List <string>(); DA.GetDataList(0, props); DA.GetDataList(1, vals); DA.GetDataList(2, ctrls); DA.GetDataList(3, tabs); TabControl tabview = new TabControl(); for (int i = 0; i < tabs.Count; i++) { TabPage tp = new TabPage() { Text = tabs[i], }; try { if (ctrls[i].Value is Control ctrl) { tp.Content = ctrl; } } catch (Exception ex) { AddRuntimeMessage(GH_RuntimeMessageLevel.Error, ex.Message); } tabview.Pages.Add(tp); } for (int i = 0; i < props.Count; i++) { string n = props[i]; object val; try { val = vals[i].Value; } catch (ArgumentOutOfRangeException) { AddRuntimeMessage(GH_RuntimeMessageLevel.Error, "P, V should correspond each other"); return; } if (n.ToLower() == "backgroundcolor" || n.ToLower() == "color" || n.ToLower() == "background color") { if (val is GH_Colour gclr) { tabview.BackgroundColor = Color.FromArgb(gclr.Value.ToArgb()); } else if (val is GH_String cstr) { if (Color.TryParse(cstr.Value, out Color clr)) { tabview.BackgroundColor = clr; } } else if (val is GH_Point pt) { Color clr = Color.FromArgb((int)pt.Value.X, (int)pt.Value.Y, (int)pt.Value.Z); tabview.BackgroundColor = clr; } else if (val is GH_Vector vec) { Color clr = Color.FromArgb((int)vec.Value.X, (int)vec.Value.Y, (int)vec.Value.Z); tabview.BackgroundColor = clr; } else if (val is Color etoclr) { tabview.BackgroundColor = etoclr; } else { try { Util.SetProp(tabview, "BackgroundColor", Util.GetGooVal(val)); } catch (Exception ex) { AddRuntimeMessage(GH_RuntimeMessageLevel.Warning, ex.Message); } } } else { try { Util.SetProp(tabview, n, Util.GetGooVal(val)); } catch (Exception ex) { AddRuntimeMessage(GH_RuntimeMessageLevel.Warning, ex.Message); } } } DA.SetData(1, new GH_ObjectWrapper(tabview)); PropertyInfo[] allprops = tabview.GetType().GetProperties(); List <string> printouts = new List <string>(); foreach (PropertyInfo prop in allprops) { if (prop.CanWrite) { printouts.Add(prop.Name + ": " + prop.PropertyType.ToString()); } } DA.SetDataList(0, printouts); }
private void tabControlInventory_DrawItem_1(object sender, DrawItemEventArgs e) { TabPage CurrentTab = tabControlInventory.TabPages[e.Index]; Rectangle ItemRect = tabControlInventory.GetTabRect(e.Index); StringFormat sf = new StringFormat(); sf.Alignment = StringAlignment.Center; sf.LineAlignment = StringAlignment.Center; SolidBrush FillBrush; SolidBrush TextBrush; FillBrush = new SolidBrush(Color.White); TextBrush = new SolidBrush(Color.Black); switch (e.Index) { case 0: FillBrush = new SolidBrush(Color.White); TextBrush = new SolidBrush(Color.Black); //If we are currently painting the Selected TabItem we'll //change the brush colors and inflate the rectangle. if (System.Convert.ToBoolean(e.State & DrawItemState.Selected)) { FillBrush.Color = Color.Black; TextBrush.Color = Color.White; ItemRect.Inflate(2, 2); } break; case 1: FillBrush = new SolidBrush(Color.White); TextBrush = new SolidBrush(Color.Blue); //If we are currently painting the Selected TabItem we'll //change the brush colors and inflate the rectangle. if (System.Convert.ToBoolean(e.State & DrawItemState.Selected)) { FillBrush.Color = Color.Blue; TextBrush.Color = Color.White; ItemRect.Inflate(2, 2); } break; case 2: FillBrush = new SolidBrush(Color.White); TextBrush = new SolidBrush(Color.Green); //If we are currently painting the Selected TabItem we'll //change the brush colors and inflate the rectangle. if (System.Convert.ToBoolean(e.State & DrawItemState.Selected)) { FillBrush.Color = Color.Green; TextBrush.Color = Color.White; ItemRect.Inflate(2, 2); } break; case 3: FillBrush = new SolidBrush(Color.White); TextBrush = new SolidBrush(Color.Red); //If we are currently painting the Selected TabItem we'll //change the brush colors and inflate the rectangle. if (System.Convert.ToBoolean(e.State & DrawItemState.Selected)) { FillBrush.Color = Color.Red; TextBrush.Color = Color.White; ItemRect.Inflate(2, 2); } break; } //Set up rotation for left and right aligned tabs if (tabControlInventory.Alignment == TabAlignment.Left || tabControlInventory.Alignment == TabAlignment.Right) { float RotateAngle = 90; if (tabControlInventory.Alignment == TabAlignment.Left) { RotateAngle = 270; } PointF cp = new PointF(ItemRect.Left + (ItemRect.Width / 2), ItemRect.Top + (ItemRect.Height / 2)); e.Graphics.TranslateTransform(cp.X, cp.Y); e.Graphics.RotateTransform(RotateAngle); ItemRect = new Rectangle(-(ItemRect.Height / 2), -(ItemRect.Width / 2), ItemRect.Height, ItemRect.Width); } //Next we'll paint the TabItem with our Fill Brush e.Graphics.FillRectangle(FillBrush, ItemRect); //Now draw the text. Font fo = new Font(e.Font.Name, 12, FontStyle.Bold, e.Font.Unit, e.Font.GdiCharSet, e.Font.GdiVerticalFont); e.Graphics.DrawString(CurrentTab.Text, fo, TextBrush, (RectangleF)ItemRect, sf); //Reset any Graphics rotation e.Graphics.ResetTransform(); //Finally, we should Dispose of our brushes. FillBrush.Dispose(); TextBrush.Dispose(); }
internal void DrawTab(Graphics g, TabPage tabPage, int nIndex) { Rectangle recBounds = this.GetTabRect(nIndex); RectangleF tabTextArea = (RectangleF)this.GetTabRect(nIndex); //debug --> to be fixed if (recBounds.Width == 0) { recBounds.Width = 50; } if (tabTextArea.Width == 0) { tabTextArea.Width = 50; } if (recBounds.Height == 0) { recBounds.Width = 22; } if (tabTextArea.Height == 0) { tabTextArea.Width = 22; } bool bSelected = (this.SelectedIndex == nIndex); bool bHot = false; if (tabPage.Tag != null) { bHot = (bool)tabPage.Tag; } //for buttons appearance if (this.Appearance != TabAppearance.Normal) { _cornerLeftWidth = 0; _cornerRightWidth = 0; _cornerWidth = 0; this.Alignment = TabAlignment.Top; } //Tab Hedaer Status DrawingMethods.TabHeaderStatus Status = DrawingMethods.TabHeaderStatus.Normal; if (_preserveTabColour) { Status = DrawingMethods.TabHeaderStatus.NormalPreserve; } if (bHot) { Status = DrawingMethods.TabHeaderStatus.Hot; } //bool bHotselected = false; if ((bSelected) && (!bHot)) { Status = DrawingMethods.TabHeaderStatus.Selected; } else if ((bSelected) && (bHot)) { Status = DrawingMethods.TabHeaderStatus.HotSelected; //bHotselected = true; } //Selected tab has to be highter if (!_allowSelectedTabHigh) { _allowSelectedTabHighSize = 0; } else { _allowSelectedTabHighSize = 1; } //Create tab Header Points (Sqared) Point[] pt = DrawingMethods.GetTabSquaredPoints(recBounds, _cornerWidth, Alignment, _cornerLeftWidth, _cornerRightWidth, this.Appearance, Status, _allowSelectedTabHighSize, false); //---------------------------- // fill this tab with background color Brush br = new SolidBrush(tabPage.BackColor); //Font for header Font fnt = Font; switch (Status) { case DrawingMethods.TabHeaderStatus.Selected: DrawingMethods.DrawTabHeader(g, pt, recBounds, _tabColourSelectedLight, _tabColourSelectedDark, tabPage.BackColor, 90, Alignment, _useExtendedLayout, Status, false); fnt = new Font(Font.FontFamily, Font.SizeInPoints, FontStyle.Bold); br = new SolidBrush(_tabForeColour); break; case DrawingMethods.TabHeaderStatus.HotSelected: DrawingMethods.DrawTabHeader(g, pt, recBounds, _tabColourSelectedLight, DrawingMethods.GetLighterColour(_tabColourSelectedDark), tabPage.BackColor, 90, Alignment, _useExtendedLayout, Status, false); fnt = new Font(Font.FontFamily, Font.SizeInPoints, FontStyle.Bold); br = new SolidBrush(_tabHotForeColour); break; case DrawingMethods.TabHeaderStatus.Hot: DrawingMethods.DrawTabHeader(g, pt, recBounds, _tabColourHotLight, _tabColourHotDark, _tabColourHotLight, 90, Alignment, _useExtendedLayout, Status, false); br = new SolidBrush(_tabHotForeColour); break; case DrawingMethods.TabHeaderStatus.Normal: DrawingMethods.DrawTabHeader(g, pt, recBounds, _tabColourDefaultLight, _tabColourDefaultDark, _tabColourDefaultLight, 90, Alignment, _useExtendedLayout, Status, false); br = new SolidBrush(_tabForeColour); break; case DrawingMethods.TabHeaderStatus.NormalPreserve: DrawingMethods.DrawTabHeader(g, pt, recBounds, DrawingMethods.GetSystemLighterColour(tabPage.BackColor), DrawingMethods.GetDarkerColour(tabPage.BackColor), tabPage.BackColor, 90, Alignment, _useExtendedLayout, Status, true); br = new SolidBrush(_tabForeColour); break; } //---------------------------- //---------------------------- // draw border //g.DrawRectangle(SystemPens.ControlDark, recBounds); g.DrawPolygon(new Pen(_borderColour, _borderWidth), pt); //---------------------------- if (((Status == DrawingMethods.TabHeaderStatus.Selected) || (Status == DrawingMethods.TabHeaderStatus.HotSelected)) && (this.Appearance == TabAppearance.Normal)) { //---------------------------- // clear bottom lines Pen pen = new Pen(tabPage.BackColor); DrawingMethods.ClearTabSelectedBottomLine(g, recBounds, pen, this.Alignment); pen.Dispose(); //---------------------------- } //---------------------------- //---------------------------- // draw tab's icon if ((tabPage.ImageIndex >= 0) && (ImageList != null) && (ImageList.Images[tabPage.ImageIndex] != null)) { int nLeftMargin = 8; int nRightMargin = 2; Image img = ImageList.Images[tabPage.ImageIndex]; Rectangle rimage = new Rectangle(recBounds.X + nLeftMargin, recBounds.Y + 1, img.Width, img.Height); // adjust rectangles float nAdj = (float)(nLeftMargin + img.Width + nRightMargin); // adjust rectangles if (Alignment == TabAlignment.Top || Alignment == TabAlignment.Bottom) { nAdj = (float)(nLeftMargin + img.Width + nRightMargin); rimage.Y += (recBounds.Height - img.Height) / 2; tabTextArea.X += nAdj; tabTextArea.Width -= nAdj; } else { if (_useExtendedLayout == false) { img.RotateFlip(RotateFlipType.Rotate90FlipNone); rimage.X -= 5; } //rimage.X += (recBounds.Width - img.Width) / 2; rimage.Y += 3; nAdj = (float)(10 + img.Height); tabTextArea.Y += img.Height; tabTextArea.Height -= img.Height; } // draw icon g.DrawImage(img, rimage); } //no image else { if (_useExtendedLayout == true) { tabTextArea.Y += 16; tabTextArea.Height -= 16; } } //---------------------------- //---------------------------- // draw string StringFormat stringFormat = new StringFormat(); stringFormat.Alignment = StringAlignment.Center; stringFormat.LineAlignment = StringAlignment.Center; //rtl if (this.RightToLeft == RightToLeft.Yes) { stringFormat.FormatFlags = StringFormatFlags.DirectionRightToLeft; } //Disabled if (!this.Enabled) { br = new SolidBrush(SystemColors.GrayText); } if (this.Alignment == TabAlignment.Right || this.Alignment == TabAlignment.Left) { //not ExtendedLayout if (_useExtendedLayout == false) { stringFormat.FormatFlags = StringFormatFlags.DirectionVertical; tabTextArea.Offset(-3, -5); } else //Extended Layout { tabTextArea.Height = tabTextArea.Height + 8; tabTextArea.Offset(4, -12); stringFormat.FormatFlags = StringFormatFlags.NoWrap; stringFormat.Trimming = StringTrimming.EllipsisCharacter; } } else { tabTextArea.Offset(-5, 0); } //use AntiAlias if (Utility.IsVista()) { g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.ClearTypeGridFit; } else { g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SystemDefault; } g.DrawString(tabPage.Text, fnt, br, tabTextArea, stringFormat); //---------------------------- br.Dispose(); }
private void InitializeBTabControl() { for (int i = 0; i < this._sSelectedContextKeys.Count; i++) { TabPage tabPage = new TabPage(this._sSelectedContextKeys[i].ToString()); BSpread bSpread = new BSpread(); FarPoint.Win.Spread.SheetView bSpread_Sheet1 = new FarPoint.Win.Spread.SheetView(); bSpread_Sheet1.Reset(); bSpread_Sheet1.SheetName = "Sheet1"; bSpread.About = "3.0.2005.2005"; bSpread.AccessibleDescription = ""; bSpread.AllowNewRow = true; bSpread.AutoClipboard = false; bSpread.AutoGenerateColumns = false; bSpread.BssClass = ""; bSpread.ClickPos = new System.Drawing.Point(0, 0); bSpread.ColFronzen = 0; bSpread.ComboEnable = true; bSpread.DataAutoHeadings = false; bSpread.DataSet = null; bSpread.DateToDateTimeFormat = false; bSpread.DefaultDeleteValue = true; bSpread.DisplayColumnHeader = true; bSpread.DisplayRowHeader = true; bSpread.Dock = System.Windows.Forms.DockStyle.Fill; bSpread.EditModeReplace = true; bSpread.FilterVisible = false; bSpread.HeadHeight = 20F; bSpread.HorizontalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded; bSpread.IsCellCopy = false; bSpread.IsMultiLanguage = false; bSpread.IsReport = false; bSpread.Key = ""; bSpread.Location = new System.Drawing.Point(3, 3); bSpread.Name = "bSpread"; bSpread.RowFronzen = 0; bSpread.RowInsertType = BISTel.PeakPerformance.Client.BISTelControl.InsertType.Current; bSpread.Sheets.AddRange(new FarPoint.Win.Spread.SheetView[] { bSpread_Sheet1 }); bSpread.Size = new System.Drawing.Size(550, 283); bSpread.StyleID = null; bSpread.TabIndex = 0; bSpread.UseAutoSort = false; bSpread.UseCheckAll = false; bSpread.UseCommandIcon = false; bSpread.UseFilter = false; bSpread.UseGeneralContextMenu = false; bSpread.UseHeadColor = false; bSpread.UseOriginalEvent = false; bSpread.UseSpreadEdit = true; bSpread.UseWidthMemory = true; bSpread.VerticalScrollBarPolicy = FarPoint.Win.Spread.ScrollBarPolicy.AsNeeded; bSpread.WhenDeleteUseModify = false; bSpread.ClearHead(); bSpread.AddHeadComplete(); bSpread.UseFilter = false; bSpread.FilterVisible = true; bSpread.UseSpreadEdit = false; bSpread.AutoGenerateColumns = false; bSpread.IsMultiLanguage = false; this.InitializeBSpread(ref bSpread, this._sSelectedContextKeys[i].ToString()); bSpread.ButtonClicked += new FarPoint.Win.Spread.EditorNotifyEventHandler(bSpread_ButtonClicked); bSpread.Dock = DockStyle.Fill; tabPage.Controls.Add(bSpread); this.bTabControl1.Controls.Add(tabPage); } }
private void tabMain_SelectedIndexChanged(object sender, EventArgs e) { this._selectedTab = this.tabMain.SelectedTab; }
private void bbtnOK_Click(object sender, EventArgs e) { ArrayList alTempContextKeys = new ArrayList(); ArrayList alTempContextValues = new ArrayList(); ArrayList alTempCheckContextValues = new ArrayList(); int idx = this.bTabControl1.Controls.Count; for (int i = 0; i < this.bTabControl1.Controls.Count; i++) { TabPage tabPage = (TabPage)this.bTabControl1.Controls[i]; BSpread bSpread = null; if (tabPage.Controls.Count > 1) { bSpread = (BSpread)tabPage.Controls[tabPage.Controls.Count - 1]; } else { bSpread = (BSpread)tabPage.Controls[0]; } alTempContextKeys.Add(bSpread.ActiveSheet.ColumnHeader.Cells[0, 1].Text); string strTemp = ""; for (int k = 0; k < bSpread.ActiveSheet.RowCount; k++) { if (bSpread.ActiveSheet.Cells[k, 0].CellType != null && bSpread.ActiveSheet.Cells[k, 0].CellType.GetType() == typeof(FarPoint.Win.Spread.CellType.CheckBoxCellType)) { if (Convert.ToBoolean(bSpread.ActiveSheet.Cells[k, 0].Value)) { if (k == 0) { strTemp = ";*"; break; } else { if (alTempCheckContextValues.Contains(bSpread.ActiveSheet.Cells[k, 1].Text)) { continue; } else { strTemp += ";" + bSpread.ActiveSheet.Cells[k, 1].Text; alTempCheckContextValues.Add(bSpread.ActiveSheet.Cells[k, 1].Text); } } } } } if (strTemp.Length > 0) { strTemp = strTemp.Substring(1); } alTempContextValues.Add(strTemp); } this._sSelectedContextKeys = alTempContextKeys; if (this._bContext) { this._sSelectedContextValues = alTempContextValues; } else { this._sSelectedExcludeValues = alTempContextValues; } this.DialogResult = DialogResult.OK; }
public void AddToTabPage(TabPage tabPage) { tabPage.Controls.Add(syntaxBox); tabPage.Tag = this; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(ExecutorProperties)); this.txId = new System.Windows.Forms.TextBox(); this.label9 = new System.Windows.Forms.Label(); this.txUsername = new System.Windows.Forms.TextBox(); this.label3 = new System.Windows.Forms.Label(); this.chkDedicated = new System.Windows.Forms.CheckBox(); this.chkConnected = new System.Windows.Forms.CheckBox(); this.txPort = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label(); this.txPingTime = new System.Windows.Forms.TextBox(); this.tabAdvanced = new System.Windows.Forms.TabPage(); this.label12 = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.txOS = new System.Windows.Forms.TextBox(); this.txArch = new System.Windows.Forms.TextBox(); this.txMaxCPU = new System.Windows.Forms.TextBox(); this.txNumCPUs = new System.Windows.Forms.TextBox(); this.label8 = new System.Windows.Forms.Label(); this.txMaxDisk = new System.Windows.Forms.TextBox(); this.label7 = new System.Windows.Forms.Label(); this.label4 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.tabPerf = new System.Windows.Forms.TabPage(); this.panel1 = new System.Windows.Forms.Panel(); this.plotSurface = new NPlot.Windows.PlotSurface2D(); this.tmRefreshSystem = new System.Windows.Forms.Timer(this.components); this.tabs.SuspendLayout(); this.tabGeneral.SuspendLayout(); this.tabAdvanced.SuspendLayout(); this.tabPerf.SuspendLayout(); this.panel1.SuspendLayout(); this.SuspendLayout(); // // tabs // this.tabs.Controls.Add(this.tabAdvanced); this.tabs.Controls.Add(this.tabPerf); this.tabs.Name = "tabs"; this.tabs.Controls.SetChildIndex(this.tabPerf, 0); this.tabs.Controls.SetChildIndex(this.tabAdvanced, 0); this.tabs.Controls.SetChildIndex(this.tabGeneral, 0); // // tabGeneral // this.tabGeneral.Controls.Add(this.label10); this.tabGeneral.Controls.Add(this.txPingTime); this.tabGeneral.Controls.Add(this.chkDedicated); this.tabGeneral.Controls.Add(this.chkConnected); this.tabGeneral.Controls.Add(this.txPort); this.tabGeneral.Controls.Add(this.label2); this.tabGeneral.Controls.Add(this.txId); this.tabGeneral.Controls.Add(this.label9); this.tabGeneral.Controls.Add(this.txUsername); this.tabGeneral.Controls.Add(this.label3); this.tabGeneral.Name = "tabGeneral"; this.tabGeneral.Controls.SetChildIndex(this.iconBox, 0); this.tabGeneral.Controls.SetChildIndex(this.lbName, 0); this.tabGeneral.Controls.SetChildIndex(this.lineLabel, 0); this.tabGeneral.Controls.SetChildIndex(this.label3, 0); this.tabGeneral.Controls.SetChildIndex(this.txUsername, 0); this.tabGeneral.Controls.SetChildIndex(this.label9, 0); this.tabGeneral.Controls.SetChildIndex(this.txId, 0); this.tabGeneral.Controls.SetChildIndex(this.label2, 0); this.tabGeneral.Controls.SetChildIndex(this.txPort, 0); this.tabGeneral.Controls.SetChildIndex(this.chkConnected, 0); this.tabGeneral.Controls.SetChildIndex(this.chkDedicated, 0); this.tabGeneral.Controls.SetChildIndex(this.txPingTime, 0); this.tabGeneral.Controls.SetChildIndex(this.label10, 0); // // btnApply // this.btnApply.Name = "btnApply"; // // btnCancel // this.btnCancel.Name = "btnCancel"; // // btnOK // this.btnOK.Name = "btnOK"; this.btnOK.Click += new System.EventHandler(this.btnOK_Click); // // iconBox // this.iconBox.Image = ((System.Drawing.Image)(resources.GetObject("iconBox.Image"))); this.iconBox.Name = "iconBox"; // // lbName // this.lbName.Name = "lbName"; // // lineLabel // this.lineLabel.Name = "lineLabel"; // // imgListSmall // this.imgListSmall.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imgListSmall.ImageStream"))); // // txId // this.txId.BackColor = System.Drawing.Color.White; this.txId.Location = new System.Drawing.Point(96, 80); this.txId.Name = "txId"; this.txId.ReadOnly = true; this.txId.Size = new System.Drawing.Size(216, 20); this.txId.TabIndex = 26; this.txId.Text = "txId"; // // label9 // this.label9.AutoSize = true; this.label9.Location = new System.Drawing.Point(16, 82); this.label9.Name = "label9"; this.label9.Size = new System.Drawing.Size(17, 16); this.label9.TabIndex = 25; this.label9.Text = "Id:"; // // txUsername // this.txUsername.BackColor = System.Drawing.Color.White; this.txUsername.Location = new System.Drawing.Point(96, 144); this.txUsername.Name = "txUsername"; this.txUsername.ReadOnly = true; this.txUsername.Size = new System.Drawing.Size(144, 20); this.txUsername.TabIndex = 24; this.txUsername.Text = "txUsername"; // // label3 // this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(16, 144); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(60, 16); this.label3.TabIndex = 23; this.label3.Text = "Username:"******"chkDedicated"; this.chkDedicated.Size = new System.Drawing.Size(80, 24); this.chkDedicated.TabIndex = 30; this.chkDedicated.Text = "Dedicated"; // // chkConnected // this.chkConnected.AutoCheck = false; this.chkConnected.Location = new System.Drawing.Point(16, 208); this.chkConnected.Name = "chkConnected"; this.chkConnected.Size = new System.Drawing.Size(80, 24); this.chkConnected.TabIndex = 29; this.chkConnected.Text = "Connected"; // // txPort // this.txPort.BackColor = System.Drawing.Color.White; this.txPort.Location = new System.Drawing.Point(96, 112); this.txPort.Name = "txPort"; this.txPort.ReadOnly = true; this.txPort.Size = new System.Drawing.Size(48, 20); this.txPort.TabIndex = 28; this.txPort.Text = "txPort"; // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(16, 112); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(28, 16); this.label2.TabIndex = 27; this.label2.Text = "Port:"; // // label10 // this.label10.AutoSize = true; this.label10.Location = new System.Drawing.Point(16, 176); this.label10.Name = "label10"; this.label10.Size = new System.Drawing.Size(78, 16); this.label10.TabIndex = 32; this.label10.Text = "Last ping time:"; // // txPingTime // this.txPingTime.BackColor = System.Drawing.Color.White; this.txPingTime.Location = new System.Drawing.Point(96, 176); this.txPingTime.Name = "txPingTime"; this.txPingTime.ReadOnly = true; this.txPingTime.Size = new System.Drawing.Size(144, 20); this.txPingTime.TabIndex = 31; this.txPingTime.Text = "txPingTime"; // // tabAdvanced // this.tabAdvanced.Controls.Add(this.label12); this.tabAdvanced.Controls.Add(this.label11); this.tabAdvanced.Controls.Add(this.label6); this.tabAdvanced.Controls.Add(this.txOS); this.tabAdvanced.Controls.Add(this.txArch); this.tabAdvanced.Controls.Add(this.txMaxCPU); this.tabAdvanced.Controls.Add(this.txNumCPUs); this.tabAdvanced.Controls.Add(this.label8); this.tabAdvanced.Controls.Add(this.txMaxDisk); this.tabAdvanced.Controls.Add(this.label7); this.tabAdvanced.Controls.Add(this.label4); this.tabAdvanced.Controls.Add(this.label5); this.tabAdvanced.Location = new System.Drawing.Point(4, 22); this.tabAdvanced.Name = "tabAdvanced"; this.tabAdvanced.Size = new System.Drawing.Size(328, 318); this.tabAdvanced.TabIndex = 1; this.tabAdvanced.Text = "Advanced"; // // label12 // this.label12.AutoSize = true; this.label12.Location = new System.Drawing.Point(248, 114); this.label12.Name = "label12"; this.label12.Size = new System.Drawing.Size(24, 16); this.label12.TabIndex = 35; this.label12.Text = "MB."; // // label11 // this.label11.AutoSize = true; this.label11.Location = new System.Drawing.Point(248, 82); this.label11.Name = "label11"; this.label11.Size = new System.Drawing.Size(29, 16); this.label11.TabIndex = 34; this.label11.Text = "Mhz."; // // label6 // this.label6.AutoSize = true; this.label6.Location = new System.Drawing.Point(16, 80); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(59, 16); this.label6.TabIndex = 29; this.label6.Text = "Max. CPU:"; // // txOS // this.txOS.BackColor = System.Drawing.Color.White; this.txOS.Location = new System.Drawing.Point(112, 48); this.txOS.Name = "txOS"; this.txOS.ReadOnly = true; this.txOS.Size = new System.Drawing.Size(200, 20); this.txOS.TabIndex = 26; this.txOS.Text = "txOS"; // // txArch // this.txArch.BackColor = System.Drawing.Color.White; this.txArch.Location = new System.Drawing.Point(112, 16); this.txArch.Name = "txArch"; this.txArch.ReadOnly = true; this.txArch.Size = new System.Drawing.Size(200, 20); this.txArch.TabIndex = 24; this.txArch.Text = "txArch"; // // txMaxCPU // this.txMaxCPU.BackColor = System.Drawing.Color.White; this.txMaxCPU.Location = new System.Drawing.Point(112, 80); this.txMaxCPU.Name = "txMaxCPU"; this.txMaxCPU.ReadOnly = true; this.txMaxCPU.Size = new System.Drawing.Size(128, 20); this.txMaxCPU.TabIndex = 28; this.txMaxCPU.Text = "txMaxCPU"; // // txNumCPUs // this.txNumCPUs.BackColor = System.Drawing.Color.White; this.txNumCPUs.Location = new System.Drawing.Point(112, 144); this.txNumCPUs.Name = "txNumCPUs"; this.txNumCPUs.ReadOnly = true; this.txNumCPUs.Size = new System.Drawing.Size(40, 20); this.txNumCPUs.TabIndex = 32; this.txNumCPUs.Text = "txNumCPUs"; // // label8 // this.label8.AutoSize = true; this.label8.Location = new System.Drawing.Point(16, 144); this.label8.Name = "label8"; this.label8.Size = new System.Drawing.Size(59, 16); this.label8.TabIndex = 33; this.label8.Text = "# of CPUs:"; // // txMaxDisk // this.txMaxDisk.BackColor = System.Drawing.Color.White; this.txMaxDisk.Location = new System.Drawing.Point(112, 112); this.txMaxDisk.Name = "txMaxDisk"; this.txMaxDisk.ReadOnly = true; this.txMaxDisk.Size = new System.Drawing.Size(128, 20); this.txMaxDisk.TabIndex = 30; this.txMaxDisk.Text = "txMaxDisk"; // // label7 // this.label7.AutoSize = true; this.label7.Location = new System.Drawing.Point(16, 112); this.label7.Name = "label7"; this.label7.Size = new System.Drawing.Size(75, 16); this.label7.TabIndex = 31; this.label7.Text = "Max. Storage:"; // // label4 // this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(16, 16); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(68, 16); this.label4.TabIndex = 25; this.label4.Text = "Architecture:"; // // label5 // this.label5.AutoSize = true; this.label5.Location = new System.Drawing.Point(16, 48); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(98, 16); this.label5.TabIndex = 27; this.label5.Text = "Operating System:"; // // tabPerf // this.tabPerf.Controls.Add(this.panel1); this.tabPerf.Location = new System.Drawing.Point(4, 22); this.tabPerf.Name = "tabPerf"; this.tabPerf.Size = new System.Drawing.Size(328, 318); this.tabPerf.TabIndex = 2; this.tabPerf.Text = "Performance"; // // panel1 // this.panel1.BackColor = System.Drawing.SystemColors.Control; this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; this.panel1.Controls.Add(this.plotSurface); this.panel1.Location = new System.Drawing.Point(8, 8); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(312, 304); this.panel1.TabIndex = 28; // // plotSurface // this.plotSurface.Anchor = System.Windows.Forms.AnchorStyles.None; this.plotSurface.AutoScaleAutoGeneratedAxes = true; this.plotSurface.AutoScaleTitle = true; this.plotSurface.BackColor = System.Drawing.SystemColors.ControlLightLight; this.plotSurface.DateTimeToolTip = false; this.plotSurface.Legend = null; this.plotSurface.LegendZOrder = -1; this.plotSurface.Location = new System.Drawing.Point(2, 2); this.plotSurface.Name = "plotSurface"; this.plotSurface.Padding = 0; this.plotSurface.RightMenu = null; this.plotSurface.ShowCoordinates = true; this.plotSurface.Size = new System.Drawing.Size(304, 296); this.plotSurface.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.None; this.plotSurface.TabIndex = 24; this.plotSurface.Text = "plotSurface2D1"; this.plotSurface.Title = ""; this.plotSurface.TitleFont = new System.Drawing.Font("Arial", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Pixel); this.plotSurface.XAxis1 = null; this.plotSurface.XAxis2 = null; this.plotSurface.YAxis1 = null; this.plotSurface.YAxis2 = null; // // tmRefreshSystem // this.tmRefreshSystem.Interval = 2000; this.tmRefreshSystem.Tick += new System.EventHandler(this.tmRefreshSystem_Tick); // // ExecutorProperties // this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.ClientSize = new System.Drawing.Size(352, 389); this.Name = "ExecutorProperties"; this.Text = "Executor Properties"; this.tabs.ResumeLayout(false); this.tabGeneral.ResumeLayout(false); this.tabAdvanced.ResumeLayout(false); this.tabPerf.ResumeLayout(false); this.panel1.ResumeLayout(false); this.ResumeLayout(false); }
private void tabMain_SelectedIndexChanged(object sender, EventArgs e) { _selectedTab = this.tabMain.SelectedTab; this.RefreshData(); }
public TabControlEventArgs(TabPage tabPage, int tabPageIndex, TabControlAction action) { TabPage = tabPage; TabPageIndex = tabPageIndex; Action = action; }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DlgDiscProperties)); this.tbKeywords = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.tbPhysicalLocation = new System.Windows.Forms.TextBox(); this.label7 = new System.Windows.Forms.Label(); this.ucItemFolderClassification = new BlueMirrorIndexer.UcItemFolderClassification(); this.label12 = new System.Windows.Forms.Label(); this.llDriveName = new System.Windows.Forms.Label(); this.llLastOptions = new System.Windows.Forms.Label(); this.label9 = new System.Windows.Forms.Label(); this.llSerialNumber = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); this.llScanned = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.tbUserLabel = new System.Windows.Forms.TextBox(); this.llVolumeLabel = new System.Windows.Forms.Label(); this.llSize = new System.Windows.Forms.Label(); this.llDriveFormat = new System.Windows.Forms.Label(); this.label8 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); this.llFreeSpace = new System.Windows.Forms.Label(); this.llDriveType = new System.Windows.Forms.Label(); this.label6 = new System.Windows.Forms.Label(); this.tcMain = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.tpDescription = new System.Windows.Forms.TabPage(); this.tbDescription = new System.Windows.Forms.TextBox(); this.tcMain.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); this.tpDescription.SuspendLayout(); this.SuspendLayout(); // // btnOK // resources.ApplyResources(this.btnOK, "btnOK"); this.btnOK.Click += new System.EventHandler(this.btnOK_Click); // // btnCancel // resources.ApplyResources(this.btnCancel, "btnCancel"); // // tbKeywords // resources.ApplyResources(this.tbKeywords, "tbKeywords"); this.tbKeywords.Name = "tbKeywords"; this.toolTip1.SetToolTip(this.tbKeywords, resources.GetString("tbKeywords.ToolTip")); // // label4 // resources.ApplyResources(this.label4, "label4"); this.label4.BackColor = System.Drawing.Color.Transparent; this.label4.Name = "label4"; // // toolTip1 // this.toolTip1.AutomaticDelay = 600; this.toolTip1.AutoPopDelay = 6000; this.toolTip1.InitialDelay = 60; this.toolTip1.IsBalloon = true; this.toolTip1.ReshowDelay = 120; this.toolTip1.ShowAlways = true; this.toolTip1.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info; this.toolTip1.ToolTipTitle = "Blue Mirror Info"; // // tbPhysicalLocation // resources.ApplyResources(this.tbPhysicalLocation, "tbPhysicalLocation"); this.tbPhysicalLocation.Name = "tbPhysicalLocation"; this.toolTip1.SetToolTip(this.tbPhysicalLocation, resources.GetString("tbPhysicalLocation.ToolTip")); // // label7 // resources.ApplyResources(this.label7, "label7"); this.label7.BackColor = System.Drawing.Color.Transparent; this.label7.Name = "label7"; // // ucItemFolderClassification // resources.ApplyResources(this.ucItemFolderClassification, "ucItemFolderClassification"); this.ucItemFolderClassification.BackColor = System.Drawing.Color.Transparent; this.ucItemFolderClassification.LogicalFolders = new BlueMirrorIndexer.LogicalFolder[0]; this.ucItemFolderClassification.Name = "ucItemFolderClassification"; // // label12 // resources.ApplyResources(this.label12, "label12"); this.label12.BackColor = System.Drawing.Color.Transparent; this.label12.Name = "label12"; // // llDriveName // resources.ApplyResources(this.llDriveName, "llDriveName"); this.llDriveName.BackColor = System.Drawing.Color.Transparent; this.llDriveName.Name = "llDriveName"; // // llLastOptions // resources.ApplyResources(this.llLastOptions, "llLastOptions"); this.llLastOptions.BackColor = System.Drawing.Color.Transparent; this.llLastOptions.Name = "llLastOptions"; // // label9 // resources.ApplyResources(this.label9, "label9"); this.label9.BackColor = System.Drawing.Color.Transparent; this.label9.Name = "label9"; // // llSerialNumber // resources.ApplyResources(this.llSerialNumber, "llSerialNumber"); this.llSerialNumber.BackColor = System.Drawing.Color.Transparent; this.llSerialNumber.Name = "llSerialNumber"; // // label11 // resources.ApplyResources(this.label11, "label11"); this.label11.BackColor = System.Drawing.Color.Transparent; this.label11.Name = "label11"; // // llScanned // resources.ApplyResources(this.llScanned, "llScanned"); this.llScanned.BackColor = System.Drawing.Color.Transparent; this.llScanned.Name = "llScanned"; // // label10 // resources.ApplyResources(this.label10, "label10"); this.label10.BackColor = System.Drawing.Color.Transparent; this.label10.Name = "label10"; // // label2 // resources.ApplyResources(this.label2, "label2"); this.label2.BackColor = System.Drawing.Color.Transparent; this.label2.Name = "label2"; // // label3 // resources.ApplyResources(this.label3, "label3"); this.label3.BackColor = System.Drawing.Color.Transparent; this.label3.Name = "label3"; // // label1 // resources.ApplyResources(this.label1, "label1"); this.label1.BackColor = System.Drawing.Color.Transparent; this.label1.Name = "label1"; // // tbUserLabel // resources.ApplyResources(this.tbUserLabel, "tbUserLabel"); this.tbUserLabel.Name = "tbUserLabel"; // // llVolumeLabel // resources.ApplyResources(this.llVolumeLabel, "llVolumeLabel"); this.llVolumeLabel.BackColor = System.Drawing.Color.Transparent; this.llVolumeLabel.Name = "llVolumeLabel"; // // llSize // resources.ApplyResources(this.llSize, "llSize"); this.llSize.BackColor = System.Drawing.Color.Transparent; this.llSize.Name = "llSize"; // // llDriveFormat // resources.ApplyResources(this.llDriveFormat, "llDriveFormat"); this.llDriveFormat.BackColor = System.Drawing.Color.Transparent; this.llDriveFormat.Name = "llDriveFormat"; // // label8 // resources.ApplyResources(this.label8, "label8"); this.label8.BackColor = System.Drawing.Color.Transparent; this.label8.Name = "label8"; // // label5 // resources.ApplyResources(this.label5, "label5"); this.label5.BackColor = System.Drawing.Color.Transparent; this.label5.Name = "label5"; // // llFreeSpace // resources.ApplyResources(this.llFreeSpace, "llFreeSpace"); this.llFreeSpace.BackColor = System.Drawing.Color.Transparent; this.llFreeSpace.Name = "llFreeSpace"; // // llDriveType // resources.ApplyResources(this.llDriveType, "llDriveType"); this.llDriveType.BackColor = System.Drawing.Color.Transparent; this.llDriveType.Name = "llDriveType"; // // label6 // resources.ApplyResources(this.label6, "label6"); this.label6.BackColor = System.Drawing.Color.Transparent; this.label6.Name = "label6"; // // tcMain // this.tcMain.Controls.Add(this.tabPage1); this.tcMain.Controls.Add(this.tabPage2); this.tcMain.Controls.Add(this.tpDescription); resources.ApplyResources(this.tcMain, "tcMain"); this.tcMain.Name = "tcMain"; this.tcMain.SelectedIndex = 0; // // tabPage1 // this.tabPage1.Controls.Add(this.label12); this.tabPage1.Controls.Add(this.label2); this.tabPage1.Controls.Add(this.llDriveName); this.tabPage1.Controls.Add(this.label6); this.tabPage1.Controls.Add(this.llLastOptions); this.tabPage1.Controls.Add(this.llDriveType); this.tabPage1.Controls.Add(this.label9); this.tabPage1.Controls.Add(this.llFreeSpace); this.tabPage1.Controls.Add(this.llSerialNumber); this.tabPage1.Controls.Add(this.label5); this.tabPage1.Controls.Add(this.label11); this.tabPage1.Controls.Add(this.label8); this.tabPage1.Controls.Add(this.llScanned); this.tabPage1.Controls.Add(this.llDriveFormat); this.tabPage1.Controls.Add(this.label10); this.tabPage1.Controls.Add(this.llSize); this.tabPage1.Controls.Add(this.llVolumeLabel); this.tabPage1.Controls.Add(this.label3); this.tabPage1.Controls.Add(this.tbUserLabel); this.tabPage1.Controls.Add(this.label1); resources.ApplyResources(this.tabPage1, "tabPage1"); this.tabPage1.Name = "tabPage1"; this.tabPage1.UseVisualStyleBackColor = true; // // tabPage2 // this.tabPage2.Controls.Add(this.ucItemFolderClassification); this.tabPage2.Controls.Add(this.label4); this.tabPage2.Controls.Add(this.tbPhysicalLocation); this.tabPage2.Controls.Add(this.label7); this.tabPage2.Controls.Add(this.tbKeywords); resources.ApplyResources(this.tabPage2, "tabPage2"); this.tabPage2.Name = "tabPage2"; this.tabPage2.UseVisualStyleBackColor = true; // // tpDescription // this.tpDescription.Controls.Add(this.tbDescription); resources.ApplyResources(this.tpDescription, "tpDescription"); this.tpDescription.Name = "tpDescription"; this.tpDescription.UseVisualStyleBackColor = true; // // tbDescription // resources.ApplyResources(this.tbDescription, "tbDescription"); this.tbDescription.Name = "tbDescription"; // // DlgDiscProperties // resources.ApplyResources(this, "$this"); this.Controls.Add(this.tcMain); this.Name = "DlgDiscProperties"; this.Load += new System.EventHandler(this.DlgDiscProperties_Load); this.Controls.SetChildIndex(this.btnOK, 0); this.Controls.SetChildIndex(this.btnCancel, 0); this.Controls.SetChildIndex(this.tcMain, 0); this.tcMain.ResumeLayout(false); this.tabPage1.ResumeLayout(false); this.tabPage1.PerformLayout(); this.tabPage2.ResumeLayout(false); this.tabPage2.PerformLayout(); this.tpDescription.ResumeLayout(false); this.tpDescription.PerformLayout(); this.ResumeLayout(false); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); this._selectedTab = this.tabMain.SelectedTab; DebugInfo config = ConfigManager.Config.DebugInfo; this.mnuAutoRefresh.Checked = config.RamAutoRefresh; this.mnuHighDensityMode.Checked = config.RamHighDensityTextMode; this.mnuByteEditingMode.Checked = config.RamByteEditingMode; this.mnuEnablePerByteNavigation.Checked = config.RamEnablePerByteNavigation; UpdateRefreshSpeedMenu(); this.mnuIgnoreRedundantWrites.Checked = config.RamIgnoreRedundantWrites; this.UpdateFlags(); this.mnuHighlightCurrentRowColumn.Checked = config.RamHighlightCurrentRowColumn; this.ctrlHexViewer.HighlightCurrentRowColumn = config.RamHighlightCurrentRowColumn; this.mnuShowCharacters.Checked = config.RamShowCharacters; this.mnuShowLabelInfoOnMouseOver.Checked = config.RamShowLabelInfo; this.ctrlHexViewer.TextZoom = config.RamTextZoom; this.ctrlHexViewer.BaseFont = new Font(config.RamFontFamily, config.RamFontSize, config.RamFontStyle); this.mnuHighlightExecution.Checked = config.RamHighlightExecution; this.mnuHightlightReads.Checked = config.RamHighlightReads; this.mnuHighlightWrites.Checked = config.RamHighlightWrites; this.mnuHideUnusedBytes.Checked = config.RamHideUnusedBytes; this.mnuHideReadBytes.Checked = config.RamHideReadBytes; this.mnuHideWrittenBytes.Checked = config.RamHideWrittenBytes; this.mnuHideExecutedBytes.Checked = config.RamHideExecutedBytes; this.mnuHighlightLabelledBytes.Checked = config.RamHighlightLabelledBytes; this.mnuHighlightBreakpoints.Checked = config.RamHighlightBreakpoints; this.mnuHighlightChrDrawnBytes.Checked = config.RamHighlightChrDrawnBytes; this.mnuHighlightChrReadBytes.Checked = config.RamHighlightChrReadBytes; this.mnuHighlightCodeBytes.Checked = config.RamHighlightCodeBytes; this.mnuHighlightDataBytes.Checked = config.RamHighlightDataBytes; this.mnuHighlightDmcDataBytes.Checked = config.RamHighlightDmcDataBytes; this.UpdateFadeOptions(); this.InitTblMappings(); this.ctrlHexViewer.StringViewVisible = mnuShowCharacters.Checked; this.ctrlHexViewer.MemoryViewer = this; UpdateImportButton(); InitMemoryTypeDropdown(true); _notifListener = new InteropEmu.NotificationListener(ConfigManager.Config.DebugInfo.DebugConsoleId); _notifListener.OnNotification += _notifListener_OnNotification; this.mnuShowCharacters.CheckedChanged += this.mnuShowCharacters_CheckedChanged; this.mnuIgnoreRedundantWrites.CheckedChanged += mnuIgnoreRedundantWrites_CheckedChanged; RestoreLocation(ConfigManager.Config.DebugInfo.MemoryViewerLocation, ConfigManager.Config.DebugInfo.MemoryViewerSize); this.InitShortcuts(); }
// MAY return null! private TabPage CreateTab(PanelInformation.PanelIDs ptype, string name, int dn, int posindex, bool dotheme) { UserControls.UserControlCommonBase uccb = PanelInformation.Create(ptype); // must create, since its a ptype. if (uccb == null) // if ptype is crap, it returns null.. catch { return(null); } uccb.Dock = System.Windows.Forms.DockStyle.Fill; // uccb has to be fill, even though the VS designer does not indicate you need to set it.. copied from designer code uccb.Location = new System.Drawing.Point(3, 3); if (dn == -1) // if work out display number { List <int> idlist = (from TabPage p in TabPages where p.Controls[0].GetType() == uccb.GetType() select(p.Controls[0] as UserControls.UserControlCommonBase).displaynumber).ToList(); if (!idlist.Contains(UserControls.UserControlCommonBase.DisplayNumberPrimaryTab)) { dn = UserControls.UserControlCommonBase.DisplayNumberPrimaryTab; } else { // search for empty id. for (int i = UserControls.UserControlCommonBase.DisplayNumberStartExtraTabs; i <= UserControls.UserControlCommonBase.DisplayNumberStartExtraTabsMax; i++) { if (!idlist.Contains(i)) { dn = i; break; } } } } //System.Diagnostics.Debug.WriteLine("Create tab {0} dn {1} at {2}", ptype, dn, posindex); int numoftab = (dn == UserControls.UserControlCommonBase.DisplayNumberPrimaryTab) ? 0 : (dn - UserControls.UserControlCommonBase.DisplayNumberStartExtraTabs + 1); if (uccb is UserControls.UserControlContainerSplitter && numoftab > 0) // so history is a splitter, so first real splitter will be dn=100, adjust for it { numoftab--; } string postfix = numoftab == 0 ? "" : "(" + numoftab.ToStringInvariant() + ")"; string title = name != null ? name : (PanelInformation.GetPanelInfoByPanelID(ptype).WindowTitle + postfix); uccb.Name = title; // for debugging use TabPage page = new TabPage(title); page.Location = new System.Drawing.Point(4, 22); // copied from normal tab creation code page.Padding = new System.Windows.Forms.Padding(3); page.Controls.Add(uccb); TabPages.Insert(posindex, page); //Init control after it is added to the form uccb.Init(eddiscovery, dn); // start the uccb up if (dotheme) // only user created ones need themeing { EDDTheme.Instance.ApplyToControls(page, applytothis: true); } return(page); }
//EDDiscovery Init calls this public void CreateTabs(EDDiscoveryForm edf, bool resettabs, string resetsettings) { eddiscovery = edf; int[] panelids; int[] displaynumbers; int restoretab = 0; string majortabs = SQLiteConnectionUser.GetSettingString(EDDProfiles.Instance.UserControlsPrefix + "MajorTabControlList", ""); string[] majortabnames = SQLiteConnectionUser.GetSettingString(EDDProfiles.Instance.UserControlsPrefix + "MajorTabControlName", "").Replace("!error!", "+").Split(';'); // if its okay, load the name list while (true) { int[] rawtabctrl; majortabs.RestoreArrayFromString(out rawtabctrl); panelids = rawtabctrl.Where((value, index) => index % 2 != 0).ToArray(); displaynumbers = rawtabctrl.Where((value, index) => index > 0 && index % 2 == 0).ToArray(); if (resettabs || panelids.Length == 0 || panelids.Length != displaynumbers.Length || !panelids.Contains(-1) || !panelids.Contains((int)PanelInformation.PanelIDs.PanelSelector)) { majortabs = resetsettings; majortabnames = null; resettabs = false; } else { if (rawtabctrl[0] > 0 && rawtabctrl[0] < panelids.Length) { restoretab = rawtabctrl[0]; } break; } } for (int i = 0; i < panelids.Length; i++) { string name = majortabnames != null && i < majortabnames.Length && majortabnames[i].Length > 0 ? majortabnames[i] : null; try { if (panelids[i] == -1) { TabPage p = CreateTab(PanelInformation.PanelIDs.SplitterControl, name ?? "History", displaynumbers[i], TabPages.Count, false); // no need the theme, will be themed as part of overall load p.Tag = true; // this marks it as the primary tab.. } else { PanelInformation.PanelIDs p = (PanelInformation.PanelIDs)panelids[i]; CreateTab(p, name, displaynumbers[i], TabPages.Count, false); // no need the theme, will be themed as part of overall load } } catch (Exception ex) // paranoia in case something crashes it, unlikely, but we want maximum chance the history tab will show { System.Diagnostics.Trace.WriteLine($"Exception caught creating tab {i} ({name}): {ex.ToString()}"); } } SelectedIndex = restoretab; }
private void OnControlSelectionChanged(Crownwood.DotNetMagic.Controls.TabControl sender, Crownwood.DotNetMagic.Controls.TabPage oldPage, Crownwood.DotNetMagic.Controls.TabPage newPage) { TabPage tabPage = newPage.Tag as TabPage; _component.CurrentPage = tabPage; }
private void ingreso_invent_grup_Load(object sender, EventArgs e) { _padre = P.Auxiliar.FindPadre(this); _page = P.Auxiliar.FindPage(this); }