private void LoadAnimation()
        {
            ObservableCollection <OrientationAnimation> animationModeCollection = new ObservableCollection <OrientationAnimation>();

            OrientationAnimation newMode = new OrientationAnimation();

            newMode.id    = "0";
            newMode.value = AppResources.Settings_LoadAnimation_Like_Liquid;

            animationModeCollection.Add(newMode);

            newMode       = new OrientationAnimation();
            newMode.id    = "1";
            newMode.value = AppResources.Settings_LoadAnimation_Fade_changes;

            animationModeCollection.Add(newMode);

            newMode       = new OrientationAnimation();
            newMode.id    = "2";
            newMode.value = AppResources.Settings_LoadAnimation_Hybrid_changes;

            animationModeCollection.Add(newMode);

            orientaionAnimListPicker.ItemsSource = animationModeCollection;

            string lan = AnimationSettingHelper.GetLanguage();

            if (lan != null)
            {
                orientaionAnimListPicker.SelectedIndex = Convert.ToInt32(lan);
            }
        }
示例#2
0
        // Do not add any additional code to this method
        private void InitializePhoneApplication()
        {
            if (phoneApplicationInitialized)
            {
                return;
            }

            // Create the frame but don't set it as RootVisual yet; this allows the splash
            // screen to remain active until the application is ready to render.
            //RootFrame = new PhoneApplicationFrame();

            string lan = AnimationSettingHelper.GetLanguage();

            if (lan != null)
            {
                switch (Convert.ToInt32(lan))
                {
                case 0:
                    RootFrame = new AnimateOrientationChangesFrame();
                    break;

                case 1:
                    RootFrame = new FadeOrientationChangesFrame();
                    break;

                case 2:
                    RootFrame = new HybridOrientationChangesFrame();
                    break;

                default:
                    RootFrame = new HybridOrientationChangesFrame();
                    break;
                }
            }
            else
            {
                RootFrame = new PhoneApplicationFrame();
            }

            RootFrame.Navigated += CompleteInitializePhoneApplication;

            // Handle navigation failures
            RootFrame.NavigationFailed += RootFrame_NavigationFailed;

            // Handle reset requests for clearing the backstack
            RootFrame.Navigated += CheckForResetNavigation;

            // Ensure we don't initialize again
            phoneApplicationInitialized = true;

            //Track Navigation
            RootFrame.Navigated += RootFrame_Navigated;
        }
        private void orientaionAnimListPicker_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            OrientationAnimation selectedItem = orientaionAnimListPicker.SelectedItem as OrientationAnimation;

            AnimationSettingHelper.SetLanguage(selectedItem.id);
        }