Пример #1
0
        void vcs_CommitShelveset(object sender, CommitShelvesetEventArgs e)
        {
            var shelf = e.Shelveset;

            //TODO configurable
            if (e.Shelveset.Properties.Any(x => x.PropertyName == "Microsoft.TeamFoundation.VersionControl.Shelveset.CreatedBy" && (string)x.Value == "Suspend"))
            {
                foreach (var item in shelf.WorkItemInfo)
                {
                    if (item.WorkItem.State == Properties.Settings.Default.SettingsCollection.GetActiveState(item.WorkItem.Project.Name))
                    {
                        item.WorkItem.PartialOpen();
                        item.WorkItem.State = Properties.Settings.Default.SettingsCollection.GetPausedState(item.WorkItem.Project.Name);
                        //TODO configurable
                        item.WorkItem.Reason = "My Work Suspended";
                        item.WorkItem.Save();
                    }
                }
            }
        }
Пример #2
0
        void vcs_CommitShelveset(object sender, CommitShelvesetEventArgs e)
        {
            var shelf = e.Shelveset;

            //TODO configurable
            if (e.Shelveset.Properties.Any(x => x.PropertyName == "Microsoft.TeamFoundation.VersionControl.Shelveset.CreatedBy" && (string)x.Value == "Suspend"))
            {
                foreach (var item in shelf.WorkItemInfo)
                {
                    if (item.WorkItem.State == Properties.Settings.Default.TimekeeperSettings.GetActiveState(item.WorkItem.Project.Name))
                    {
                        item.WorkItem.PartialOpen();
                        item.WorkItem.State = Properties.Settings.Default.TimekeeperSettings.GetPausedState(item.WorkItem.Project.Name);
                        //TODO configurable
                        item.WorkItem.Reason = "My Work Suspended";
                        item.WorkItem.Save();
                    }
                }
            }
        }
        private void CommitShelveSet(object sender, CommitShelvesetEventArgs e)
        {
            MalevichOptionPageGrid options = Options();

            if (!options.ShowOnShelve ||
                options.NoShowPrefixes.Split(';').ToList()
                .Any(prefix => e.Shelveset.Name.StartsWith(prefix, StringComparison.InvariantCultureIgnoreCase)))
            {
                return;
            }

            ShowToolWindow(this, null);
        }
Пример #4
0
 /// <summary>
 /// Handles the CommitShelveset event of the versionControlServer control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="Microsoft.TeamFoundation.VersionControl.Client.CommitShelvesetEventArgs"/> instance containing the event data.</param>
 /// <remarks>Documented by CFI, 2010-06-27</remarks>
 protected void versionControlServer_CommitShelveset(object sender, CommitShelvesetEventArgs e)
 {
     pluginUI.UpdatePendingChanges();
 }