File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
ED-Router.UI.Desktop/ViewModel Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,8 @@ public MainViewModel()
4646 MyRoute = new ObservableCollection < SystemJump > ( ) ;
4747 From = new ObservableCollection < string > ( ) ;
4848 To = new ObservableCollection < string > ( ) ;
49+ _fromSearch = Router . Start ;
50+ _toSearch = Router . Destination ;
4951 }
5052
5153 public ICommand CalculateCommand { get ; private set ; }
@@ -84,6 +86,12 @@ public string FromSearch
8486 if ( suggestionSystems . Contains ( sys ) == false )
8587 From . Remove ( sys ) ;
8688 }
89+
90+ // pass the Name to the underlying router
91+ if ( suggestionSystems . Contains ( value ) )
92+ {
93+ Router . Destination = value ;
94+ }
8795 }
8896 }
8997 }
@@ -113,6 +121,12 @@ public string ToSearch
113121 if ( suggestionSystems . Contains ( sys ) == false )
114122 To . Remove ( sys ) ;
115123 }
124+
125+ // pass the Name to the underlying router
126+ if ( suggestionSystems . Contains ( value ) )
127+ {
128+ Router . Destination = value ;
129+ }
116130 }
117131 }
118132 }
You can’t perform that action at this time.
0 commit comments