Esempio n. 1
0
        private void EnableDarkMode_Toggled(object sender, RoutedEventArgs e)
        {
            ToggleSwitch toggleSwitch = sender as ToggleSwitch;

            ApplicationData.Current.LocalSettings.Values["EnableDarkMode(I)"] = EnableDarkMode.IsOn;
            if (toggleSwitch != null)
            {
                if (toggleSwitch.IsOn == true)
                {
                    spContentSplitView.Background = new SolidColorBrush(UtilityClass.ConvertStringToColor("#1e1e1e"));
                    style();
                }
                else
                {
                    spContentSplitView.Background = new SolidColorBrush(UtilityClass.ConvertStringToColor("#8D3EBB"));
                    web.Refresh();
                }
            }
            UtilityData.isInstagramDark = EnableDarkMode.IsOn;
            if (!isFirstLoaded)
            {
                MainPage.ncSettings.setSettings = "Instagram";
            }

            _ucCommandBar.cbAppbar.Background = MainPage.topSCBrush;
        }
Esempio n. 2
0
        public void ChangeColor(string color)
        {
            if (color == "#1a1a1a" && topSCBrush != null && topSCBrush.Color == Color.FromArgb(255, 26, 26, 26))
            {
                return;
            }

            SolidColorBrush scbColor = new SolidColorBrush(UtilityClass.ConvertStringToColor(color));

            if (scbColor != null)
            {
                topSCBrush       = scbColor;
                rpWeb.Background = scbColor;
                UtilityClass.titlebar(scbBrush: scbColor);
                ucCommandBar.scbColor = scbColor;

                if (UtilityData.isFluentDesign)
                {
                    ((AcrylicBrush)HamburgerAcrylicBrush).TintColor        = scbColor.Color;
                    ((AcrylicBrush)HamburgerAcrylicBrush).FallbackColor    = scbColor.Color;
                    ((AcrylicBrush)HamburgerAcrylicBrush).BackgroundSource = AcrylicBackgroundSource.HostBackdrop;
                    mySplitsview.PaneBackground = HamburgerAcrylicBrush;

                    ((AcrylicBrush)topAcrylicBrush).TintColor        = scbColor.Color;
                    ((AcrylicBrush)topAcrylicBrush).FallbackColor    = scbColor.Color;
                    ((AcrylicBrush)topAcrylicBrush).BackgroundSource = AcrylicBackgroundSource.HostBackdrop;
                    //rpWeb.Background = topAcrylicBrush;
                }
                else
                {
                    mySplitsview.PaneBackground = rpWeb.Background;
                }
            }
        }
Esempio n. 3
0
        private async void OneTimeSave()
        {
            isFirstLoaded                      = true;
            EnableNotification.IsOn            = (bool)UtilityClass.ApplicationDataBool("Notification(WhatsApp)", true);
            _ucCommandBar.btsetting.Visibility = Visibility.Visible;
            EnableDarkMode.IsOn                = UtilityData.isWhatsAppDark;
            if (!EnableDarkMode.IsOn)
            {
                spContentSplitView.Background = new SolidColorBrush(UtilityClass.ConvertStringToColor("#009688"));
            }

            if (UtilityData.isFluentDesign)
            {
                _ucCommandBar.cbAppbar.Style = Application.Current.Resources["CommandBarRevealStyle"] as Style;
            }

            cssToApply = UtilityData.getCss("WhatsApp");
            style();
            var _cssToApply = await UtilityClass.serverStyle("http://rebrand.ly/oneWhatsApp", "WhatsApp", "DesktopMain");

            if (_cssToApply != "")
            {
                var result = _cssToApply.Split(new[] { '\r', '\n' });
                if (result != null && result[0] != null)
                {
                    styleDisplayNone += result[0];
                }
                cssToApply = _cssToApply;
                style();
            }
        }
Esempio n. 4
0
        private async void OneTimeSave()
        {
            isFirstLoaded = true;
            try
            {
                if (ApplicationView.GetForCurrentView().IsViewModeSupported(ApplicationViewMode.CompactOverlay))
                {
                    _ucCommandBar.btCompactOverlay.Visibility = Visibility.Visible;
                    _ucCommandBar.btCompactOverlay.Click     += btCompactOverlay_Click;
                }
            }
            catch (Exception)
            {
            }
            _ucCommandBar.btsetting.Visibility = Visibility.Visible;
            cbLiteItems.Visibility             = _ucCommandBar.btforward.Visibility;
            if (cbLiteItems.Visibility == Visibility.Visible)
            {
                cbLiteItems.SelectedIndex = (int)UtilityClass.ApplicationDataBool("(Twit)cbLiteItems", 1);
                cbLiteItemsSelection();
            }
            else
            {
                web.Source = new Uri("https://twitter.com/login");
            }

            chbGoToTop.IsChecked = (bool)UtilityClass.ApplicationDataBool("isGoToTop(Twit)", false);

            EnableDarkMode.IsOn = UtilityData.isTwitterDark;
            if (!EnableDarkMode.IsOn)
            {
                spContentSplitView.Background = new SolidColorBrush(UtilityClass.ConvertStringToColor("#138BDE"));
            }

            if (UtilityData.isFluentDesign)
            {
                _ucCommandBar.cbAppbar.Style = Application.Current.Resources["CommandBarRevealStyle"] as Style;
            }

            DesktopCss = UtilityData.getCss("DTwit");
            MobileCss  = UtilityData.getCss("MTwit");
            style();
            DownloadMobileCss();
            var _DesktopCss = await UtilityClass.serverStyle("https://rebrand.ly/TwitDesktopMain", "Twitter", "DesktopMain");

            if (_DesktopCss != "")
            {
                var result = _DesktopCss.Split(new[] { '\r', '\n' });
                if (result != null && result[0] != null)
                {
                    styleDisplayNone += result[0];
                }
                DesktopCss = _DesktopCss;
                style();
            }
        }
Esempio n. 5
0
        private async void EnableDarkMode_Toggled(object sender, RoutedEventArgs e)
        {
            ToggleSwitch toggleSwitch = sender as ToggleSwitch;

            ApplicationData.Current.LocalSettings.Values["EnableDarkMode(Twitter)"] = EnableDarkMode.IsOn;
            if (toggleSwitch != null)
            {
                if (toggleSwitch.IsOn == true)
                {
                    spContentSplitView.Background = new SolidColorBrush(UtilityClass.ConvertStringToColor("#171717"));
                    web.DefaultBackgroundColor    = (spContentSplitView.Background as SolidColorBrush).Color;
                    style();
                }
                else
                {
                    spContentSplitView.Background = new SolidColorBrush(UtilityClass.ConvertStringToColor("#138BDE"));
                    web.DefaultBackgroundColor    = Colors.White;
                    web.Refresh();
                }
                UtilityData.isTwitterDark = EnableDarkMode.IsOn;
                if (!isFirstLoaded)
                {
                    MainPage.ncSettings.setSettings = "Twitter";
                }
                await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal,
                                                                              () =>
                {
                    _ucCommandBar.Background = ucCommandBar.scbColor;
                });

                //if (UtilityData.isFluentDesign)
                //{
                //    ContentSplitView.PaneBackground = new AcrylicBrush()
                //    {
                //        FallbackColor = ((SolidColorBrush)ContentSplitView.PaneBackground).Color,
                //        TintColor = ((SolidColorBrush)ContentSplitView.PaneBackground).Color,
                //        TintOpacity = 0.6,
                //        BackgroundSource = AcrylicBackgroundSource.Backdrop
                //    };
                //}
                //else
                //{
                //    _ucCommandBar.cbAppbar.Background = MainPage.topSCBrush;
                //}
                _ucCommandBar.cbAppbar.Background = MainPage.topSCBrush;
            }
        }
Esempio n. 6
0
        private async void OneTimeSave()
        {
            isFirstLoaded = true;
            try
            {
                if (ApplicationView.GetForCurrentView().IsViewModeSupported(ApplicationViewMode.CompactOverlay))
                {
                    _ucCommandBar.btCompactOverlay.Visibility = Visibility.Visible;
                    _ucCommandBar.btCompactOverlay.Click     += btCompactOverlay_Click;
                }
            }
            catch (Exception)
            {
            }
            _ucCommandBar.btsetting.Visibility = Visibility.Visible;

            chbGoToTop.IsChecked = (bool)UtilityClass.ApplicationDataBool("isGoToTop(Insta)", false);

            EnableDarkMode.IsOn = UtilityData.isInstagramDark;
            if (!EnableDarkMode.IsOn)
            {
                spContentSplitView.Background = new SolidColorBrush(UtilityClass.ConvertStringToColor("#8D3EBB"));
            }

            if (UtilityData.isFluentDesign)
            {
                _ucCommandBar.cbAppbar.Style = Application.Current.Resources["CommandBarRevealStyle"] as Style;
            }

            DesktopCss = UtilityData.getCss("Insta");
            style();
            var _DesktopCss = await UtilityClass.serverStyle("https://rebrand.ly/InstaMain", "Instagram", "InstaMain");

            if (_DesktopCss != "")
            {
                var result = _DesktopCss.Split(new[] { '\r', '\n' });
                if (result != null && result[0] != null)
                {
                    styleDisplayNone = result[0];
                }
                DesktopCss = _DesktopCss;
                style();
            }
        }
Esempio n. 7
0
        private void EnableDarkMode_Toggled(object sender, RoutedEventArgs e)
        {
            ToggleSwitch toggleSwitch = sender as ToggleSwitch;

            ApplicationData.Current.LocalSettings.Values["EnableDarkMode(F)"] = EnableDarkMode.IsOn;
            if (toggleSwitch != null)
            {
                if (toggleSwitch.IsOn == true)
                {
                    spContentSplitView.Background = new SolidColorBrush(UtilityClass.ConvertStringToColor("#171717"));
                    style();
                }
                else
                {
                    spContentSplitView.Background = new SolidColorBrush(UtilityClass.ConvertStringToColor("#4267B2"));
                    web.Refresh();
                }
            }
            UtilityData.isFacebookDark = EnableDarkMode.IsOn;
            if (!isFirstLoaded || ucCommandBar.scbColor == null)
            {
                MainPage.ncSettings.setSettings = "Facebook";
            }

            _ucCommandBar.Background = ucCommandBar.scbColor;
            //if (UtilityData.isFluentDesign)
            //{
            //    ContentSplitView.PaneBackground = new AcrylicBrush()
            //    {
            //        FallbackColor = ((SolidColorBrush)ContentSplitView.PaneBackground).Color,
            //        TintColor = ((SolidColorBrush)ContentSplitView.PaneBackground).Color,
            //        TintOpacity = 0.6,
            //        BackgroundSource = AcrylicBackgroundSource.Backdrop
            //    };
            //}
            //else
            //{
            //    _ucCommandBar.cbAppbar.Background = MainPage.topSCBrush;
            //}
            _ucCommandBar.cbAppbar.Background = MainPage.topSCBrush;
        }
Esempio n. 8
0
        private void EnableDarkMode_Toggled(object sender, RoutedEventArgs e)
        {
            ApplicationData.Current.LocalSettings.Values["EnableDarkMode(Telegram)"] = EnableDarkMode.IsOn;
            if (EnableDarkMode.IsOn == true)
            {
                spContentSplitView.Background = new SolidColorBrush(UtilityClass.ConvertStringToColor("#171717"));
                style();
            }
            else
            {
                spContentSplitView.Background = new SolidColorBrush(UtilityClass.ConvertStringToColor("#5682A3"));
                web.Refresh();
            }
            UtilityData.isTelegramDark = EnableDarkMode.IsOn;
            if (!isFirstLoaded)
            {
                MainPage.ncSettings.setSettings = "Telegram";
            }

            _ucCommandBar.cbAppbar.Background = MainPage.topSCBrush;
        }
Esempio n. 9
0
        private async void OneTimeSave()
        {
            isFirstLoaded = true;
            try
            {
                if (ApplicationView.GetForCurrentView().IsViewModeSupported(ApplicationViewMode.CompactOverlay))
                {
                    _ucCommandBar.btCompactOverlay.Visibility = Visibility.Visible;
                    _ucCommandBar.btCompactOverlay.Click     += btCompactOverlay_Click;
                }
            }
            catch (Exception)
            {
            }
            // EnableNotification.IsOn = (bool)Utility.ApplicationDataBool("Notification(Telegram)", true);
            _ucCommandBar.btsetting.Visibility = Visibility.Visible;
            EnableDarkMode.IsOn = UtilityData.isTelegramDark;
            if (!EnableDarkMode.IsOn)
            {
                spContentSplitView.Background = new SolidColorBrush(UtilityClass.ConvertStringToColor("#5682A3"));
            }

            if (UtilityData.isFluentDesign)
            {
                _ucCommandBar.cbAppbar.Style = Application.Current.Resources["CommandBarRevealStyle"] as Style;
            }

            TeleCss = UtilityData.getCss("Tele");
            style();
            var _TeleCss = await UtilityClass.serverStyle("https://rebrand.ly/TeleMain", "Telegram", "TeleMain");

            if (_TeleCss != "")
            {
                TeleCss = _TeleCss;
                style();
            }
        }
Esempio n. 10
0
        private async void OneTimeSave()
        {
            isFirstLoaded = true;
            try
            {
                if (ApplicationView.GetForCurrentView().IsViewModeSupported(ApplicationViewMode.CompactOverlay))
                {
                    _ucCommandBar.btCompactOverlay.Visibility = Visibility.Visible;
                    _ucCommandBar.btCompactOverlay.Click     += btCompactOverlay_Click;
                }
            }
            catch (Exception)
            {
            }

            _ucCommandBar.btsetting.Visibility = Visibility.Visible;
            cbLiteItems.Visibility             = _ucCommandBar.btforward.Visibility;

            chbGoToTop.IsChecked = (bool)UtilityClass.ApplicationDataBool("isGoToTop(FB)", false);
            if (cbLiteItems.Visibility == Visibility.Visible)
            {
                cbLiteItems.SelectedIndex = (int)UtilityClass.ApplicationDataBool("(FB)cbLiteItems", 0);
                cbLiteItemsSelection();
            }
            else
            {
                web.Source = new Uri("https://m.facebook.com");
            }

            EnableDarkMode.IsOn = UtilityData.isFacebookDark;
            if (!EnableDarkMode.IsOn)
            {
                spContentSplitView.Background = new SolidColorBrush(UtilityClass.ConvertStringToColor("#4267B2"));
            }

            if (UtilityData.isFluentDesign)
            {
                _ucCommandBar.cbAppbar.Style = Application.Current.Resources["CommandBarRevealStyle"] as Style;
            }

            DesktopCss = UtilityData.getCss("DFb");
            MobileCss  = UtilityData.getCss("MFb");
            style();

            StartDarkModeDispatcher();

            DownloadMobileCss();

            var _DesktopCss = await UtilityClass.serverStyle("https://rebrand.ly/fbDesktopMain", "Facebook", "DesktopMain");

            if (_DesktopCss != "")
            {
                var result = _DesktopCss.Split(new[] { '\r', '\n' });
                if (result != null && result[0] != null)
                {
                    styleDisplayNone += result[0];
                }
                DesktopCss = _DesktopCss;
                style();
            }


            //if (ApplicationData.Current.LocalSettings.Values.ContainsKey("TotalUsage(FB)"))
            //{
            //    TotalUsageTime = (int)ApplicationData.Current.LocalSettings.Values["TotalUsage(FB)"];
            //}
            //UsageTimerStart();
        }