示例#1
0
        private void HandleSaveCommand(S2VXCommand oldCommand)
        {
            var commandString = EditInputBar.ValuesToString();
            var addSuccessful = false;

            try {
                var newCommand = S2VXCommand.FromString(commandString);
                Editor.Reversibles.Push(new ReversibleUpdateCommand(oldCommand, newCommand, this));
                addSuccessful = true;
            } catch (Exception ex) {
                EditInputBar.AddErrorIndicator();
                Console.WriteLine(ex);
            }
            if (addSuccessful)
            {
                EditCommandReference = null;
                LoadCommandsList();
            }
        }
示例#2
0
 private void ResetEditInputBar(S2VXCommand command)
 {
     EditInputBar = CreateEditInputBar();
     EditInputBar.CommandToValues(command);
 }