public SubwayGraph()
 {
     InitializeComponent();
     IntializeStationFlash();
     this.subwayMap            = BackgroundCore.GetBackgroundCore().SubwayMap;
     this.displayRouteUnitList = ((App)App.Current).DisplayRouteUnitList;
 }
Esempio n. 2
0
 private void comboBox_Cities_DropDownOpened(object sender, EventArgs e)
 {
     ((Cities)this.stackPanel_FunctionArea.Resources["cities"]).Clear();
     foreach (string city in BackgroundCore.GetBackgroundCore().CityList)
     {
         ((Cities)this.stackPanel_FunctionArea.Resources["cities"]).Add(city);
     }
 }
Esempio n. 3
0
        public MainWindow()
        {
            InitializeComponent();
            this.subwayMap                         = BackgroundCore.GetBackgroundCore().SubwayMap;
            this.displayRouteUnitList              = ((App)App.Current).DisplayRouteUnitList;
            this.listView_Route.ItemsSource        = displayRouteUnitList;
            this.comboBox_StartStation.ItemsSource = displayStationsName;
            this.comboBox_EndStation.ItemsSource   = displayStationsName;
            ((App)App.Current).IsShortestPlaning   = (bool)radioButton_Shortest.IsChecked;

            BackgroundCore.GetBackgroundCore().SelectFunction(this, ((App)App.Current).Args);
        }
Esempio n. 4
0
 private void comboBox_Cities_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (this.comboBox_Cities.SelectedItem != null)
     {
         BackgroundCore.GetBackgroundCore().RefreshMap((string)this.comboBox_Cities.SelectedItem);
         subwayGraph.IsEnabled = true;
         subwayGraph.SetSubwayMap();
         this.subwayMap = BackgroundCore.GetBackgroundCore().SubwayMap;
         displayStationsName.Clear();
         foreach (Station station in subwayMap.Stations)
         {
             displayStationsName.Add(station.Name);
         }
         subwayGraph.InvalidateVisual();
     }
 }
 public void SetSubwayMap()
 {
     this.subwayMap = BackgroundCore.GetBackgroundCore().SubwayMap;
 }