public NoteViewModel(Note note) { _model = note; OnEditCommand = ReactiveCommand.Create(() => EditClicked.Invoke(this, null)); OnArchiveCommand = ReactiveCommand.Create(() => ArchiveClicked.Invoke(this, null)); OnDeleteCommand = ReactiveCommand.Create(() => DeleteClicked.Invoke(this, null)); OnMiddleClickCommand = ReactiveCommand.Create(() => MiddleMouseClicked.Invoke(this, null)); name = note.Name; content = note.Content; fontFamily = FontFamilyUtil.FontFamilyFromFont(note.Metadata.FontFamily); fontSize = note.Metadata.FontSize; caretPosition = note.Metadata.CaretPosition; }
private void EditButtonClicked(object sender, System.EventArgs e) { EditClicked?.Invoke(this); }
private void Modify_Click(object sender, RoutedEventArgs e) { // BlockEntry block = (sender as Button).DataContext as BlockEntry; EditClicked?.Invoke(sender, null); }
private void Script_EditClicked(ScriptItem source) { EditClicked?.Invoke(source.Script); }
private void Modify_Click(object sender, RoutedEventArgs e) { EditClicked?.Invoke(sender, null); }