예제 #1
0
        private void button3_Click(object sender, EventArgs e)
        {
            using (var m = new ModelCreator())
            {
                var result = m.ShowDialog();

                if (result == DialogResult.OK)
                {
                    var model = m.Model;

                    RegisterModel(model);
                }
            }
        }
예제 #2
0
        private void modelsListBox_DoubleClick(object sender, EventArgs e)
        {
            if (modelsListBox.SelectedItem != null)
            {
                var model = (Model)modelsListBox.SelectedItem;

                using (var m = new ModelCreator())
                {
                    m.PopulateWithModel(model);
                    var result = m.ShowDialog();

                    if (result == DialogResult.OK)
                    {
                        RegisterModel(m.Model);
                    }
                }
            }
        }