public void addSceneConfig(string[] games) { controlLineList = controlLineList.addControlLine(games); pnlSceneConfig.Controls.AddRange(controlLineList.draw(controlLineList.getLength())); btnAddSceneConfig.Location = new Point(6, 22 + 37 * controlLineList.getLength()); controlLineList.fillComboboxes(sceneNamesStr); }
public sceneConfigControlLine removeControlLine(int index) { if (index > 0) { next = next.removeControlLine(index - 1); return(this); } else { return(next); } }
//Initializing--------------------------------------------------------------------------------------------------------------- public frmOBSSupporter() { InitializeComponent(); controlLineList = new Empty(this); main = new Main(this); nfiTrayIcon.Visible = true; // Watch started Processes watchOut(); // Load Settings loadSettings(); // Set PasswordTextBox tbxPassword.setPasswordChar('*'); }
public sceneConfigControlLine addControlLine(string[] sg) { next = next.addControlLine(sg); return(this); }
//Initializing--------------------------------------------------------------------------------------------------------------- public ControlLine(frmOBSSupporter par, string[] sg, sceneConfigControlLine n) { next = n; parent = par; lblScene = new Label(); lblScene.AutoSize = true; lblScene.Text = "Scene " + getLength(); lblScene.Anchor = AnchorStyles.Top | AnchorStyles.Left; cobxScenes = new ComboBox(); cobxScenes.Size = new Size(160, 21); cobxScenes.FlatStyle = FlatStyle.Flat; cobxScenes.SelectedValueChanged += new EventHandler(cobxScenes_SelectedValueChanged); cobxScenes.SelectionChangeCommitted += new EventHandler(cobxScene_SelectionChangeCommitted); cobxScenes.Anchor = AnchorStyles.Top | AnchorStyles.Left; pnlGames = new Panel(); pnlGames.Name = "" + getLength(); pnlGames.Size = new Size(234, 21); pnlGames.ControlAdded += new ControlEventHandler(pnlControlAdded); pnlGames.ControlRemoved += new ControlEventHandler(pnlControlRemoved); pnlGames.Anchor = (AnchorStyles.Top | AnchorStyles.Left) | AnchorStyles.Right; btnAddGames = new Button(); btnAddGames.Size = new Size(75, 23); btnAddGames.Text = "Add Games"; btnAddGames.Click += new EventHandler(btnAddGames_Click); btnAddGames.Anchor = AnchorStyles.Top | AnchorStyles.Right; if (sg != null) { cobxSelItem = sg[0]; for (int i = 1; i < sg.Length; i++) { try { addGame(sg[i]); } catch { parent.missingGames += Environment.NewLine + sg[i]; } } } lblNoGames.Text = "* no Games are Selected"; lblNoGames.ForeColor = Color.Red; lblNoGames.Size = new Size(105, 13); lblNoGames.AutoSize = true; lblNoGames.Visible = false; lblNoGames.Anchor = AnchorStyles.Top | AnchorStyles.Left; lblNoScene.Text = "* no Scene selected"; lblNoScene.ForeColor = Color.Red; lblNoScene.Size = new Size(103, 13); lblNoScene.AutoSize = true; lblNoScene.Visible = false; lblNoScene.Anchor = AnchorStyles.Top | AnchorStyles.Left; btnDeleteLine = new Button(); btnDeleteLine.Text = "remove"; btnDeleteLine.Size = new Size(55, 23); btnDeleteLine.Click += new EventHandler(removeMe); btnDeleteLine.Anchor = AnchorStyles.Top | AnchorStyles.Right; }