Пример #1
0
        private AgentForm CreateAgentForm()
        {
            AgentForm childForm = new AgentForm();

            childForm.MdiParent = this;
            childForm.Text      = "Window " + childFormNumber++;
            childForm.Show();
            return(childForm);
        }
Пример #2
0
        private void OpenRemote(object sender, EventArgs e)
        {
            AgencyClient client = new AgencyClient();
            AgencyProxy  agency = client.GetAgency();

            List <string>  names  = agency.GetBrainFactoryNames();
            ListViewDialog dialog = new ListViewDialog();

            dialog.ListView.Columns.Add("Name", 100);
            dialog.ListView.View = View.Details;

            foreach (var name in names)
            {
                ListViewItem item = new ListViewItem(name);
                dialog.ListView.Items.Add(item);
                //dialog.ListView.Items.Add(name);
            }
            dialog.ShowDialog();
            string    factoryName = dialog.ItemName;
            AgentForm form        = CreateAgentForm();

            form.OpenModel(factoryName);
        }