public void OnViewerRemoved(uint viewerId) { Viewer viewer = _viewerList.Get(viewerId); if (_api != null && viewer != null) { bool hasMarker = viewer.HasMarker; _viewerList.Delete(viewerId); int nrImages = _viewerList.Count; _api.SetViewerWindowBorderVisible(nrImages >= 2); uint?nrviewers = _api?.GetViewerCount(); if (hasMarker) { List <Viewer> markerViewers = _viewerList.MarkerViewers; if (markerViewers.Count == 0 && _crossCheck != null) { _crossCheck.Dispose(); _crossCheck = null; } } if (nrviewers == 0) { DockPaneGlobeSpotter globeSpotter = (dynamic)DataContext; globeSpotter.Hide(); _lastSpatialReference = null; } } }
public GlobeSpotter() { InitializeComponent(); _apiKey = ApiKey.Instance; _settings = FileSettings.Instance; _constants = ConstantsViewer.Instance; _historicalRecordings = HistoricalRecordings.Instance; _login = FileLogin.Instance; _login.PropertyChanged += OnLoginPropertyChanged; _configuration = FileConfiguration.Instance; _configuration.PropertyChanged += OnConfigurationPropertyChanged; _openNearest = new List <string>(); _crossCheck = null; _lastSpatialReference = null; _layers = new List <CycloMediaLayer>(); _startOpenNearest = false; GetVectorLayerListAsync(); ModuleGlobeSpotter globeSpotterModule = ModuleGlobeSpotter.Current; _viewerList = globeSpotterModule.ViewerList; _measurementList = globeSpotterModule.MeasurementList; _cycloMediaGroupLayer = globeSpotterModule.CycloMediaGroupLayer; Initialize(); }
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 BubbleInteractionSolver() { discontinuityFinders = new CrossCheck <DiscontinuousBubble <Position>, DiscontinuousBubble <Position>, float>( (_1, _2) => float.PositiveInfinity); discontinuityResolvers = new CrossCheck <DiscontinuousBubble <Position>, DiscontinuousBubble <Position>, int>( (_1, _2) => 0); broadPhaseCutoff = new CrossCheck <DiscontinuousBubble <Position>, DiscontinuousBubble <Position>, float>( (_1, _2) => 0.05f); functionAdder = new FunctionAdder(); }
public async void OnOpenNearestImageResult(string input, bool opened, string imageId, Point3D location) { if (opened && _startOpenNearest) { if (_crossCheck == null) { _crossCheck = new CrossCheck(); } double size = _constants.CrossCheckSize; await _crossCheck.UpdateAsync(location.x, location.y, size); _openNearest.Add(imageId); } _startOpenNearest = false; }
public void OnImageChanged(uint viewerId) { Viewer viewer = _viewerList.Get(viewerId); if ((viewer != null) && (_api != null)) { string imageId = _api.GetImageID(viewerId); viewer.ImageId = imageId; if (viewer.HasMarker) { viewer.HasMarker = false; List <Viewer> markerViewers = _viewerList.MarkerViewers; if (markerViewers.Count == 0 && _crossCheck != null) { _crossCheck.Dispose(); _crossCheck = null; } } } }
public StreetSmart() { InitializeComponent(); _settings = FileSettings.Instance; _constants = ConstantsViewer.Instance; _login = FileLogin.Instance; _configuration = FileConfiguration.Instance; _openNearest = new List <string>(); _crossCheck = null; _lastSpatialReference = null; _layers = new List <CycloMediaLayer>(); _startOpenNearest = false; GetVectorLayerListAsync(); ModulestreetSmart streetSmartModule = ModulestreetSmart.Current; _viewerList = streetSmartModule.ViewerList; _measurementList = streetSmartModule.MeasurementList; _cycloMediaGroupLayer = streetSmartModule.CycloMediaGroupLayer; }