void CordovaBrowser_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs e) { Debug.WriteLine("CordovaBrowser_LoadCompleted"); string[] autoloadPlugs = this.configHandler.AutoloadPlugins; foreach (string plugName in autoloadPlugs) { //nativeExecution.ProcessCommand(commandCallParams); } string nativeReady = "(function(){ cordova.require('cordova/channel').onNativeReady.fire()})();"; try { CordovaBrowser.InvokeScript("execScript", new string[] { nativeReady }); } catch (Exception /*ex*/) { Debug.WriteLine("Error calling js to fire nativeReady event. Did you include cordova.js in your html script tag?"); } if (this.CordovaBrowser.Opacity < 1) { FadeIn.Begin(); } }
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; }
void FadeOut_Completed(object sender, EventArgs e) { FadeOut.Stop(); FadeIn.Stop(); currentTextBlock.Text = textCollection[textCounter]; textCounter++; if (textCounter == 5) { textCounter = 0; if (currentTextBlock == PageTitle) { currentTextBlock = ApplicationTitle; } else { currentTextBlock = PageTitle; } Storyboard.SetTarget(FadeIn, currentTextBlock); Storyboard.SetTarget(FadeOut, currentTextBlock); } FadeIn.Begin(); }
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(); } }
private void ListView_SelectionChanged(object sender, SelectionChangedEventArgs e) { //VerseScroll.ScrollToVerticalOffset(0); VerseScroll.ChangeView(0, 0, 1, false); //Animate FadeIn.Begin(); }
public void Show(double width) { popup.IsOpen = true; FadeIn.Begin(); if (width < popup.MinWidth) { popup.Width = popup.MinWidth; rootGrid.Width = popup.MinWidth; if (rootGrid.Width + HorizontalOffset > userControl.ActualWidth) { if (rootGrid.Width + DEFAULT_WIDTH_MARGIN < userControl.ActualWidth) { popup.HorizontalOffset = DEFAULT_WIDTH_MARGIN; } else { popup.HorizontalOffset = -(popup.MinWidth - userControl.ActualWidth) / 2; } } else { popup.HorizontalOffset = HorizontalOffset; } } else { popup.HorizontalOffset = HorizontalOffset; popup.Width = width; rootGrid.Width = width; } }
void CordovaBrowser_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs e) { if (IsExiting) { // Special case, we navigate to about:blank when we are about to exit. IsolatedStorageSettings.ApplicationSettings.Save(); Application.Current.Terminate(); return; } Debug.WriteLine("CordovaBrowser_LoadCompleted"); string version = "?"; System.Windows.Resources.StreamResourceInfo streamInfo = Application.GetResourceStream(new Uri("VERSION", UriKind.Relative)); if (streamInfo != null) { using (StreamReader sr = new StreamReader(streamInfo.Stream)) { version = sr.ReadLine(); } } Debug.WriteLine("Apache Cordova native platform version " + version + " is starting"); string[] autoloadPlugs = this.configHandler.AutoloadPlugins; foreach (string plugName in autoloadPlugs) { nativeExecution.AutoLoadCommand(plugName); } // send js code to fire ready event string nativeReady = "(function(){ cordova.require('cordova/channel').onNativeReady.fire()})();"; try { CordovaBrowser.InvokeScript("eval", new string[] { nativeReady }); } catch (Exception /*ex*/) { Debug.WriteLine("Error calling js to fire nativeReady event. Did you include cordova.js in your html script tag?"); } // attach js code to dispatch exitApp string appExitHandler = "(function(){navigator.app = navigator.app || {}; navigator.app.exitApp= function(){cordova.exec(null,null,'CoreEvents','__exitApp',[]); }})();"; try { CordovaBrowser.InvokeScript("eval", new string[] { appExitHandler }); } catch (Exception /*ex*/) { Debug.WriteLine("Error calling js to add appExit funtion."); } if (this.CordovaBrowser.Opacity < 1) { FadeIn.Begin(); } }
private void ChangeText() { if (textCounter == 5) { textCounter = 0; } TextRotator.Text = textCollection[textCounter]; textCounter++; FadeIn.Begin(); }
private void playVideo() { FadeThumb.Stop(); vidStage.SetValue(MediaElement.SourceProperty, currentVidCategory[playIndex]); vidStage.AutoPlay = true; createThumbnails(); FadeThumb.SetValue(Storyboard.TargetNameProperty, "thumb" + playIndex); FadeThumb.Begin(); FadeIn.Begin(); }
void SetActive() { if (IsScreenActive == Visibility.Visible) { Visibility = Visibility.Visible; FadeIn.Begin(); } else { FadeOut.Begin(); } }
private void showPicture() { FadeThumb.Stop(); //FadeIn.Stop(); imgStage.SetValue(Image.SourceProperty, new BitmapImage(currentPicCategory[playIndex])); createThumbnails(); FadeThumb.SetValue(Storyboard.TargetNameProperty, "thumb" + playIndex); FadeThumb.Begin(); FadeIn.Begin(); }
void ShowControlPanel() { controlsTimer.Stop(); controlsTimer.Start(); Locator.MediaPlaybackViewModel.MouseService.ShowCursor(); if (isVisible == true) { return; } isVisible = true; FadeIn.Begin(); OnPlayerControlVisibilityChanged(true); }
void ShowControlPanel() { VolumeSlider.Foreground = _viewModel.Volume > _viewModel.VOLUME_THRESHOLD ? _red : _white; _viewModel.SliderBindingEnabled = true; controlsTimer.Stop(); controlsTimer.Start(); _viewModel.MouseService.ShowCursor(); if (isVisible == true) { return; } isVisible = true; FadeIn.Begin(); OnPlayerControlVisibilityChanged(true); }
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); } }
public void thumbnails_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { Image img = (Image)sender; BitmapImage bmi = (BitmapImage)img.Source; if (showMode == "picture") { imgStage.Source = new BitmapImage(bmi.UriSource); } else { vidStage.Source = new Uri(bmi.UriSource.ToString().Replace(".jpg", ".wmv"), UriKind.Relative); } FadeIn.Begin(); }
void CordovaBrowser_LoadCompleted(object sender, System.Windows.Navigation.NavigationEventArgs e) { if (IsExiting) { // Special case, we navigate to about:blank when we are about to exit. IsolatedStorageSettings.ApplicationSettings.Save(); Application.Current.Terminate(); return; } Debug.WriteLine("CordovaBrowser_LoadCompleted"); string[] autoloadPlugs = this.configHandler.AutoloadPlugins; foreach (string plugName in autoloadPlugs) { //nativeExecution.ProcessCommand(commandCallParams); } // send js code to fire ready event string nativeReady = "(function(){ cordova.require('cordova/channel').onNativeReady.fire(); angular.bootstrap(document,['opvko']); alert('ready')})();"; try { CordovaBrowser.InvokeScript("execScript", new string[] { nativeReady }); } catch (Exception /*ex*/) { Debug.WriteLine("Error calling js to fire nativeReady event. Did you include cordova.js in your html script tag?"); } // attach js code to dispatch exitApp string appExitHandler = "(function(){navigator.app = navigator.app || {}; navigator.app.exitApp= function(){cordova.exec(null,null,'CoreEvents','__exitApp',[]); }})();"; try { CordovaBrowser.InvokeScript("execScript", new string[] { appExitHandler }); } catch (Exception /*ex*/) { Debug.WriteLine("Error calling js to add appExit funtion."); } if (this.CordovaBrowser.Opacity < 1) { FadeIn.Begin(); } }
private async void FadeOut_Completed(object sender, object e) { using (var stream = await DisplayFile.OpenAsync(FileAccessMode.Read)) { var bitmap = new BitmapImage(); DisplayImage.Source = bitmap; await bitmap.SetSourceAsync(stream); } try { ConnectedAnimation animation = ConnectedAnimationService.GetForCurrentView().GetAnimation("PhotoAnimation"); animation?.TryStart(DisplayImage); } catch (Exception) { } finally { FadeIn.Begin(); DisplayImage.Opacity = 1; } }
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 { } }
private void Viewer_PointerEntered(object sender, PointerRoutedEventArgs e) { FadeIn.Begin(); }
private void ShowPopup() { popUp.IsOpen = true; FadeIn.Begin(); }
private void ShowButtons() { LayoutRoot.Visibility = Visibility.Visible; FadeIn.Begin(); }
private void FadeOut_Completed(object sender, object e) { DisplayCodeFormatted(); FadeIn.Begin(); }