private void OnRestoreDefaults(object sender, EventArgs e) { foreach (object o in snippetsList.Items) { CodeSnippet snp = (CodeSnippet)o; snp.RestoreDefault(); } OnSelChange(null, null); }
private void OnTemplateChanged(object sender, EventArgs e) { CodeSnippet snp = (CodeSnippet)snippetsList.SelectedItem; if (snp == null) { return; } snp.Text = templateText.Text; exampleText.Text = snp.Generate(); }
private void OnSelChange(object sender, EventArgs e) { CodeSnippet snp = (CodeSnippet)snippetsList.SelectedItem; if (snp == null) { return; } templateText.Text = snp.Text; variablesText.Text = snp.Description; exampleText.Text = snp.Generate(); }