Ejemplo n.º 1
0
        internal void ReplayAllCommands()
        {
            // reverse
            var playBackCommands = new List <INoteCommand>();

            foreach (var command in AllCommands)
            {
                if (playBackCommands.Count == 0)
                {
                    playBackCommands.Add(command);
                }
                else
                {
                    playBackCommands.Insert(0, command);
                }
            }

            this.DisplayNotes.Clear();
            AllCommands.Clear();
            DisplayCommands.Clear();

            foreach (var command in playBackCommands)
            {
                Task.Delay(250).Wait();
                ReplayCommand(command);
            }
        }
Ejemplo n.º 2
0
        public void LoadCommands()
        {
            var commands = CommandInfoModel.GetAll();

            Application.Current.Dispatcher.Invoke(delegate
            {
                AllCommands.Clear();
            });

            foreach (var command in commands)
            {
                Application.Current.Dispatcher.Invoke(delegate
                {
                    AllCommands.Add(command);
                });
            }
        }
Ejemplo n.º 3
0
 public void Update()
 {
     Addin = AddinManagerService.GetAddin(Addin.AddinFile);
     AllCommands.Clear();
     AllCommands.AddRange(Addin.Commands);
 }