public Main(frmOBSSupporter e) { supporterForm = e; _obs.Connected += onConnect; _obs.Disconnected += onDisconnect; _obs.SceneChanged += onSceneChange; if (obsPath != "") { createObsLnk(); createObsProcess(); supporterForm.Enabled = true; } }
//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; }
public Empty(frmOBSSupporter par) { parent = par; }