Esempio n. 1
0
 private void OnRestoreDefaults(object sender, EventArgs e)
 {
     foreach (object o in snippetsList.Items)
     {
         CodeSnippet snp = (CodeSnippet)o;
         snp.RestoreDefault();
     }
     OnSelChange(null, null);
 }
Esempio n. 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();
        }
Esempio n. 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();
        }