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

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

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

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

            SetMarkersForNodes(nodeEntities);
        }
Пример #5
0
        public MainWindow()
        {
            InitializeComponent();

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

            DrawLines();
        }
Пример #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);
        }
Пример #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);
        }