示例#1
0
        public void AddCommands()
        {
            CommandHelper.AddCommand(_mcs, ShowChangesCommand, PkgCmdIDList.ShowChanges);
            CommandHelper.AddCommand(_mcs, PullCommand, PkgCmdIDList.Pull);
            CommandHelper.AddCommand(_mcs, FetchCommand, PkgCmdIDList.Fetch);
            CommandHelper.AddCommand(_mcs, CommitCommand, PkgCmdIDList.Commit);
            CommandHelper.AddCommand(_mcs, PushCommand, PkgCmdIDList.Push);

            CommandHelper.AddCommand(_mcs, ShowLogCommand, PkgCmdIDList.ShowLog);
            CommandHelper.AddCommand(_mcs, DiskBrowserCommand, PkgCmdIDList.DiskBrowser);
            CommandHelper.AddCommand(_mcs, RepoBrowserCommand, PkgCmdIDList.RepoBrowser);

            CommandHelper.AddCommand(_mcs, CreateStashCommand, PkgCmdIDList.CreateStash);
            var applyStash = CommandHelper.CreateCommand(ApplyStashCommand, PkgCmdIDList.ApplyStash);

            applyStash.BeforeQueryStatus += CommandHelper.ApplyStash_BeforeQueryStatus;
            CommandHelper.AddCommand(_mcs, applyStash);

            CommandHelper.AddCommand(_mcs, BranchCommand, PkgCmdIDList.Branch);
            CommandHelper.AddCommand(_mcs, SwitchCommand, PkgCmdIDList.Switch);
            CommandHelper.AddCommand(_mcs, MergeCommand, PkgCmdIDList.Merge);
            CommandHelper.AddCommand(_mcs, RebaseCommand, PkgCmdIDList.Rebase);

            CommandHelper.AddCommand(_mcs, RevertCommand, PkgCmdIDList.Revert);
            CommandHelper.AddCommand(_mcs, ResolveCommand, PkgCmdIDList.Resolve);
            CommandHelper.AddCommand(_mcs, TagCommand, PkgCmdIDList.Tag);
            CommandHelper.AddCommand(_mcs, SyncCommand, PkgCmdIDList.Sync);
            CommandHelper.AddCommand(_mcs, CleanupCommand, PkgCmdIDList.Cleanup);
            CommandHelper.AddCommand(_mcs, BrowseRefCommand, PkgCmdIDList.BrowseRef);
            CommandHelper.AddCommand(_mcs, AbortMergeCommand, PkgCmdIDList.AbortMerge);
        }
示例#2
0
        public void AddCommands()
        {
            //GitFlow Commands
            //Start/Finish Feature
            var startFeature = CommandHelper.CreateCommand(StartFeatureCommand, PkgCmdIDList.StartFeature);

            startFeature.BeforeQueryStatus += CommandHelper.GitFlow_BeforeQueryStatus;
            CommandHelper.AddCommand(_mcs, startFeature);

            var finishFeature = CommandHelper.CreateCommand(FinishFeatureCommand, PkgCmdIDList.FinishFeature);

            finishFeature.BeforeQueryStatus += CommandHelper.Feature_BeforeQueryStatus;
            CommandHelper.AddCommand(_mcs, finishFeature);

            //Start/Finish Release
            var startRelease = CommandHelper.CreateCommand(StartReleaseCommand, PkgCmdIDList.StartRelease);

            startRelease.BeforeQueryStatus += CommandHelper.GitFlow_BeforeQueryStatus;
            CommandHelper.AddCommand(_mcs, startRelease);

            var finishRelease = CommandHelper.CreateCommand(FinishReleaseCommand, PkgCmdIDList.FinishRelease);

            finishRelease.BeforeQueryStatus += CommandHelper.Release_BeforeQueryStatus;
            CommandHelper.AddCommand(_mcs, finishRelease);

            //Start/Finish Hotfix
            var startHotfix = CommandHelper.CreateCommand(StartHotfixCommand, PkgCmdIDList.StartHotfix);

            startHotfix.BeforeQueryStatus += CommandHelper.GitFlow_BeforeQueryStatus;
            CommandHelper.AddCommand(_mcs, startHotfix);

            var finishHotfix = CommandHelper.CreateCommand(FinishHotfixCommand, PkgCmdIDList.FinishHotfix);

            finishHotfix.BeforeQueryStatus += CommandHelper.Hotfix_BeforeQueryStatus;
            CommandHelper.AddCommand(_mcs, finishHotfix);

            //Init
            var init = CommandHelper.CreateCommand(InitCommand, PkgCmdIDList.Init);

            init.BeforeQueryStatus += CommandHelper.GitHubFlow_BeforeQueryStatus;
            CommandHelper.AddCommand(_mcs, init);

            //GitHubFlow Commands
            //Start/Finish Feature
            CommandHelper.AddCommand(_mcs, StartFeatureGitHubCommand, PkgCmdIDList.StartFeatureGitHub);
            var finishFeatureGitHub = CommandHelper.CreateCommand(FinishFeatureGitHubCommand, PkgCmdIDList.FinishFeatureGitHub);

            finishFeatureGitHub.BeforeQueryStatus += CommandHelper.Feature_BeforeQueryStatus;
            CommandHelper.AddCommand(_mcs, finishFeatureGitHub);
        }
示例#3
0
        public void AddCommands()
        {
            CommandHelper.AddCommand(_mcs, ShowLogContextCommand, PkgCmdIDList.ShowLogContext, ActiveDocument_BeforeQueryStatus);
            CommandHelper.AddCommand(_mcs, DiskBrowserContextCommand, PkgCmdIDList.DiskBrowserContext, ActiveDocument_BeforeQueryStatus);
            CommandHelper.AddCommand(_mcs, RepoBrowserContextCommand, PkgCmdIDList.RepoBrowserContext, ActiveDocument_BeforeQueryStatus);

            CommandHelper.AddCommand(_mcs, BlameContextCommand, PkgCmdIDList.BlameContext, ActiveDocument_BeforeQueryStatus);

            CommandHelper.AddCommand(_mcs, MergeContextCommand, PkgCmdIDList.MergeContext, ActiveDocument_BeforeQueryStatus);

            CommandHelper.AddCommand(_mcs, PullContextCommand, PkgCmdIDList.PullContext, ActiveDocument_BeforeQueryStatus);
            CommandHelper.AddCommand(_mcs, FetchContextCommand, PkgCmdIDList.FetchContext, ActiveDocument_BeforeQueryStatus);
            CommandHelper.AddCommand(_mcs, CommitContextCommand, PkgCmdIDList.CommitContext, ActiveDocument_BeforeQueryStatus);
            CommandHelper.AddCommand(_mcs, RevertContextCommand, PkgCmdIDList.RevertContext, ActiveDocument_BeforeQueryStatus);
            CommandHelper.AddCommand(_mcs, DiffContextCommand, PkgCmdIDList.DiffContext, ActiveDocument_BeforeQueryStatus);
            CommandHelper.AddCommand(_mcs, PrefDiffContextCommand, PkgCmdIDList.PrefDiffContext, ActiveDocument_BeforeQueryStatus);
        }
示例#4
0
        private void SetupCommands()
        {
            var commands = new List <Command>();

            Command command = new Command();

            command.Obj      = imgChat;
            command.Execute += delegate() {
                model.ShowChat = !model.ShowChat;
            };
            commands.Add(command);

            command          = new Command();
            command.Obj      = imgMuteAudio;
            command.Execute += delegate() {
                model.AudioMuted = !model.AudioMuted;
                rtcControl.MuteAudio(model.AudioMuted);
            };
            commands.Add(command);

            command          = new Command();
            command.Obj      = imgMuteVideo;
            command.Execute += delegate() {
                model.VideoMuted = !model.VideoMuted;
                rtcControl.MuteVideo(model.VideoMuted);
            };
            commands.Add(command);


            command          = new Command();
            command.Obj      = imgLeave;
            command.Execute += delegate() {
                rtcControl.LeaveMeeting();
            };
            commands.Add(command);



            foreach (var item in commands)
            {
                CommandHelper c = new CommandHelper((UIElement)item.Obj);
                c.AddCommand(item);
            }
        }
示例#5
0
 public void AddCommands()
 {
     CommandHelper.AddCommand(_mcs, SvnDCommitCommand, PkgCmdIDList.SvnDCommit);
     CommandHelper.AddCommand(_mcs, SvnFetchCommand, PkgCmdIDList.SvnFetch);
     CommandHelper.AddCommand(_mcs, SvnRebaseCommand, PkgCmdIDList.SvnRebase);
 }