コード例 #1
0
        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
    public override void RefreshUI()
    {
        object value = Binding.GetBoundValue();

        if (value is Angle)
        {
            Angle angle = (Angle)value;

            // Animate (if applicable):
            var smoothie = GetComponent <SmoothRotate>();
            if (smoothie == null)
            {
                transform.rotation = angle.ToUnityQuaternion();
            }
            else
            {
                var animation = new OrientationAnimation(smoothie.gameObject,
                                                         smoothie.transform.rotation.ToNucleusAngle(), angle, 0.06,
                                                         Interpolation.Sin);
                smoothie.Animation = animation;
            }
        }
    }
コード例 #3
0
        private void orientaionAnimListPicker_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            OrientationAnimation selectedItem = orientaionAnimListPicker.SelectedItem as OrientationAnimation;

            AnimationSettingHelper.SetLanguage(selectedItem.id);
        }