/// <summary> /// Constructeur par défaut, génère plusieurs carrés. /// </summary> public RectangleEnigmaPanel() { Random rnd = new Random(); TableLayoutPanel centerLayout = new TableLayoutPanel(); centerLayout.ColumnCount = 27; for (int i = 0; i < 27 ;i++) { centerLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent,0.04f)); } centerLayout.RowCount = 21; for (int i = 0; i < 21; i++) { centerLayout.RowStyles.Add(new RowStyle(SizeType.Percent, 0.05f)); } centerLayout.Dock = DockStyle.Fill; Controls.Add(centerLayout); for (int i = 0; i < tpnlCarre.Length; i++) { tpnlCarre[i] = new Panel(); Random randonGen = new Random(); Color randomColor = Color.FromArgb(randonGen.Next(240), randonGen.Next(240), randonGen.Next(255)); tpnlCarre[i].BackColor = randomColor; tpnlCarre[i].Size = new Size(20, 20); int iLocX = rnd.Next(1, 27); int iLocY = rnd.Next(0, 21); centerLayout.Controls.Add(tpnlCarre[i], iLocX, iLocY); tpnlCarre[i].Click += new EventHandler(ClickOnCarre); } centerLayout.Click += new EventHandler(ClickOnPanel); }
public DialogHandler() { Control = new EtoFormBase { StartPosition = swf.FormStartPosition.CenterParent, AutoSize = true, Size = sd.Size.Empty, MinimumSize = sd.Size.Empty, ShowInTaskbar = false, ShowIcon = false, MaximizeBox = false, MinimizeBox = false }; panelContent = new swf.Panel { Dock = swf.DockStyle.Fill, AutoSize = true, AutoSizeMode = swf.AutoSizeMode.GrowAndShrink }; panelButtons = new swf.TableLayoutPanel { Dock = swf.DockStyle.Bottom, Height = 0 }; panelButtons.RowStyles.Add(new swf.RowStyle(swf.SizeType.AutoSize)); panelButtons.ColumnStyles.Add(new swf.ColumnStyle(swf.SizeType.Percent, 100)); Control.Controls.Add(panelContent); Control.Controls.Add(panelButtons); }
private void InitializeComponent() { ComponentResourceManager manager = new ComponentResourceManager(typeof(AutoRefreshOptionControl)); PropertyValue value2 = new PropertyValue(); this.lblSlowVolumeAutoRefresh = new Label(); this.cmbSlowVolumeAutoRefresh = new ComboBoxEx(); this.ValuesWatcher = new PropertyValuesWatcher(); TableLayoutPanel panel = new TableLayoutPanel(); panel.SuspendLayout(); ((ISupportInitialize) this.ValuesWatcher).BeginInit(); base.SuspendLayout(); manager.ApplyResources(panel, "tlpBack"); panel.Controls.Add(this.lblSlowVolumeAutoRefresh, 0, 0); panel.Controls.Add(this.cmbSlowVolumeAutoRefresh, 1, 0); panel.Name = "tlpBack"; manager.ApplyResources(this.lblSlowVolumeAutoRefresh, "lblSlowVolumeAutoRefresh"); this.lblSlowVolumeAutoRefresh.Name = "lblSlowVolumeAutoRefresh"; manager.ApplyResources(this.cmbSlowVolumeAutoRefresh, "cmbSlowVolumeAutoRefresh"); this.cmbSlowVolumeAutoRefresh.DropDownStyle = ComboBoxStyle.DropDownList; this.cmbSlowVolumeAutoRefresh.FormattingEnabled = true; this.cmbSlowVolumeAutoRefresh.MinimumSize = new Size(110, 0); this.cmbSlowVolumeAutoRefresh.Name = "cmbSlowVolumeAutoRefresh"; value2.DataObject = this.cmbSlowVolumeAutoRefresh; value2.PropertyName = "SelectedIndex"; this.ValuesWatcher.Items.AddRange(new PropertyValue[] { value2 }); manager.ApplyResources(this, "$this"); base.AutoScaleMode = AutoScaleMode.Font; base.Controls.Add(panel); base.Name = "AutoRefreshOptionControl"; panel.ResumeLayout(false); panel.PerformLayout(); ((ISupportInitialize) this.ValuesWatcher).EndInit(); base.ResumeLayout(false); base.PerformLayout(); }
protected override CollectionForm CreateCollectionForm() { _CollectionForm = base.CreateCollectionForm(); _LayoutPanel = _CollectionForm.Controls["overArchingTableLayoutPanel"] as TableLayoutPanel; if (_LayoutPanel != null) { PropertyGrid propertyGrid = _LayoutPanel.Controls["propertyBrowser"] as PropertyGrid; if (propertyGrid != null) { propertyGrid.HelpVisible = true; propertyGrid.GotFocus += PropertyGridGotFocus; } } _CollectionForm.Load += CollectionFormLoad; _CollectionForm.Resize += CollectionFormResize; _CollectionForm.LocationChanged += CollectionFormLocationChanged; return (_CollectionForm); }
private void Init() { layoutPanel = new TableLayoutPanel(); layoutPanel.CellBorderStyle = TableLayoutPanelCellBorderStyle.InsetDouble; layoutPanel.Dock = DockStyle.Fill; this.machinePanel.Controls.Add(layoutPanel); int row = 4, col = 4; DynamicLayout(layoutPanel, row, col); int index = 1; for (int i = 0; i < row; i++) { for (int j = 0; j < col; j++) { MachineControl machine = new MachineControl(); uiMachines[index-1] = machine; machine.Dock = DockStyle.Fill; //machine.IPAddress = string.Format("192.168.0.{0:G}", 4 + index); machine.IPAddress = MainForm.Sixteen_IP[index - 1]; machine.anotherName = MainForm.Sixteen_Name[index - 1]; layoutPanel.Controls.Add(machine); layoutPanel.SetRow(machine, i); layoutPanel.SetColumn(machine, j); index++; } } }
public FunctionConverterScene(MainForm mainForm) { _mainForm = mainForm; _panel = new TableLayoutPanel(); Initialize(); }
public override object CreateControl() { ParameterPanel panelFalse = new ParameterPanel(); ParameterPanel panelTrue = new ParameterPanel(); panelFalse.Init(SubParamsFalse, ParamNameWidth, (int) TotalWidth); panelTrue.Init(SubParamsTrue, ParamNameWidth, (int) TotalWidth); CheckBox cb = new CheckBox{Checked = Value}; cb.CheckedChanged += (sender, e) => ValueHasChanged(); TableLayoutPanel tlp = new TableLayoutPanel(); tlp.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100)); tlp.RowStyles.Add(new RowStyle(SizeType.Absolute, paramHeight)); tlp.RowStyles.Add(new RowStyle(SizeType.AutoSize, 100)); tlp.Controls.Add(cb, 0, 0); panelFalse.Visible = !Value; panelTrue.Visible = Value; tlp.Controls.Add(panelFalse, 0, 1); tlp.Controls.Add(panelTrue, 0, 1); cb.CheckedChanged += (sender, e) =>{ panelFalse.Visible = !cb.Checked; panelTrue.Visible = cb.Checked; }; tlp.PerformLayout(); control = tlp; return control; }
public override void PopulateOperandView(BHAVEditor master, EditorScope escope, TableLayoutPanel panel) { panel.Controls.Add(new OpLabelControl(master, escope, Operand, new OpStaticTextProvider("Refreshes the specified property of the object on demand."))); panel.Controls.Add(new OpComboControl(master, escope, Operand, "Target Object:", "TargetObject", new OpStaticNamedPropertyProvider(EditorScope.Behaviour.Get<STR>(211)))); panel.Controls.Add(new OpComboControl(master, escope, Operand, "Property:", "RefreshType", new OpStaticNamedPropertyProvider(EditorScope.Behaviour.Get<STR>(212)))); }
/// <summary> /// Constructeur par défaut, génère un texte et l'affiche dans le Panel. /// </summary> public AppuieReponseEnigmaPanel() { Label lblEnigme = new Label(); Label lblRep = new Label(); lblRep.Text = "réponse"; lblEnigme.Text = "Appuie sur la"; lblRep.Font = new Font(FontFamily.GenericSansSerif, 24, FontStyle.Bold); lblEnigme.Font = new Font(FontFamily.GenericSansSerif, 24, FontStyle.Bold); lblRep.Size = TextRenderer.MeasureText(lblRep.Text, lblRep.Font); lblEnigme.Size = TextRenderer.MeasureText(lblEnigme.Text, lblEnigme.Font); lblRep.Click += new EventHandler(ClickOnReponse); TableLayoutPanel centerLayout = new TableLayoutPanel(); centerLayout.ColumnCount = 2; centerLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50)); centerLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50)); centerLayout.RowCount = 3; centerLayout.RowStyles.Add(new RowStyle(SizeType.Percent, 50)); centerLayout.RowStyles.Add(new RowStyle(SizeType.AutoSize)); centerLayout.RowStyles.Add(new RowStyle(SizeType.Percent, 50)); centerLayout.Dock = DockStyle.Fill; Controls.Add(centerLayout); centerLayout.Controls.Add(lblRep, 1, 1); centerLayout.Controls.Add(lblEnigme, 0, 1); lblEnigme.Dock = DockStyle.Right; lblEnigme.Margin = new Padding(0, 0, 0, 0); lblRep.Margin = new Padding(0, 0, 0, 0); }
public WelcomeFormEx() { AutoSize = true; AutoSizeMode = AutoSizeMode.GrowAndShrink; StartPosition = FormStartPosition.CenterScreen; TableLayoutPanel table = new TableLayoutPanel { Dock = DockStyle.Fill, AutoSize = true }; table.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50)); table.Controls.Add(new Label { Text = "Client: ", TextAlign = ContentAlignment.MiddleCenter }, 0, 0); table.Controls.Add(new Label { Text = "Server: ", TextAlign = ContentAlignment.MiddleCenter }, 0, 1); table.Controls.Add(new Label { Text = "Port: ", TextAlign = ContentAlignment.MiddleCenter }, 0, 2); table.Controls.Add(boxClient, 1, 0); table.Controls.Add(buttonClient, 2, 0); table.Controls.Add(boxServer, 1, 1); table.SetColumnSpan(boxServer, 2); table.Controls.Add(boxPort, 1, 2); table.SetColumnSpan(boxPort, 2); table.Controls.Add(buttonOK, 0, 3); table.SetColumnSpan(buttonOK, 3); Controls.Add(table); boxClient.Text = ConfigEx.GetElement(Ultima.Client.GetFilePath("client.exe") ?? string.Empty, "Client"); boxServer.Text = ConfigEx.GetElement("185.21.223.28", "Server"); boxPort.Text = ConfigEx.GetElement("2593", "Port"); buttonClient.Click += buttonClient_Click; }
/// <summary> /// Initializes the options table /// </summary> /// <param name="settingsTable">Table</param> /// <param name="isPluginOptions">Whether the options are global options</param> public static void InitializeOptionsTable(TableLayoutPanel settingsTable, bool isPluginOptions) { int columnCount = isPluginOptions ? 3 : 4; settingsTable.SuspendLayout(); try { // Set Columns settingsTable.ColumnCount = columnCount; settingsTable.ColumnStyles.Clear(); settingsTable.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize)); settingsTable.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize)); settingsTable.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize)); if (!isPluginOptions) { settingsTable.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize)); } // Rows settingsTable.RowCount = 0; settingsTable.Controls.Clear(); } finally { settingsTable.ResumeLayout(true); } // Hook Resize event settingsTable.Resize += (s, e) => ResizeEditorControls(settingsTable); }
/// <summary> /// Constructor. /// </summary> public DrawingToolbox() : base() { _panel = new TableLayoutPanel(); _panel.AutoSize = true; _panel.Dock = DockStyle.Top; this.Controls.Add(_panel); InitializeComponent(); _panel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50)); _panel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50)); _panel.RowStyles.Add(new RowStyle(SizeType.Percent, 50)); _panel.RowStyles.Add(new RowStyle(SizeType.Percent, 50)); _panel.Controls.Add(_titleLabel); _panel.SetCellPosition(_titleLabel, new TableLayoutPanelCellPosition(0,0)); _panel.Controls.Add(DrawnigModeEnabled); _panel.SetCellPosition(DrawnigModeEnabled, new TableLayoutPanelCellPosition(0,1)); _panel.Controls.Add(ClearButton); _panel.SetCellPosition(ClearButton, new TableLayoutPanelCellPosition(0, 2)); _panel.Controls.Add(ExportImageButton); _panel.SetCellPosition(ExportImageButton, new TableLayoutPanelCellPosition(1, 2)); Enabled = false; DrawnigModeEnabled.Enabled = false; }
/// <summary> /// Показывает окно с подробным перечислением очков /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DetailsLinkLabelClicked(object sender, LinkLabelLinkClickedEventArgs e) { if(Scores == null) return; var form = new Form { Size = new Size(400, 200), AutoSize = false, MinimizeBox = false, MaximizeBox = false, Padding = new Padding(10), FormBorderStyle = FormBorderStyle.FixedDialog }; var outerPanel = new TableLayoutPanel {AutoSize = true, ColumnCount = 2, RowCount = 2}; form.Controls.Add(outerPanel); for(int rNum = 0; rNum < 2; rNum++) { string penalties = string.Concat(Scores.GetPenalties(rNum).Select(x => x + "\r\n")); string text = string.Format( "Robot {0}:\r\n " + "Temporary scores: {1}\r\n" + "Penalties:\r\n{2}", rNum, Scores.GetTemp(rNum), penalties); var label = new Label { AutoSize = true, TabIndex = rNum, Anchor = (rNum == 0 ? AnchorStyles.Left : AnchorStyles.Right) | AnchorStyles.Top, Text = text }; outerPanel.Controls.Add(label, rNum, 0); form.AutoScrollMinSize = label.Size; } form.ShowDialog(); }
public HotkeyInput() { var tableLayout = new TableLayoutPanel(); tableLayout.Dock = DockStyle.Fill; _textBox = new TextBox(); _textBox.KeyDown += TextBoxOnKeyDown; _textBox.Dock = DockStyle.Fill; _textBox.Margin = new Padding(0); _clearButton = new Button(); _clearButton.Text = "Clear"; _clearButton.Click += ButtonClearOnClick; _clearButton.Margin = new Padding(0); _clearButton.Height = _textBox.Height; tableLayout.ColumnCount = 2; tableLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100)); tableLayout.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize)); tableLayout.Controls.Add(_textBox, 0, 0); tableLayout.Controls.Add(_clearButton, 1, 0); tableLayout.Dock = DockStyle.Fill; Controls.Add(tableLayout); HotkeyUpdated(); }
public TabInventory(PlayerDataFile playerDataFile) { this.playerDataFile = playerDataFile; Text = "Inventory"; panel = new TableLayoutPanel(); panel.Dock = DockStyle.Fill; panel.AutoSize = true; panel.RowCount = 5; panel.ColumnCount = 8; for (int i = 0; i < 4; i++) { for (int j = 0; j < 8; j++) { ItemStack itemStack = playerDataFile.bag[i * 8 + j]; BinderItem itemBinder = new BinderItem(itemStack); SlotInventory slot = new SlotInventory(itemBinder, DataItem.getNameList()); panel.Controls.Add(slot, j, i); } } for (int i = 0; i < 8; i++) { ItemStack itemStack = playerDataFile.inventory[i]; BinderItem itemBinder = new BinderItem(itemStack); SlotInventory slot = new SlotInventory(itemBinder, DataItem.getNameList()); panel.Controls.Add(slot, i, 4); } Controls.Add(panel); }
public void TestExtenderMethods () { TableLayoutPanel p = new TableLayoutPanel (); Control c = new Button (); Assert.AreEqual (new TableLayoutPanelCellPosition (-1, -1), p.GetCellPosition (c), "A1"); Assert.AreEqual (-1, p.GetColumn (c), "A2"); Assert.AreEqual (1, p.GetColumnSpan (c), "A3"); Assert.AreEqual (-1, p.GetRow (c), "A4"); Assert.AreEqual (1, p.GetRowSpan (c), "A5"); p.SetCellPosition (c, new TableLayoutPanelCellPosition (1, 1)); Assert.AreEqual (new TableLayoutPanelCellPosition (1, 1), p.GetCellPosition (c), "A6"); p.SetColumn (c, 2); Assert.AreEqual (2, p.GetColumn (c), "A7"); p.SetRow (c, 2); Assert.AreEqual (2, p.GetRow (c), "A9"); p.SetColumnSpan (c, 2); Assert.AreEqual (2, p.GetColumnSpan (c), "A8"); p.SetRowSpan (c, 2); Assert.AreEqual (2, p.GetRowSpan (c), "A10"); Assert.AreEqual (new TableLayoutPanelCellPosition (2, 2), p.GetCellPosition (c), "A11"); // ??????? //Assert.AreEqual (new TableLayoutPanelCellPosition (-1, -1), p.GetPositionFromControl (c), "A12"); //Assert.AreEqual (c, p.GetControlFromPosition(0, 0), "A13"); }
protected override void CreateControls(TableLayoutPanel panel) { panel.ColumnCount = 1; panel.RowCount = 3; CreateProjectNameControls(panel); }
public void createSgTable(int sgCnt, string meth) { int depth = 25 * (sgCnt + 1); table2 = new TableLayoutPanel() { ColumnCount = 4, RowCount = sgCnt + 1, Size = new Size(725, depth) }; for (int i = 0; i < sgCnt + 1; i++) this.table2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 24)); table2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 120)); table2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 120)); table2.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 120)); table2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F)); Panel panel0 = new Panel() { Dock = DockStyle.Fill }; Panel panel1 = new Panel() { Dock = DockStyle.Fill }; Panel panel2 = new Panel() { Dock = DockStyle.Fill }; Panel panel3 = new Panel() { Dock = DockStyle.Fill }; table2.Controls.Add(panel0, 0, 0); table2.Controls.Add(panel1, 1, 0); table2.Controls.Add(panel2, 2, 0); table2.Controls.Add(panel3, 3, 0); Label labelSg = new Label() { Text = "SampGrp", Padding = new Padding(3, 0, 0, 0), AutoSize = true }; panel0.Controls.Add(labelSg); Label labelSamp = new Label() { Text = "Current Samples", AutoSize = true }; panel1.Controls.Add(labelSamp); Label labelSupp = new Label() { Text = "Supplemental", AutoSize = true }; panel2.Controls.Add(labelSupp); Label labelIns = new Label() { Text = "Insurance Available", AutoSize = true }; panel3.Controls.Add(labelIns); //this.flowLayoutPanel1.Controls.Add(table2); }
public UITableHandler(Button verifyExerciseButton, Label numberOfEmptyCellsLabel, TableLayoutPanel exerciseTable) { this.exerciseTable = exerciseTable; this.verifyExerciseButton = verifyExerciseButton; this.numberOfEmptyCellsLabel = numberOfEmptyCellsLabel; CreateTableOnGUI(); }
private void InitializeComponent() { ComponentResourceManager manager = new ComponentResourceManager(typeof(SplashPiece)); this.pictureWait = new PictureBox(); this.lblNote = new Label(); this.overarchingTableLayoutPanel = new TableLayoutPanel(); ((ISupportInitialize) this.pictureWait).BeginInit(); this.overarchingTableLayoutPanel.SuspendLayout(); base.SuspendLayout(); manager.ApplyResources(this.pictureWait, "pictureWait"); this.pictureWait.Name = "pictureWait"; this.pictureWait.TabStop = false; manager.ApplyResources(this.lblNote, "lblNote"); this.lblNote.Name = "lblNote"; manager.ApplyResources(this.overarchingTableLayoutPanel, "overarchingTableLayoutPanel"); this.overarchingTableLayoutPanel.Controls.Add(this.pictureWait, 0, 0); this.overarchingTableLayoutPanel.Controls.Add(this.lblNote, 0, 1); this.overarchingTableLayoutPanel.Name = "overarchingTableLayoutPanel"; manager.ApplyResources(this, "$this"); base.Controls.Add(this.overarchingTableLayoutPanel); base.Name = "SplashPiece"; ((ISupportInitialize) this.pictureWait).EndInit(); this.overarchingTableLayoutPanel.ResumeLayout(false); this.overarchingTableLayoutPanel.PerformLayout(); base.ResumeLayout(false); base.PerformLayout(); }
private void AddTableContentOnlySymbol(TableLayoutPanel tlp, Field2ColorElements<DiscreteElement> f2discrete) { short row = 0; foreach (DiscreteElement element in f2discrete.Elements) { string strWithoutA; tlp.RowStyles.Add(new RowStyle(SizeType.Absolute, 17f)); row = (short) (row + 1); tlp.Controls.Add(base.CreateNumberLabel(row), 0, row); tlp.Controls.Add(base.CreateSymbolLabel(element.Symbol), 1, row); if (element.Value.Contains("@")) { strWithoutA = this.GetStrWithoutA(element.Value); } else { strWithoutA = element.Value; } tlp.Controls.Add(base.CreateValueTextBox(strWithoutA), 2, row); if (element.Legend.Contains("@")) { strWithoutA = this.GetStrWithoutA(element.Legend); } else { strWithoutA = element.Legend; } tlp.Controls.Add(base.CreateLegendTextBox(strWithoutA), 3, row); tlp.Controls.Add(base.CreateIsEnableCheckBox(element.IsEnabled), 4, row); } }
/// <summary> /// Add Control to TableLayoutPanel /// </summary> /// <param name="column">column position</param> /// <param name="row">row position</param> private void AddNewRow(Control control1stColumn, Control control2ndColumn, TableLayoutPanel panel) { panel.RowCount = panel.RowCount + 1; panel.RowStyles.Add(new RowStyle(SizeType.AutoSize)); panel.Controls.Add(control1stColumn, 0, panel.RowCount); panel.Controls.Add(control2ndColumn, 1, panel.RowCount); }
protected override void CreateControls(TableLayoutPanel panel) { panel.ColumnCount = 1; panel.RowCount = 1; CreateExceptionGrid(panel); }
public float Init(Parameters parameters1, float paramNameWidth, int totalWidth) { Controls.Clear(); Parameters = parameters1; Parameters.Convert(WinFormsParameterFactory.Convert); int nrows = Parameters.GroupCount; parameterGroupPanels = new ParameterGroupPanel[nrows]; grid = new TableLayoutPanel{AutoScroll = true}; grid.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100)); grid.Name = "tableLayoutPanel"; int totalHeight = 0; for (int i = 0; i < nrows; i++){ int h = (int) (parameters1.GetGroup(i).Height + 26); grid.RowStyles.Add(new RowStyle(SizeType.Absolute, h)); totalHeight += h; } grid.RowStyles.Add(new RowStyle(SizeType.AutoSize, 100)); grid.Width = totalWidth; grid.Height = totalHeight; for (int i = 0; i < nrows; i++){ AddParameterGroup(parameters1.GetGroup(i), i, paramNameWidth, totalWidth); } grid.Dock = DockStyle.Fill; Controls.Add(grid); Name = "ParameterPanel"; Width = totalWidth; Height = totalHeight; return totalHeight; }
public ReportSelectionPanel() { table = new TableLayoutPanel { RowCount = 2, ColumnCount = 1, Dock = DockStyle.Fill }; List<string> reports = new List<string>(); reports.Add("Sales Weight and Dollars"); // 0 reports.Add("Current Product Inventory"); // 1 reports.Add("Current Plant Inventory"); // 2 reports.Add("Sales With Tax"); // 3 reports.Add("Vendor Sales"); // 4 cb_reports = new ComboBox { DataSource = reports, Dock = DockStyle.Top }; cb_reports.SelectedIndexChanged += cb_reports_SelectedIndexChanged; this.Controls.Add(table); table.Controls.Add(cb_reports, 0, 0); this.table.Controls.Add(pan_sales = new SalesWeightDollarsPanel()); }
public static TableLayoutPanel CreateHeaderLabel(string text) { var panel = new TableLayoutPanel { RowCount = 1, ColumnCount = 2, AutoSize = true, Anchor = AnchorStyles.Left | AnchorStyles.Right }; panel.Controls.Add( new Label { Anchor = AnchorStyles.Left, AutoSize = true, Margin = new Padding(0, 0, 3, 0), Text = text }); panel.Controls.Add( new Label { AccessibleRole = System.Windows.Forms.AccessibleRole.Separator, Anchor = AnchorStyles.Left | AnchorStyles.Right, BackColor = System.Drawing.SystemColors.ControlDark, Margin = new Padding(3, 0, 0, 0), Height = 1 }); return panel; }
public ApplicationPropertyControl(Action<bool> isDirtyAction) { isDirty = isDirtyAction; this.Font = System.Drawing.SystemFonts.MessageBoxFont; mainPanel = new TableLayoutPanel { AutoSize = true, Width = 0, Height = 0, ColumnCount = 1, }; mainPanel.Controls.Add(Utils.CreateLabel("Crate name:", Utils.Paddding())); crateBox = Utils.CreateTextBox("", Utils.Paddding()); crateBox.Width = 294; mainPanel.Controls.Add(crateBox); mainPanel.Controls.Add(Utils.CreateLabel("Output type:", Utils.Paddding())); typeComboBox = Utils.CreateComboBox( new[] { BuildOutputType.Application.ToDisplayString(), BuildOutputType.Library.ToDisplayString() }, Utils.Paddding()); typeComboBox.Anchor = AnchorStyles.Left | AnchorStyles.Right; mainPanel.Controls.Add(typeComboBox); AddLibraryTypeBox(); this.Controls.Add(mainPanel); }
private void AddRow(System.Windows.Forms.TableLayoutPanel tableLayout) { tableLayout.RowStyles.Add(new RowStyle(SizeType.AutoSize)); // increment RowCount for every row added or else layout style becomes wonky ++tableLayout.RowCount; }
private static TableLayoutPanel CreateTableLayoutPanel() { int row = 10; int col = 3; TableLayoutPanel tlpLayout = new TableLayoutPanel(); tlpLayout.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single; tlpLayout.Dock = DockStyle.Fill; tlpLayout.RowCount = row; tlpLayout.ColumnCount = col; for (int i = 0; i < row; i++) { tlpLayout.RowStyles.Add(new RowStyle(SizeType.Percent, 50F)); } for (int i = 0; i < col; i++) { tlpLayout.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F)); } //设置tablelayoutpanel控件的DoubleBuffered 属性为true,这样可以减少或消除由于不断重绘所显示图面的某些部分而导致的闪烁 tlpLayout.GetType() .GetProperty("DoubleBuffered", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic) .SetValue(tlpLayout, true, null); return tlpLayout; }
private void Build() { var pnlTable = new WForms.TableLayoutPanel(); pnlTable.SuspendLayout(); pnlTable.Dock = WForms.DockStyle.Fill; pnlTable.Controls.Add(BuildNif()); pnlTable.Controls.Add(BuildNombre()); pnlTable.Controls.Add(BuildTelefono()); pnlTable.Controls.Add(BuildCorreo()); pnlTable.Controls.Add(BuildFiltroYear()); pnlTable.Controls.Add(BuildPanelBotones()); pnlTable.Controls.Add(BuildPanelBotonesSeleccion()); pnlTable.ResumeLayout(false); pnlTable.MinimumSize = new Draw.Size(400, 300); pnlTable.MaximumSize = pnlTable.MinimumSize; Controls.Add(pnlTable); Controls.Add(BuildDireccion()); MinimumSize = new Draw.Size(775, 300); MaximumSize = MinimumSize; ModoSeleccion(false); ModoInicial(); }
public FormGame() { // Create table and fill it with buttons tableField = new TableLayoutPanel() { Location = new Point(170, 110), ColumnCount = fieldSize, RowCount = fieldSize, BackColor = System.Drawing.Color.YellowGreen, CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.OutsetPartial, AutoSize = true }; for(int i = 0; i < fieldSize; i++) { //tableField.RowStyles.Add(new RowStyle(SizeType.Absolute, cellSize)); for(int j = 0; j < fieldSize; j++) { //tableField.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, cellSize)); tableField.Controls.Add(new Button(){ Width = cellSize, Height = cellSize, BackColor = System.Drawing.Color.LightYellow, TextAlign = ContentAlignment.MiddleCenter},j, i); } } // add table to FornGame this.Controls.Add(tableField); //tableField.Left = (this.ClientSize.Width - tableField.Width) / 2; //tableField.Top = (this.ClientSize.Height - tableField.Height) / 2; InitializeComponent(); }
public static void Init(TableLayoutPanel tlp) { MainWindowGrid = tlp; var tl = Create3D(); var tr = Create2D(Viewport2D.ViewDirection.Top); var bl = Create2D(Viewport2D.ViewDirection.Front); var br = Create2D(Viewport2D.ViewDirection.Side); Viewports.Add(tl); Viewports.Add(tr); Viewports.Add(bl); Viewports.Add(br); Viewports.ForEach(SubscribeExceptions); MainWindowGrid.Controls.Clear(); MainWindowGrid.ColumnCount = 2; MainWindowGrid.RowCount = 2; MainWindowGrid.Controls.Add(tl, 0, 0); MainWindowGrid.Controls.Add(tr, 1, 0); MainWindowGrid.Controls.Add(bl, 0, 1); MainWindowGrid.Controls.Add(br, 1, 1); RunAll(); }
public void tablePanel_KeyUp(System.Windows.Forms.TableLayoutPanel tablePanel, object sender, System.Windows.Forms.KeyEventArgs e) { /* if (e.KeyCode == Keys.Enter || e.KeyCode == Keys.Down) * { * e.Handled = true; * TextBox tb = (TextBox)sender; * string name_head = tb.Name.Split('_')[0]; * bool flag = false; * foreach (Control c in tablePanel.Controls) * { * if (flag && c.Name.Contains(name_head)) { c.Focus(); break; } * if (c.Name == tb.Name) flag = true; * } * } * else if (e.KeyCode == Keys.Up) * { * e.Handled = true; * TextBox tb = (TextBox)sender; * string name_head = tb.Name.Split('_')[0]; * Control p_ctr = null; * foreach (Control c in tablePanel.Controls) * { * if (p_ctr == null && c.Name.Contains(name_head)) p_ctr = c; * if (c.Name == tb.Name) { p_ctr.Focus(); break; } * if (c.Name.Contains(name_head)) { p_ctr = c; } * } * }*/ }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.progressPanel1 = new DevExpress.XtraWaitForm.ProgressPanel(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanel1.SuspendLayout(); this.SuspendLayout(); // // progressPanel1 // this.progressPanel1.Appearance.BackColor = System.Drawing.Color.Transparent; this.progressPanel1.Appearance.Options.UseBackColor = true; this.progressPanel1.AppearanceCaption.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); this.progressPanel1.AppearanceCaption.Options.UseFont = true; this.progressPanel1.AppearanceDescription.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F); this.progressPanel1.AppearanceDescription.Options.UseFont = true; this.progressPanel1.Description = "Loading..."; this.progressPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.progressPanel1.ImageHorzOffset = 10; this.progressPanel1.Location = new System.Drawing.Point(0, 17); this.progressPanel1.LookAndFeel.SkinName = "Sharp"; this.progressPanel1.LookAndFeel.UseDefaultLookAndFeel = false; this.progressPanel1.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.progressPanel1.Name = "progressPanel1"; this.progressPanel1.Size = new System.Drawing.Size(246, 39); this.progressPanel1.TabIndex = 0; this.progressPanel1.Text = "progressPanel1"; // // tableLayoutPanel1 // this.tableLayoutPanel1.AutoSize = true; this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent; this.tableLayoutPanel1.ColumnCount = 1; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 220F)); this.tableLayoutPanel1.Controls.Add(this.progressPanel1, 0, 0); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(0, 14, 0, 14); this.tableLayoutPanel1.RowCount = 1; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tableLayoutPanel1.Size = new System.Drawing.Size(246, 73); this.tableLayoutPanel1.TabIndex = 1; // // WaitForm1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoSize = true; this.ClientSize = new System.Drawing.Size(246, 73); this.Controls.Add(this.tableLayoutPanel1); this.DoubleBuffered = true; this.MinimumSize = new System.Drawing.Size(246, 0); this.Name = "FrmLoading"; this.StartPosition = System.Windows.Forms.FormStartPosition.Manual; this.Text = "Form1"; this.tableLayoutPanel1.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); }
private void compareToolStripMenuItem_Click(object sender, EventArgs e) { Compare myComparison = new Compare(); //combobox ComboBox myComboBox = new ComboBox(); //foreach (String labelText in myComparison.Car1()) //{ // myComboBox.Text += labelText + "\n"; //} //Compare label 1 Label CompareBoxLabel1 = new Label(); CompareBoxLabel1.Font = new System.Drawing.Font("Consolas", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); CompareBoxLabel1.Anchor = System.Windows.Forms.AnchorStyles.Right; CompareBoxLabel1.Size = new System.Drawing.Size(270, 260); //CompareBoxLabel1.Text = myComparison.Car1().Text; foreach (String labelText in myComparison.Car1().Text) { CompareBoxLabel1.Text += labelText + "\n"; } //Compare label 2 Label CompareBoxLabel2 = new Label(); CompareBoxLabel2.Font = new System.Drawing.Font("Consolas", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); //CompareBoxLabel2.Anchor = System.Windows.Forms.AnchorStyles.Left; CompareBoxLabel2.Size = new System.Drawing.Size(270, 260); CompareBoxLabel2.Text = myComparison.Car2().Text; //foreach (String labelText in myComparison.Car2()) //{ // CompareBoxLabel2.Text += labelText + "\n"; //} //About Panel TableLayoutPanel ComparePanel = new System.Windows.Forms.TableLayoutPanel(); ComparePanel.Name = "Compare Panel"; ComparePanel.Size = new System.Drawing.Size(600, 300); ComparePanel.TabIndex = 0; ComparePanel.ColumnCount = 2; ComparePanel.RowCount = 1; ComparePanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 60.0F)); ComparePanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 40.0F)); ComparePanel.Controls.Add(CompareBoxLabel1, 0, 0); ComparePanel.Controls.Add(CompareBoxLabel2, 1, 0); ComparePanel.Controls.Add(myComboBox, 1, 0); Form compareForm = new Form(); compareForm.Size = new System.Drawing.Size(650, 350); compareForm.Text = "Compare Car Calulator"; compareForm.Controls.Add(ComparePanel); compareForm.Show(); }
public void Set_TablePanelColumnHead(System.Windows.Forms.TableLayoutPanel tablePanel, string[] s_ar) { for (int c_i = 0; c_i < tablePanel.ColumnCount; c_i++) { System.Windows.Forms.Label lb = new System.Windows.Forms.Label(); lb.Text = s_ar[c_i]; tablePanel.Controls.Add(lb, c_i, 0); } }
void Build(Capitulo cap) { var mainPanel = new WFrms.TableLayoutPanel { Dock = WFrms.DockStyle.Fill }; mainPanel.Controls.Add(this.BuildDataGrid(cap)); //mainPanel.Controls.Add(this.BuildAddBtn()); //mainPanel.Show(); this.Controls.Add(mainPanel); }
private void ProductUC_Load(object sender, EventArgs e) { var tbLayoutPanel = new TableLayoutPanel(); tbLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); tbLayoutPanel.Name = "tlpProduct"; tbLayoutPanel.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.OutsetDouble; tbLayoutPanel.ColumnCount = _seatCols; for (int i = 0; i < _seatCols; i++) { tbLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, (float)(100.0 / _seatCols))); } tbLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; tbLayoutPanel.Location = new System.Drawing.Point(0, 0); tbLayoutPanel.RowCount = _seatRows; for (int i = 0; i < _seatRows; i++) { tbLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, (float)(100.0 / _seatRows))); } tbLayoutPanel.Size = this.Parent.Size; tbLayoutPanel.TabIndex = 0; this.Controls.Add(tbLayoutPanel); _progressBarList = new ProgressBarEx[_productpositioncount]; tbLayoutPanel.SuspendLayout(); for (int i = 0; i < _productpositioncount; i++) { _progressBarList[i] = new ProgressBarEx(); _progressBarList[i].BackgroundPainter = PainterFactory.GetProductStatePainter("EMPTY"); _progressBarList[i].ProgressPainter = PainterFactory.GetProgressPainter("BURNIN"); _progressBarList[i].BorderPainter = PainterFactory.GetPlainBoarderPainter("UNACTIVE"); _progressBarList[i].Dock = System.Windows.Forms.DockStyle.Fill; _progressBarList[i].Location = new System.Drawing.Point(6 + (i % _seatCols) * 166, 6 + (i / _seatCols) * 124); _progressBarList[i].MarqueePercentage = 25; _progressBarList[i].MarqueeSpeed = 30; _progressBarList[i].MarqueeStep = 1; _progressBarList[i].Maximum = 100; _progressBarList[i].Minimum = 0; _progressBarList[i].Name = "pbeProduct" + i.ToString(); _progressBarList[i].ProgressPadding = 0; _progressBarList[i].ProgressType = ProgressODoom.ProgressType.Smooth; _progressBarList[i].ShowPercentage = false; _progressBarList[i].Text = (i + 1).ToString() + ": "; _progressBarList[i].Value = 0; _progressBarList[i].MouseDown += new System.Windows.Forms.MouseEventHandler(this.ProgressBarEx_MouseDown); _progressBarList[i].ContextMenuStrip = null; tbLayoutPanel.Controls.Add(_progressBarList[i]); } tbLayoutPanel.ResumeLayout(false); }
public void Set_TablePanelStyle(System.Windows.Forms.TableLayoutPanel tablePanel) { tablePanel.ColumnStyles.Clear(); tablePanel.RowStyles.Clear(); for (int i = 0; i < tablePanel.ColumnCount; i++) { tablePanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 5F)); } for (int i = 0; i < tablePanel.RowCount; i++) { tablePanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); } }
void Build() { var mainPanel = new WFrms.TableLayoutPanel { Dock = WFrms.DockStyle.Fill }; mainPanel.Controls.Add(this.BuildTitulo()); mainPanel.Controls.Add(this.BuildNotas()); mainPanel.Controls.Add(this.BuildBtnAddCap()); this.Controls.Add(mainPanel); }
public TableLayoutHandler() { Control = new SWF.TableLayoutPanel(); this.Control.SuspendLayout(); this.Control.Margin = SWF.Padding.Empty; this.Control.Dock = SWF.DockStyle.Fill; this.Control.Size = SD.Size.Empty; this.Control.MinimumSize = SD.Size.Empty; this.Control.AutoSize = true; this.Control.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.Spacing = TableLayout.DefaultSpacing; this.Padding = TableLayout.DefaultPadding; }
public TableLayoutHandler() { Control = new swf.TableLayoutPanel { Margin = swf.Padding.Empty, Dock = swf.DockStyle.Fill, Size = sd.Size.Empty, MinimumSize = sd.Size.Empty, AutoSize = true, AutoSizeMode = swf.AutoSizeMode.GrowAndShrink }; this.Spacing = TableLayout.DefaultSpacing; this.Padding = TableLayout.DefaultPadding; Control.SuspendLayout(); }
void Build(List <Capitulo> caps) { var mainPanel = new WFrms.TableLayoutPanel { Dock = WFrms.DockStyle.Fill }; mainPanel.Controls.Add(this.BuildDataGrid(caps)); mainPanel.Controls.Add(this.BuildAddBtn()); mainPanel.Controls.Add(this.BuildEditBtn()); mainPanel.Controls.Add(this.BuildSeccionBtn()); mainPanel.Controls.Add(this.BuildListBtn()); this.Controls.Add(mainPanel); }
void Build() { var mainPanel = new WFrms.TableLayoutPanel { RowCount = 3, Dock = WFrms.DockStyle.Fill }; mainPanel.Controls.Add(this.BuildTexto(), 0, 0); mainPanel.Controls.Add(this.BuildNotas(), 0, 1); mainPanel.Controls.Add(this.BuildBtnAddSec(), 0, 2); this.Controls.Add(mainPanel); }
private void Build() { var mainPanel = new WFrms.TableLayoutPanel { AutoScroll = true, Dock = WFrms.DockStyle.Fill, Font = new Font("Century Gothic", 11F, FontStyle.Regular, GraphicsUnit.Point, 0) }; mainPanel.Controls.Add(this.BuildNIF()); mainPanel.Controls.Add(this.BuildNombre()); mainPanel.Controls.Add(this.BuildTelefono()); mainPanel.Controls.Add(this.BuildEmail()); mainPanel.Controls.Add(this.BuildDireccion()); mainPanel.Controls.Add(this.BuildBotonAceptar()); this.Controls.Add(mainPanel); }
void Build(Capitulo cap, string s) { this.seccionEditar = cap.recuperarSeccion(s); var mainPanel = new WFrms.TableLayoutPanel { Dock = WFrms.DockStyle.Fill }; mainPanel.Controls.Add(this.BuildTexto()); mainPanel.Controls.Add(this.BuildNotas()); mainPanel.Controls.Add(this.BuildBtnAddSec()); //WFrms.MessageBox.Show(seccionEditar.ToString()); this.Controls.Add(mainPanel); }
private TableLayoutPanel GetTabBody() { // Set up the body of the tab as a table TableLayoutPanel body = new System.Windows.Forms.TableLayoutPanel(); // Customise its properties body.BackColor = System.Drawing.SystemColors.Window; body.ColumnCount = 1; body.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); body.Dock = System.Windows.Forms.DockStyle.Fill; body.Location = new System.Drawing.Point(0, 0); body.Name = "BrowserTableLayoutPanel"; body.RowCount = 2; body.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.AutoSize, 40F)); body.RowStyles.Add(new System.Windows.Forms.RowStyle()); body.Size = new System.Drawing.Size(435, 455); body.Margin = new Padding(0); body.Padding = new Padding(0); body.CellBorderStyle = TableLayoutPanelCellBorderStyle.None; body.Cursor = Cursors.Default; // Create the tab toolstrip bar and output area ToolStrip tabTools = CreateTabTools(); TextBox outputArea = new TextBox(); // Output area configuration outputArea.Multiline = true; outputArea.Dock = DockStyle.Fill; outputArea.ReadOnly = true; outputArea.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; outputArea.BorderStyle = System.Windows.Forms.BorderStyle.None; outputArea.BackColor = SystemColors.Window; outputArea.Margin = new Padding(5, 0, 5, 5); outputArea.Font = new Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular); // Now add the tab tools and output area to the tab body body.Controls.Add(tabTools, 0, 0); body.Controls.Add(outputArea, 0, 1); // Finally, return the tab body (TableLayoutPanel) return(body); }
private void Build() { var mainPanel = new WFrms.TableLayoutPanel { AutoScroll = true, Dock = WFrms.DockStyle.Fill, Font = new Font("Century Gothic", 11F, FontStyle.Regular, GraphicsUnit.Point, 0) }; mainPanel.Controls.Add(this.BuildMatricula()); mainPanel.Controls.Add(this.BuildTipo()); mainPanel.Controls.Add(this.BuildMarca()); mainPanel.Controls.Add(this.BuildConsumo()); mainPanel.Controls.Add(this.BuildFechaAdquisicion()); mainPanel.Controls.Add(this.BuildFechaFabricacion()); mainPanel.Controls.Add(this.BuildBotonAceptar()); this.Controls.Add(mainPanel); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { components = new System.ComponentModel.Container(); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.table = new System.Windows.Forms.TableLayoutPanel(); this.backgroundWorker = new System.ComponentModel.BackgroundWorker(); this.lblWon = new System.Windows.Forms.LinkLabel(); this.SuspendLayout(); //table this.table.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.table.ColumnCount = 1; this.table.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.table.Location = new System.Drawing.Point(0, 0); this.table.Name = "table"; this.table.RowCount = 1; this.table.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.table.Size = new System.Drawing.Size(260, 190); this.table.TabIndex = 0; //backgroundworker this.backgroundWorker.WorkerSupportsCancellation = true; this.backgroundWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker_DoWork); //lblWon this.lblWon.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.lblWon.Location = new System.Drawing.Point(0, 193); this.lblWon.Name = "lblWon"; this.lblWon.Size = new System.Drawing.Size(260, 23); this.lblWon.TabIndex = 0; // LightsOutGame // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.table); this.Name = "AllPay_LightOut"; this.Size = new System.Drawing.Size(260, 219); this.ResumeLayout(false); }
/// <summary> /// Initializes a new instance of the <see cref="T:ShellLayoutView"/> class. /// </summary> public ShellLayoutView() { InitializeComponent(); Control[] ctrls = Controls.Find("_MainTLP", true); if (ctrls.Length > 0) { System.Windows.Forms.TableLayoutPanel _MainTLP = ctrls[0].Name == "_MainTLP" ? (System.Windows.Forms.TableLayoutPanel)ctrls[0] : null; // Ajustar el alto del área de Radio y Telefonía de acuerdo al número de filas de LC _MainTLP.RowStyles[2].Height = HMI.Presentation.Asecna.Properties.Settings.Default.LcRows == 2 ? _MainTLP.RowStyles[2].Height : _MainTLP.RowStyles[2].Height / 2; _MainTLP.RowStyles[1].Height = HMI.Presentation.Asecna.Properties.Settings.Default.LcRows == 2 ? _MainTLP.RowStyles[1].Height : (_MainTLP.RowStyles[1].Height + (_MainTLP.RowStyles[2].Height / 2)); } _MainToolsWS.Name = WorkspaceNames.HeaderWorkspace; _RdWS.Name = WorkspaceNames.RdWorkspace; _TlfWS.Name = WorkspaceNames.TlfWorkspace; _LcWS.Name = WorkspaceNames.LcWorkspace; }
private void CreateEnvironmentPresentation() { int placeSize = Config.environmentPlaceSizeWidth * Config.environmentSize; tableLayoutPanel1 = new TableLayoutPanel(); tableLayoutPanel1.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Single; tableLayoutPanel1.ColumnCount = Config.environmentSize; tableLayoutPanel1.RowCount = 1; tableLayoutPanel1.Size = new System.Drawing.Size(placeSize + Config.environmentSize, Config.environmentPlaceSizeHeight); tableLayoutPanel1.Location = new System.Drawing.Point(71, 512); tableLayoutPanel1.Name = "tableLayoutPanel1"; tableLayoutPanel1.BackColor = Color.Transparent; tableLayoutPanel1.CellBorderStyle = TableLayoutPanelCellBorderStyle.None; tableLayoutPanel1.BringToFront(); tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, Config.environmentPlaceSizeWidth)); for (int e = 0; e < Config.environmentSize; e++) { tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, Config.environmentPlaceSizeWidth)); } pictureBox1.Controls.Add(tableLayoutPanel1); for (int e = 0; e < Config.environmentSize; e++) { PictureBox pictureBoxGeneral = new PictureBox(); ((ISupportInitialize)(pictureBoxGeneral)).BeginInit(); pictureBoxGeneral.InitialImage = null; pictureBoxGeneral.Name = "pictureBoxGeneral" + e.ToString(); pictureBoxGeneral.Size = new System.Drawing.Size(Config.environmentPlaceSizeWidth, 55); pictureBoxGeneral.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; pictureBoxGeneral.Anchor = AnchorStyles.Bottom; pictureBoxGeneral.Visible = true; pictureBoxGeneral.MouseClick += new MouseEventHandler(ClickOnPlace); tableLayoutPanel1.Controls.Add(pictureBoxGeneral, e, 0); ((ISupportInitialize)(pictureBoxGeneral)).EndInit(); } pictureBox2.Visible = false; }
public TextAreaHandler() { defaultSize = TextArea.DefaultSize; Control = new swf.RichTextBox { Size = sd.Size.Empty, Multiline = true, AcceptsTab = true, Dock = swf.DockStyle.Fill, BorderStyle = swf.BorderStyle.None, ScrollBars = swf.RichTextBoxScrollBars.Both, }; container = new swf.TableLayoutPanel { MinimumSize = sd.Size.Empty, BorderStyle = swf.BorderStyle.FixedSingle, Size = defaultSize.ToSD() }; container.ColumnStyles.Add(new swf.ColumnStyle(swf.SizeType.AutoSize, 1)); container.RowStyles.Add(new swf.RowStyle(swf.SizeType.AutoSize, 1)); container.Controls.Add(Control, 0, 0); }
//tblpanelBody private void BuildPanelBody() { try { if (listTableLayoutPanelConfig != null && listTableLayoutPanelConfig.Count > 0) { var listtblpanelBody = listTableLayoutPanelConfig.Where(c => c.TableLayoutTableName.Trim() == "tblpanelBody" && c.IsShow).OrderBy(c => c.RowInt).ToList(); if (listtblpanelBody.Count > 0) { this.tblpanelBody = new TableLayoutPanel(); this.tblpanelBody.SuspendLayout(); this.tblpanelBody.ColumnCount = 1; this.tblpanelBody.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.tblpanelBody.Dock = System.Windows.Forms.DockStyle.Fill; this.tblpanelBody.Location = new System.Drawing.Point(0, 0); this.tblpanelBody.Name = "tblpanelBody"; this.tblpanelBody.RowCount = listtblpanelBody.Count; foreach (var item in listtblpanelBody) { float size = 0; float.TryParse(item.SizePercent, out size); this.tblpanelBody.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, size)); } this.tblpanelBody.Controls.Add(this.tblpanelHeader, 0, 0); this.tblpanelBody.Controls.Add(this.tblpanelTitle1, 0, 1); this.tblpanelBody.Controls.Add(this.tblpanelContent, 0, 2); this.tblpanelBody.Margin = new System.Windows.Forms.Padding(0); this.tblpanelBody.Size = new System.Drawing.Size(739, 405); this.tblpanelBody.TabIndex = 0; this.Controls.Add(this.tblpanelBody); this.tblpanelBody.ResumeLayout(false); } } } catch (Exception ex) { MessageBox.Show("Lỗi: " + ex.Message); } }
public void createTable(int sizeCol, int sizeRow)/////can be parameters { tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); Controls.Add(tableLayoutPanel); tableLayoutPanel.ColumnCount = sizeCol; tableLayoutPanel.RowCount = sizeRow; tableLayoutPanel.Margin = new System.Windows.Forms.Padding(0); tableLayoutPanel.Padding = new System.Windows.Forms.Padding(0); tableLayoutPanel.Name = "tableLayoutPanel"; tableLayoutPanel.Location = new System.Drawing.Point(122, 154); tableLayoutPanel.Size = new System.Drawing.Size(500, 1000); for (int i = 0; i < sizeRow; i++) { tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F)); for (int j = 0; j < sizeCol; j++) { tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F)); tableLayoutPanel.Controls.Add(btnCreate(i, j)); } } }
private void FormChooseRecipe_Load(object sender, EventArgs e) { if (!Directory.Exists(System.Environment.CurrentDirectory + "\\Recipe")) { Directory.CreateDirectory(System.Environment.CurrentDirectory + "\\Recipe"); } DirectoryInfo d = new DirectoryInfo(System.Environment.CurrentDirectory + "\\Recipe"); FileSystemInfo[] fsinfos = d.GetFileSystemInfos("*.recipe"); tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); tableLayoutPanel1.ColumnCount = 5; tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 20F)); tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; //tableLayoutPanel1.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single; for (int i = 0; i < fsinfos.Length; i++) { System.Windows.Forms.RadioButton rdo_Control = new System.Windows.Forms.RadioButton(); rdo_Control.AutoSize = true; //rdo_Control.Checked = true; rdo_Control.Location = new System.Drawing.Point(25, 248); rdo_Control.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); rdo_Control.Name = "rdo_Recipe" + i.ToString(); rdo_Control.Size = new System.Drawing.Size(103, 25); rdo_Control.TabIndex = i + 1; rdo_Control.TabStop = true; rdo_Control.Text = fsinfos[i].Name.Split('.')[0]; rdo_Control.UseVisualStyleBackColor = true; tableLayoutPanel1.Controls.Add(rdo_Control); } panel1.Controls.Add(tableLayoutPanel1); tableLayoutPanel1.SuspendLayout(); }
void Build(List <Capitulo> caps) { var mainPanel = new WFrms.TableLayoutPanel { Dock = WFrms.DockStyle.Fill, ColumnCount = 5, RowCount = 2 }; WFrms.Panel gridPanel = this.BuildDataGrid(caps); mainPanel.Controls.Add(gridPanel, 0, 1); mainPanel.Controls.Add(this.BuildAddBtn(), 0, 0); mainPanel.Controls.Add(this.BuildEditBtn(), 1, 0); //mainPanel.Controls.Add(this.BuildDeleteBtn(), 2, 0); mainPanel.Controls.Add(this.BuildSeccionBtn(), 3, 0); mainPanel.Controls.Add(this.BuildListBtn(), 4, 0); mainPanel.SetColumnSpan(gridPanel, 5); this.Controls.Add(mainPanel); this.MinimumSize = new Size(600, 200); this.Text = "Capitulos"; }
private TabPage CustomTabPage(string name) { TabPage newTabPage = new TabPage(name); #region Define System.Windows.Forms.TableLayoutPanel tableLayoutPanel_Base = new System.Windows.Forms.TableLayoutPanel(); System.Windows.Forms.TableLayoutPanel tableLayoutPanel_Param = new System.Windows.Forms.TableLayoutPanel(); System.Windows.Forms.TableLayoutPanel tableLayoutPanel_Result = new System.Windows.Forms.TableLayoutPanel(); System.Windows.Forms.TextBox textBox_B = new System.Windows.Forms.TextBox(); System.Windows.Forms.TextBox textBox_A = new System.Windows.Forms.TextBox(); System.Windows.Forms.TextBox textBox_R2 = new System.Windows.Forms.TextBox(); System.Windows.Forms.Label label_B = new System.Windows.Forms.Label(); System.Windows.Forms.Label label_A = new System.Windows.Forms.Label(); System.Windows.Forms.Label label_R2 = new System.Windows.Forms.Label(); System.Windows.Forms.DataVisualization.Charting.Chart chart1 = new System.Windows.Forms.DataVisualization.Charting.Chart(); System.Windows.Forms.DataVisualization.Charting.ChartArea chartArea1 = new System.Windows.Forms.DataVisualization.Charting.ChartArea(); System.Windows.Forms.DataVisualization.Charting.Legend legend1 = new System.Windows.Forms.DataVisualization.Charting.Legend(); System.Windows.Forms.DataVisualization.Charting.Series series1 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataVisualization.Charting.Series series2 = new System.Windows.Forms.DataVisualization.Charting.Series(); System.Windows.Forms.DataGridView dataGridView1 = new System.Windows.Forms.DataGridView();; System.Windows.Forms.DataGridViewTextBoxColumn NO = new System.Windows.Forms.DataGridViewTextBoxColumn(); System.Windows.Forms.DataGridViewTextBoxColumn Ground = new System.Windows.Forms.DataGridViewTextBoxColumn(); System.Windows.Forms.DataGridViewTextBoxColumn Vision = new System.Windows.Forms.DataGridViewTextBoxColumn(); System.Windows.Forms.DataGridViewTextBoxColumn AfterRegression = new System.Windows.Forms.DataGridViewTextBoxColumn(); System.Windows.Forms.DataGridViewTextBoxColumn Diff = new System.Windows.Forms.DataGridViewTextBoxColumn(); #endregion #region Base #region Result #region Param #region textBox_B textBox_B.Dock = System.Windows.Forms.DockStyle.Fill; textBox_B.Location = new System.Drawing.Point(297, 30); textBox_B.Name = "textBox_B"; textBox_B.Size = new System.Drawing.Size(93, 22); textBox_B.TabIndex = 3; #endregion #region textBox_A textBox_A.Dock = System.Windows.Forms.DockStyle.Fill; textBox_A.Location = new System.Drawing.Point(101, 30); textBox_A.Name = "textBox_A"; textBox_A.Size = new System.Drawing.Size(92, 22); textBox_A.TabIndex = 3; #endregion #region textBox_R2 textBox_R2.Dock = System.Windows.Forms.DockStyle.Fill; textBox_R2.Location = new System.Drawing.Point(101, 3); textBox_R2.Name = "textBox_R2"; textBox_R2.Size = new System.Drawing.Size(92, 22); textBox_R2.TabIndex = 3; #endregion #region label_B label_B.AutoSize = true; label_B.Dock = System.Windows.Forms.DockStyle.Fill; label_B.Location = new System.Drawing.Point(199, 30); label_B.Margin = new System.Windows.Forms.Padding(3); label_B.Name = "label_B"; label_B.Size = new System.Drawing.Size(92, 21); label_B.TabIndex = 3; label_B.Text = "B"; label_B.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; #endregion #region label_A label_A.AutoSize = true; label_A.Dock = System.Windows.Forms.DockStyle.Fill; label_A.Location = new System.Drawing.Point(3, 30); label_A.Margin = new System.Windows.Forms.Padding(3); label_A.Name = "label_A"; label_A.Size = new System.Drawing.Size(92, 21); label_A.TabIndex = 3; label_A.Text = "A"; label_A.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; #endregion #region label_R2 label_R2.AutoSize = true; label_R2.Dock = System.Windows.Forms.DockStyle.Fill; label_R2.Location = new System.Drawing.Point(3, 3); label_R2.Margin = new System.Windows.Forms.Padding(3); label_R2.Name = "label_R2"; label_R2.Size = new System.Drawing.Size(92, 21); label_R2.TabIndex = 3; label_R2.Text = "R平方值"; label_R2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; #endregion #region tableLayoutPanel_Param tableLayoutPanel_Param.ColumnCount = 4; tableLayoutPanel_Param.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); tableLayoutPanel_Param.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); tableLayoutPanel_Param.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); tableLayoutPanel_Param.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); tableLayoutPanel_Param.Controls.Add(textBox_B, 3, 1); tableLayoutPanel_Param.Controls.Add(textBox_A, 1, 1); tableLayoutPanel_Param.Controls.Add(textBox_R2, 1, 0); tableLayoutPanel_Param.Controls.Add(label_B, 2, 1); tableLayoutPanel_Param.Controls.Add(label_A, 0, 1); tableLayoutPanel_Param.Controls.Add(label_R2, 0, 0); tableLayoutPanel_Param.Dock = System.Windows.Forms.DockStyle.Fill; tableLayoutPanel_Param.Location = new System.Drawing.Point(3, 3); tableLayoutPanel_Param.Name = "tableLayoutPanel_Param"; tableLayoutPanel_Param.RowCount = 2; tableLayoutPanel_Param.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); tableLayoutPanel_Param.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); tableLayoutPanel_Param.Size = new System.Drawing.Size(393, 54); tableLayoutPanel_Param.TabIndex = 2; #endregion #endregion #region DataGirdView #region dataGridView1 dataGridView1.AllowUserToAddRows = false; dataGridView1.AllowUserToDeleteRows = false; dataGridView1.AllowUserToResizeColumns = false; dataGridView1.AllowUserToResizeRows = false; dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { NO, Ground, Vision, AfterRegression, Diff }); dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill; dataGridView1.Location = new System.Drawing.Point(-239, 189); dataGridView1.Name = "RegressionDataGridView"; dataGridView1.ReadOnly = true; dataGridView1.RowHeadersVisible = false; dataGridView1.RowTemplate.Height = 24; dataGridView1.Size = new System.Drawing.Size(464, 150); dataGridView1.TabIndex = 2; dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(RegressionDataGridView_CellClick); #endregion #region NO NO.FillWeight = 50F; NO.HeaderText = "No."; NO.Name = "NO"; NO.ReadOnly = true; #endregion #region Ground Ground.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; Ground.DefaultCellStyle.Format = "N3"; Ground.HeaderText = "精測數據"; Ground.Name = "Ground"; Ground.ReadOnly = true; #endregion #region Vision Vision.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; Vision.DefaultCellStyle.Format = "N3"; Vision.HeaderText = "視覺量測"; Vision.Name = "Vision"; Vision.ReadOnly = true; #endregion #region AfterRegression AfterRegression.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; AfterRegression.DefaultCellStyle.Format = "N3"; AfterRegression.HeaderText = "線性轉換"; AfterRegression.Name = "AfterRegression"; AfterRegression.ReadOnly = true; #endregion #region Diff Diff.DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight; Diff.DefaultCellStyle.Format = "N3"; Diff.HeaderText = "與精測差"; Diff.Name = "Diff"; Diff.ReadOnly = true; #endregion #endregion #region tableLayoutPanel_Result tableLayoutPanel_Result.ColumnCount = 1; tableLayoutPanel_Result.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); tableLayoutPanel_Result.Controls.Add(tableLayoutPanel_Param, 0, 0); tableLayoutPanel_Result.Controls.Add(dataGridView1, 0, 1); tableLayoutPanel_Result.Dock = System.Windows.Forms.DockStyle.Fill; tableLayoutPanel_Result.Location = new System.Drawing.Point(535, 3); tableLayoutPanel_Result.Name = "tableLayoutPanel_Result"; tableLayoutPanel_Result.RowCount = 2; tableLayoutPanel_Result.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 60F)); tableLayoutPanel_Result.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); tableLayoutPanel_Result.Size = new System.Drawing.Size(399, 577); tableLayoutPanel_Result.TabIndex = 1; #endregion #endregion #region chart1 chartArea1.AxisX.Title = "Pixel"; chartArea1.AxisY.Title = "mm"; chartArea1.Name = "ChartArea1"; chart1.ChartAreas.Add(chartArea1); chart1.Dock = System.Windows.Forms.DockStyle.Fill; legend1.Alignment = System.Drawing.StringAlignment.Far; legend1.Docking = System.Windows.Forms.DataVisualization.Charting.Docking.Top; legend1.Name = "Legend1"; chart1.Legends.Add(legend1); chart1.Location = new System.Drawing.Point(3, 3); chart1.Name = "chart1"; series1.ChartArea = "ChartArea1"; series1.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; series1.Legend = "Legend1"; series1.Name = "視覺量測-精測"; series2.ChartArea = "ChartArea1"; series2.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Point; series2.Legend = "Legend1"; series2.Name = "視覺量測-迴歸後"; chart1.Series.Add(series1); chart1.Series.Add(series2); chart1.Size = new System.Drawing.Size(526, 577); chart1.TabIndex = 2; chart1.Text = "chart1"; #endregion #region tableLayoutPanel_Base tableLayoutPanel_Base.ColumnCount = 2; tableLayoutPanel_Base.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); tableLayoutPanel_Base.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 405F)); tableLayoutPanel_Base.Controls.Add(tableLayoutPanel_Result, 1, 0); tableLayoutPanel_Base.Controls.Add(chart1, 0, 0); tableLayoutPanel_Base.Dock = System.Windows.Forms.DockStyle.Fill; tableLayoutPanel_Base.Location = new System.Drawing.Point(0, 0); tableLayoutPanel_Base.Name = "tableLayoutPanel_Base"; tableLayoutPanel_Base.RowCount = 1; tableLayoutPanel_Base.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); tableLayoutPanel_Base.Size = new System.Drawing.Size(937, 583); tableLayoutPanel_Base.TabIndex = 0; #endregion #endregion newTabPage.Controls.Add(tableLayoutPanel_Base); return(newTabPage); }
public HubConfigUpdatePanelRowItem(System.Windows.Forms.TableLayoutPanel tableLayoutPanel, string localConfigFolder, string actualConfigFolder, int rowNumber, string hubId, NLog.Logger logger) { this.logger = logger; this.tableLayoutPanel = tableLayoutPanel; this.rowNumber = rowNumber; this.localConfigFolder = localConfigFolder; this.actualConfigFolder = actualConfigFolder; this.configDiffsDisplayed = new string[0]; this.hubId = hubId; // // checkBoxConfigsHubId // this.checkBoxConfigsHubId = new System.Windows.Forms.CheckBox(); this.checkBoxConfigsHubId.AutoSize = true; this.checkBoxConfigsHubId.Dock = System.Windows.Forms.DockStyle.Fill; this.checkBoxConfigsHubId.Name = "checkBoxConfigsHubId" + this.rowNumber.ToString(); this.checkBoxConfigsHubId.TabIndex = 12; this.checkBoxConfigsHubId.Text = hubId; this.checkBoxConfigsHubId.UseVisualStyleBackColor = true; this.checkBoxConfigsHubId.Margin = new Padding(0); this.checkBoxConfigsHubId.CheckedChanged += new System.EventHandler(this.checkBoxConfigsHubId_CheckedChanged); // // buttonConfigsUpdateActualConfigs // this.buttonConfigsUpdateActualConfigs = new System.Windows.Forms.Button(); this.buttonConfigsUpdateActualConfigs.AutoSize = false; this.buttonConfigsUpdateActualConfigs.Dock = System.Windows.Forms.DockStyle.Fill; this.buttonConfigsUpdateActualConfigs.Name = "buttonConfigsUpdateActualConfigs" + this.rowNumber.ToString(); this.buttonConfigsUpdateActualConfigs.TabIndex = 13; this.buttonConfigsUpdateActualConfigs.Text = "Actual"; this.buttonConfigsUpdateActualConfigs.UseVisualStyleBackColor = true; this.buttonConfigsUpdateActualConfigs.Margin = new Padding(0); this.buttonConfigsUpdateActualConfigs.Click += new System.EventHandler(this.buttonConfigsUpdateActualConfigs_Click); // // buttonConfigsUpdateDesiredConfigs // this.buttonConfigsUpdateDesiredConfigs = new System.Windows.Forms.Button(); this.buttonConfigsUpdateDesiredConfigs.AutoSize = false; this.buttonConfigsUpdateDesiredConfigs.Dock = System.Windows.Forms.DockStyle.Fill; this.buttonConfigsUpdateDesiredConfigs.Name = "buttonConfigsUpdateDesiredConfigs" + this.rowNumber.ToString(); this.buttonConfigsUpdateDesiredConfigs.TabIndex = 14; this.buttonConfigsUpdateDesiredConfigs.Text = "Desired"; this.buttonConfigsUpdateDesiredConfigs.UseVisualStyleBackColor = true; this.buttonConfigsUpdateDesiredConfigs.Margin = new Padding(0); this.buttonConfigsUpdateDesiredConfigs.Click += new System.EventHandler(this.buttonConfigsUpdateDesiredConfigs_Click); // config diff links child layout panel this.tableLayoutPanelConfigDiffLinks = new System.Windows.Forms.TableLayoutPanel(); this.tableLayoutPanelConfigDiffLinks.RowCount = 1; this.tableLayoutPanelConfigDiffLinks.ColumnCount = 8; this.tableLayoutPanelConfigDiffLinks.AutoScroll = false; this.tableLayoutPanelConfigDiffLinks.CellBorderStyle = TableLayoutPanelCellBorderStyle.None; this.tableLayoutPanelConfigDiffLinks.AutoSize = true; this.tableLayoutPanelConfigDiffLinks.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanelConfigDiffLinks.Name = "tableLayoutPanelConfigDiffLinks"; this.tableLayoutPanelConfigDiffLinks.TabIndex = 0; string[] configDiffs = null; List <string> configDiffList = CheckConfigDifferences(Path.GetFullPath(this.actualConfigFolder), Path.GetFullPath(this.localConfigFolder)); if (null != configDiffList) { configDiffs = configDiffList.ToArray(); } else { configDiffs = new string[0]; } HandleConfigDiffsDisplay(configDiffs); // // linkLabelConfigsApps // this.tableLayoutPanel.Controls.Add(this.checkBoxConfigsHubId, 0, rowNumber); this.tableLayoutPanel.Controls.Add(this.buttonConfigsUpdateActualConfigs, 1, rowNumber); this.tableLayoutPanel.Controls.Add(this.buttonConfigsUpdateDesiredConfigs, 2, rowNumber); this.tableLayoutPanel.Controls.Add(this.tableLayoutPanelConfigDiffLinks, 3, rowNumber); this.tableLayoutPanel.SetColumnSpan(this.tableLayoutPanelConfigDiffLinks, 3); StartWatchingDesiredLocalConfigChanges(Path.GetFullPath(this.localConfigFolder)); }
/// <summary> /// 07. Còn đang chỉnh sửa /// chưa viết sự kiện cho các button /// </summary> /// <param name="text"></param> /// <param name="caption"></param> /// <param name="buttons"></param> /// <param name="icon"></param> /// <returns></returns> public static DialogResult Show(string text, string caption, MessageBoxButtons buttons, MessageBoxIcon icon) { System.Windows.Forms.Panel pnButton; System.Windows.Forms.TableLayoutPanel tlpPanelMain; System.Windows.Forms.PictureBox ptbBaner; System.Windows.Forms.TableLayoutPanel tlpPanelContent; System.Windows.Forms.PictureBox ptbIcon; System.Windows.Forms.Label lbMessage; // // Button // System.Windows.Forms.Button btnAbort07; System.Windows.Forms.Button btnRetry07; System.Windows.Forms.Button btnIgnore07; System.Windows.Forms.Button btnOK07; System.Windows.Forms.Button btnCancel07; System.Windows.Forms.Button btnYes07; System.Windows.Forms.Button btnNo07; // // frmMsgBox01 // Khởi tạo & định dạng Form // frmMsgBox07 = new Form(); frmMsgBox07.Name = "frmMsgBox07"; frmMsgBox07.Text = caption; frmMsgBox07.StartPosition = FormStartPosition.CenterParent; frmMsgBox07.Size = new System.Drawing.Size(500, 300); // Kích thước form frmMsgBox07.MinimizeBox = false; frmMsgBox07.MaximizeBox = false; frmMsgBox07.FormBorderStyle = FormBorderStyle.FixedDialog; pnButton = new System.Windows.Forms.Panel(); btnAbort07 = new System.Windows.Forms.Button(); btnRetry07 = new System.Windows.Forms.Button(); btnIgnore07 = new System.Windows.Forms.Button(); btnOK07 = new System.Windows.Forms.Button(); btnCancel07 = new System.Windows.Forms.Button(); btnYes07 = new System.Windows.Forms.Button(); btnNo07 = new System.Windows.Forms.Button(); tlpPanelMain = new System.Windows.Forms.TableLayoutPanel(); ptbBaner = new System.Windows.Forms.PictureBox(); tlpPanelContent = new System.Windows.Forms.TableLayoutPanel(); ptbIcon = new System.Windows.Forms.PictureBox(); lbMessage = new System.Windows.Forms.Label(); pnButton.SuspendLayout(); tlpPanelMain.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(ptbBaner)).BeginInit(); tlpPanelContent.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(ptbIcon)).BeginInit(); // // pnButton // #region Thêm & định vị các button lên pnButton switch (buttons) { case MessageBoxButtons.AbortRetryIgnore: btnAbort07.Location = new System.Drawing.Point(478 - 75 - 25 - 75 - 10 - 75 - 10, 6); btnRetry07.Location = new System.Drawing.Point(478 - 75 - 25 - 75 - 10, 6); btnIgnore07.Location = new System.Drawing.Point(478 - 75 - 25, 6); pnButton.Controls.Add(btnAbort07); pnButton.Controls.Add(btnRetry07); pnButton.Controls.Add(btnIgnore07); break; case MessageBoxButtons.OK: btnOK07.Location = new System.Drawing.Point(478 - 75 - 25, 6); pnButton.Controls.Add(btnOK07); break; case MessageBoxButtons.OKCancel: btnOK07.Location = new System.Drawing.Point(478 - 75 - 25 - 75 - 10, 6); btnCancel07.Location = new System.Drawing.Point(478 - 75 - 25, 6); pnButton.Controls.Add(btnOK07); pnButton.Controls.Add(btnCancel07); break; case MessageBoxButtons.RetryCancel: btnRetry07.Location = new System.Drawing.Point(478 - 75 - 25 - 75 - 10, 6); btnCancel07.Location = new System.Drawing.Point(478 - 75 - 25, 6); pnButton.Controls.Add(btnRetry07); pnButton.Controls.Add(btnCancel07); break; case MessageBoxButtons.YesNo: btnYes07.Location = new System.Drawing.Point(478 - 75 - 25 - 75 - 10, 6); btnNo07.Location = new System.Drawing.Point(478 - 75 - 25, 6); pnButton.Controls.Add(btnYes07); pnButton.Controls.Add(btnNo07); break; case MessageBoxButtons.YesNoCancel: btnYes07.Location = new System.Drawing.Point(478 - 75 - 25 - 75 - 10 - 75 - 10, 6); btnNo07.Location = new System.Drawing.Point(478 - 75 - 25 - 75 - 10, 6); btnCancel07.Location = new System.Drawing.Point(478 - 75 - 25, 6); pnButton.Controls.Add(btnYes07); pnButton.Controls.Add(btnNo07); pnButton.Controls.Add(btnCancel07); break; default: //OK btnOK07.Location = new System.Drawing.Point(478 - 75 - 25, 6); pnButton.Controls.Add(btnOK07); break; } #endregion pnButton.Dock = System.Windows.Forms.DockStyle.Fill; pnButton.Location = new System.Drawing.Point(3, 225); pnButton.Name = "pnButton"; pnButton.Size = new System.Drawing.Size(478, 34); pnButton.TabIndex = 1; // // tlpPanelMain // tlpPanelMain.ColumnCount = 1; tlpPanelMain.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); tlpPanelMain.Controls.Add(pnButton, 0, 2); tlpPanelMain.Controls.Add(tlpPanelContent, 0, 1); tlpPanelMain.Controls.Add(ptbBaner, 0, 0); tlpPanelMain.Dock = System.Windows.Forms.DockStyle.Fill; tlpPanelMain.Location = new System.Drawing.Point(0, 0); tlpPanelMain.Name = "tlpPanelMain"; tlpPanelMain.RowCount = 3; tlpPanelMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F)); tlpPanelMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); tlpPanelMain.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); tlpPanelMain.Size = new System.Drawing.Size(484, 262); tlpPanelMain.TabIndex = 0; // // ptbBaner // ptbBaner.Dock = System.Windows.Forms.DockStyle.Fill; ptbBaner.Image = global::Core.Librarys.Properties.Resources.Baner_MsgBox_01; ptbBaner.Location = new System.Drawing.Point(3, 3); ptbBaner.Name = "ptbBaner"; ptbBaner.Size = new System.Drawing.Size(478, 44); ptbBaner.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; ptbBaner.TabIndex = 3; ptbBaner.TabStop = false; #region Thêm vào các button // Abort: Hủy bỏ, kết thúc công việc btnAbort07 = new System.Windows.Forms.Button(); btnAbort07.Name = "btnAbort07"; btnAbort07.Size = new System.Drawing.Size(75, 23); btnAbort07.TabIndex = 0; btnAbort07.Text = "&Hủy bỏ"; btnAbort07.UseVisualStyleBackColor = true; btnAbort07.Click += new System.EventHandler(btnAbort05_Click); // Retry: Thử lại btnRetry07 = new System.Windows.Forms.Button(); btnRetry07.Name = "btnRetry07"; btnRetry07.Size = new System.Drawing.Size(75, 23); btnRetry07.TabIndex = 0; btnRetry07.Text = "&Thử lại"; btnRetry07.UseVisualStyleBackColor = true; btnRetry07.Click += new System.EventHandler(btnRetry05_Click); // Ignore: Bỏ qua, vẫn chạy tiếp chương trình btnIgnore07 = new System.Windows.Forms.Button(); btnIgnore07.Name = "btnIgnore07"; btnIgnore07.Size = new System.Drawing.Size(75, 23); btnIgnore07.TabIndex = 0; btnIgnore07.Text = "&Bỏ qua"; btnIgnore07.UseVisualStyleBackColor = true; btnIgnore07.Click += new System.EventHandler(btnIgnore05_Click); // btnOK07: Nhận btnOK07 = new System.Windows.Forms.Button(); btnOK07.Name = "btnOK07"; btnOK07.Size = new System.Drawing.Size(75, 23); btnOK07.TabIndex = 0; btnOK07.Text = "&Nhận"; btnOK07.UseVisualStyleBackColor = true; btnOK07.Click += new System.EventHandler(btnOK05_Click); // btnCancel07: Hủy btnCancel07 = new System.Windows.Forms.Button(); btnCancel07.Name = "btnCancel07"; btnCancel07.Size = new System.Drawing.Size(75, 23); btnCancel07.TabIndex = 0; btnCancel07.Text = "&Hủy"; btnCancel07.UseVisualStyleBackColor = true; btnCancel07.Click += new System.EventHandler(btnCancel05_Click); // btnYes07: Có btnYes07 = new System.Windows.Forms.Button(); btnYes07.Name = "btnYes07"; btnYes07.Size = new System.Drawing.Size(75, 23); btnYes07.TabIndex = 0; btnYes07.Text = "&Có"; btnYes07.UseVisualStyleBackColor = true; btnYes07.Click += new System.EventHandler(btnYes05_Click); // btnNo07: Không btnNo07 = new System.Windows.Forms.Button(); btnNo07.Name = "btnNo07"; btnNo07.Size = new System.Drawing.Size(75, 23); btnNo07.TabIndex = 0; btnNo07.Text = "&Không"; btnNo07.UseVisualStyleBackColor = true; btnNo07.Click += new System.EventHandler(btnNo05_Click); #endregion // // tlpPanelContent // tlpPanelContent.BackColor = System.Drawing.SystemColors.ControlLightLight; tlpPanelContent.ColumnCount = 2; tlpPanelContent.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 50F)); tlpPanelContent.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); tlpPanelContent.Controls.Add(ptbIcon, 0, 1); tlpPanelContent.Controls.Add(lbMessage, 1, 1); tlpPanelContent.Dock = System.Windows.Forms.DockStyle.Fill; tlpPanelContent.Location = new System.Drawing.Point(3, 53); tlpPanelContent.Name = "tlpPanelContent"; tlpPanelContent.RowCount = 2; tlpPanelContent.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 10F)); tlpPanelContent.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); tlpPanelContent.Size = new System.Drawing.Size(478, 166); tlpPanelContent.TabIndex = 2; // // ptbIcon // ptbIcon.Dock = System.Windows.Forms.DockStyle.Top; switch (icon) { case MessageBoxIcon.Asterisk: // MessageBoxIcon.Information ptbIcon.Image = global::Core.Librarys.Properties.Resources.Button_Info_Icon_64_01; break; case MessageBoxIcon.Error: // MessageBoxIcon.Hand, MessageBoxIcon.Stop ptbIcon.Image = global::Core.Librarys.Properties.Resources.Button_Error_Icon_64_01; break; case MessageBoxIcon.Exclamation: // MessageBoxIcon.Warning ptbIcon.Image = global::Core.Librarys.Properties.Resources.Exclamatio_Icon_64_01; break; case MessageBoxIcon.None: //ptbIcon.Image = global::Core.Librarys.Properties.Resources.info64; break; case MessageBoxIcon.Question: ptbIcon.Image = global::Core.Librarys.Properties.Resources.Button_Help_icon_64_01; break; default: break; } ptbIcon.Location = new System.Drawing.Point(3, 13); ptbIcon.Name = "ptbIcon"; ptbIcon.Size = new System.Drawing.Size(44, 44); ptbIcon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; ptbIcon.TabIndex = 0; ptbIcon.TabStop = false; // // lbMessage // lbMessage.Dock = System.Windows.Forms.DockStyle.Fill; lbMessage.Location = new System.Drawing.Point(53, 10); lbMessage.Name = "lbMessage"; lbMessage.Size = new System.Drawing.Size(422, 156); lbMessage.TabIndex = 1; lbMessage.Text = text; // // TestForm1 // frmMsgBox07.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); frmMsgBox07.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; frmMsgBox07.ClientSize = new System.Drawing.Size(484, 262); frmMsgBox07.Controls.Add(tlpPanelMain); frmMsgBox07.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; frmMsgBox07.MaximizeBox = false; frmMsgBox07.MinimizeBox = false; frmMsgBox07.Name = "TestForm1"; frmMsgBox07.Text = "Thông báo"; ((System.ComponentModel.ISupportInitialize)(ptbBaner)).EndInit(); ((System.ComponentModel.ISupportInitialize)(ptbIcon)).EndInit(); frmMsgBox07.ResumeLayout(false); return(frmMsgBox07.ShowDialog()); }
private void Form4_Load(object sender, EventArgs e) { activezone.Text = GlobalVariable.activezonse; expire_date.Text = GlobalVariable.expirationdate; this.MinimizeBox = false; this.MaximizeBox = false; label9.Font = GlobalVariable.headerlistFONT; label8.Font = GlobalVariable.headerlistFONT; label7.Font = GlobalVariable.headerlistFONT; label6.Font = GlobalVariable.headerlistFONT; label5.Font = GlobalVariable.headerlistFONT; label4.Font = GlobalVariable.headerlistFONT; label3.Font = GlobalVariable.headerlistFONT; label2.Font = GlobalVariable.headerlistFONTBold; label15.Font = GlobalVariable.headerlistFONT; expire_date.Font = GlobalVariable.headerlistFONT; label13.Font = GlobalVariable.headerlistFONT; label12.Font = GlobalVariable.headerlistFONT; label11.Font = GlobalVariable.headerlistFONT; label10.Font = GlobalVariable.headerlistFONT; ipholder.Font = GlobalVariable.headerlistFONT; label1.Font = GlobalVariable.headerlistFONT; activezone.Font = GlobalVariable.headerlistFONT; if (Settings1.Default.ServerIP != null) { ipholder.Text = Settings1.Default.ServerIP; } PanelOne.PanelElement.Shape = new RoundRectShape(); PanelOne.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; PanelOne.PanelElement.PanelFill.BackColor = Color.WhiteSmoke; PanelTwo.PanelElement.Shape = new RoundRectShape(); PanelTwo.PanelElement.PanelFill.GradientStyle = GradientStyles.Solid; PanelTwo.PanelElement.PanelFill.BackColor = Color.WhiteSmoke; this.BackColor = Color.Black; string json = ""; try { var directory = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); string path = Path.Combine(directory, "Arvand", "text.txt"); if (System.IO.File.Exists(path) == false) { Directory.CreateDirectory(Path.GetDirectoryName(path)); using (FileStream fs = new FileStream(path, FileMode.Create)) { } } using (StreamReader sr = new StreamReader(path, true)) { json = sr.ReadToEnd(); } } catch (Exception) { MessageBox.Show("adfsdf"); } List <login> mymodel = new List <login>(); if (json != "") { mymodel = JsonConvert.DeserializeObject <List <login> >(json); } int k = 0; for (int i = GlobalVariable.portlimit; i > 0; i--) { string name = "panel" + i; Telerik.WinControls.UI.RadPanel panel = new Telerik.WinControls.UI.RadPanel(); panel.Dock = System.Windows.Forms.DockStyle.Top; panel.Location = new System.Drawing.Point(0, 0); panel.Name = name; panel.Size = new System.Drawing.Size(729, 50); ((Telerik.WinControls.Primitives.BorderPrimitive)(panel.GetChildAt(0).GetChildAt(1))).Visibility = Telerik.WinControls.ElementVisibility.Collapsed; System.Windows.Forms.TableLayoutPanel tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); tableLayoutPanel1.ColumnCount = 6; tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 5F)); tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 22.5F)); tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 22.5F)); tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 22.5F)); tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 22.5F)); tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 22.5F)); tableLayoutPanel1.RowCount = 1; tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); tableLayoutPanel1.RightToLeft = System.Windows.Forms.RightToLeft.Yes; tableLayoutPanel1.Name = "tableLayoutPanel1"; for (int j = 1; j < 4; j++) { Telerik.WinControls.UI.RadPanel panelfortable = new Telerik.WinControls.UI.RadPanel(); panelfortable.BackColor = System.Drawing.SystemColors.ScrollBar; System.Windows.Forms.TextBox textBox6 = new TextBox(); textBox6.BackColor = System.Drawing.SystemColors.ScrollBar; textBox6.BorderStyle = System.Windows.Forms.BorderStyle.None; textBox6.Font = new System.Drawing.Font("B Nazanin", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(178))); textBox6.Location = new System.Drawing.Point(12, 2); textBox6.Name = "textBox6"; textBox6.Size = new System.Drawing.Size(149, 23); textBox6.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.ipholder.Margin = new System.Windows.Forms.Padding(10, 5, 10, 5); textBox6.TabIndex = 1; panelfortable.Controls.Add(textBox6); panelfortable.Location = new System.Drawing.Point(161, 37); panelfortable.BackColor = System.Drawing.SystemColors.ScrollBar; panelfortable.Name = "panelfortable"; panelfortable.Size = new System.Drawing.Size(180, 29); panelfortable.Anchor = System.Windows.Forms.AnchorStyles.Right; panelfortable.TabIndex = 16; panelfortable.Padding = new System.Windows.Forms.Padding(5, 5, 5, 5); //panelfortable.BackColor = System.Drawing.Color.Transparent; ((Telerik.WinControls.Primitives.BorderPrimitive)(panelfortable.GetChildAt(0).GetChildAt(1))).Visibility = Telerik.WinControls.ElementVisibility.Collapsed; // panelfortable.Dock = System.Windows.Forms.DockStyle.Fill; tableLayoutPanel1.Controls.Add(panelfortable, j, 0); if (j == 1) { string tab = i.ToString() + "4"; textBox6.TabIndex = Convert.ToInt32(tab); if (k < mymodel.Count) { textBox6.Text = mymodel[k].name; } else { textBox6.Text = ""; } nameList.Add(textBox6); } else if (j == 2) { string tab = i.ToString() + "3"; textBox6.TabIndex = Convert.ToInt32(tab); if (k < mymodel.Count) { textBox6.Text = mymodel[k].username; } else { textBox6.Text = ""; } usernameList.Add(textBox6); } else if (j == 3) { string tab = i.ToString() + "2"; textBox6.TabIndex = Convert.ToInt32(tab); if (k < mymodel.Count) { textBox6.Text = mymodel[k].password; } else { textBox6.Text = ""; } passList.Add(textBox6); } } System.Windows.Forms.Label number = new Label(); number.Anchor = System.Windows.Forms.AnchorStyles.Right; number.BackColor = System.Drawing.Color.Transparent; number.Font = new System.Drawing.Font("B Nazanin", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(178))); number.Location = new System.Drawing.Point(630, 8); number.Name = "number"; number.Size = new System.Drawing.Size(113, 28); number.TabIndex = 10; number.Text = i.ToString(); number.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; tableLayoutPanel1.Controls.Add(number, 0, 0); Telerik.WinControls.UI.RadPanel panelforport = new Telerik.WinControls.UI.RadPanel(); panelforport.BackColor = System.Drawing.SystemColors.ScrollBar; panelforport.Location = new System.Drawing.Point(161, 37); panelforport.Name = "panelfortable"; panelforport.Size = new System.Drawing.Size(180, 29); panelforport.Anchor = System.Windows.Forms.AnchorStyles.Right; panelforport.TabIndex = 16; ((Telerik.WinControls.Primitives.BorderPrimitive)(panelforport.GetChildAt(0).GetChildAt(1))).Visibility = Telerik.WinControls.ElementVisibility.Collapsed; System.Windows.Forms.Label Port = new Label(); Port.Dock = System.Windows.Forms.DockStyle.Fill; Port.BackColor = System.Drawing.Color.Transparent; Port.Font = new System.Drawing.Font("B Nazanin", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(178))); Port.Location = new System.Drawing.Point(630, 8); Port.Name = "Port"; Port.Size = new System.Drawing.Size(113, 28); Port.TabIndex = 10; Port.Text = (8001 + i).ToString(); Port.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; panelforport.Controls.Add(Port); portList.Add(8001 + i); tableLayoutPanel1.Controls.Add(panelforport, 4, 0); tableLayoutPanel1.BackColor = System.Drawing.Color.Transparent; tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; // tableLayoutPanel1.CellBorderStyle = System.Windows.Forms.TableLayoutPanelCellBorderStyle.Inset; panel.Controls.Add(tableLayoutPanel1); PanelOfDynamicData.Controls.Add(panel); k++; } }