예제 #1
0
 public ClickTypeViewModel()
 {
     AddSnippetCommand    = new AddSnippetHandler(this);
     EditSnippetCommand   = new EditSnippetHandler(this);
     DeleteSnippetCommand = new DeleteSnippetHandler(this);
     Snippets             = SnippetLoader.LoadSnippets();
 }
예제 #2
0
 public void DeleteSelectedSnippet()
 {
     SnippetLoader.DeleteSnippet(SelectedSnippet.id);
     Snippets = SnippetLoader.LoadSnippets();
 }
예제 #3
0
 public void EditSelectedSnippet()
 {
     SnippetLoader.EditSnippet(SelectedSnippet.id, TypedText);
     Snippets = SnippetLoader.LoadSnippets();
 }
예제 #4
0
 public void AddSnippet()
 {
     SnippetLoader.AddSnippet(TypedText);
     Snippets  = SnippetLoader.LoadSnippets();
     TypedText = null; // Since adding a snippet with no prior selection does not clear this out
 }