예제 #1
0
        private void mnuCreateEquipement(object sender, RoutedEventArgs e)
        {
            CreateEquipementWindow newEquipementWindow = new CreateEquipementWindow();

            if (newEquipementWindow.ShowDialog() == true)
            {
                dataCtrl.EquiCtrl.Create(newEquipementWindow.ProjName.Text);
                CreateEquipFromWindow(newEquipementWindow);
                dataCtrl.EquiCtrl.AddToProject(dataCtrl.ProjCtrl);
            }
        }
예제 #2
0
        private void ModifyEquipement_Click(object sender, RoutedEventArgs e)
        {
            if (SetSelectedEquip())
            {
                string ip = dataCtrl.EquiCtrl.Ip != null?dataCtrl.EquiCtrl.Ip.ToString() : null;

                CreateEquipementWindow newEquipementWindow = new CreateEquipementWindow(
                    dataCtrl.EquiCtrl.Name,
                    dataCtrl.EquiCtrl.Type,
                    dataCtrl.EquiCtrl.Os,
                    dataCtrl.EquiCtrl.Version,
                    ip,
                    dataCtrl.EquiCtrl.MacAddress,
                    dataCtrl.EquiCtrl.Notes);
                if (newEquipementWindow.ShowDialog() == true)
                {
                    dataCtrl.EquiCtrl.DeleteFromProject(dataCtrl.ProjCtrl);
                    CreateEquipFromWindow(newEquipementWindow);
                    dataCtrl.EquiCtrl.AddToProject(dataCtrl.ProjCtrl);
                }
            }
        }