public LoginViewController(CoreViewController parent) : base() { // setup our timer LoginSuccessfulTimer = new System.Timers.Timer(); LoginSuccessfulTimer.AutoReset = false; LoginSuccessfulTimer.Interval = 1; Parent = parent; }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching( UIApplication app, NSDictionary options ) { // create a new window instance based on the screen size window = new UIWindow( UIScreen.MainScreen.Bounds ); // If you have defined a root view controller, set it here: CoreViewController = new CoreViewController(); window.RootViewController = CoreViewController; // make the window visible window.MakeKeyAndVisible( ); // start up the delegate and actual location service Location.Location.Instance.OnRegionEnteredDelegate = CoreViewController.RegionEntered; Location.Location.Instance.Create( null ); return true; }
// // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching(UIApplication app, NSDictionary options) { // create a new window instance based on the screen size window = new UIWindow(UIScreen.MainScreen.Bounds); // If you have defined a root view controller, set it here: CoreViewController = new CoreViewController(); window.RootViewController = CoreViewController; // make the window visible window.MakeKeyAndVisible( ); // start up the delegate and actual location service Location.Location.Instance.OnRegionEnteredDelegate = CoreViewController.RegionEntered; Location.Location.Instance.Create(null); return(true); }
public override void ViewDidLoad() { base.ViewDidLoad(); // First setup the SpringboardReveal button, which rests in the upper left // of the MainNavigationUI. (We must do it here because the ContainerViewController's // NavBar is the active one.) NSString buttonLabel = new NSString(""); HomeButton = new UIButton(UIButtonType.System); HomeButton.Font = Rock.Mobile.PlatformSpecific.iOS.Graphics.FontManager.GetFont("Bh", 36); HomeButton.SetTitle(buttonLabel.ToString( ), UIControlState.Normal); HomeButton.SetTitleColor(Theme.GetColor(Config.Instance.VisualSettings.TopHeaderTextColor), UIControlState.Normal); HomeButton.SetTitleColor(UIColor.DarkGray, UIControlState.Disabled); // determine its dimensions CGSize buttonSize = buttonLabel.StringSize(HomeButton.Font); HomeButton.Bounds = new CGRect(0, 0, buttonSize.Width, buttonSize.Height); // set its callback HomeButton.TouchUpInside += (object sender, EventArgs e) => { // clear any current family VC CurrentFamilyInfoViewController = null; // reset our stack SubNavigationController.PopToRootViewController(true); SubNavigationController.View.SetNeedsLayout( ); // turn off the home button HomeButton.Enabled = false; // and enable the add family button AddFamilyButton.Enabled = true; }; // set the "Add Family" button buttonLabel = new NSString(""); AddFamilyButton = new UIButton(UIButtonType.System); AddFamilyButton.Font = Rock.Mobile.PlatformSpecific.iOS.Graphics.FontManager.GetFont("Bh", 36); AddFamilyButton.SetTitle(buttonLabel.ToString( ), UIControlState.Normal); AddFamilyButton.SetTitleColor(Theme.GetColor(Config.Instance.VisualSettings.TopHeaderTextColor), UIControlState.Normal); AddFamilyButton.SetTitleColor(UIColor.DarkGray, UIControlState.Disabled); // determine its dimensions buttonSize = buttonLabel.StringSize(HomeButton.Font); AddFamilyButton.Bounds = new CGRect(0, 0, buttonSize.Width, buttonSize.Height); // set its callback AddFamilyButton.TouchUpInside += (object sender, EventArgs e) => { // clear any current family VC CurrentFamilyInfoViewController = null; // and present a new family page PresentNewFamilyPage( ); }; UIBarButtonItem[] leftItems = new UIBarButtonItem[] { new UIBarButtonItem(HomeButton), new UIBarButtonItem(AddFamilyButton) }; this.NavigationItem.SetLeftBarButtonItems(leftItems, false); CreateSubNavigationController( ); SearchFamiliesViewController = new SearchFamiliesViewController(this); SubNavigationController.PushViewController(SearchFamiliesViewController, true); HomeButton.Enabled = false; SettingsViewController = new SettingsViewController(this); // set our theme CoreViewController.ApplyTheme(this); }
public ContainerViewController(CoreViewController parent) : base( ) { Parent = parent; }
public ContainerViewController( CoreViewController parent ) : base() { Parent = parent; }
public FirstRunViewController(CoreViewController parent) : base( ) { Parent = parent; }
public FirstRunViewController( CoreViewController parent ) : base() { Parent = parent; }
public override void ViewDidLoad() { base.ViewDidLoad(); // set our theme CoreViewController.ApplyTheme(this); // and the busy indicator BusyIndicator = PlatformBusyIndicator.Create( ); BusyIndicator.Color = 0x999999FF; BusyIndicator.BackgroundColor = 0; BusyIndicator.Opacity = 0; BusyIndicator.AddAsSubview(View); // setup the header label HeaderLabel = new UILabel( ); View.AddSubview(HeaderLabel); Theme.StyleLabel(HeaderLabel, Config.Instance.VisualSettings.LabelStyle); HeaderLabel.Font = FontManager.GetFont(Settings.General_RegularFont, 32); HeaderLabel.Text = "Family Manager"; HeaderLabel.SizeToFit( ); HeaderLabel.TextAlignment = UITextAlignment.Center; UserNameField = new UIInsetTextField(); View.AddSubview(UserNameField); Theme.StyleTextField(UserNameField, Config.Instance.VisualSettings.TextFieldStyle); UserNameField.InputAssistantItem.LeadingBarButtonGroups = null; UserNameField.InputAssistantItem.TrailingBarButtonGroups = null; UserNameField.Font = FontManager.GetFont(Settings.General_RegularFont, Config.Instance.VisualSettings.MediumFontSize); UserNameField.Layer.AnchorPoint = CGPoint.Empty; UserNameField.AutocorrectionType = UITextAutocorrectionType.No; UserNameField.AutocapitalizationType = UITextAutocapitalizationType.None; UserNameField.Placeholder = "Username"; UserNameField.ShouldReturn += (textField) => { textField.ResignFirstResponder(); TryRockBind(); return(true); }; PasswordField = new UIInsetTextField(); View.AddSubview(PasswordField); Theme.StyleTextField(PasswordField, Config.Instance.VisualSettings.TextFieldStyle); PasswordField.InputAssistantItem.LeadingBarButtonGroups = null; PasswordField.InputAssistantItem.TrailingBarButtonGroups = null; PasswordField.Layer.AnchorPoint = CGPoint.Empty; PasswordField.Font = FontManager.GetFont(Settings.General_RegularFont, Config.Instance.VisualSettings.MediumFontSize); PasswordField.AutocorrectionType = UITextAutocorrectionType.No; PasswordField.AutocapitalizationType = UITextAutocapitalizationType.None; PasswordField.Placeholder = "Password"; PasswordField.SecureTextEntry = true; PasswordField.ShouldReturn += (textField) => { textField.ResignFirstResponder(); TryRockBind(); return(true); }; // obviously attempt a login if login is pressed LoginButton = UIButton.FromType(UIButtonType.System); View.AddSubview(LoginButton); Theme.StyleButton(LoginButton, Config.Instance.VisualSettings.PrimaryButtonStyle); LoginButton.SetTitle("Login", UIControlState.Normal); LoginButton.Font = FontManager.GetFont(Settings.General_RegularFont, Config.Instance.VisualSettings.SmallFontSize); LoginButton.SizeToFit( ); LoginButton.Layer.AnchorPoint = CGPoint.Empty; LoginButton.TouchUpInside += (object sender, EventArgs e) => { TryRockBind(); }; // setup the result LoginResult = new UILabel( ); View.AddSubview(LoginResult); Theme.StyleLabel(LoginResult, Config.Instance.VisualSettings.LabelStyle); LoginResult.TextAlignment = UITextAlignment.Center; // version Version = new UILabel(); Version.Layer.AnchorPoint = CGPoint.Empty; Version.TextColor = UIColor.White; Version.TextAlignment = UITextAlignment.Center; Version.Text = Strings.General_Version; Theme.StyleLabel(Version, Config.Instance.VisualSettings.LabelStyle); Version.Font = Version.Font.WithSize(14); View.AddSubview(Version); }