Exemple #1
0
 public void undo(SimpleForm form)
 {
     form.getList().newGetString();
 }
Exemple #2
0
 public void delete(SimpleForm form)
 {
     if (form.getTextBox().SelectedText.Length != null)
     {
         form.setAction(false);
         form.setTextArea(form.getTextArea().Substring(0, form.getTextBox().SelectionStart) + form.getTextArea().Substring(form.getTextBox().SelectionLength, form.getTextArea().Length));
         form.getList().newPutString(form.getTextBox().SelectedText, form.getTextBox().SelectionStart, actionsHistory.action.SUB);
         form.setAction(true);
     }
 }
Exemple #3
0
 public void redo(SimpleForm form)
 {
     form.getList().newRestoreString();
 }
Exemple #4
0
 public void cut(SimpleForm form)
 {
     int cp;
     if (form.getTextBox().SelectedText.Length != 0)
     {
         copy(form);
         cp = form.getTextBox().SelectionStart;
         form.getList().newPutString(form.getTextBox().SelectedText, cp, actionsHistory.action.SUB);
         if (form.getTextBox().SelectionStart == 0)
         {
             form.setTextArea(form.getTextArea().Substring(form.getTextBox().SelectedText.Length, form.getTextArea().Length));
             form.getTextBox().SelectionStart = cp;
             return;
         }
         if (form.getTextBox().SelectionStart > 0 && form.getTextBox().SelectionStart < form.getTextArea().Length)
         {
             form.setTextArea(form.getTextArea().Substring(0, form.getTextBox().SelectionStart) + form.getTextArea().Substring(form.getTextBox().SelectionStart + form.getTextBox().SelectedText.Length, form.getTextArea().Length));
             form.getTextBox().SelectionStart = cp;
             return;
         }
         if (form.getTextBox().SelectionStart == form.getTextArea().Length)
         {
             form.setTextArea(form.getTextArea().Substring(0, form.getTextBox().SelectionStart));
             form.getTextBox().SelectionStart = cp;
             return;
         }
     }
 }