private void OnInfoLauncherClick(object sender, System.Windows.RoutedEventArgs e) { if (e is RibbonGroupBox.LauncherClickEventArgs && ((RibbonGroupBox.LauncherClickEventArgs)e).Hook is IMapDocument) { IMapDocument mapDocument = (IMapDocument)((RibbonGroupBox.LauncherClickEventArgs)e).Hook; if (!AppUIGlobals.IsAppReadOnly(mapDocument.Application)) { MapOptionPageIdentify dlg = new MapOptionPageIdentify(mapDocument); dlg.ShowDialog(); } } }
private void OnSnappingLauncherClick(object sender, RoutedEventArgs e) { if (e is RibbonGroupBox.LauncherClickEventArgs && ((RibbonGroupBox.LauncherClickEventArgs)e).Hook is IMapDocument) { IMapDocument mapDocument = (IMapDocument)((RibbonGroupBox.LauncherClickEventArgs)e).Hook; IMapApplication mapApplication = mapDocument.Application as IMapApplication; if (mapApplication != null) { Module module = mapApplication.IMapApplicationModule(new Guid(gView.Framework.Snapping.Core.Globals.ModuleGuidString)) as Module; if (!AppUIGlobals.IsAppReadOnly(mapDocument.Application)) { FormSnappingLauncher dlg = new FormSnappingLauncher(module); dlg.ShowDialog(); } } } }
private void OnEditLauncherClick(object sender, RoutedEventArgs e) { if (e is RibbonGroupBox.LauncherClickEventArgs && ((RibbonGroupBox.LauncherClickEventArgs)e).Hook is IMapDocument) { IMapDocument mapDocument = (IMapDocument)((RibbonGroupBox.LauncherClickEventArgs)e).Hook; IMapApplication mapApplication = mapDocument.Application as IMapApplication; if (mapApplication != null) { Module module = mapApplication.IMapApplicationModule(Globals.ModuleGuid) as Module; if (!AppUIGlobals.IsAppReadOnly(mapDocument.Application)) { FormEditLauncher dlg = new FormEditLauncher(module); dlg.ShowDialog(); } } } }