Beispiel #1
0
        public FormMapProperties(IMapApplication app, IMap map, IDisplay display)
        {
            _app     = app;
            _map     = map;
            _display = display;

            InitializeComponent();
        }
        private void Current_SelectedLayerChanged(object sender, EventArgs e)
        {
            IMapApplication app = sender as IMapApplication;

            if (app != null)
            {
                SetSelectedLayer(app.SelectedLayer);
            }
        }
Beispiel #3
0
        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();
                    }
                }
            }
        }
Beispiel #4
0
        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();
                    }
                }
            }
        }
        public static void SetApplication(IMapApplication applicationHost)
        {
            if (_applicationContext == null)
            {
                lock (lockObject)
                {
                    if (_applicationContext == null)
                    {
                        _applicationContext = new MapApplication();
                    }
                }
            }

            _appHost = applicationHost;

            FrameworkElement appHostElement = applicationHost as FrameworkElement;

            if (appHostElement != null)
            {
                registerForNotification("SelectedLayer", appHostElement, SelectedLayerPropertyChanged);
            }
        }
Beispiel #6
0
 public ModulePersist(IMapApplication app)
 {
     _app = app;
 }
Beispiel #7
0
 public ModulsPersists(IMapApplication application)
 {
     _application = application;
 }
Beispiel #8
0
 public MapDocument(IMapApplication application) : this()
 {
     _application = application;
 }
        public static void SetApplication(IMapApplication applicationHost)
        {
            if (_applicationContext == null)
            {
                lock (lockObject)
                {
                    if (_applicationContext == null)
                    {
                        _applicationContext = new MapApplication();
                    }
                }
            }

            _appHost = applicationHost;

            FrameworkElement appHostElement = applicationHost as FrameworkElement;
            if (appHostElement != null)
                registerForNotification("SelectedLayer", appHostElement, SelectedLayerPropertyChanged);
        }