protected override void LoadWorkerDoWork(object sender, DoWorkEventArgs e) { Utils.EnsureCulture(); OnReloading = true; Dispatcher.Invoke(new Action(() => { aiLoader.Visibility = Visibility.Visible; tbNoResults.Visibility = Visibility.Collapsed; })); if (Convert.ToBoolean(e.Argument)) { Dispatcher.Invoke(new Action(() => { var propsSelectorWindow = new PropsSelectorWindow(true) { Owner = this }; Opacity = 0.5; propsSelectorWindow.ShowDialog(); Opacity = 1; _propID = propsSelectorWindow.GetPropID(); })); } e.Result = new List <object> { PropsService.Get(_propID), PropStatusChangesService.Instanse.GetLatest(_propID) }; }
protected override void SaveWorkerDoWork(object sender, DoWorkEventArgs e) { OnSaving = true; Dispatcher.Invoke(new Action(() => { aiLoader.Visibility = Visibility.Visible; var propsSelector = new PropsSelectorWindow(false) { Owner = this }; Opacity = 0.5; propsSelector.ShowDialog(); Opacity = 1; e.Result = propsSelector.GetPropIDs(); })); }