protected async override void OnNavigatedTo(NavigationEventArgs e) { try { myMusic = await deserialize(); } catch { } if (myMusic.albumList == null || myMusic.songList == null) { await GetMusic(); } ProgressbarMain.ShowPaused = true; MainFrame.Navigate(typeof(AlbumView), myMusic); BackgroundFrame.Navigate(typeof(NowPlaying)); var MediaElementObject = new MediaElement(); Application.Current.Suspending += ForegroundApp_Suspending; Application.Current.Resuming += ForegroundApp_Resuming; ApplicationSettingsHelper.SaveSettingsValue(ApplicationSettingsConstants.AppState, AppState.Active.ToString()); NowPlatingCover.Source = new BitmapImage(new Uri("ms-appx:///Assets/main.png")); NowPlayingTitle.Text = "MusicFlow"; NowPlayingArtist.Text = "For Windows 10"; }
private void Pivot_SelectionChanged(object sender, SelectionChangedEventArgs e) { Pivot p = sender as Pivot; Debug.Assert(p != null, "p != null"); switch (p.SelectedIndex) { case -1: break; case 0: //Color BackgroundFrame.Navigate(typeof(ColorPage)); Vm.BackgroundVm.BackgroundMode = BackgroundMode.SolidColorBrush; break; case 5: //Gradient Color Brush BackgroundFrame.Navigate(typeof(GradientColorPage)); Vm.BackgroundVm.BackgroundMode = BackgroundMode.GradientColorBrush; break; case 1: //Geometry BackgroundFrame.Navigate(typeof(GeometryPage)); Vm.BackgroundVm.BackgroundMode = BackgroundMode.Geometry; break; } }
public void Dispose() { EncoderNode.Dispose(); PreEncoderFilterPool.Dispose(); UiFilter?.Dispose(); Blender.Dispose(); BackgroundFrame.Dispose(); UiFilterQueue.Dispose(); EncoderQueue.Dispose(); PreEncoderFilterQueue.Dispose(); }
protected override void ControlInput(Camera cam) { base.ControlInput(cam); if (BackgroundFrame.Contains(PlayerInput.MousePosition)) { cam.OffsetAmount = 0; //if this is used, we need to implement syncing this inventory with the server /*Character.DisableControls = true; * if (Character.Controlled != null) * { * if (PlayerInput.KeyHit(InputType.Select)) * { * Character.Controlled.SelectedConstruction = null; * } * }*/ } }
protected override void ControlInput(Camera cam) { if (draggingItem == null && HUD.CloseHUD(BackgroundFrame)) { // TODO: fix so that works with the server side Character.Controlled.SelectedConstruction = null; return; } base.ControlInput(cam); if (BackgroundFrame.Contains(PlayerInput.MousePosition)) { cam.OffsetAmount = 0; //if this is used, we need to implement syncing this inventory with the server /*Character.DisableControls = true; * if (Character.Controlled != null) * { * if (PlayerInput.KeyHit(InputType.Select)) * { * Character.Controlled.SelectedConstruction = null; * } * }*/ } }