Ejemplo n.º 1
0
        private void InitMainPageState()
        {
            NavigateManager.BackRequested += OnBackRequested;
            StatusBarInit.InitInnerDesktopStatusBar(true);
            Window.Current.SetTitleBar(BasePartBorder);
            var isDarkOrNot = (bool?)SettingsHelper.ReadSettingsValue(SettingsConstants.IsDarkThemeOrNot) ?? true;

            RequestedTheme = isDarkOrNot ? ElementTheme.Dark : ElementTheme.Light;
            RegisterAllTaskAsync();
        }
Ejemplo n.º 2
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));
 }
Ejemplo n.º 3
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));
 }
Ejemplo n.º 4
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 InitMainPageState()
        {
            NavigateManager.BackRequested += OnBackRequested;
            var isDarkOrNot = (bool?)SettingsHelper.ReadSettingsValue(SettingsConstants.IsDarkThemeOrNot) ?? true;

            RequestedTheme = isDarkOrNot ? ElementTheme.Dark : ElementTheme.Light;
            ChangeTitlePath(1, navigateTitlePath.Text);
            StatusBarInit.InitInnerDesktopStatusBar(true);
            Window.Current.SetTitleBar(BasePartBorder);
            LoginClient = UnRedirectHttpClient;
            IfNeedAdapteVitualNavigationBar();
            InitSlideRecState();

            /// Change for Windows Store

            AutoLoginIfNeed();

            ///
        }
Ejemplo n.º 6
0
        public MainPage()
        {
            this.InitializeComponent();
            Current = this;
            baseListRing.IsActive = true;
            PrepareFrame.Navigate(typeof(PreparePage));
            var isDarkOrNot = (bool?)SettingsHelper.ReadSettingsValue(SettingsConstants.IsDarkThemeOrNot) ?? true;

            RequestedTheme = isDarkOrNot ? ElementTheme.Dark : ElementTheme.Light;
            NavigateManager.BackRequested += OnBackRequested;
            MainContentFrame  = this.ContentFrame;
            BaseListRing      = this.baseListRing;
            NavigateTitlePath = this.navigateTitlePath;
            ChangeTitlePath(NaviPathTitle.RoutePath);
            StatusBarInit.InitInnerDesktopStatusBar(true);
            Window.Current.SetTitleBar(BasePartBorder);
            IfNeedAdapteVitualNavigationBar();
            InitSlideRecState();
            GetResources();
        }
 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));
     }
 }