public void LoadSwitches() { NetworkModel networkModel = Deserialize("Geographic.xml"); List <SwitchEntity> switchEntities = networkModel.Switches; SetMarkersForSwitches(switchEntities); }
public void LoadSubstations() { NetworkModel networkModel = Deserialize("Geographic.xml"); List <SubstationEntity> substationEntities = networkModel.Substations; SetMarkersForSubstations(substationEntities); }
public void LoadLines() { NetworkModel networkModel = Deserialize("Geographic.xml"); List <LineEntity> lines = networkModel.Lines; SetLines(lines); }
public void LoadNodes() { NetworkModel networkModel = Deserialize("Geographic.xml"); List <NodeEntity> nodeEntities = networkModel.Nodes; SetMarkersForNodes(nodeEntities); }
public MainWindow() { InitializeComponent(); networkModel = GridHandler.LoadNetworkModel(networkModel, grid, myCanvas, MouseClickPoint); DrawLines(); }
public MainWindow() { InitializeComponent(); NetworkModel networkModel = new NetworkModel(); networkModel = MapHandler.LoadModelToMap(networkModel, MyModel); transformation = new Transformation(viewport, skaliranje, this, translate, rotateX, rotateY); hitTest = new HitTesting(viewport, model3DGroup, this); }
private NetworkModel Deserialize(string path) { NetworkModel networkModel = null; XmlSerializer xmlSerializer = new XmlSerializer(typeof(NetworkModel)); try { StreamReader reader = new StreamReader(path); networkModel = (NetworkModel)xmlSerializer.Deserialize(reader); reader.Close(); } catch (Exception e) { MessageBox.Show("Doslo je do greske: " + e.ToString()); } return(networkModel); }