public AddGeoFenceWindow(GeoFenceWidget parentWidget) { InitializeComponent(); _parentWidget = parentWidget; _vm = _parentWidget.DataGridViewModel; _bInitDone = Init(); Map.MouseClick += Map_MouseClick; }
private bool SetDataSource(DataSource dataSource) { if (_dataSource != dataSource) { GeoFenceViewModel vm = DataGridViewModel as GeoFenceViewModel; vm.TrackIdFieldName = TrackIdFieldName; vm.NameFieldName = NameFieldName; vm.CategoryFieldName = CategoryFieldName; vm.ActiveFieldName = ActiveFieldName; vm.GroupByFieldName = GroupByFieldName; vm.SortByFieldName1 = SortByFieldName1; vm.SortByFieldName2 = SortByFieldName2; vm.SetDataSource(dataSource); _dataSource = dataSource; } return(SetMapWidget(dataSource)); }
public GeoFenceWidget() { this.Resources.MergedDictionaries.Add(SharedDictionaryManager.SharedStyleDictionary); this.Resources.MergedDictionaries.Add(SharedDictionaryManager.SharedDataTemplateDictionary); InitializeComponent(); DataGridViewModel = new GeoFenceViewModel(null); DataContext = DataGridViewModel; Caption = "GeoFences"; Properties = new Dictionary <string, string>(); _bAddWidgetWindowOpen = false; // init the widget's data members from the VM TrackIdFieldName = DataGridViewModel.TrackIdFieldName; NameFieldName = DataGridViewModel.NameFieldName; CategoryFieldName = DataGridViewModel.CategoryFieldName; ActiveFieldName = DataGridViewModel.ActiveFieldName; DataGridViewModel.GetProperties(Properties); }