Exemplo n.º 1
0
        void TestAllCommands()
        {
            AnkhContext context = AnkhContext.Create(sp);

            foreach (AnkhCommand command in Enum.GetValues(typeof(AnkhCommand)))
            {
                var e = new CommandUpdateEventArgs(command, context);

                cm.PerformUpdate(command, e);
            }

            foreach (AnkhCommandMenu m in Enum.GetValues(typeof(AnkhCommandMenu)))
            {
                var e = new CommandUpdateEventArgs((AnkhCommand)m, context);

                cm.PerformUpdate((AnkhCommand)m, e);
            }
        }
Exemplo n.º 2
0
        void OnUpdateDelete(object sender, CommandUpdateEventArgs e)
        {
            CommandMapper mapper = CommandMapper;

            if (mapper != null)
            {
                mapper.PerformUpdate(AnkhCommand.SvnNodeDelete, e);
            }
            else
            {
                e.Enabled = false;
            }
        }
Exemplo n.º 3
0
        void OnUpdateRename(object sender, CommandUpdateEventArgs e)
        {
            CommandMapper mapper = CommandMapper;

            if (mapper != null)
            {
                mapper.PerformUpdate(AnkhCommand.RenameRepositoryItem, e);
            }
            else
            {
                e.Enabled = false;
            }
        }