private void setCurrentClientTheme() { btnSaveAccount.BackgroundColor = IosHelper.FromHexString(GeneralSettings.ButtonBackgroundColor); btnSaveAccount.SetTitleColor(IosHelper.FromHexString(GeneralSettings.ButtonTextColor), UIControlState.Normal); this.Title = Lang.ACCOUNT_MY_ACCOUNT; try { if (Joyces.GeneralSettings.MainFont != null) { lblEditAccountFirstName.Font = ThemeHelperIOS.GetThemeFont(17); lblEditAccountLastName.Font = ThemeHelperIOS.GetThemeFont(17); lblEditAccountMobile.Font = ThemeHelperIOS.GetThemeFont(17); txtFirstname.Font = ThemeHelperIOS.GetThemeFont(17); txtMobileNo.Font = ThemeHelperIOS.GetThemeFont(17); txtLastname.Font = ThemeHelperIOS.GetThemeFont(17); btnSaveAccount.Font = ThemeHelperIOS.GetThemeFont(17); } lblEditAccountFirstName.Text = Lang.EDIT_ACCOUNT_FIRSTNAME; lblEditAccountLastName.Text = Lang.EDIT_ACCOUNT_LASTNAME; lblEditAccountMobile.Text = Lang.ACCOUNT_MOBILE; btnSaveAccount.SetTitle(Lang.SAVE, UIControlState.Normal); setTitleTheme(); } catch (Exception e) { } try { this.View.BackgroundColor = ColorExtensions.ToUIColor(GeneralSettings.BackgroundColor); // Color.FromHex("#00FF00").ToUIColor(); } catch (Exception eee) { } }
public async override void ViewDidLoad() { if (!string.IsNullOrEmpty(IosHelper.getNSUserDefaults("offerImageURL"))) { ImageService.Instance.LoadUrl(IosHelper.getNSUserDefaults("offerImageURL")).Into(offerImage); } offerName.Text = IosHelper.getNSUserDefaults("offerName"); offerNote.Text = IosHelper.getNSUserDefaults("offerNote"); OfferValue.Text = IosHelper.getNSUserDefaults("offerValue"); lblValidDate.Text = Lang.VALID_UNTIL + " " + IosHelper.getNSUserDefaults("offerValidityDate"); OfferDutyText.Text = IosHelper.getNSUserDefaults("offerDutyText"); this.Title = offerName.Text; UIColor BorderColor = new UIColor(red: 0.71f, green: 0.70f, blue: 0.68f, alpha: 1.0f); lblOfferPanel.Layer.BorderColor = BorderColor.CGColor; lblOfferPanel.Layer.BorderWidth = 1; try { this.View.BackgroundColor = ColorExtensions.ToUIColor(GeneralSettings.BackgroundColor); // Color.FromHex("#00FF00").ToUIColor(); }catch (Exception eee) { } //Ska inte synas för Joyces // //offerCodeQR.Image = IosHelper.GetQrCode(IosHelper.getNSUserDefaults("offerCode"), 120, 120, 0); //offerCodeQRHolder.Layer.CornerRadius = 10f; //offerCodeQRHolder.Layer.MasksToBounds = true; //lblCode.Text = IosHelper.getNSUserDefaults("offerCode"); }
private void setCurrentClientTheme() { //btnCreateAccount.BackgroundColor = IosHelper.FromHexString(GeneralSettings.ButtonBackgroundColor); //btnCreateAccount.SetTitleColor(IosHelper.FromHexString(GeneralSettings.ButtonTextColor), UIControlState.Normal); this.Title = Lang.ID_HEADER; try { //var d = txtEmail; //d.set lblIdScanDescription.Text = Lang.ID_DESCRIPTION; lblIdLowerDescription.Text = Lang.ID_DESCRIPTION_NEWS; lblQRCodeBackground.BackgroundColor = IosHelper.FromHexString(GeneralSettings.BackgroundColorSpecific); if (Joyces.GeneralSettings.MainFont != null) { lblIdScanDescription.Font = ThemeHelperIOS.GetThemeFont(17); lblIdLowerDescription.Font = ThemeHelperIOS.GetThemeFont(14); } //try //{ // this.View.BackgroundColor = ColorExtensions.ToUIColor(GeneralSettings.BackgroundColor); // Color.FromHex("#00FF00").ToUIColor(); //} //catch (Exception eee) //{ //} setTitleTheme(); } catch (Exception e) { } }
private void setCurrentClientTheme() { btnCreateAccount.BackgroundColor = IosHelper.FromHexString(GeneralSettings.ButtonBackgroundColor); btnCreateAccount.SetTitleColor(IosHelper.FromHexString(GeneralSettings.ButtonTextColor), UIControlState.Normal); this.Title = Lang.CREATE_ACCOUNT; try { //var d = txtEmail; //d.set if (Joyces.GeneralSettings.MainFont != null) { txtEmail.Font = ThemeHelperIOS.GetThemeFont(17); txtMobileNo.Font = ThemeHelperIOS.GetThemeFont(17); txtPwd1.Font = ThemeHelperIOS.GetThemeFont(17); txtPwd2.Font = ThemeHelperIOS.GetThemeFont(17); txtPersNr.Font = ThemeHelperIOS.GetThemeFont(17); txtCountryCode.Font = ThemeHelperIOS.GetThemeFont(17); lblTerms.Font = ThemeHelperIOS.GetThemeFont(17); lblTermsText.Font = ThemeHelperIOS.GetThemeFont(14); lblTermsAccept.Font = ThemeHelperIOS.GetThemeFont(14); } lblTerms.Text = Lang.CREATE_ACCOUNT_TERMS_HEADER; lblTermsText.Text = Lang.CREATE_ACCOUNT_TERMS; // lblTermsText.TextAlignment = UITextAlignment.Left; lblTermsText.SizeToFit(); lblTermsAccept.Text = Lang.CREATE_ACCOUNT_ACCEPT_TERMS; txtEmail.Placeholder = Lang.EMAIL; if (btnCreateAccount != null) { try { btnCreateAccount.SetTitle(Lang.CREATE_ACCOUNT, UIControlState.Normal); btnCreateAccount.Font = ThemeHelperIOS.GetThemeFont(17); }catch (Exception ee) { } } try { this.View.BackgroundColor = ColorExtensions.ToUIColor(GeneralSettings.BackgroundColor); // Color.FromHex("#00FF00").ToUIColor(); } catch (Exception eee) { } string s = this.NavigationItem.Title; var x = this.NavigationItem.BackBarButtonItem; setTitleTheme(); // UIBarButtonItem buttonBack = new UIBarButtonItem("text", UIBarButtonItemStyle.Plain, (sender, args) => { }); // buttonBack.TintColor = UIColor.Red; // buttonBack. // this.NavigationItem.SetLeftBarButtonItem() //this.NavigationItem.SetLeftBarButtonItem(new UIBarButtonItem("text", UIBarButtonItemStyle.Plain, (sender, args) => { }), true); } catch (Exception e) { } }
private void setTitleTheme() { try { //TITLE FONT UIStringAttributes ats = new UIStringAttributes(); ats.Font = ThemeHelperIOS.GetThemeFont(17); //UIFont.FromName("Copperplate", 24); //ThemeHelperIOS.GetThemeFont(17); // ats.ForegroundColor = UIColor.Purple; this.NavigationController.NavigationBar.TitleTextAttributes = ats; //BACK BUTTON COLOR //this.NavigationController.NavigationBar.TintColor = IosHelper.FromHexString(GeneralSettings.ButtonTextColor);// UIColor.Magenta; //this.NavigationController.NavigationBar //UITextAttributes myTextAttrib = new UITextAttributes(); //myTextAttrib.Font = UIFont.FromName("Copperplate", 24); //myTextAttrib.TextColor = UIColor.FromRGB(202, 185, 131); //var attr = UINavigationBar.Appearance.GetTitleTextAttributes(); //UINavigationBar.Appearance.SetTitleTextAttributes(new UITextAttributes() // { // TextColor = UIColor.White, // TextShadowColor = UIColor.Clear // }); //this.NavigationController.NavigationBar.TitleTextAttributes = myTextAttrib; //myNavController.NavigationBar.SetTitleTextAttributes(myTextAttrib); //HEADER BACKGROUND COLOR this.NavigationController.NavigationBar.BarTintColor = IosHelper.FromHexString(GeneralSettings.BackgroundColor);// UIColor.Yellow; // UITextAttributes icoFontAttribute = new UITextAttributes(); // icoFontAttribute.Font = ThemeHelperIOS.GetThemeFont(17);// UIFont.FromName("icomoon", 24); // //icoFontAttribute.TextColor = UIColor.Red; // var btnMap = new UIBarButtonItem("text", UIBarButtonItemStyle.Bordered, (sender, args) => { }); //new UIBarButtonItem(); //// btnMap.SetBackButtonBackgroundImage(UIImage.FromFile("Images/iconbackarrow.png"), new UIControlState(), new UIBarMetrics()); // btnMap.SetBackgroundImage(UIImage.FromFile("Images/iconbackarrow.png"), new UIControlState(), new UIBarMetrics()); // // new UIBarButtonItem ("xe620", UIBarButtonItemStyle.Done, null); // btnMap.SetTitleTextAttributes(icoFontAttribute, UIControlState.Application); // btnMap.Title = "Login"; // btnMap.Style = UIBarButtonItemStyle.Done; // btnMap.TintColor = UIColor.Red; // this.NavigationItem.SetLeftBarButtonItem(btnMap, true); // var par = this.ParentViewController; //UIView v = new UIView() //v.TintColor = UIColor.Purple; //this.NavigationItem.TitleView = v; } catch (Exception e) { } }
async override public void ViewWillAppear(bool animated) { try { base.ViewWillAppear(animated); NavigationItem.RightBarButtonItem.TintColor = IosHelper.FromHexString(GeneralSettings.TabBarTint); setCurrentClientTheme(); } catch (Exception ex) { } }
private void setTitleTheme() { try { //TITLE FONT UIStringAttributes ats = new UIStringAttributes(); ats.Font = ThemeHelperIOS.GetThemeFont(17); //UIFont.FromName("Copperplate", 24); //ThemeHelperIOS.GetThemeFont(17); // ats.ForegroundColor = UIColor.Purple; this.NavigationController.NavigationBar.TitleTextAttributes = ats; this.NavigationController.NavigationBar.BarTintColor = IosHelper.FromHexString(GeneralSettings.BackgroundColor);// UIColor.Yellow; } catch (Exception e) { } }
public override void ViewDidLoad() { base.ViewDidLoad(); // Perform any additional setup after loading the view, typically from a nib. //var tbViewControllers = new List<UIViewController>(TabBarController.ViewControllers); //tbViewControllers.Insert(2, new RemvoedViewController()); //TabBarController.ViewControllers = tbViewControllers.ToArray(); UITabBar.Appearance.SelectedImageTintColor = IosHelper.FromHexString(GeneralSettings.TabBarTint); UITabBar.Appearance.TintColor = IosHelper.FromHexString(GeneralSettings.TabBarTint); try { this.View.BackgroundColor = ColorExtensions.ToUIColor(GeneralSettings.BackgroundColor); // Color.FromHex("#00FF00").ToUIColor(); } catch (Exception eee) { } }
/// <summary> /// /// </summary> private void setCurrentClientTheme() { btnResetPassword.BackgroundColor = IosHelper.FromHexString(GeneralSettings.ButtonBackgroundColor); btnResetPassword.SetTitleColor(IosHelper.FromHexString(GeneralSettings.ButtonTextColor), UIControlState.Normal); this.Title = Lang.FORGOT_PASSWORD; try { if (Joyces.GeneralSettings.MainFont != null) { txtForgotEmail.Font = ThemeHelperIOS.GetThemeFont(17); } txtForgotEmail.Placeholder = Lang.EMAIL; btnResetPassword.SetTitle(Lang.RESET_PASSWORD, UIControlState.Normal); setTitleTheme(); } catch (Exception e) { } }
public async override void ViewDidLoad() { if (!string.IsNullOrEmpty(IosHelper.getNSUserDefaults("newsImageURL"))) { ImageService.Instance.LoadUrl(IosHelper.getNSUserDefaults("newsImageURL")).Into(newsImage); } newsHeadline.Text = IosHelper.getNSUserDefaults("newsName"); newsDescription.Text = IosHelper.getNSUserDefaults("newsNote"); this.Title = newsHeadline.Text; UIColor BorderColor = new UIColor(red: 0.71f, green: 0.70f, blue: 0.68f, alpha: 1.0f); lblNewPanel.Layer.BorderColor = BorderColor.CGColor; lblNewPanel.Layer.BorderWidth = 1; try { this.View.BackgroundColor = ColorExtensions.ToUIColor(GeneralSettings.BackgroundColor); // Color.FromHex("#00FF00").ToUIColor(); } catch (Exception eee) { } }
private void setCurrentClientTheme() { btnLogout.BackgroundColor = IosHelper.FromHexString(GeneralSettings.ButtonBackgroundColor); btnLogout.SetTitleColor(IosHelper.FromHexString(GeneralSettings.ButtonTextColor), UIControlState.Normal); this.Title = Lang.ACCOUNT_MY_ACCOUNT; try { if (Joyces.GeneralSettings.MainFont != null) { lblAccountHeader.Font = ThemeHelperIOS.GetThemeFont(17); lblAccountEmail.Font = ThemeHelperIOS.GetThemeFont(17); lblAccountMobile.Font = ThemeHelperIOS.GetThemeFont(17); lblAccountName.Font = ThemeHelperIOS.GetThemeFont(17); txtEmail.Font = ThemeHelperIOS.GetThemeFont(17); txtMobileNo.Font = ThemeHelperIOS.GetThemeFont(17); txtName.Font = ThemeHelperIOS.GetThemeFont(17); btnLogout.Font = ThemeHelperIOS.GetThemeFont(17); } lblAccountHeader.Text = Lang.ACCOUNT_PERSONAL_DETAILS; lblAccountEmail.Text = Lang.EMAIL; lblAccountMobile.Text = Lang.ACCOUNT_MOBILE; lblAccountName.Text = Lang.ACCOUNT_NAME; btnLogout.SetTitle(Lang.LOGOUT, UIControlState.Normal); setTitleTheme(); } catch (Exception e) { } try { this.View.BackgroundColor = ColorExtensions.ToUIColor(GeneralSettings.BackgroundColor); // Color.FromHex("#00FF00").ToUIColor(); } catch (Exception eee) { } }
private void setCurrentClientTheme() { imageLogo.Image = UIImage.FromBundle(GeneralSettings.LogoLogin); UIColor backgroundColor = IosHelper.FromHexString(GeneralSettings.BackgroundColorSpecific); mainView.BackgroundColor = backgroundColor; btnForgotPassword.BackgroundColor = IosHelper.FromHexString(GeneralSettings.ButtonBackgroundColor); //backgroundColor; btnForgotPassword.SetTitleColor(IosHelper.FromHexString(GeneralSettings.ButtonTextColor), UIControlState.Normal); btnLogin.BackgroundColor = IosHelper.FromHexString(GeneralSettings.ButtonBackgroundColor); btnLogin.SetTitleColor(IosHelper.FromHexString(GeneralSettings.ButtonTextColor), UIControlState.Normal); btnRegister.BackgroundColor = IosHelper.FromHexString(GeneralSettings.ButtonBackgroundColor); btnRegister.SetTitleColor(IosHelper.FromHexString(GeneralSettings.ButtonTextColor), UIControlState.Normal); try { if (Joyces.GeneralSettings.MainFont != null) { btnRegister.Font = ThemeHelperIOS.GetThemeFont(17); btnLogin.Font = ThemeHelperIOS.GetThemeFont(17); btnForgotPassword.Font = ThemeHelperIOS.GetThemeFont(17); lblLoginPassword.Font = ThemeHelperIOS.GetThemeFont(17); lblUsername.Font = ThemeHelperIOS.GetThemeFont(17); txtName.Font = ThemeHelperIOS.GetThemeFont(17); txtPassword.Font = ThemeHelperIOS.GetThemeFont(17); } btnRegister.SetTitle(Lang.CREATE_ACCOUNT, UIControlState.Normal); btnLogin.SetTitle(Lang.LOGIN, UIControlState.Normal); btnForgotPassword.SetTitle(Lang.FORGOT_PASSWORD, UIControlState.Normal); lblLoginPassword.Text = Lang.PASSWORD; lblUsername.Text = Lang.EMAIL; } catch (Exception eee) { } }
void ProcessNotification(NSDictionary options, bool fromFinishedLaunching) { // Check to see if the dictionary has the aps key. This is the notification payload you would have sent if (null != options && options.ContainsKey(new NSString("aps"))) { //Get the aps dictionary NSDictionary aps = options.ObjectForKey(new NSString("aps")) as NSDictionary; string sActionKey = string.Empty; //Extract the alert text // NOTE: If you're using the simple alert by just specifying // " aps:{alert:"alert msg here"} ", this will work fine. // But if you're using a complex alert with Localization keys, etc., // your "alert" object from the aps dictionary will be another NSDictionary. // Basically the JSON gets dumped right into a NSDictionary, // so keep that in mind. if (aps.ContainsKey(new NSString("action-loc-key"))) { sActionKey = (aps[new NSString("action-loc-key")] as NSString).ToString(); IosHelper.setNSUserDefaults("actionKey", sActionKey); } //If this came from the ReceivedRemoteNotification while the app was running, // we of course need to manually process things like the sound, badge, and alert. //if (!fromFinishedLaunching) //{ // //Manually show an alert // if (!string.IsNullOrEmpty(sActionKey)) // { // UIAlertView avAlert = new UIAlertView("Notification", sActionKey, null, "OK", null); // avAlert.Show(); // } //} } }
async public override void ViewDidLoad() { base.ViewDidLoad(); try { if (string.IsNullOrEmpty(sUserAccountNumber)) { sUserAccountNumber = "0000"; } ImagePersonalQRCode.Image = IosHelper.GetQrCode(sUserAccountNumber, 240, 240, 0); lblCustomerId.Text = sUserAccountNumber; lblQRCodeBackground.Layer.CornerRadius = 10f; lblQRCodeBackground.Layer.MasksToBounds = true; qrCodePlaceHolderBorder.Layer.CornerRadius = 10f; qrCodePlaceHolderBorder.Layer.MasksToBounds = true; qrCodePlaceHolderBorder.Layer.BorderColor = UIColor.White.CGColor; qrCodePlaceHolderBorder.Layer.BorderWidth = 1f; if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0)) { var pushSettings = UIUserNotificationSettings.GetSettingsForTypes( UIUserNotificationType.Alert | UIUserNotificationType.Badge | UIUserNotificationType.Sound, new NSSet()); UIApplication.SharedApplication.RegisterUserNotificationSettings(pushSettings); UIApplication.SharedApplication.RegisterForRemoteNotifications(); } else { UIRemoteNotificationType notificationTypes = UIRemoteNotificationType.Alert | UIRemoteNotificationType.Badge | UIRemoteNotificationType.Sound; UIApplication.SharedApplication.RegisterForRemoteNotificationTypes(notificationTypes); } //string sAccessToken = Helpers.Settings.AccessToken; //string sUserEmail = Helpers.Settings.UserEmail; //if (!string.IsNullOrEmpty(sAccessToken) && !string.IsNullOrEmpty(sUserEmail)) //{ // Joyces.Platform.AppContext.Instance.Platform.CustomerId = sUserEmail; // var getCustomer = await RestAPI.GetCustomer(sUserEmail, sAccessToken); // if (getCustomer != null && getCustomer is Customer) // { // Joyces.Platform.AppContext.Instance.Platform.CustomerList = (Customer)getCustomer; // var resp = await RestAPI.GetOffer(sUserEmail, sAccessToken); // if (resp != null && resp is List<Offer>) // Joyces.Platform.AppContext.Instance.Platform.OfferList = (List<Offer>)resp; // else // Joyces.Platform.AppContext.Instance.Platform.OfferList = null; // resp = await RestAPI.GetNews(sUserEmail, sAccessToken); // if (resp != null && resp is List<Joyces.News>) // Joyces.Platform.AppContext.Instance.Platform.NewsList = (List<Joyces.News>)resp; // else // Joyces.Platform.AppContext.Instance.Platform.NewsList = null; // Joyces.Platform.AppContext.Instance.Platform.MoreList = await RestAPI.GetMore(sAccessToken); // } // else // { // Helpers.Settings.AccessToken = string.Empty; // Helpers.Settings.UserEmail = string.Empty; // var mainController = Storyboard.InstantiateViewController("loginNavigationController"); // UIApplication.SharedApplication.KeyWindow.RootViewController = mainController; // } //} //else //{ // //Något är JÄÄÄVLIGT FEL, hit ska den absolut aldrig kunna komma!!! // Helpers.Settings.AccessToken = string.Empty; // Helpers.Settings.UserEmail = string.Empty; // var mainController = Storyboard.InstantiateViewController("loginNavigationController"); // UIApplication.SharedApplication.KeyWindow.RootViewController = mainController; // return; //} if (!string.IsNullOrEmpty(Joyces.Helpers.Settings.AccessToken)) { sendDeviceToken(Joyces.Helpers.Settings.AccessToken); } } catch (Exception ex) { } }