private void AddTabItem() { var addDialog = new AddHostDialog(); addDialog.Owner = Window.GetWindow(this); addDialog.ShowDialog(); }
private void AddHost(object selectedItem) { AddHostDialog dlg = new AddHostDialog(); if (dlg.ShowDialog().Value) { VMHostGroup hostParent = this.SelectedItem as VMHostGroup; foreach (string hostname in dlg.HostNames) { //check if host is already present if (VMHostGroup.FindParentFor(hostname, vmHostModel.RootVMHostGroup) == null) { hostParent.AddHost(new VMHost(hostname)); } } hostParent.Save(); } }