當前位置: 首頁>>代碼示例>>C#>>正文


C# NSWindow.MakeKeyAndOrderFront方法代碼示例

本文整理匯總了C#中MonoMac.AppKit.NSWindow.MakeKeyAndOrderFront方法的典型用法代碼示例。如果您正苦於以下問題:C# NSWindow.MakeKeyAndOrderFront方法的具體用法?C# NSWindow.MakeKeyAndOrderFront怎麽用?C# NSWindow.MakeKeyAndOrderFront使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在MonoMac.AppKit.NSWindow的用法示例。


在下文中一共展示了NSWindow.MakeKeyAndOrderFront方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: FinishedLaunching

		public override void FinishedLaunching (NSObject notification)
		{
			window = new NSWindow(new RectangleF (50, 50, 400, 400), (NSWindowStyle) (1 | (1 << 1) | (1 << 2) | (1 << 3)), NSBackingStore.Buffered, false);
			window.MakeKeyAndOrderFront(this);
			//mainWindowController = new MainWindowController ();
			//mainWindowController.Window.MakeKeyAndOrderFront (this);
		}
開發者ID:Clancey,項目名稱:MonoMac.Windows.Form,代碼行數:7,代碼來源:AppDelegate.cs

示例2: FinishedLaunching

    public override void FinishedLaunching(NSObject notification)
    {
        text = new NSTextField (new RectangleF (44, 32, 232, 31)) {
            StringValue = "Hello Mono Mac!"
        };

        window = new NSWindow (new RectangleF (50, 50, 400, 400), (NSWindowStyle) (1 | (1 << 1) | (1 << 2) | (1 << 3)), 0, false);
        window.ContentView.AddSubview (text);
        window.MakeKeyAndOrderFront (this);
    }
開發者ID:sichy,項目名稱:monomac,代碼行數:10,代碼來源:hello.cs

示例3: goFullScreen

		partial void goFullScreen (NSButton sender)
		{
			isInFullScreenMode = true;
			
			// Pause the non-fullscreen view
			openGLView.StopAnimation ();
			
			RectangleF mainDisplayRect;
			RectangleF viewRect;
			
			// Create a screen-sized window on the display you want to take over
			// Note, mainDisplayRect has a non-zero origin if the key window is on a secondary display
			mainDisplayRect = NSScreen.MainScreen.Frame;
			
			fullScreenWindow = new NSWindow (mainDisplayRect, NSWindowStyle.Borderless, NSBackingStore.Buffered, true);
			
			// Set the window level to be above the menu bar
			fullScreenWindow.Level = NSWindowLevel.MainMenu + 1;
			
			// Perform any other window configuration you desire
			fullScreenWindow.IsOpaque = true;
			fullScreenWindow.HidesOnDeactivate = true;
			
			// Create a view with a double-buffered OpenGL context and attach it to the window
			// By specifying the non-fullscreen context as the shareContext, we automatically inherit the 
			// OpenGL objects (textures, etc) it has defined
			viewRect = new RectangleF (0, 0, mainDisplayRect.Size.Width, mainDisplayRect.Size.Height);
			
			fullScreenView = new MyOpenGLView (viewRect, openGLView.OpenGLContext);
			fullScreenWindow.ContentView = fullScreenView;
			
			// Show the window
			fullScreenWindow.MakeKeyAndOrderFront (this);
			
			// Set the scene with the full-screen viewport and viewing transformation
			Scene.setViewportRect (viewRect);
			
			// Assign the view's MainController to self
			fullScreenView.MainController = this;
			
			if (!isAnimating) {
				// Mark the view as needing drawing to initalize its contents
				fullScreenView.NeedsDisplay = true;
			} else {
				// Start playing the animation
				fullScreenView.StartAnimation ();
				
			}
		}
開發者ID:Anomalous-Software,項目名稱:monomac,代碼行數:49,代碼來源:MainWindowController.cs

示例4: FinishedLaunching

		public override void FinishedLaunching (NSObject notification)
		{
			_window = new NSWindow (new RectangleF(200,200,400,700), NSWindowStyle.Closable | NSWindowStyle.Resizable | NSWindowStyle.Titled,
			                        NSBackingStore.Buffered, false, NSScreen.MainScreen);

			var setup = new Setup (this, _window);
			setup.Initialize ();

			var startup = Mvx.Resolve<IMvxAppStart> ();
			startup.Start ();

			_window.MakeKeyAndOrderFront (this);

			return;

		}
開發者ID:Dexyon,項目名稱:MvvmCross-Samples,代碼行數:16,代碼來源:AppDelegate.cs


注:本文中的MonoMac.AppKit.NSWindow.MakeKeyAndOrderFront方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。