Exemplo n.º 1
0
 public NoteListViewModel()
 {
     Tabs = Utilities.SavedData.Open();
     Utilities.SavedData.Save(Tabs);
     NewNote        = new Commands.NewNoteCommand(this);
     TextSize       = TEXT_SIZE_DEFAULT;
     CurrentTab     = 0;
     SelectedIndex  = -1;
     TabsFocused    = true; // Unused
     _dialogService = new MvvmDialogs.DialogService(null, new Utilities.Locator(), null);
     ScrollUp       = new Commands.ScrollCommand(verticalScroll, -1);
     ScrollDown     = new Commands.ScrollCommand(verticalScroll, 1);
     ScrollLeft     = new Commands.ScrollCommand(horizontalScroll, -1);
     ScrollRight    = new Commands.ScrollCommand(horizontalScroll, 1);
     ResetFocus     = new Commands.SetPropertyCommand(setFocus, true);
     RemoveFocus    = new Commands.SetPropertyCommand(setFocus, false);
     DeleteNote     = new Commands.GenericCommand(deleteNote);
     NewTab         = new Commands.GenericCommand(createTab);
     DeleteTab      = new Commands.GenericCommand(deleteTab);
     OpenHelp       = new Commands.GenericCommand(openHelp);
     Reverse        = new Commands.GenericCommand(reverseNotes);
     Exit           = new Commands.CloseCommand(exitApplication);
     EditNote       = new Commands.GenericCommand(openEdit);
     ChangeTextSize = new Commands.BoolCommand(textSize);
 }
Exemplo n.º 2
0
 public EditWindow()
 {
     InitializeComponent();
     textBox.Focus();
     MoveLeft  = new Commands.ScrollCommand(horizontalScroll, -1);
     MoveRight = new Commands.ScrollCommand(horizontalScroll, 1);
     MoveUp    = new Commands.ScrollCommand(verticalScroll, 1);
     MoveDown  = new Commands.ScrollCommand(verticalScroll, -1);
 }
Exemplo n.º 3
0
 public MainWindow()
 {
     FocusTabs = new Commands.FocusCommand(focusTabs);
     FocusText = new Commands.FocusCommand(focusText);
     MoveLeft  = new Commands.ScrollCommand(horizontalScroll, -1);
     MoveRight = new Commands.ScrollCommand(horizontalScroll, 1);
     MoveUp    = new Commands.ScrollCommand(verticalScroll, 1);
     MoveDown  = new Commands.ScrollCommand(verticalScroll, -1);
 }