Example #1
0
        private void FileNew_Click(object sender, RoutedEventArgs e)
        {
            ShipHull ship = new ShipHull();

            appli.ShipName         = ship.name;
            appli.CurrentViewModel = new ShipHullViewModel(ship);
        }
Example #2
0
 public ShipHullViewModel(ShipHull ship)
 {
     _ship          = ship;
     Subsystems     = new SubsystemsManagerViewModel(ship.subsystemsManager);
     ExteriorMeshes = new MeshTreeViewModel(ship.exteriorMeshes);
     InteriorMeshes = new MeshTreeViewModel(ship.interiorMeshes);
 }
Example #3
0
 public ShipHullViewModel()
 {
     _ship          = new ShipHull();
     Subsystems     = new SubsystemsManagerViewModel();
     ExteriorMeshes = new MeshTreeViewModel();
     InteriorMeshes = new MeshTreeViewModel();
 }
Example #4
0
 private void ViewShipHull(string shipHullName)
 {
     try
     {
         ShipName = shipHullName;
         string            content           = File.ReadAllText(Settings.RogueSysemFileRoot + "/Mod/RogSysCM/Ships/" + shipHullName + ".ROG");
         ShipHullTable     shipHullTable     = new ShipHullTable(shipHullName, content);
         ShipHull          shipHull          = new ShipHull(shipHullTable);
         ShipHullViewModel shipHullViewModel = new ShipHullViewModel(shipHull);
         CurrentViewModel = shipHullViewModel;
     }
     catch (FileNotFoundException e)
     {
         MessageBox.Show("Cannot found the ship file !");
     }
 }