Example #1
0
        private void btnCheck_Click(object sender, EventArgs e)
        {
            tbOutput.Text = "";
            listBoxBranchFiles.Items.Clear();
            listBoxMainlineFiles.Items.Clear();
            listBoxBranchCsproj.Items.Clear();
            listBoxMainlineCsproj.Items.Clear();

            #region register workflow items.
            AddTask(new TaskItem_CheckProj_CheckDeveloper(comboBox1.SelectedItem.ToString())); // check developer
            AddTask(new TaskItem_CheckProj_CheckTfsMapping(tbTfsMapping.Text));                // check TFS mapping

            var taskGetMainlineFiles = new TaskItem_CheckProj_GetMainlineFiles(tbTfsMapping.Text);
            AddTask(taskGetMainlineFiles); // search for all files in mainline

            var taskGetBranchFiles = new TaskItem_CheckProj_GetBranchFiles(tbTfsMapping.Text, comboBox1.SelectedItem.ToString());
            AddTask(taskGetBranchFiles); // search for all files in branches

            // comparing of project files(except csproj, \bin, \obj, \writedir, \UploadFile, \.vs, \data_dll
            AddTask(new TaskItem_CheckProj_CheckFiles(taskGetMainlineFiles, taskGetBranchFiles));

            // comparing of csproj files.
            AddTask(new TaskItem_CheckProj_CheckCsprojFiles(taskGetMainlineFiles, taskGetBranchFiles));
            #endregion // register workflow items.

            StartWorkFlow();
        }
Example #2
0
        private void listBoxBranchCsproj_SelectedIndexChanged(object sender, EventArgs e)
        {
            using (var task = new TaskItem_CheckProj_GetBranchFiles(tbTfsMapping.Text, comboBox1.SelectedItem.ToString()))
            {
                FileInfo fiBcRight   = new FileInfo(listBoxBranchCsproj.SelectedItem.ToString());
                string   bcFileRight = tbTfsMapping.Text + fiBcRight.Directory.Parent.Name.Replace(".branch", "") + "\\" + fiBcRight.Directory.Name + "\\" + fiBcRight.Name;

                int selIndex = listBoxBranchCsproj.Items.IndexOf(bcFileRight);
                if (0 <= selIndex)
                {
                    listBoxBranchCsproj.SetSelected(selIndex, true);
                }
            }
        }
Example #3
0
        private void listBoxMainlineCsproj_SelectedIndexChanged(object sender, EventArgs e)
        {
            using (var task = new TaskItem_CheckProj_GetBranchFiles(tbTfsMapping.Text, comboBox1.SelectedItem.ToString()))
            {
                FileInfo fiBcLeft    = new FileInfo(listBoxMainlineCsproj.SelectedItem.ToString());
                string   bcFileRight = task.TfsMapping + task.DeveloperDirGroup + fiBcLeft.Directory.Parent.Name + ".branch\\" + fiBcLeft.Directory.Name + "\\" + fiBcLeft.Directory.Name + ".branch." + task.Developer + fiBcLeft.Extension;

                int selIndex = listBoxBranchCsproj.Items.IndexOf(bcFileRight);
                if (0 <= selIndex)
                {
                    listBoxBranchCsproj.SetSelected(selIndex, true);
                }
            }
        }
Example #4
0
        private void listBoxMainlineFiles_SelectedIndexChanged(object sender, EventArgs e)
        {
            using (var task = new TaskItem_CheckProj_GetBranchFiles(tbTfsMapping.Text, comboBox1.SelectedItem.ToString()))
            {
                string bcFile       = listBoxMainlineFiles.SelectedItem.ToString().Substring(tbTfsMapping.Text.Length + 1); // $mango_WMS/Git.WMS.Web/xxxx -or- $mango_WMS/Git.Framework/xxxx
                string ModuleName   = bcFile.Substring(0, bcFile.IndexOf("\\"));                                            // "Git.WMS.Web" -or- "Git.Framework"
                string RelativePath = bcFile.Substring(bcFile.IndexOf("\\") + 1);                                           // rest descriptor without "Git.WMS.Web" -or- "Git.Framework"
                string bcFileRight  = tbTfsMapping.Text + task.DeveloperDirGroup + ModuleName + ".branch\\" + RelativePath;

                int selIndex = listBoxBranchFiles.Items.IndexOf(bcFileRight);
                if (0 <= selIndex)
                {
                    listBoxBranchFiles.SetSelected(selIndex, true);
                }
            }
        }
Example #5
0
 public TaskItem_CheckProj_CheckCsprojFiles(TaskItem_CheckProj_GetMainlineFiles pTask1, TaskItem_CheckProj_GetBranchFiles pTask2)
     : base(pTask1, pTask2)
 {
 }
Example #6
0
 public TaskItem_CheckProj_CheckFiles(TaskItem_CheckProj_GetMainlineFiles pTask1, TaskItem_CheckProj_GetBranchFiles pTask2)
 {
     PrevTaskMainline = pTask1;
     PrevTaskBranch   = pTask2;
 }