Exemplo n.º 1
0
        private void Suffix_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            String command = FindSuffix();

            LineNumber = command[0] - '0';
            string Command = command.Remove(0, 2);

            Command = Command.ToLower();
            char OP = Command[0];

            try
            {
                switch (OP)
                {
                case 'a':
                    Insert(1, LineNumber + 1);
                    break;

                case 'b':
                    Insert(1, LineNumber - 1);
                    break;

                case 'i':
                    Command = Command.Remove(0, 1);
                    Insert(Convert.ToInt32(Command), LineNumber);
                    break;

                case '"':
                    Command = Command.Remove(0, 1);
                    Command = Command.Remove(Command.Length - 1, 1);
                    Command = Command.Remove(Command.Length - 1, 1);
                    Copy(Convert.ToInt32(Command), LineNumber);
                    break;

                default:
                    break;
                }
            }
            catch (Exception ex) {
                MessageBox.Show("Format Error, see help");
            }
            SuffixBox.Clear();
            foreach (string text in SuffixCommands)
            {
                SuffixBox.AppendText(text);
                //SuffixBox.AppendText("\n");
            }
        }
Exemplo n.º 2
0
 private void CleanBoxData()
 {
     rtbEditor.Document.Blocks.Clear();
     SuffixBox.Clear();
     SuffixColumns.Clear();
 }