示例#1
0
 /// <summary>
 /// IMESample's constructor
 /// </summary>
 /// <param name="isLandscape"> A flag whether current display orientation is landscape or not. </param>
 public App(bool isLandscape)
 {
     IsLandscape = AppOrientation.Portrait;
     if (isLandscape)
     {
         OnOrientationChanged(AppOrientation.Landscape);
     }
     else
     {
         OnOrientationChanged(AppOrientation.Portrait);
     }
 }
示例#2
0
 /// <summary>
 /// IMESample's constructor
 /// </summary>
 /// <param name="isLandscape"> A flag whether current display orientation is landscape or not. </param>
 public App(bool isLandscape)
 {
     IsLandscape = AppOrientation.Portrait;
     if (isLandscape)
     {
         // Changed the layout to landscape keyboard
         OnOrientationChanged(AppOrientation.Landscape);
     }
     else
     {
         // Changed the layout to portrait keyboard
         OnOrientationChanged(AppOrientation.Portrait);
     }
 }
        /// <summary>
        /// Device orientation changing notification interface.
        /// </summary>
        /// <param name="orientation"> A value which shows changed device orientation. </param>
        public void OnOrientationChanged(AppOrientation orientation)
        {
            switch (orientation)
            {
            case AppOrientation.Landscape:
                FormatterInstance.IsLandscapeOrientation = true;
                MainPage = new CalculatorMainPageLandscape();
                break;

            case AppOrientation.Portrait:
            default:
                FormatterInstance.IsLandscapeOrientation = false;
                MainPage = new CalculatorMainPage();
                break;
            }
        }
示例#4
0
        public void OnOrientationChanged(AppOrientation orientation)
        {
            switch (orientation)
            {
            case AppOrientation.Landscape:
                IsLandscape = AppOrientation.Landscape;
                MainPage    = new IME_KEYBOARD_LAYOUT_QWERTY_LAND();
                break;

            case AppOrientation.Portrait:
            default:
                IsLandscape = AppOrientation.Portrait;
                MainPage    = new IME_KEYBOARD_LAYOUT_QWERTY_PORT();
                break;
            }
        }
示例#5
0
        /// <summary>
        /// A method which provides the device orientation change
        /// </summary>
        /// <param name="orientation"> A device orientation value. </param>
        public void OnOrientationChanged(AppOrientation orientation)
        {
            switch (orientation)
            {
            case AppOrientation.Landscape:
                // Load the landscape keyboard layout
                MainPage = new IME_KEYBOARD_LAYOUT_QWERTY_LAND();
                break;

            case AppOrientation.Portrait:
            default:
                // Load the portrait keyboard layout
                MainPage = new IME_KEYBOARD_LAYOUT_QWERTY_PORT();
                break;
            }
        }