private void GetAllMapTypesCompleted(object sender, Service.GetAllMapTypesCompletedEventArgs eventArgs) { ServiceProxy.GetAllMapTypesCompleted -= GetAllMapTypesCompleted; TypeManager.AddNodeTypes(eventArgs.Result.NodeTypes.Values); TypeManager.AddRelationshipTypes(eventArgs.Result.RelationshipTypes.Values); TypeManager.AddConnectionTypes(eventArgs.Result.DescriptorTypes.Values); TypeManager.AddMetadataTypes(eventArgs.Result.MetadataTypes.Values); IsMapTypesLoaded = true; Proxy.InitialiseMapManagerEventArgs initialisationEventArgs = new Proxy.InitialiseMapManagerEventArgs(true); InitialiseMapManagerCompleted(this, initialisationEventArgs); }
private void OnInitialiseMapManagerCompleted(object sender, Proxy.InitialiseMapManagerEventArgs e) { if (!e.IsInitialised) { SuperMessageBoxService.Show("Incorrect Glyma Version", e.ErrorMessage, MessageBoxType.ErrorWithNoInput); } else { if (RelatedContentPanelUtil.Instance.IsJavascriptLibraryLoaded()) { SecurityManager.GetUsersPermissionLevelNameAsync("Initialisation", GetUsersPermissionLevelNameCompleted); } else { SuperMessageBoxService.Show("Missing Dependencies", "Please contact your administrator as dependency files are missing from the system", MessageBoxType.ErrorWithNoInput); } } }
private void GetGlymaVersionCompleted(object sender, Service.GetApplicationVersionCompletedEventArgs eventArgs) { ServiceProxy.GetApplicationVersionCompleted -= GetGlymaVersionCompleted; Service.GlymaVersion serverVersion = eventArgs.Result; if (GlymaClientVersion.RequiresRefresh(serverVersion)) { Proxy.InitialiseMapManagerEventArgs initialisationEventArgs = new Proxy.InitialiseMapManagerEventArgs(false); initialisationEventArgs.ErrorMessage = "The version of Glyma your browser is using is out-of-date. Please clear your browser's cache and refresh your browser to download the latest version of Glyma."; InitialiseMapManagerCompleted(this, initialisationEventArgs); } else { ServiceProxy.GetAllMapTypesCompleted += GetAllMapTypesCompleted; ServiceProxy.GetAllMapTypesAsync(System.Windows.Browser.HtmlPage.Document.DocumentUri.ToString()); } }
private void OnInitialiseMapManagerCompleted(object sender, InitialiseMapManagerEventArgs e) { if (GetDomainId().HasValue) { //if the starting NodeUid is provided use that if (GetNodeId().HasValue) { InitializeNavigator(GetDomainId().Value, GetNodeId().Value); } //if no starting NodeUid is provided find the domain node and use that else { _mapManager.QueryMapByDomainCompleted.RegisterEvent(GetDomainId().Value, new EventHandler<Proxy.NodesEventArgs>(OnAcquireNodesByDomainCompleted)); _mapManager.QueryMapByDomainAsync(GetDomainId().Value); } } else { // If there is no domain ID supplied then provide a dialog box to select one. DomainSelectionDialog selectionDialog = new DomainSelectionDialog(new SecurityManager()); // TODO: The following lines need to be modded so that the MapManager is passed through rather than the NodeService. selectionDialog.DataContext = _nodeService; selectionDialog.MapManager = _mapManager; selectionDialog.HasCloseButton = false; selectionDialog.Show(); } }