Exemple #1
0
        ///<summary>
        ///	Present
        /// Presents the window
        ///</summary>

/*		public new void Present ()
 *              {
 *                      if (everShown == false) {
 *                              Show ();
 *                              everShown = true;
 *                      } else {
 *                              base.Present ();
 *                      }
 *              }
 */
        #endregion


        #region Public Properties
        #endregion

        public static void ShowWindow(ServiceLocator serviceLocator)
        {
            if (targetWindow != null)
            {
                if (targetWindow.IsActive)
                {
                    int x;
                    int y;

                    targetWindow.GetPosition(out x, out y);

                    lastXPos = x;
                    lastYPos = y;

                    targetWindow.Hide();
                }
                else
                {
                    if (!targetWindow.Visible)
                    {
                        int x = lastXPos;
                        int y = lastYPos;

                        if (x >= 0 && y >= 0)
                        {
                            targetWindow.Move(x, y);
                        }
                    }
                    targetWindow.Present();
                }
            }
            else
            {
                TargetWindow.targetWindow = new TargetWindow(serviceLocator);
                int x = lastXPos;
                int y = lastYPos;

                if (x >= 0 && y >= 0)
                {
                    targetWindow.Move(x, y);
                }

                targetWindow.ShowAll();
            }
        }