private void FileNew_Click(object sender, RoutedEventArgs e) { ShipHull ship = new ShipHull(); appli.ShipName = ship.name; appli.CurrentViewModel = new ShipHullViewModel(ship); }
public ShipHullViewModel(ShipHull ship) { _ship = ship; Subsystems = new SubsystemsManagerViewModel(ship.subsystemsManager); ExteriorMeshes = new MeshTreeViewModel(ship.exteriorMeshes); InteriorMeshes = new MeshTreeViewModel(ship.interiorMeshes); }
public ShipHullViewModel() { _ship = new ShipHull(); Subsystems = new SubsystemsManagerViewModel(); ExteriorMeshes = new MeshTreeViewModel(); InteriorMeshes = new MeshTreeViewModel(); }
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 !"); } }