void SetText() { UkName.Text = Settings.MobileSettings.main_name; if (!string.IsNullOrWhiteSpace(Settings.Person.companyPhone)) { LabelPhone.Text = "+" + Settings.Person.companyPhone.Replace("+", ""); } else { IconViewLogin.IsVisible = false; LabelPhone.IsVisible = false; } LabelTitle.Text = _pollInfo.Name; FrameBtnNext.BackgroundColor = (Color)Application.Current.Resources["MainColor"]; FrameBtnFinish.BackgroundColor = (Color)Application.Current.Resources["MainColor"]; Color hexColor = (Color)Application.Current.Resources["MainColor"]; IconViewLogin.SetAppThemeColor(IconView.ForegroundProperty, hexColor, Color.White); //IconViewTech.SetAppThemeColor(IconView.ForegroundProperty, hexColor, Color.Black); Pancake.SetAppThemeColor(PancakeView.BorderColorProperty, hexColor, Color.Transparent); PancakeViewIcon.SetAppThemeColor(PancakeView.BorderColorProperty, hexColor, Color.Transparent); if (Device.RuntimePlatform == Device.iOS) { if (AppInfo.PackageName == "rom.best.saburovo" || AppInfo.PackageName == "sys_rom.ru.tsg_saburovo") { PancakeViewIcon.Padding = new Thickness(0); } } //LabelTech.SetAppThemeColor(Label.TextColorProperty, hexColor, Color.Black); Color unselect = hexColor.AddLuminosity(0.3); FrameBack.SetAppThemeColor(Frame.BackgroundColorProperty, unselect, Color.FromHex("#4A4A4A")); StackLayoutIndicator.SetAppThemeColor(StackLayout.BackgroundColorProperty, unselect, Color.White); }
public OSSPool(OSS oSS) { InitializeComponent(); Analytics.TrackEvent("Вопросы ОСС"); NavigationPage.SetHasNavigationBar(this, false); var profile = new TapGestureRecognizer(); profile.Tapped += async(s, e) => { if (Navigation.NavigationStack.FirstOrDefault(x => x is ProfilePage) == null) { await Navigation.PushAsync(new ProfilePage()); } }; IconViewProfile.GestureRecognizers.Add(profile); var techSend = new TapGestureRecognizer(); techSend.Tapped += async(s, e) => { await Navigation.PushAsync(new AppPage()); }; LabelTech.GestureRecognizers.Add(techSend); var call = new TapGestureRecognizer(); call.Tapped += async(s, e) => { if (Settings.Person.Phone != null) { IPhoneCallTask phoneDialer; phoneDialer = CrossMessaging.Current.PhoneDialer; if (phoneDialer.CanMakePhoneCall && !string.IsNullOrWhiteSpace(Settings.Person.companyPhone)) { phoneDialer.MakePhoneCall(System.Text.RegularExpressions.Regex.Replace(Settings.Person.companyPhone, "[^+0-9]", "")); } } }; switch (Device.RuntimePlatform) { case Device.iOS: int statusBarHeight = DependencyService.Get <IStatusBar>().GetHeight(); Pancake.Padding = new Thickness(0, statusBarHeight, 0, 0); //BackgroundColor = Color.White; break; default: break; } var backClick = new TapGestureRecognizer(); backClick.Tapped += async(s, e) => { ClosePage(); }; BackStackLayout.GestureRecognizers.Add(backClick); UkName.Text = Settings.MobileSettings.main_name; //FrameBack.BackgroundColor = colorFromMobileSettings; FrameBtnNext.BackgroundColor = colorFromMobileSettings; FrameBtnFinish.BackgroundColor = colorFromMobileSettings; var nextClick = new TapGestureRecognizer(); nextClick.Tapped += async(s, e) => { NextQuest(); }; FrameBtnNext.GestureRecognizers.Add(nextClick); //var backClickQuest = new TapGestureRecognizer(); //backClickQuest.Tapped += async (s, e) => { BackQuest(); }; //FrameBack.GestureRecognizers.Add(backClickQuest); var finishClick = new TapGestureRecognizer(); finishClick.Tapped += async(s, e) => { FinishClick(); }; FrameBtnFinish.GestureRecognizers.Add(finishClick); _oss = oSS; for (int qNow = 0; qNow < _oss.Questions.Count; qNow++) { if (!string.IsNullOrWhiteSpace(_oss.Questions[qNow].Answer)) { quest++; } } setIndicator(); setQuest(); setQuestVisible(); ChechQuestions(); setVisibleButton(); SetQuestion(quest); if (quest > 0) { visibleIndicator(quest, true); } if (ProtokolStackL.IsVisible) { urlProtokol.TextColor = colorFromMobileSettings; urlProtokol.GestureRecognizers.Add(new TapGestureRecognizer { Command = new Command(async() => await Launcher.OpenAsync(fileLink)) }); } pdf2.Foreground = colorFromMobileSettings; Color hexColor = (Color)Application.Current.Resources["MainColor"]; FramePool.SetAppThemeColor(Frame.BorderColorProperty, hexColor, Color.White); //IconViewTech.SetAppThemeColor(IconView.ForegroundProperty, hexColor, Color.White); //LabelTech.SetAppThemeColor(Label.TextColorProperty, hexColor, Color.White); Color unselect = hexColor.AddLuminosity(0.3); StackLayoutIndicator.SetAppThemeColor(StackLayout.BackgroundColorProperty, unselect, Color.White); }