예제 #1
0
        void DisplayOrHide(bool mouseOrTouchPresent)
        {
            isVisible = mouseOrTouchPresent;

            if (Locator.VideoPlayerVm.IsVideoPlayerAudioTracksSettingsVisible ||
                Locator.VideoPlayerVm.IsVideoPlayerOptionsPanelVisible ||
                Locator.VideoPlayerVm.IsVideoPlayerSubtitlesSettingsVisible ||
                Locator.VideoPlayerVm.IsVideoPlayerVolumeSettingsVisible)
            {
                return;
            }
            if (!isVisible)
            {
                ControlsGridFadeOut.Value = ControlsBorder.ActualHeight;
                HeaderGridFadeOut.Value   = -HeaderGrid.ActualHeight;
                FadeOut.Begin();

                Locator.MediaPlaybackViewModel.MouseService.HideCursor();
            }
            else
            {
                FadeIn.Begin();
                Locator.MediaPlaybackViewModel.MouseService.ShowCursor();
            }
        }
예제 #2
0
 public void Update()
 {
     if (account != null)
     {
         FadeOut.Begin();
     }
 }
예제 #3
0
    IEnumerator Workflow()
    {
        FadeIn fadeIn = logo.AddComponent <FadeIn>();

        fadeIn.time = 1.0f;
        fadeIn.Begin();
        yield return(new WaitForSeconds(2f));

        FadeOut fadeOut = logo.AddComponent <FadeOut>();

        fadeOut.time = 1.0f;
        fadeOut.Begin();
        yield return(new WaitForSeconds(1f));

        logo.SetActive(false);
        loadingLayer.SetActive(true);
        yield return(new WaitForEndOfFrame());

        MoveBy move = title.AddComponent <MoveBy>();

        move.offset = new Vector3(0, -2f, 0);
        move.time   = 1f;
        move.Begin();
        yield return(new WaitForSeconds(1f));

        async = SceneManager.LoadSceneAsync("MainScene");
        async.allowSceneActivation = false;
        yield return(StartCoroutine(Loading()));

        text.text      = "开始游戏";
        button.enabled = true;
    }
예제 #4
0
 public SimpleAnimation()
 {
     InitializeComponent();
     PageFlip.Begin();
     currentTextBlock   = PageTitle;
     FadeOut.Completed += new EventHandler(FadeOut_Completed);
     FadeIn.Completed  += new EventHandler(FadeIn_Completed);
     FadeOut.Begin();
 }
예제 #5
0
            public static void DrawWithFade(SerializedProperty property, float faded, DColor dColor, bool indentContent = false, bool addExtraSpaceWhenExpanded = false, params GUILayoutOption[] options)
            {
                float alpha = GUI.color.a;

                if (FadeOut.Begin(faded, indentContent))
                {
                    Draw(property, dColor, options);
                }
                FadeOut.End(faded, addExtraSpaceWhenExpanded, alpha);
            }
예제 #6
0
            public static void DrawWithFade(SerializedProperty property, float faded, float rowHeight, DColor dColor, float propertyWidth, bool indentContent = false, bool addExtraSpaceWhenExpanded = false)
            {
                float alpha = GUI.color.a;

                if (FadeOut.Begin(faded, indentContent))
                {
                    Draw(property, dColor, propertyWidth, rowHeight);
                }
                FadeOut.End(faded, addExtraSpaceWhenExpanded, alpha);
            }
예제 #7
0
            public static void UnityEventWithFade(SerializedProperty property, float faded, string label, DColor dColor, int eventsCount, bool indentContent = false, bool addExtraSpaceWhenExpanded = false)
            {
                float alpha = GUI.color.a;

                if (FadeOut.Begin(faded, indentContent))
                {
                    UnityEvent(property, label, dColor, eventsCount);
                }
                FadeOut.End(faded, addExtraSpaceWhenExpanded, alpha);
            }
예제 #8
0
            public static void DrawWithFade(SerializedProperty property, float faded, ColorName colorName, string emptyMessage = EMPTY_MESSAGE, float extraLineSpacing = 0, params GUILayoutOption[] options)
            {
                float alpha = GUI.color.a;

                if (FadeOut.Begin(faded, false))
                {
                    Draw(property, colorName, emptyMessage, extraLineSpacing, options);
                }
                FadeOut.End(faded, true, alpha);
            }
 void HideControlPanel()
 {
     if (isVisible == false || Locator.VideoPlayerVm.IsVideoPlayerOptionsPanelVisible)
     {
         return;
     }
     isVisible = false;
     ControlsGridFadeOut.Value = ControlsBorder.ActualHeight;
     HeaderGridFadeOut.Value   = -HeaderGrid.ActualHeight;
     FadeOut.Begin();
     Locator.MediaPlaybackViewModel.MouseService.HideCursor();
 }
예제 #10
0
 void SetActive()
 {
     if (IsScreenActive == Visibility.Visible)
     {
         Visibility = Visibility.Visible;
         FadeIn.Begin();
     }
     else
     {
         FadeOut.Begin();
     }
 }
예제 #11
0
        private void PlayShow()
        {
            ImageIndex = (ImageIndex + 1) % ImgLoader.ImageSources.Count;

            if (FrontBackground.Opacity == 1)
            {
                BackBackground.Source = ImgLoader.ImageSources[ImageIndex];
                FadeOut.Begin(FrontBackground);
            }
            else
            {
                FrontBackground.Source = ImgLoader.ImageSources[ImageIndex];
                FadeIn.Begin(FrontBackground);
            }
        }
예제 #12
0
        /// <summary>
        /// 使用动画效果更改当前显示的图片
        /// </summary>
        /// <param name="e">需要显示的图片</param>
        private void ChangeDisplayImage(PhotoDisplaySupport e)
        {
            FileName.Text        = e.FileName;
            DisplayFile          = e.PhotoFile;
            DisplayImage.Opacity = 0;

            Image image = ((ImageList.ContainerFromItem(e) as ListViewItem).ContentTemplateRoot as FrameworkElement).FindName("Photo") as Image;

            ConnectedAnimationService.GetForCurrentView().PrepareToAnimate("PhotoAnimation", image).Configuration = new BasicConnectedAnimationConfiguration();

            ConnectedAnimationService.GetForCurrentView().DefaultDuration = TimeSpan.FromMilliseconds(600);

            FadeOut.Begin();
            SelectedPhotoID = e.PhotoFile.FolderRelativeId;
        }
예제 #13
0
        public async Task SetUriSourceAsync(Uri uri)
        {
            try
            {
                var file = await StorageFile.GetFileFromPathAsync(uri.OriginalString);

                using (var stream = await file.OpenAsync(FileAccessMode.Read))
                {
                    var bitmap = new BitmapImage();

                    if (DecodePixelWidth > 0)
                    {
                        bitmap.DecodePixelWidth = (int)DecodePixelWidth;
                    }
                    if (DecodePixelHeight > 0)
                    {
                        bitmap.DecodePixelHeight = (int)DecodePixelHeight;
                    }

                    await bitmap.SetSourceAsync(stream);

                    Image.Source = bitmap;
                }

                if (UseAnimation)
                {
                    FadeIn.Begin();
                }
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex);
                if (UseAnimation)
                {
                    FadeOut.Begin();
                }
                Image.Source = null;
            }
        }
 private void PointerCheckTimer_Tick(object sender, object e)
 {
     try
     {
         if (previousMouseLocation != Window.Current.CoreWindow.PointerPosition)
         {
             mouseHasntMoved = 0;
             Window.Current.CoreWindow.PointerCursor = new CoreCursor(CoreCursorType.Arrow, 1);
             if (transportControls.Opacity == 0)
             {
                 FadeIn.Begin();
             }
         }
         else if (mouseHasntMoved == 20 && transportControls.Opacity == 1)
         {
             FadeOut.Begin();
             Window.Current.CoreWindow.PointerCursor = null;
         }
         mouseHasntMoved      += 1;
         previousMouseLocation = Window.Current.CoreWindow.PointerPosition;
     }
     catch { }
 }
예제 #15
0
 void FadeIn_Completed(object sender, EventArgs e)
 {
     FadeOut.Begin();
 }
예제 #16
0
 private void StartRotation()
 {
     FadeOut.Begin();
 }
예제 #17
0
 private void Viewer_PointerExited(object sender, PointerRoutedEventArgs e)
 {
     FadeOut.Begin();
 }