コード例 #1
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();
            }
        }
コード例 #2
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();
            }
        }
コード例 #3
0
        private async void DownloadMobileCss()
        {
            var _MobileCss = await UtilityClass.serverStyle("https://rebrand.ly/TwitMobileMain", "Twitter", "MobileMain");

            if (_MobileCss != "")
            {
                var result = _MobileCss.Split(new[] { '\r', '\n' });
                if (result != null && result[0] != null)
                {
                    styleDisplayNone = result[0];
                }
                MobileCss = _MobileCss;
                style();
            }
        }
コード例 #4
0
        private async void btRefreshDarkMode_Click(object sender, RoutedEventArgs e)
        {
            btRefreshDarkMode.IsEnabled = false;
            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();
                btRefreshDarkMode.IsEnabled = true;
            }
        }
コード例 #5
0
        private async void btRefreshDarkMode_Click(object sender, RoutedEventArgs e)
        {
            btRefreshDarkMode.IsEnabled = false;
            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();
            }
            btRefreshDarkMode.IsEnabled = true;
        }
コード例 #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();
            }
        }
コード例 #7
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();
            }
        }
コード例 #8
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();
        }