static void Main() { TrayAppContext appContext = new TrayAppContext(); // Retrieve CircleToken on startup if (Properties.Settings.Default.CircleToken == "") { SetAPITokenForm form = new SetAPITokenForm(appContext); if (form.ShowDialog() != DialogResult.OK) { appContext.Dispose(); return; } } // Set required user parameters on startup if (Properties.Settings.Default.Username == "" || Properties.Settings.Default.ProjectName == "" || Properties.Settings.Default.VCSType == "") { SetProjectDetailsForm form = new SetProjectDetailsForm(appContext, true); if (form.ShowDialog() != DialogResult.OK) { appContext.Dispose(); return; } } // Populate tray icon if we have everything we need to do so. appContext.RefreshBuilds(); appContext.RestartTimer(); Application.Run(appContext); }
public Requests(TrayAppContext appContext) { this.appContext = appContext; username = Properties.Settings.Default.Username; vcsType = Properties.Settings.Default.VCSType; projectName = Properties.Settings.Default.ProjectName; }
// Initializes and displays the NotifyIcon. public static void InitNotifyIcon(TrayAppContext appContext, Container components) { ContextMenuStrip strip = new CircleContextMenuStrip(appContext); notifyIcon = new NotifyIcon(components) { ContextMenuStrip = strip, Icon = Properties.Resources.favicon_icon, Text = DEFAULT_TOOLTIP_TEXT, Visible = true }; }
public CircleContextMenuStrip(TrayAppContext appContext) { this.appContext = appContext; //MatchNumBuilds(appContext.NumBuilds, Properties.Settings.) Items.Add(toolStripSeparator); Items.Add("Refresh", null, new EventHandler(Refresh_OnClick)); Items.Add("Set Circle API Token", null, SetAPIToken_OnClick); Items.Add(CreateNumBuildsDropDownMenu()); Items.Add("Set Polling Interval", null, SetPollingInterval_OnClick); Items.Add("Set Project Details", null, SetProjectDetails_OnClick); Items.Add("Exit", null, new EventHandler(Exit_OnClick)); ShowCheckMargin = false; ShowImageMargin = false; }
public NotifyIconManager(TrayAppContext appContext) { this.appContext = appContext; }