예제 #1
0
        static private void MOGGlobalBranches_Click(object sender, System.EventArgs e)
        {
            string branch = ((ToolStripMenuItem)sender).Text;

            // Check if we already have an Active Branch?
            if (MOG_ControllerProject.IsBranch())
            {
                // Check if they just specified the already active Branch?
                if (string.Compare(MOG_ControllerProject.GetBranchName(), branch, true) == 0)
                {
                    // No need to login into the already active project
                    return;
                }
            }

            // Login into the specified Branch
            if (guiProject.SetLoginBranch(branch))
            {
                ((ToolStripMenuItem)sender).Checked = true;
            }
            else
            {
                guiProject.UpdateGuiBranch(MOG_ControllerProject.GetBranchName());
            }
        }