예제 #1
0
 private void OnThemeSwitchToggled(ToggleSwitch sender)
 {
     SaveThemeSettings(IsGlobalDark      = sender.IsOn);
     AppResources.Current.RequestedTheme = sender.IsOn ? ElementTheme.Dark : ElementTheme.Light;
     if (isInitViewOrNot)
     {
         return;
     }
     StatusBarInit.InitDesktopStatusBar(false, Colors.Black, Color.FromArgb(255, 67, 104, 203), Colors.White, Color.FromArgb(255, 202, 0, 62));
     StatusBarInit.InitMobileStatusBar(false, Colors.Black, Color.FromArgb(255, 67, 104, 203), Colors.White, Color.FromArgb(255, 202, 0, 62));
 }
예제 #2
0
 private void MainPage_Loaded(object sender, RoutedEventArgs e)
 {
     InitSliderTimer();
     OutIMG.BeginTime  = new TimeSpan(0, 0, 0, 0, 800);
     OutREC.BeginTime  = new TimeSpan(0, 0, 0, 0, 800);
     OutIMG.SpeedRatio = 0.07;
     OutREC.SpeedRatio = 0.07;
     OutIMG.Begin();
     OutREC.Begin();
     isDarkOrNot = IsGlobalDark;
     if (StatusBarInit.HaveAddMobileExtensions())
     {
         StatusBarInit.InitInnerMobileStatusBar(true);
     }
     StatusBarInit.InitDesktopStatusBar(false, Colors.Black, Color.FromArgb(255, 67, 104, 203), Colors.White, Color.FromArgb(255, 202, 0, 62));
     StatusBarInit.InitMobileStatusBar(false, Colors.Black, Color.FromArgb(255, 67, 104, 203), Colors.White, Color.FromArgb(255, 202, 0, 62));
 }
예제 #3
0
 private void MainPage_Loaded(object sender, RoutedEventArgs e)
 {
     isColorfulOrNot = (bool?)SettingsHelper.ReadSettingsValue(SettingsConstants.IsColorfulOrNot) ?? false;
     isLightOrNot    = (bool?)SettingsHelper.ReadSettingsValue(SettingsConstants.IsDarkThemeOrNot) ?? false;
     if (StatusBarInit.HaveAddMobileExtensions())
     {
         StatusBarInit.InitInnerMobileStatusBar(true);
     }
     StatusBarInit.InitDesktopStatusBar(false);
     StatusBarInit.InitMobileStatusBar(false);
     InitSliderTimer();
     OutIMG.BeginTime  = new TimeSpan(0, 0, 0, 0, 800);
     OutREC.BeginTime  = new TimeSpan(0, 0, 0, 0, 800);
     OutIMG.SpeedRatio = 0.07;
     OutREC.SpeedRatio = 0.07;
     OutIMG.Begin();
     OutREC.Begin();
 }
 private void OnThemeSwitchToggled(ToggleSwitch sender)
 {
     SettingsHelper.SaveSettingsValue(SettingsConstants.IsDarkThemeOrNot, sender.IsOn);
     MainPage.Current.RequestedTheme = sender.IsOn ? ElementTheme.Dark : ElementTheme.Light;
     if (isInitViewOrNot)
     {
         return;
     }
     StatusBarInit.InitDesktopStatusBar(!sender.IsOn, Colors.Black, Color.FromArgb(255, 67, 104, 203), Colors.White, Color.FromArgb(255, 202, 0, 62));
     StatusBarInit.InitMobileStatusBar(!sender.IsOn, Colors.Black, Color.FromArgb(255, 67, 104, 203), Colors.White, Color.FromArgb(255, 202, 0, 62));
     if (SchedulePage.Current != null)
     {
         MainPage.Current.NavigateToBase?.Invoke(
             this,
             new NavigateParameter {
             MessageBag  = GetUIString("LNU_Index_SC"),
             NaviType    = NavigateType.Schedule,
             ToFetchType = DataFetchType.NULL,
             ToUri       = new Uri("http://jwgl.lnu.edu.cn/pls/wwwbks/xk.CourseView")
         },
             MainPage.InnerResources.GetFrameInstance(NavigateType.Schedule),
             MainPage.InnerResources.GetPageType(NavigateType.Schedule));
     }
 }