예제 #1
0
 private bool TryGetSelectedChange(out int ChangeNumber)
 {
     if (SpecifyChangeRadioButton.Checked)
     {
         return(int.TryParse(ChangeNumberTextBox.Text, out ChangeNumber));
     }
     else if (SystemicFixRadioButton.Checked)
     {
         ChangeNumber = -1;
         return(true);
     }
     else
     {
         PerforceDescribeRecord Change = (ChangesListView.SelectedItems.Count > 0)? ChangesListView.SelectedItems[0].Tag as PerforceDescribeRecord : null;
         if (Change == null)
         {
             ChangeNumber = 0;
             return(false);
         }
         else
         {
             ChangeNumber = Change.ChangeNumber;
             return(true);
         }
     }
 }
예제 #2
0
        private void ChangesContextMenu_MoreInfo_Click(object sender, EventArgs e)
        {
            PerforceDescribeRecord Record = (PerforceDescribeRecord)ChangesListContextMenu.Tag;

            if (!Utility.SpawnHiddenProcess("p4vc.exe", String.Format("-p\"{0}\" change {1}", Perforce.ServerAndPort, Record.ChangeNumber)))
            {
                MessageBox.Show("Unable to spawn p4vc. Check you have P4V installed.");
            }
        }
예제 #3
0
 private void ChangesListView_MouseClick(object Sender, MouseEventArgs Args)
 {
     if (Args.Button == MouseButtons.Right)
     {
         ListViewHitTestInfo HitTest = ChangesListView.HitTest(Args.Location);
         if (HitTest.Item != null && HitTest.Item.Tag != null)
         {
             PerforceDescribeRecord Record = HitTest.Item.Tag as PerforceDescribeRecord;
             if (Record != null)
             {
                 ChangesListContextMenu.Tag = Record;
                 ChangesListContextMenu.Show(ChangesListView, Args.Location);
             }
         }
     }
 }
        public PerforceChangeDetails(PerforceDescribeRecord DescribeRecord)
        {
            Description = DescribeRecord.Description;

            // Check whether the files are code or content
            string[] CodeExtensions = { ".cs", ".h", ".cpp", ".inl", ".usf", ".ush", ".uproject", ".uplugin" };
            foreach (PerforceDescribeFileRecord File in DescribeRecord.Files)
            {
                if (CodeExtensions.Any(Extension => File.DepotFile.EndsWith(Extension, StringComparison.InvariantCultureIgnoreCase)))
                {
                    bContainsCode = true;
                }
                else
                {
                    bContainsContent = true;
                }
            }
        }