Ejemplo n.º 1
0
        /// <summary>
        /// Method.
        /// </summary>
        /// <param name=""></param>
        /// <returns>Opens the Window - if it is of a certain type</returns>
        public void Open()
        {
            switch (this.Type)
            {
            case Window.WindowType.Info:
                InteropHelper.Do(String.Format("Open Window {0}", this.ID));
                break;

            case Window.WindowType.Legend:
                InteropHelper.Do(String.Format("Open Window {0}", this.ID));
                break;

            case Window.WindowType.MapBasic:
                InteropHelper.Do(String.Format("Open Window {0}", this.ID));
                break;

            case Window.WindowType.Message:
                InteropHelper.Do(String.Format("Open Window {0}", this.ID));
                break;

            case Window.WindowType.Ruler:
                InteropHelper.Do(String.Format("Open Window {0}", this.ID));
                break;

            case Window.WindowType.Statistics:
                InteropHelper.Do(String.Format("Open Window {0}", this.ID));
                break;
                //case else:
                //Do nothing only the windows above can be opened
            }
        }
Ejemplo n.º 2
0
        public static void MapBasicWindowShow()
        {
            Win32Window mapbasicwindow = new Win32Window((int)Win32Window.WindowType.WIN_MAPBASIC);

            if (!mapbasicwindow.IsOpen)
            {
                // Open the mapbasic window.
                InteropHelper.Do("Run Menu Command 608");
            }
            if ((_mapbasicWindow == null) || (_mapbasicWindow.IsDisposed))
            {
                //MessageBox.Show("1");
                _mapbasicWindow = new MapBasicWindowForm(new MapBasicWindowController(), mapbasicwindow);
                //MessageBox.Show("2");
                _miApp = InteropServices.MapInfoApplication;
                // Register the window with the docking system
                //MessageBox.Show("3");
                _dockWindow = _miApp.RegisterDockWindow(_mapbasicWindow.Handle);
                //MessageBox.Show("4");
                _mapbasicWindow.SetDockPosition();

                //MessageBox.Show("5");
                _dockWindow.Title = "MapBasic Window";

                //_mapbasicWindow.EnableDockChangedEvent();
            }
            else
            {
                _dockWindow.Activate();
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Method.
 /// </summary>
 /// <param name=""></param>
 /// <returns>Closes the Window</returns>
 public void Close(bool interactive)
 {
     if (interactive == true)
     {
         InteropHelper.Do(string.Format("Close Window {0} Interactive", _windowID));
     }
     else
     {
         InteropHelper.Do(string.Format("Close Window {0}", _windowID));
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Method.
 /// </summary>
 /// <param name=""></param>
 /// <returns>Restore the Window</returns>
 public void Restore()
 {
     InteropHelper.Do(_restoreStatement);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Method.
 /// </summary>
 /// <param name=""></param>
 /// <returns>Updates/Refreshes the Window</returns>
 public void Update()
 {
     InteropHelper.Do(string.Format("Update Window {0}", _windowID));
 }
Ejemplo n.º 6
0
 //------------------------------------------------------------
 #region Methods for Cloning/Updating
 /// <summary>
 /// Method.
 /// </summary>
 /// <param name=""></param>
 /// <returns>Closes the Window</returns>
 public void Clone()
 {
     InteropHelper.Do(string.Format("Run Command WindowInfo({0},15)", _windowID));
 }
Ejemplo n.º 7
0
 //------------------------------------------------------------
 #region Methods for Min/Max/Restore/Set Front
 /// <summary>
 /// Method.
 /// </summary>
 /// <param name=""></param>
 /// <returns>Makes the Window the front most window</returns>
 public void SetFront()
 {
     InteropHelper.Do(string.Format("Set Window {0} Front", _windowID));
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Method.
 /// </summary>
 /// <param name=""></param>
 /// <returns>Resets the Title of the Window to the default (dynamic) value</returns>
 public void ResetName()
 {
     InteropHelper.Do(string.Format("Set Window {0} Title Default", _windowID));
     _windowTitle = InteropHelper.GetWindowName(_windowID);
 }