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