Пример #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 void SavedDarkMode()
 {
     UtilityData.isFacebookDark  = (bool)UtilityClass.ApplicationDataBool("EnableDarkMode(F)", true);
     UtilityData.isTwitterDark   = (bool)UtilityClass.ApplicationDataBool("EnableDarkMode(Twitter)", true);
     UtilityData.isInstagramDark = (bool)UtilityClass.ApplicationDataBool("EnableDarkMode(I)", true);
     UtilityData.isTelegramDark  = (bool)UtilityClass.ApplicationDataBool("EnableDarkMode(Telegram)", true);
     UtilityData.isWhatsAppDark  = (bool)UtilityClass.ApplicationDataBool("EnableDarkMode(WhatsApp)", true);
 }
Пример #3
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();
            }
        }
Пример #4
0
 private void TelegramLicense()
 {
     btTelegram.Visibility = Visibility.Visible;
     if (ApplicationData.Current.RoamingSettings.Values.ContainsKey(UtilityData.UpTelegram))
     {
         if ((bool)ApplicationData.Current.RoamingSettings.Values[UtilityData.UpTelegram] == true)
         {
             btTelegram.Visibility    = (bool)UtilityClass.ApplicationDataBool("Hide(Tele)", false) ? Visibility.Collapsed : Visibility.Visible;
             tbTelegramIAP.Visibility = Visibility.Collapsed;
             tbTelegramIAPx.Text      = "Telegram";
             return;
         }
     }
     tbTelegramIAP.Visibility = Visibility.Visible;
     tbTelegramIAPx.Text      = "Unlock Telegram";
 }
Пример #5
0
 private void OneTimeSave()
 {
     try
     {
         storeContext = StoreContext.GetDefault();
     }
     catch (Exception)
     {
     }
     if (ApiInformation.IsTypePresent("Windows.UI.Xaml.Media.AcrylicBrush"))
     {
         tgsFluentDesign.Visibility = Visibility.Visible;
         if (ApplicationData.Current.LocalSettings.Values.ContainsKey("isFluentDesign"))
         {
             tgsFluentDesign.IsOn = (bool)ApplicationData.Current.LocalSettings.Values["isFluentDesign"];
         }
         else
         {
             tgsFluentDesign.IsOn = true;
         }
     }
     else
     {
         tgsFluentDesign.Visibility = Visibility.Collapsed;
     }
     prClearCache.Visibility = Visibility.Collapsed;
     HideCompactMenu.IsOn    = (bool)UtilityClass.ApplicationDataBool("HideCompactMenu", false);
     if (ApplicationData.Current.LocalSettings.Values.ContainsKey("defaultPin"))
     {
         defaultPin.IsChecked = (bool)ApplicationData.Current.LocalSettings.Values["defaultPin"];
     }
     if (ApplicationData.Current.LocalSettings.Values.ContainsKey("WindowsHello"))
     {
         WindowsHelloPin.IsChecked = (bool)ApplicationData.Current.LocalSettings.Values["WindowsHello"];
     }
     if (ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons"))
     {
         chbbthardwareBack.IsChecked  = (bool)UtilityClass.ApplicationDataBool("bthardwareBack", false);
         chbbthardwareBack.Visibility = Visibility.Visible;
     }
     else
     {
         chbbthardwareBack.Visibility = Visibility.Collapsed;
     }
 }
Пример #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 void HideListView()
        {
            btFaceBook.Visibility  = (bool)UtilityClass.ApplicationDataBool("Hide(F)", false) ? Visibility.Collapsed : Visibility.Visible;
            btTwitter.Visibility   = (bool)UtilityClass.ApplicationDataBool("Hide(Tw)", false) ? Visibility.Collapsed : Visibility.Visible;
            btInstagram.Visibility = (bool)UtilityClass.ApplicationDataBool("Hide(I)", false) ? Visibility.Collapsed : Visibility.Visible;
            btReddit.Visibility    = (bool)UtilityClass.ApplicationDataBool("Hide(R)", false) ? Visibility.Collapsed : Visibility.Visible;
            //btGoogle.Visibility = (bool)UtilityClass.ApplicationDataBool("Hide(G)", false) ? Visibility.Collapsed : Visibility.Visible;

            if (ApplicationData.Current.LocalSettings.Values.ContainsKey("Hide(Mix)"))
            {
                if ((bool)ApplicationData.Current.LocalSettings.Values["Hide(Mix)"] == true)
                {
                    btMix.Visibility = Visibility.Collapsed;
                }
                else if ((bool)ApplicationData.Current.LocalSettings.Values["Hide(Mix)"] == false)
                {
                    btMix.Visibility = Visibility.Visible;
                }
            }

            if (UtilityData.isFirstAppRun)
            {
                ApplicationData.Current.LocalSettings.Values["Hide(Wh)"] = true;
                btWhatsApp.Visibility     = Visibility.Collapsed;
                UtilityData.isFirstAppRun = false;
            }
            else
            {
                if (ApplicationData.Current.LocalSettings.Values.ContainsKey("Hide(Wh)"))
                {
                    if ((bool)ApplicationData.Current.LocalSettings.Values["Hide(Wh)"] == true)
                    {
                        btWhatsApp.Visibility = Visibility.Collapsed;
                    }
                    else if ((bool)ApplicationData.Current.LocalSettings.Values["Hide(Wh)"] == false)
                    {
                        btWhatsApp.Visibility = Visibility.Visible;
                    }
                }
            }
        }
Пример #8
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            if (ApiInformation.IsTypePresent("Windows.ApplicationModel.Core.CoreApplicationViewTitleBar") && Microsoft.Toolkit.Uwp.Helpers.SystemInformation.DeviceFamily == "Windows.Desktop")
            {
                gdTitleBar.Visibility = Visibility.Visible;
                CoreApplicationViewTitleBar coreTitleBar = CoreApplication.GetCurrentView().TitleBar;
                coreTitleBar.ExtendViewIntoTitleBar = true;
                Window.Current.SetTitleBar(gdTitleBar);
            }
            else
            {
                gdTitleBar.Visibility = Visibility.Collapsed;
            }

            UtilityData.LinksSetting = (int)UtilityClass.ApplicationDataBool("cbExtLinks", 3);
            isHideCompactMenu        = (bool)UtilityClass.ApplicationDataBool("HideCompactMenu", false);

            if (!isMenuPinned)
            {
                mySplitsview.IsPaneOpen = true;
                mySplitsview.IsPaneOpen = false;
            }

            HideCompactMenu();

            HideListView();

            InAppPurchaseLicense();
            try
            {
                if (e.Parameter == null || (string)e.Parameter == "")
                {
                    if (mylistbox.SelectedIndex == -1)
                    {
                        pageselection();
                    }
                }
                else
                {
                    switch ((string)e.Parameter)
                    {
                    case "jplFacebook":
                        mylistbox.SelectedIndex = 5;
                        break;

                    case "jplTwitter":
                        mylistbox.SelectedIndex = 0;
                        break;

                    case "jplTelegram":
                        mylistbox.SelectedIndex = 2;
                        break;

                    //case "jplWhatsApp":
                    //    mylistbox.SelectedIndex = 3;
                    //    break;
                    case "jplReddit":
                        mylistbox.SelectedIndex = 4;
                        break;

                    case "jplInstagram":
                        mylistbox.SelectedIndex = 1;
                        break;

                    case "jplSplitView":
                        mylistbox.SelectedIndex = 7;
                        break;
                    }
                }
            }
            catch (Exception)
            {
                if (mylistbox.SelectedIndex == -1)
                {
                    pageselection();
                }
            }
            if (ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons"))
            {
                UtilityData.isbtHardwareBack = (bool)UtilityClass.ApplicationDataBool("bthardwareBack", false);
            }
        }
Пример #9
0
        private void OneTimeSave()
        {
            try
            {
                storeContext = StoreContext.GetDefault();
            }
            catch (Exception)
            {
            }

            isMenuPinned = (bool)UtilityClass.ApplicationDataBool("isMenuPinned", false);

            if (SystemInformation.DeviceFamily == "Windows.Mobile")
            {
                btPinSplitView.Visibility = Visibility.Collapsed;
            }
            //UserAgentHelper.SetDefaultUserAgent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36");

            if (ApiInformation.IsTypePresent("Windows.UI.Xaml.Media.AcrylicBrush"))
            {
                UtilityData.isFluentDesign = (bool)UtilityClass.ApplicationDataBool("isFluentDesign", true);
            }
            else
            {
                UtilityData.isFluentDesign = false;
            }
            //UtilityData.isFluentDesign = false;
            try
            {
                if (UtilityData.isFluentDesign)
                {
                    topAcrylicBrush = new AcrylicBrush()
                    {
                        FallbackColor    = ((SolidColorBrush)rpWeb.Background).Color,
                        TintColor        = ((SolidColorBrush)rpWeb.Background).Color,
                        TintOpacity      = 0.7,
                        BackgroundSource = AcrylicBackgroundSource.HostBackdrop
                    };
                    HamburgerAcrylicBrush = new AcrylicBrush()
                    {
                        FallbackColor    = ((SolidColorBrush)mySplitsview.PaneBackground).Color,
                        TintColor        = ((SolidColorBrush)mySplitsview.PaneBackground).Color,
                        TintOpacity      = 0.7,
                        BackgroundSource = AcrylicBackgroundSource.HostBackdrop
                    };
                    // Fluent Button Style
                    bthamburger.Style = Application.Current.Resources["ButtonRevealStyle"] as Style;
                }
            }
            catch (Exception)
            {
                UtilityData.isFluentDesign = false;
            }
            if (ApiInformation.IsTypePresent("Windows.ApplicationModel.Core.CoreApplicationViewTitleBar") && Microsoft.Toolkit.Uwp.Helpers.SystemInformation.DeviceFamily == "Windows.Desktop")
            {
                CoreApplicationViewTitleBar coreTitleBar = CoreApplication.GetCurrentView().TitleBar;
                coreTitleBar.LayoutMetricsChanged += (s, a) =>
                {
                    gdTitleBar.Margin = new Thickness(coreTitleBar.SystemOverlayLeftInset, 0, 0, 0);
                };
                coreTitleBar.IsVisibleChanged += (s, a) => { gdTitleBar.Visibility = coreTitleBar.IsVisible ? Visibility.Visible : Visibility.Collapsed; };
            }

            SavedDarkMode();

            PinnedMenuHelper(isMenuPinned);
        }
Пример #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();
        }