Ejemplo n.º 1
0
        private void insertAliasToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AliasSelectionDialog aliasDialog = new AliasSelectionDialog((aliases) =>
            {
                // Enquotes every single alias and joins it using "\n,"
                string aliasInsert = string.Join(
                    "," + Environment.NewLine,
                    aliases.Select(alias => string.Concat('"', alias, '"')));

                textBox.InsertText(textBox.SelectionStart, aliasInsert);
                textBox.SelectionEnd = textBox.SelectionEnd + aliasInsert.Length;
            });

            aliasDialog.ShowDialog();
        }
Ejemplo n.º 2
0
            public override void OnSelected(SelectedEventArgs e)
            {
                var textbox = (Parent.TargetControlWrapper as ScintillaWrapper).target;
                AliasSelectionDialog aliasDialog = new AliasSelectionDialog((aliases) =>
                {
                    var aliasList = aliases.ToList();
                    if (aliasList.Count > 0)
                    {
                        textbox.InsertText(textbox.SelectionStart, '"' + aliasList[0] + '"');
                        textbox.SelectionStart = textbox.SelectionEnd + aliasList[0].Length + 2;
                    }
                });

                aliasDialog.MultiSelect = false;
                aliasDialog.ShowDialog();
            }
Ejemplo n.º 3
0
 private void insertAliasToolStripMenuItem_Click(object sender, EventArgs e)
 {
     AliasSelectionDialog aliasDialog = new AliasSelectionDialog(new AliasSelectCallback(textBox));
     aliasDialog.ShowDialog();
 }
Ejemplo n.º 4
0
        private void insertAliasToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AliasSelectionDialog aliasDialog = new AliasSelectionDialog(new AliasSelectCallback(textBox));

            aliasDialog.ShowDialog();
        }