Пример #1
0
        private void btVariables_Click(object sender, EventArgs e)
        {
            var          formVariables = new FormVariables();
            DialogResult dr            = formVariables.ShowDialog();

            if (dr == DialogResult.OK)
            {
                _focusedTextBox.Paste("{" + formVariables.ChosenVariable.UniqueName + "}");
            }
        }
Пример #2
0
        private void buttonAddRuleImageFile_Click(object sender, EventArgs e)
        {
            DataGridViewRow row          = new DataGridViewRow();
            FormVariables   formVaiables = new FormVariables();

            for (int i = 0; i < map.LayerCount; i++)
            {
                string layerName = map.get_Layer(i).Name;
                if ((layerName != trainingStartImageName) && (layerName != trainingEndImageName))
                {
                    formVaiables.ListViewControl.Items.Add(layerName);
                }
            }
            if (formVaiables.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                for (int i = 0; i < formVaiables.ListViewControl.SelectedItems.Count; i++)
                {
                    dataGridViewVariableDatas.Rows.Add(formVaiables.ListViewControl.SelectedItems[i].Text);
                }
            }
        }