public void Handle(ProjectClosedEvent args) { _selectedItems.Clear(); OnPropertyChanged(() => Items); OnPropertyChanged(() => SelectedItems); }
private Module1() { FrameworkApplication.State.Deactivate("planet_state_connection"); ProjectOpenedEvent.Subscribe(OnProjectOpen); ProjectClosedEvent.Subscribe(OnProjectClose); ProjectSavingEvent.Subscribe(OnProjectSaving); }
public void Handle(ProjectClosedEvent eventToHandle) { lock (_locker) { _cache.Clear(); } }
/// <summary> /// Uninitialize method. Make sure the module unsubscribes from the events. /// </summary> protected override void Uninitialize() { base.Uninitialize(); ProjectOpenedEvent.Unsubscribe(OnProjectOpen); ProjectClosedEvent.Unsubscribe(OnProjectClosed); }
protected ImportPlatViewModel() { CheckNewLayers(); ProjectClosedEvent.Subscribe(OnProjectClosed); //Subscribe to ActiveMapViewChangedEvent in order to get the layers in the map ActiveMapViewChangedEvent.Subscribe(OnActiveMapViewChanged); }
protected StreetSmart() { ProjectClosedEvent.Subscribe(OnProjectClosed); _currentDispatcher = Dispatcher.CurrentDispatcher; _inRestart = false; _inClose = false; _apiKey = ApiKey.Instance; _settings = Settings.Instance; _constants = ConstantsViewer.Instance; _login = Login.Instance; _login.PropertyChanged += OnLoginPropertyChanged; _configuration = FileConfiguration.Instance; _configuration.PropertyChanged += OnConfigurationPropertyChanged; _openNearest = new List <string>(); _crossCheck = null; _lastSpatialReference = null; _configurationPropertyChanged = new List <string>(); GetVectorLayerListAsync(); ModulestreetSmart streetSmartModule = ModulestreetSmart.Current; _viewerList = streetSmartModule.ViewerList; _measurementList = streetSmartModule.MeasurementList; _cycloMediaGroupLayer = streetSmartModule.CycloMediaGroupLayer; Initialize(); }
public void TestHandleProjectClosedShouldRaiseLayoutColumnsChangedEvent() { var args = new ProjectClosedEvent(); _service.Handle(args); _mockEventBus.Verify(p => p.Raise(It.IsAny <LayoutResetEvent>())); }
public void TestHandleProjectClosedEventShouldUpdatePlots() { var @event = new ProjectClosedEvent(); _service.Handle(@event); _mockTask.Verify(p => p.Execute(It.IsAny <UpdatePlotsCommand>()), Times.Once()); }
protected override bool Initialize() { //listen to project open/close events ProjectOpenedEvent.Subscribe(onProjectOpened); ProjectClosedEvent.Subscribe(onProjectClosed); return(base.Initialize()); }
protected SymbolsViewModel() { SearchPauseSearching = true; #region Events //Subscribe to ProjectItemsChangedEvent to update ProjecyStyles ProjectItemsChangedEvent.Subscribe(OnProjectItemsChanged); ProjectClosedEvent.Subscribe(OnProjectClosed); //Subscribe to ActiveMapViewChangedEvent in order to get the layers in the map ActiveMapViewChangedEvent.Subscribe(OnActiveMapViewChanged); LayersAddedEvent.Subscribe(OnLayersAdded); LayersRemovedEvent.Subscribe(OnLayersemoved); //Subscribe to Graphic Elements selection changed event ElementSelectionChangedEvent.Subscribe(OnGraphicsElementSelectionChanged); #endregion BindingOperations.EnableCollectionSynchronization(_layersInMap, _layersInMapLock); _ = GetLayersInMapAsync(); _patchTypes = new Dictionary <StyleItemType, SymbolPatchType> { { StyleItemType.LineSymbol, SymbolPatchType.ZigzagLine }, { StyleItemType.PolygonSymbol, SymbolPatchType.BoundaryPoly } }; //Get the Styles in the project ProjectFilterStyles.Add(new SymbolSearcherSearchFilter(true)); ProjectFilterStyles.Add(new SymbolSearcherSearchFilter()); foreach (var pi in Project.Current.GetItems <StyleProjectItem>()) { ProjectFilterStyles.Add(new SymbolSearcherSearchFilter(false, pi)); } if (SelectedProjectFilterStyle == null && ProjectFilterStyles.Count > 0) { SelectedProjectFilterStyle = ProjectFilterStyles[0]; } //Get the various StyleItemTypes in Pro. foreach (StyleItemType sit in Enum.GetValues(typeof(StyleItemType))) { if (sit == 0) { continue; } StyleItemTypeValues.Add(sit); } SelectedStyleItemType = StyleItemTypeValues.FirstOrDefault(); SearchPauseSearching = false; }
protected SymbolSearcherDockpaneViewModel() { System.Diagnostics.Debug.WriteLine($@"==== SymbolPicker constructor start"); //Subscribe to ProjectItemsChangedEvent to update ProjecyStyles ProjectItemsChangedEvent.Subscribe(OnProjectItemsChanged); ProjectClosedEvent.Subscribe(OnProjectClosed); //Subscribe to ActiveMapViewChangedEvent in order to get the layers in the map ActiveMapViewChangedEvent.Subscribe(OnActiveMapViewChanged); _ = GetLayersInMapAsync(); _patchTypes = new Dictionary <StyleItemType, SymbolPatchType> { { StyleItemType.LineSymbol, SymbolPatchType.ZigzagLine }, { StyleItemType.PolygonSymbol, SymbolPatchType.BoundaryPoly } }; BindingOperations.EnableCollectionSynchronization(_filterStyleItems, _StyleProjectItemsLock); BindingOperations.EnableCollectionSynchronization(_layersInMap, _layersInMapLock); // if current project is null the OnProjectItemsChanged event will take care of FilterStyles if (Project.Current != null) { // setting up the search filter StyleItem list for the combo happens in OnProjectItemsChanged unless the project is already open FilterStyles.Add(new SymbolSearcherSearchFilter(true)); FilterStyles.Add(new SymbolSearcherSearchFilter()); foreach (var pi in Project.Current.GetItems <StyleProjectItem>()) { FilterStyles.Add(new SymbolSearcherSearchFilter(false, pi)); } if (SelectedFilterStyle == null && FilterStyles.Count > 0) { // select the default search type SelectedFilterStyle = FilterStyles[1]; } SearchPauseSearching = false; System.Diagnostics.Debug.WriteLine($@"==== SearchPauseSearching false"); } System.Diagnostics.Debug.WriteLine($@"==== SymbolPicker constructor end"); // set the start value to line type SelectedSearchType = SearchTypes[3]; }
/// <summary> /// CTor /// </summary> public OpenMapviewsDockpaneViewModel() { BindingOperations.EnableCollectionSynchronization(ListOfMapviews, _lockCollection); // create a simulated list of mapviews // either when a project is opened or if a project is already open ProjectOpenedEvent.Subscribe((ProjectEventArgs e) => { CreateMapviewItemsAsync(); }); if (Project.Current != null) { CreateMapviewItemsAsync(); } ProjectClosedEvent.Subscribe((ProjectEventArgs e) => { // cleanup temp folder if (!string.IsNullOrEmpty(_temporaryPath)) { System.IO.Directory.Delete(_temporaryPath, true); } _temporaryPath = string.Empty; }); }
public void Handle(ProjectClosedEvent eventToHandle) { ClearComparison(); }
public void Handle(ProjectClosedEvent eventToHandle) { updateProjectItems(isEnabled: false, observedDataEnabled: false); _menuBarItemRepository[MenuBarItemIds.JournalEditorView].Enabled = false; _simulationState.Reset(); }
// TODO: Move this into an application-level event handler public void Handle(ProjectClosedEvent args) { SetIsStartMenuVisible(true); SetIsNavigationTreeVisible(false); }
public void Handle(ProjectClosedEvent args) { ClearViewModels(); }
public void Handle(ProjectClosedEvent eventToHandle) { //Ensure that we clear the command cache when the project is closed Clear(); }
protected GlobeSpotter() { ProjectClosedEvent.Subscribe(OnProjectClosed); }
public void Handle(ProjectClosedEvent eventToHandle) { updateProjectInfo(Captions.None, Captions.None, enabled: false); }
public void Handle(ProjectClosedEvent args) { OnPropertyChanged(() => Title); OnPropertyChanged(() => Items); }
public void Handle(ProjectClosedEvent args) { OnPropertyChanged(() => Properties); }
private SapConfigModule() { ProjectOpenedEvent.Subscribe(OnProjectOpen); ProjectClosedEvent.Subscribe(OnProjectClose); }
public void Handle(ProjectClosedEvent eventToHandle) { closeAndClearReferences(); }
public void Handle(ProjectClosedEvent eventToHandle) { _view.Enabled = false; _view.ClearResults(); }
public void Handle(ProjectClosedEvent eventToHandle) { clearFeedbackReferences(); resetFeedback(); _view.NoFeedbackAvailable(); }
public void Handle(ProjectClosedEvent eventToHandle) { projectItemsAreEnabled = false; }
public void Handle(ProjectClosedEvent eventToHandle) { refrehHistory(); }
public virtual void Handle(ProjectClosedEvent eventToHandle) { _view.DestroyNodes(); }
public void Handle(ProjectClosedEvent eventToHandle) { ClearAllNotification(); }
/// <summary> /// Module constructor. Subscribe to the ProjectOpened and ProjectClosed events. /// </summary> private Module1() { ProjectOpenedEvent.Subscribe(OnProjectOpen); ProjectClosedEvent.Subscribe(OnProjectClosed); }