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); }
private void Refresh_OnClick(object source, EventArgs e) { // Ask user to set API token if they haven't already if (Properties.Settings.Default.CircleToken == null) { SetAPITokenForm form = new SetAPITokenForm(appContext); form.Show(); } // Clear all current build labels RemoveBuilds(); appContext.RefreshBuilds(); }
private void SetAPIToken_OnClick(object source, EventArgs e) { SetAPITokenForm form = new SetAPITokenForm(appContext); form.Show(); }