Example #1
0
        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);
        }
Example #2
0
        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();
        }
Example #3
0
        private void SetAPIToken_OnClick(object source, EventArgs e)
        {
            SetAPITokenForm form = new SetAPITokenForm(appContext);

            form.Show();
        }