Esempio n. 1
0
        private void btnInsertSubtable_Click(object sender, EventArgs e)
        {
            var lookup = new FrmSubtablesLookup();
            lookup.ShowDialog();

            // Once the Dialog has closed, has the user selected an entry
            if (lookup.SubTableId == 0) return;
            var subTableId = lookup.SubTableId;
            var insertText = "¬subtable:" + subTableId.ToString(CultureInfo.InvariantCulture).Trim() + "¬";
            var selectionIndex = txtFieldNotes.SelectionStart;
            txtFieldNotes.Text = txtFieldNotes.Text.Insert(selectionIndex, insertText);
            txtFieldNotes.SelectionStart = selectionIndex + insertText.Length;
        }
Esempio n. 2
0
        private void btnInsertSubtable_Click(object sender, EventArgs e)
        {
            var lookup = new FrmSubtablesLookup();

            lookup.ShowDialog();

            // Once the Dialog has closed, has the user selected an entry
            if (lookup.SubTableId == 0)
            {
                return;
            }
            var subTableId     = lookup.SubTableId;
            var insertText     = "¬subtable:" + subTableId.ToString(CultureInfo.InvariantCulture).Trim() + "¬";
            var selectionIndex = txtFieldNotes.SelectionStart;

            txtFieldNotes.Text           = txtFieldNotes.Text.Insert(selectionIndex, insertText);
            txtFieldNotes.SelectionStart = selectionIndex + insertText.Length;
        }