Beispiel #1
0
        private void ReposLV_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (ReposLV.SelectedItems.Count > 0)
            {
                ManagerData.Selected_Repo = ManagerData.Selected_Store._Repos[ReposLV.SelectedItems[0].Name];

                ManagerData.Copy_Selected_Repo();

                if (ManagerData.Selected_Repo != null)
                {
                    MainStatusSSL.Text = ManagerData.Selected_Repo.Path;
                }

                RepoStatusCB.Enabled = true;
                CloneRepoBT.Visible  = true;

                if (!ManagerData.Selected_Repo.Logs_Parsed && Properties.Settings.Default.LogParseMethod == 0 || Properties.Settings.Default.LogParseMethod == 1)
                {
                    try
                    {
                        Process LogP = RepoHelpers.Create_Process(ManagerData.Selected_Repo.Path, " git --no-pager log");
                        LogP.Start();
                        string Raw_Log = LogP.StandardOutput.ReadToEnd();
                        LogP.StandardInput.WriteLine("exit");
                        LogP.WaitForExit();

                        if (Properties.Settings.Default.LogParseMethod == 1 && ManagerData.Selected_Repo.Logs != null)
                        {
                            ManagerData.Selected_Repo.Logs.Clear();
                        }

                        RepoHelpers.Parse_Logs(Raw_Log, ManagerData.Selected_Repo);
                        ManagerData.Selected_Repo.Logs_Parsed = true;

                        if (Properties.Settings.Default.LogParseMethod == 0)
                        {
                            ManagerData.Selected_Repo.Logs_Parsed = true;
                        }
                    }

                    catch (Exception ex)
                    {
                    }
                }

                Populate_Info_List();
            }

            else
            {
                RepoStatusCB.Enabled       = false;
                RepoStatusCB.SelectedIndex = -1;
                RepoPathTB.Clear();
                LastCommitTB.Clear();
                LastCommitMessageTB.Clear();
                MainStatusSSL.Text  = string.Empty;
                CloneRepoBT.Visible = false;
            }
        }
Beispiel #2
0
        private void StoreLocationCB_SelectedIndexChanged(object sender, EventArgs e)
        {
            try
            {
                if (ManagerData.Stores.Keys.Contains(StoreLocationCB.SelectedItem.ToString()))
                {
                    ManagerData.Selected_Store = ManagerData.Stores[StoreLocationCB.SelectedItem.ToString()];
                    ReposLV_Initialize();
                    MainStatusSSL.Text = ManagerData.Selected_Store._Path;
                }
            }

            catch
            {
                RepoPathTB.Clear();
                LastCommitTB.Clear();
                LastCommitMessageTB.Clear();
            }
        }
Beispiel #3
0
        private void ReposLV_Initialize()
        {
            ReposLV.Items.Clear();

            if (ManagerData.Selected_Store != null)
            {
                try
                {
                    foreach (string repo in ManagerData.Selected_Store._Repos.Keys)
                    {
                        ListViewItem lvi = new ListViewItem
                        {
                            Name = repo,
                            Text = repo
                        };

                        ReposLV.Items.Add(lvi);
                    }
                }

                catch
                {
                }
            }

            if (ReposLV.SelectedItems.Count == 0)
            {
                RepoStatusCB.SelectedIndex = -1;
                RepoStatusCB.Enabled       = false;
                RepoPathTB.Clear();
                LastCommitTB.Clear();
                LastCommitMessageTB.Clear();
            }

            else
            {
                RepoStatusCB.Enabled = true;
            }
        }