public void undo(SimpleForm form) { form.getList().newGetString(); }
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); } }
public void redo(SimpleForm form) { form.getList().newRestoreString(); }
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; } } }