当前位置: 首页>>代码示例>>C#>>正文


C# UIApplication.SetStatusBarHidden方法代码示例

本文整理汇总了C#中UIApplication.SetStatusBarHidden方法的典型用法代码示例。如果您正苦于以下问题:C# UIApplication.SetStatusBarHidden方法的具体用法?C# UIApplication.SetStatusBarHidden怎么用?C# UIApplication.SetStatusBarHidden使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UIApplication的用法示例。


在下文中一共展示了UIApplication.SetStatusBarHidden方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FinishedLaunching

 public override bool FinishedLaunching(UIApplication app, NSDictionary options)
 {
     app.SetStatusBarHidden(true, true);
       IOSPlatform.register(app, IOSPlatform.SupportedOrients.PORTRAITS);
       PlayN.run(new TrainBox());
       return true;
 }
开发者ID:TrainBox,项目名称:TrainBox,代码行数:7,代码来源:Main.cs

示例2: FinishedLaunching

 public override bool FinishedLaunching(UIApplication app, NSDictionary options)
 {
     app.SetStatusBarHidden(true, true);
       var pf = IOSPlatform.register(app, IOSPlatform.SupportedOrients.PORTRAITS);
       pf.assets().setPathPrefix("assets");
       PlayN.run(new MemoryGame());
       return true;
 }
开发者ID:rida1148,项目名称:libgdx-memory-game,代码行数:8,代码来源:Main.cs

示例3: FinishedLaunching

 public override bool FinishedLaunching(UIApplication app, NSDictionary options)
 {
     app.SetStatusBarHidden(true, true);
       var pconfig = new IOSPlatform.Config();
       // use pconfig to customize iOS platform, if needed
       IOSPlatform.register(app, pconfig);
       PlayN.run(new MyGame());
       return true;
 }
开发者ID:piyanatsuriwong,项目名称:game01_bui,代码行数:9,代码来源:Main.cs

示例4: FinishedLaunching

 public override bool FinishedLaunching(UIApplication app, NSDictionary options)
 {
     app.SetStatusBarHidden(true, true);
       IOSPlatform.Config config = new IOSPlatform.Config();
       config.orients = IOSPlatform.SupportedOrients.PORTRAITS;
       IOSPlatform.register(app, config);
       PlayN.run(new PerfTest());
       return true;
 }
开发者ID:playn,项目名称:playn-perf,代码行数:9,代码来源:Main.cs

示例5: FinishedLaunching

 public override bool FinishedLaunching(UIApplication app, NSDictionary options)
 {
     app.SetStatusBarHidden(true, true);
       IOSPlatform.Config config = new IOSPlatform.Config();
       config.orients = IOSPlatform.SupportedOrients.LANDSCAPES;
       IOSPlatform platform = IOSPlatform.register(app, config);
       IOSTPPlatform.register(platform);
       PlayN.run(new TripleDemo());
       return true;
 }
开发者ID:tomfisher,项目名称:tripleplay,代码行数:10,代码来源:Main.cs

示例6: FinishedLaunching

        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            NSError audioError;
            AVAudioSession.SharedInstance().SetCategory (new NSString("AVAudioSessionCategoryAmbient"), out audioError);

            app.SetStatusBarHidden (true, UIStatusBarAnimation.Slide);

            _monogameGame = GetInstance ();
            _monogameGame.Run ();

            return true;
        }
开发者ID:Ben-P-Leda,项目名称:Bopscotch-IOS,代码行数:12,代码来源:AppDelegate.cs

示例7: FinishedLaunching

        public override void FinishedLaunching(UIApplication app)
        {
            // Fun begins..
            game = new TestGame ();
            game.Run ();

            //[[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide];
            //UIApplication.SharedApplication.SetStatusBarHidden (true, true);
            app.SetStatusBarHidden (true, true);
            var controller = UIApplication.SharedApplication.Windows[0].RootViewController;
            if (controller != null) {
                //controller.SetNeedsStatusBarAppearanceUpdate ();
            }
        }
开发者ID:fordream,项目名称:Sunfish,代码行数:14,代码来源:Main.cs

示例8: FinishedLaunching

        // This method is invoked when the application has loaded its UI and is ready to run
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            app.SetStatusBarHidden (true, false);
            // create a new window instance based on the screen size
            window = new UIWindow (UIScreen.MainScreen.Bounds);

            // load the appropriate UI, depending on whether the app is running on an iPhone or iPad
            if (UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Phone) {
                viewController = new OpenGLViewController ("OpenGLViewController_iPhone", null);
            } else {
                viewController = new OpenGLViewController ("OpenGLViewController_iPad", null);
            }
            window.RootViewController = viewController;

            ((EAGLView)(viewController.View)).Run (60.0);

            // make the window visible
            window.MakeKeyAndVisible ();

            return true;
        }
开发者ID:bholmes,项目名称:NeHe-MonoTouch,代码行数:22,代码来源:AppDelegate.cs

示例9: FinishedLaunching

    public override bool FinishedLaunching (UIApplication app, NSDictionary options) {
      app.SetStatusBarHidden(true, true);

      // configure our Flurry and SGAgent bits
      var flurryKey = "FLURRYKEY";
      // these can be useful if you have this info
      // FA.Flurry.SetAppVersion("app_version");
      // FA.Flurry.SetUserID("user_id");
      Flurry flurry = new IOSFlurry();
      try {
        Console.WriteLine("Initializing Flurry [vers=" + FA.Flurry.GetFlurryAgentVersion() + "]");
        FA.Flurry.StartSession(flurryKey);
      } catch (Exception e) {
        Console.WriteLine("Failed to init Flurry [key=" + flurryKey + "]");
        Console.WriteLine(e);
      }

      // initialize PlayN and start the game
      var pconfig = new IOSPlatform.Config();
      // use pconfig to customize iOS platform, if needed
      IOSPlatform.register(app, pconfig);
      PlayN.run(new FlurryExample(flurry));
      return true;
    }
开发者ID:livingblast,项目名称:playn-samples,代码行数:24,代码来源:Main.cs

示例10: FinishedLaunching

		// This method is invoked when the application has loaded its UI and its ready to run
		public override bool FinishedLaunching (UIApplication app, NSDictionary options)
		{
			RectangleF rect = UIScreen.MainScreen.ApplicationFrame;

			window.BackgroundColor = UIColor.Black;

			//Create the OpenGL drawing view and add it to the window
			drawingView = new PaintingView (new RectangleF (rect.Location, rect.Size));
			window.AddSubview (drawingView);

			// Create a segmented control so that the user can choose the brush color.
			var images = new[] {
				UIImage.FromFile ("Images/Red.png"),
				UIImage.FromFile ("Images/Yellow.png"),
				UIImage.FromFile ("Images/Green.png"),
				UIImage.FromFile ("Images/Blue.png"),
				UIImage.FromFile ("Images/Purple.png")
			};
			if (UIDevice.CurrentDevice.CheckSystemVersion (7, 0)) {
				// we want the original colors, which is not the default iOS7 behaviour, so we need to
				// replace them with ones having the right UIImageRenderingMode
				for (int i = 0; i < images.Length; i++)
					images [i] = images [i].ImageWithRenderingMode (UIImageRenderingMode.AlwaysOriginal);
			}
			var segmentedControl = new UISegmentedControl (images);

			// Compute a rectangle that is positioned correctly for the segmented control you'll use as a brush color palette
			var frame = new RectangleF (rect.X + LeftMarginPadding, rect.Height - PaletteHeight - TopMarginPadding,
				rect.Width - (LeftMarginPadding + RightMarginPadding), PaletteHeight);
			segmentedControl.Frame = frame;
			// When the user chooses a color, the method changeBrushColor: is called.
			segmentedControl.ValueChanged += ChangeBrushColor;
			// Make sure the color of the color complements the black background
			segmentedControl.TintColor = UIColor.DarkGray;
			// Set the third color (index values start at 0)
			segmentedControl.SelectedSegment = 2;

			// Add the control to the window
			window.AddSubview (segmentedControl);
			// Now that the control is added, you can release it
			// [segmentedControl release];

			float r, g, b;
			// Define a starting color
			HslToRgb (2.0f / PaletteSize, PaintingView.Saturation, PaintingView.Luminosity, out r, out g, out b);
			// Set the color using OpenGL
			GL.Color4 (r, g, b, PaintingView.BrushOpacity);

			
			// Look in the Info.plist file and you'll see the status bar is hidden
			// Set the style to black so it matches the background of the application
			app.SetStatusBarStyle (UIStatusBarStyle.Default, false);
			// Now show the status bar, but animate to the style.
			app.SetStatusBarHidden (false, true);

			//Configure and enable the accelerometer
			UIAccelerometer.SharedAccelerometer.UpdateInterval = 1.0f / AccelerometerFrequency;
			UIAccelerometer.SharedAccelerometer.Acceleration += OnAccelerated;
			
			//Show the window
			window.MakeKeyAndVisible ();
	
			return true;
		}
开发者ID:BoogieMAN2K,项目名称:monotouch-samples,代码行数:65,代码来源:Main.cs

示例11: FinishedLaunching

		public override void FinishedLaunching (UIApplication app)
		{
			RectangleF rect = UIScreen.MainScreen.ApplicationFrame;

			//Create a full-screen window
			window = new UIWindow (UIScreen.MainScreen.Bounds);
			window.BackgroundColor = UIColor.Black;

			//Create the OpenGL drawing view and add it to the window
			drawingView = new PaintingView (new RectangleF (rect.Location, rect.Size));
			window.AddSubview (drawingView);

			// Create a segmented control so that the user can choose the brush color.
			UISegmentedControl segmentedControl = new UISegmentedControl (new[]{
					UIImage.FromFile ("Red.png"),
					UIImage.FromFile ("Yellow.png"),
					UIImage.FromFile ("Green.png"),
					UIImage.FromFile ("Blue.png"),
					UIImage.FromFile ("Purple.png"),
			});

			// Compute a rectangle that is positioned correctly for the segmented control you'll use as a brush color palette
			RectangleF frame = new RectangleF (rect.X + LeftMarginPadding, rect.Height - PaletteHeight - TopMarginPadding,
				rect.Width - (LeftMarginPadding + RightMarginPadding), PaletteHeight);
			segmentedControl.Frame = frame;
			// When the user chooses a color, the method changeBrushColor: is called.
			segmentedControl.ValueChanged += ChangeBrushColor;
			segmentedControl.ControlStyle = UISegmentedControlStyle.Bar;
			// Make sure the color of the color complements the black background
			segmentedControl.TintColor = UIColor.DarkGray;
			// Set the third color (index values start at 0)
			segmentedControl.SelectedSegment = 2;

			// Add the control to the window
			window.AddSubview (segmentedControl);
			// Now that the control is added, you can release it
			// [segmentedControl release];

			float r, g, b;
			// Define a starting color
			HslToRgb (2.0f / PaletteSize, PaintingView.Saturation, PaintingView.Luminosity, out r, out g, out b);
			// Set the color using OpenGL
			GL.Color4 (r, g, b, PaintingView.BrushOpacity);

			//Show the window
			window.MakeKeyAndVisible ();
			// Look in the Info.plist file and you'll see the status bar is hidden
			// Set the style to black so it matches the background of the application
			app.SetStatusBarStyle (UIStatusBarStyle.BlackTranslucent, false);
			// Now show the status bar, but animate to the style.
			app.SetStatusBarHidden (false, true);

			//Configure and enable the accelerometer
			UIAccelerometer.SharedAccelerometer.UpdateInterval = 1.0f / AccelerometerFrequency;
			UIAccelerometer.SharedAccelerometer.Acceleration += OnAccelerated;
		}
开发者ID:CVertex,项目名称:monotouch-samples,代码行数:56,代码来源:GLPaint.cs


注:本文中的UIApplication.SetStatusBarHidden方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。