Example #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MapViewerController"/> class.
        /// </summary>
        /// <param name="viewer">The viewer.</param>
        /// <param name="legend">The legend.</param>
        /// <param name="statBar">The stat bar.</param>
        /// <param name="propPane">The prop pane.</param>
        /// <param name="toolbar">The toolbar.</param>
        public MapViewerController(IMapViewer viewer, IMapLegend legend, IMapStatusBar statBar, IPropertyPane propPane, IDefaultToolbar toolbar)
            : this(viewer, legend, statBar, propPane)
        {
            if (toolbar == null)
                throw new ArgumentNullException("toolbar");

            toolbar.Viewer = viewer;
        }
Example #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MapViewerController"/> class.
        /// </summary>
        /// <param name="viewer">The viewer.</param>
        /// <param name="legend">The legend.</param>
        /// <param name="statBar">The stat bar.</param>
        /// <param name="propPane">The prop pane.</param>
        public MapViewerController(IMapViewer viewer, IMapLegend legend, IMapStatusBar statBar, IPropertyPane propPane)
        {
            if (viewer == null)
                throw new ArgumentNullException("viewer"); //NOXLATE

            _viewer = viewer;
            _legend = legend;
            _statBar = statBar;
            _propPane = propPane;

            WireEvents();
        }
Example #3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MapViewerController"/> class.
        /// </summary>
        /// <param name="viewer">The viewer.</param>
        /// <param name="legend">The legend.</param>
        /// <param name="statBar">The stat bar.</param>
        /// <param name="propPane">The prop pane.</param>
        public MapViewerController(IMapViewer viewer, IMapLegend legend, IMapStatusBar statBar, IPropertyPane propPane)
        {
            if (viewer == null)
            {
                throw new ArgumentNullException("viewer"); //NOXLATE
            }
            _viewer   = viewer;
            _legend   = legend;
            _statBar  = statBar;
            _propPane = propPane;

            WireEvents();
        }
        public int CreateInstance(IntPtr unkOuter, ref Guid iid, out IntPtr obj)
        {
            obj = IntPtr.Zero;
            if (unkOuter != IntPtr.Zero)
            {
                Marshal.ThrowExceptionForHR(NativeMethods.CLASS_E_NOAGGREGATION);
            }
            else if (iid == NativeMethods.iidIUnknown || iid == typeof(IPropertyPage).GUID)
            {
                // Create the PropertyPagePane from the clsid
                IntPtr paneUnknown;
                int    hr = NativeMethods.CoCreateInstance(ref clsid, unkOuter, NativeMethods.CLSCTX_INPROC_SERVER, ref iid, out paneUnknown);
                if (hr != 0)
                {
                    Marshal.ThrowExceptionForHR(hr);
                }
                else
                {
                    // Marshal it into a C# object
                    IPropertyPane pane = Marshal.GetTypedObjectForIUnknown(paneUnknown, typeof(IPropertyPane)) as IPropertyPane;
                    if (pane == null)
                    {
                        Marshal.ThrowExceptionForHR(NativeMethods.E_NOINTERFACE);
                    }
                    else
                    {
                        // Create a property page from the property page pane.
                        IPropertyPage page = new PropertyPage(pane);
                        // And marshall the property page back to an IPropertyPage COM interface
                        obj = Marshal.GetComInterfaceForObject(page, typeof(IPropertyPage));
                    }
                }
            }
            else
            {
                Marshal.ThrowExceptionForHR(NativeMethods.E_NOINTERFACE);
            }

            return(0);
        }
Example #5
0
        private string[] configNames;                 // = null;
        #endregion

        #region Construction
        public PropertyPage(IPropertyPane pane)
        {
            this.pane = pane;
            pane.SetHost(this);
        }
Example #6
0
    private string[] configNames; // = null;
    #endregion

    #region Construction
    public PropertyPage(IPropertyPane pane)
    {
      this.pane = pane;
      pane.SetHost(this);
    }   
Example #7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MapViewerController"/> class.
        /// </summary>
        /// <param name="viewer">The viewer.</param>
        /// <param name="legend">The legend.</param>
        /// <param name="statBar">The stat bar.</param>
        /// <param name="propPane">The prop pane.</param>
        /// <param name="toolbar">The toolbar.</param>
        public MapViewerController(IMapViewer viewer, IMapLegend legend, IMapStatusBar statBar, IPropertyPane propPane, IDefaultToolbar toolbar)
            : this(viewer, legend, statBar, propPane)
        {
            if (toolbar == null)
            {
                throw new ArgumentNullException("toolbar");
            }

            toolbar.Viewer = viewer;
        }