Exemplo n.º 1
0
		// Shared initialization code
		void Initialize () {
			//does center itself in MakeKeyAndFront to replicate iOS behaviour
			//Point centerOfScreen = new Rectangle(NSScreen.MainScreen.Frame).Center;
			var rectangle = new Rectangle (new Point (0, 0), 800, 700);//TODO: must come from config, like last position etc
			Window = new BridgeTry.Mac.MainWindow (rectangle);
			//Window.CurrentFrame.Center = centerOfScreen;//TODO:Make it work and cross platform
			//Window.SetFrameOrigin (new System.Drawing.PointF ((float)(centerOfScreen.X), (float)(centerOfScreen.Y)));
			Window.StyleMask = NSWindowStyle.Miniaturizable | NSWindowStyle.Resizable | NSWindowStyle.Titled;
			Window.Center ();
			base.Window = (NSWindow)Window;
		}
Exemplo n.º 2
0
        // Shared initialization code
        void Initialize()
        {
            //does center itself in MakeKeyAndFront to replicate iOS behaviour
            //Point centerOfScreen = new Rectangle(NSScreen.MainScreen.Frame).Center;
            var rectangle = new Rectangle(new Point(0, 0), 800, 700);              //TODO: must come from config, like last position etc

            Window = new BridgeTry.Mac.MainWindow(rectangle);
            //Window.CurrentFrame.Center = centerOfScreen;//TODO:Make it work and cross platform
            //Window.SetFrameOrigin (new System.Drawing.PointF ((float)(centerOfScreen.X), (float)(centerOfScreen.Y)));
            Window.StyleMask = NSWindowStyle.Miniaturizable | NSWindowStyle.Resizable | NSWindowStyle.Titled;
            Window.Center();
            base.Window = (NSWindow)Window;
        }