예제 #1
0
        private void Populate_Info_List()
        {
            if (ManagerData.Selected_Repo != null)
            {
                RepoPathTB.Text            = ManagerData.Selected_Repo.Path;
                RepoStatusCB.SelectedIndex = (int)ManagerData.Selected_Repo.Current_Status;
                LastCommitTB.Text          = ManagerData.Selected_Repo.Last_Commit.ToString();
                LastCommitMessageTB.Text   = ManagerData.Selected_Repo.Last_Commit_Message;
            }

            else
            {
                StoreLocationCB.Focus();
            }
        }
예제 #2
0
        private void SettingsBT_Click(object sender, EventArgs e)
        {
            string currStore = StoreLocationCB.SelectedItem.ToString();

            SettingsViewFRM settings = new SettingsViewFRM();

            settings.ShowDialog();

            if (Settings_Changed)
            {
                Configuration.Helpers.Deserialize_Condensed(Properties.Settings.Default.ConfigPath);
                MainStatusSSL.Text = string.Empty;
                StoreLocationCB_Initialize();
                ReposLV_Initialize();
            }

            int index = StoreLocationCB.FindStringExact(currStore);

            if (index != -1)
            {
                StoreLocationCB.SelectedIndex = index;
            }

            else
            {
                StoreLocationCB.SelectedIndex = 0;
            }

            if (Properties.Settings.Default.AutoChangeRate != -1)
            {
                AutoCheckTMR.Interval = Properties.Settings.Default.AutoChangeRate * 1000;
                AutoCheckTMR.Enabled  = true;
                AutoCheckTMR.Start();
            }

            else
            {
                AutoCheckTMR.Stop();
                AutoCheckTMR.Interval = 0;
                AutoCheckTMR.Enabled  = false;
            }
        }
예제 #3
0
        private void RefreshStoresBT_Click(object sender, EventArgs e)
        {
            if (Refresh_Complete)
            {
                Refresh_Complete = false;

                string currStore = StoreLocationCB.SelectedItem.ToString();

                this.Cursor = Cursors.WaitCursor;

                MainStatusSSL.Text = "Refreshing ...";

                // Need to rescan the current store for any new repos
                if (ManagerData.Selected_Store != null || !(string.IsNullOrEmpty(StoreLocationCB.SelectedItem.ToString()) && string.IsNullOrWhiteSpace(StoreLocationCB.SelectedItem.ToString())))
                {
                    if (RepoHelpers.Detect_Changes(false))
                    {
                        Configuration.Helpers.Serialize_Condensed_All(Properties.Settings.Default.ConfigPath);
                        Refresh_Elements(false);
                        MainStatusSSL.Text = "Refresh Complete - Changes Were Applied";
                    }

                    else
                    {
                        // If a new repo was added, it needs to have an initial commit otherwise it will not be detected
                        MainStatusSSL.Text = "Refresh Complete - No Changes Detected";
                    }

                    this.Cursor = Cursors.Default;
                }

                Refresh_Complete = true;

                StoreLocationCB.SelectedIndex = StoreLocationCB.FindStringExact(currStore);
            }
        }