Esempio n. 1
0
        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;
        }
Esempio n. 2
0
 private void EditButtonClicked(object sender, System.EventArgs e)
 {
     EditClicked?.Invoke(this);
 }
Esempio n. 3
0
 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);
 }
Esempio n. 5
0
 private void Modify_Click(object sender, RoutedEventArgs e)
 {
     EditClicked?.Invoke(sender, null);
 }