Exemple #1
0
        public void LoadSwitches()
        {
            NetworkModel        networkModel   = Deserialize("Geographic.xml");
            List <SwitchEntity> switchEntities = networkModel.Switches;

            SetMarkersForSwitches(switchEntities);
        }
Exemple #2
0
        public void LoadSubstations()
        {
            NetworkModel            networkModel       = Deserialize("Geographic.xml");
            List <SubstationEntity> substationEntities = networkModel.Substations;

            SetMarkersForSubstations(substationEntities);
        }
Exemple #3
0
        public void LoadLines()
        {
            NetworkModel      networkModel = Deserialize("Geographic.xml");
            List <LineEntity> lines        = networkModel.Lines;

            SetLines(lines);
        }
Exemple #4
0
        public void LoadNodes()
        {
            NetworkModel      networkModel = Deserialize("Geographic.xml");
            List <NodeEntity> nodeEntities = networkModel.Nodes;

            SetMarkersForNodes(nodeEntities);
        }
Exemple #5
0
        public MainWindow()
        {
            InitializeComponent();

            networkModel = GridHandler.LoadNetworkModel(networkModel, grid, myCanvas, MouseClickPoint);

            DrawLines();
        }
Exemple #6
0
        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);
        }
Exemple #7
0
        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);
        }