Ejemplo n.º 1
0
        private void AddHost()
        {
            AddNewHostForm addNewHostForm = new AddNewHostForm();
            addNewHostForm.ShowDialog();

            if (addNewHostForm.NewHosts.Count > 0)
            {
                int id = this.Hosts.Count;
                foreach (Host host in addNewHostForm.NewHosts)
                {
                    host.Id = id++;
                    this.hosts.Add(host);
                    this.AddNewListViewItem(host);
                }

                this.modifed = true;
                CheckSaveStatus();

            }
        }
Ejemplo n.º 2
0
        private void AddHost()
        {
            AddNewHostForm addNewHostForm = new AddNewHostForm();

            addNewHostForm.ShowDialog();

            if (addNewHostForm.NewHosts.Count > 0)
            {
                int id = this.Hosts.Count;
                foreach (Host host in addNewHostForm.NewHosts)
                {
                    host.Id = id++;
                    this.hosts.Add(host);
                    this.AddNewListViewItem(host);
                }

                this.modifed = true;
                CheckSaveStatus();
            }
        }