/// <inheritdoc /> /// <summary> /// </summary> public override void Destroy() { BackgroundContainer.Destroy(); Screen.Ruleset?.Destroy(); Container?.Destroy(); BackgroundManager.Loaded -= OnBackgroundLoaded; }
private void MainPage_Loaded(object sender, RoutedEventArgs e) { DataService.Instance.Dispatcher = new DispatcherWrapper(Dispatcher); BackgroundContainer.Blur(20, 0).Start(); if (_isHost) { if (App.IsXbox()) { PlayPause.Focus(FocusState.Keyboard); } this.PointerMoved += MainPage_PointerMoved; this.KeyDown += MainPage_KeyDown; _playerService.PropertyChanged += _dataService_PropertyChanged; _timer = new DispatcherTimer(); _timer.Interval = TimeSpan.FromSeconds(10); _timer.Tick += _timer_Tick; _timer.Start(); } else { AddButton.Focus(FocusState.Pointer); UserSongCollection.ItemsSource = (_viewModel as ClientViewModel).UserSongs; var t = (_viewModel as ClientViewModel).LoadUserSongs(); this.SizeChanged += MainPage_SizeChanged; } }
public async Task BackgroundChanged() { await SetBackground(); var animation = new DoubleAnimation(0, 1, TimeSpan.FromMilliseconds(1000)); BackgroundContainer.BeginAnimation(OpacityProperty, animation); }
/// <summary> /// Composition effects completed /// </summary> private void _loadedSurface_LoadCompleted(LoadedImageSurface sender, LoadedImageSourceLoadCompletedEventArgs args) { BackgroundContainer.Fade(0.35f, 300, 0, EasingType.Circle).Start(); }
public override void UpdateData() { base.UpdateData(); BackgroundContainer?.SetBackgroundColor(ColorConstants.BackroundContent); View1?.SetBackgroundColor(ColorConstants.SelectorHome); View2?.SetBackgroundColor(ColorConstants.SelectorHome); View3?.SetBackgroundColor(ColorConstants.SelectorHome); View4?.SetBackgroundColor(ColorConstants.SelectorHome); View5?.SetBackgroundColor(ColorConstants.SelectorHome); View6?.SetBackgroundColor(ColorConstants.SelectorHome); View7?.SetBackgroundColor(ColorConstants.SelectorHome); View8?.SetBackgroundColor(ColorConstants.SelectorHome); ImageQR?.SetImageFromResource(DrawableConstants.QRBlurryIcon); if (ImageScan != null) { ImageScan.Visibility = ViewState.Visible; ImageScan?.SetImageFromResource(DrawableConstants.QRWaitIcon); } if (ConfirmTableText != null) { ConfirmTableText.Click -= ConfirmTableText_Click; ConfirmTableText.Click += ConfirmTableText_Click; ConfirmTableText.Text = RCode.ConfirmTable.ToUpperInvariant(); ConfirmTableText.SetBackgroundColor(ColorConstants.BlackColor); ConfirmTableText.SetSelectedColor(ColorConstants.WhiteColor.SelectorTransparence(ColorConstants.Procent50)); ConfirmTableText.SetTextColor(ColorConstants.WhiteColor); ConfirmTableText.SetFont(FontsConstant.OpenSansBold, FontsConstant.Size14); } if (TitleText != null) { TitleText.Text = RCode.QrCode; TitleText.SetTextColor(ColorConstants.WhiteColor); TitleText.SetFont(FontsConstant.OpenSansBold, FontsConstant.Size18); } if (TableNrText != null) { TableNrText.Text = RCode.TableNo; TableNrText.SetTextColor(ColorConstants.WhiteColor); TableNrText.SetFont(FontsConstant.OpenSansBold, FontsConstant.Size18); } if (TableNrValueText != null) { TableNrValueText.Visibility = ViewState.Invisible; TableNrValueText.Text = string.Empty; TableNrValueText.SetTextColor(ColorConstants.SelectorHome); TableNrValueText.SetFont(FontsConstant.OpenSansBold, FontsConstant.Size36); } if (ImageQR.IsNull()) { return; } ImageQR.Click -= ImageQR_Click; ImageQR.Click += ImageQR_Click; }
// Use this for initialization void Awake() { MyCharacters = new CharacterContainer(); MyPaths = new PathsContainer(); MyDisciplines = new DisciplineContainer(); MyConcepts = new ConceptContainer(); MyClans = new ClanContainer(); MyBackgrounds = new BackgroundContainer(); MyArchetypes = new ArchetypesContainer(); MyMeritFlaws = new MeritFlawContainer(); MyStats = new StatContainer(); CharacterXMLPath = Application.dataPath + "/XML/Characters2.xml"; AchetypeXMLPath = Application.dataPath + "/XML/Archetypes.xml"; BackgroundXMLPath = Application.dataPath + "/XML/Backgrounds.xml"; ClanXMLPath = Application.dataPath + "/XML/Clans.xml"; ConceptXMLPath = Application.dataPath + "/XML/Concepts.xml"; DisciplineXMLPath = Application.dataPath + "/XML/Disciplines.xml"; PathXMLPath = Application.dataPath + "/XML/Paths.xml"; MeritFlawXMLPath = Application.dataPath + "/XML/MeritsFlaws.xml"; StatsPath = Application.dataPath + "/XML/Stats.xml"; DirectoryInfo dirInf = new DirectoryInfo(Application.dataPath + "/XML"); if (!dirInf.Exists) //Check if directory exists { dirInf.Create(); } if (!File.Exists(CharacterXMLPath)) { //Debug.Log("No Character XML Data. Creating...."); File.WriteAllText(CharacterXMLPath, CharacterXML.ToString()); MyCharacters = CharacterContainer.Load(CharacterXMLPath); } else { //Debug.Log("Loading Character Data"); MyCharacters = CharacterContainer.Load(CharacterXMLPath); } if (!File.Exists(AchetypeXMLPath)) { //Debug.Log("No Archetype XML Data. Creating...."); File.WriteAllText(AchetypeXMLPath, AchetypeXML.ToString()); MyArchetypes = ArchetypesContainer.Load(AchetypeXMLPath); } else { //Debug.Log("Loading Archetype Data"); MyArchetypes = ArchetypesContainer.Load(AchetypeXMLPath); } if (!File.Exists(BackgroundXMLPath)) { //Debug.Log("No Backgrounds XML Data. Creating...."); File.WriteAllText(BackgroundXMLPath, BackgroundXML.ToString()); MyBackgrounds = BackgroundContainer.Load(BackgroundXMLPath); } else { //Debug.Log("Loading Background Data"); MyBackgrounds = BackgroundContainer.Load(BackgroundXMLPath); } if (!File.Exists(ClanXMLPath)) { //Debug.Log("No Clan XML Data. Creating...."); File.WriteAllText(ClanXMLPath, ClanXML.ToString()); MyClans = ClanContainer.Load(ClanXMLPath); } else { //Debug.Log("Loading Clan Data"); MyClans = ClanContainer.Load(ClanXMLPath); } if (!File.Exists(DisciplineXMLPath)) { //Debug.Log("No Discipline XML Data. Creating...."); File.WriteAllText(DisciplineXMLPath, DisciplineXML.ToString()); MyDisciplines = DisciplineContainer.Load(DisciplineXMLPath); } else { //Debug.Log("Loading Discipline Data"); MyDisciplines = DisciplineContainer.Load(DisciplineXMLPath); } if (!File.Exists(PathXMLPath)) { //Debug.Log("No Paths XML Data. Creating...."); File.WriteAllText(PathXMLPath, PathXML.ToString()); MyPaths = PathsContainer.Load(PathXMLPath); } else { //Debug.Log("Loading Paths Data"); MyPaths = PathsContainer.Load(PathXMLPath); } if (!File.Exists(ConceptXMLPath)) { //Debug.Log("No Concept XML Data. Creating...."); File.WriteAllText(ConceptXMLPath, ConceptXML.ToString()); MyConcepts = ConceptContainer.Load(ConceptXMLPath); } else { //Debug.Log("Loading Concept Data"); MyConcepts = ConceptContainer.Load(ConceptXMLPath); } if (!File.Exists(MeritFlawXMLPath)) { //Debug.Log("No MeritFlaw XML Data. Creating...."); File.WriteAllText(MeritFlawXMLPath, MeritFlawXML.ToString()); MyMeritFlaws = MeritFlawContainer.Load(MeritFlawXMLPath); } else { //Debug.Log("Loading MeritFlaw Data"); MyMeritFlaws = MeritFlawContainer.Load(MeritFlawXMLPath); } if (!File.Exists(StatsPath)) { //Debug.Log("No Stats XML Data. Creating...."); File.WriteAllText(StatsPath, StatsXML.ToString()); MyStats = StatContainer.Load(StatsPath); } else { //Debug.Log("Loading Stats XML Data"); MyStats = StatContainer.Load(StatsPath); } Loaded = true; }