private void SourceControlLock(object sender, RoutedEventArgs e)
 {
     string lockComment = string.Empty;
     if (GingerCore.General.GetInputWithValidation("Lock", "Lock Comment:", ref lockComment, System.IO.Path.GetInvalidFileNameChars()))
     {
         SourceControlIntegration.Lock(App.UserProfile.Solution.SourceControl, this.NodePath(), lockComment);
         mTreeView.Tree.RefreshHeader((ITreeViewItem)this);
     }
 }
        private void SourceControlLock(object sender, RoutedEventArgs e)
        {
            string lockComment = string.Empty;

            if (GingerCore.General.GetInputWithValidation("Lock", "Lock Comment:", ref lockComment))
            {
                SourceControlIntegration.Lock(WorkSpace.Instance.Solution.SourceControl, this.NodePath(), lockComment);
                mTreeView.Tree.RefreshHeader((ITreeViewItem)this);
            }
        }
Exemple #3
0
        private void SourceControlLock(object sender, RoutedEventArgs e)
        {
            RepositoryItemBase RI = ((ITreeViewItem)this).NodeObject() as RepositoryItemBase;

            if (RI != null && (RI.SourceControlStatus == eImageType.SourceControlLockedByMe || RI.SourceControlStatus == eImageType.SourceControlLockedByAnotherUser))
            {
                Reporter.ToUser(eUserMsgKey.SourceControlItemAlreadyLocked);
                return;
            }
            string lockComment = string.Empty;

            if (GingerCore.General.GetInputWithValidation("Lock", "Lock Comment:", ref lockComment))
            {
                SourceControlIntegration.Lock(WorkSpace.Instance.Solution.SourceControl, this.NodePath(), lockComment);
                mTreeView.Tree.RefreshHeader((ITreeViewItem)this);
            }
        }