Beispiel #1
0
 private void OnRestoreDefaults(object sender, EventArgs e)
 {
     foreach (object o in snippetsList.Items)
     {
         CodeSnippet snp = (CodeSnippet)o;
         snp.RestoreDefault();
     }
     OnSelChange(null, null);
 }
Beispiel #2
0
        private void OnTemplateChanged(object sender, EventArgs e)
        {
            CodeSnippet snp = (CodeSnippet)snippetsList.SelectedItem;

            if (snp == null)
            {
                return;
            }
            snp.Text         = templateText.Text;
            exampleText.Text = snp.Generate();
        }
Beispiel #3
0
        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();
        }