/// <summary> /// Displays the icon in the system tray. /// </summary> public void Display() { // Put the icon in the system tray and allow it react to mouse clicks. ni.Icon = Resources.default_icon; ni.Text = "OBStray"; ni.Visible = true; // Attach a context menu. TrayApp mainApp = new TrayApp("ws://127.0.0.1:4444"); ni.ContextMenuStrip = mainApp.Create(); }
public FormSetup(TrayApp app) { trayControl = app; InitializeComponent(); btnSaveCliked = false; txtObsApp.Text = trayControl.obsExePath; txtObsProfile.Text = trayControl.obsProfilePath; txtObsSettings.Text = trayControl.obsConfigPath; float factorDefault = 0; for (float factor = 1.0f; factor <= 3.0f; factor += 0.25f) { cmbDownscaleFactor.Items.Add(factor.ToString()); if (float.TryParse(trayControl.obsDownscale, out factorDefault)) if (factor == factorDefault) cmbDownscaleFactor.SelectedIndex = cmbDownscaleFactor.Items.Count - 1; } foreach (var screen in System.Windows.Forms.Screen.AllScreens) lstMonitors.Items.Add(screen.DeviceName); lstMonitors.SelectedIndex = 0; }
public OBSTrayControl(TrayApp app) { trayControl = app; }