コード例 #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            if (this.RevealViewController() != null)
            {
                _gobackButton.TouchUpInside += (sender, e) => this.RevealViewController().RevealToggleAnimated(true);
                View.AddGestureRecognizer(this.RevealViewController().PanGestureRecognizer);

                //Popout from Flyout
                //				mailController.ModalInPopover = true;
                //				mailController.SetToRecipients(new[] { "*****@*****.**" });
                //				mailController.SetSubject("Altinn hjelp");
                //				mailController.SetMessageBody("Ansvarsfraskrivelse av Altinn!", true);
                //
                //				mailController.Finished += (s, args) =>
                //				{
                //					Logger.Logg(args.Result.ToString());
                //
                //					this.RevealViewController().RevealToggleAnimated(true);
                //					args.Controller.DismissViewController(false, null);
                //					//this.RevealViewController().SetFrontViewController(this.RevealViewController().RearViewController, true);
                //				};
                //
                //				//this.RevealViewController ().SetFrontViewController (mailController, true);
                //
                //				mailController.ModalInPopover = true;
                //				//					this.RevealViewController().SetFrontViewController(mailController, false);
                //				this.RevealViewController().PresentModalViewController(mailController, false);
                _trans = new CorePlatform.Translate();

                Localize();
            }
        }
コード例 #2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            BTProgressHUD.Show();

            webview.ShouldStartLoad = ShouldStartHandler;

            _trans = new Translate();
            Localize();
        }
コード例 #3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            BTProgressHUD.Show();

            ConfigureView();
            _trans = new Translate();

            Localize();
        }
コード例 #4
0
 public override void ViewDidLoad()
 {
     _trans = new CorePlatform.Translate();
     base.ViewDidLoad();
     UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false);
     var cookies = NSHttpCookieStorage.SharedStorage.CookiesForUrl(new NSUrl(new NSUrl(AppContext.Domain).Host));
     foreach (NSHttpCookie cookie in cookies)
     {
         NSHttpCookieStorage.SharedStorage.DeleteCookie(cookie);
     }
 }
コード例 #5
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            if (this.RevealViewController() != null)
            {
                _gobackButton.TouchUpInside += (sender, e) => this.RevealViewController().RevealToggleAnimated(true);
                View.AddGestureRecognizer(this.RevealViewController().PanGestureRecognizer);
            }

            //_contactTlf.TitleLabel.Text = Constants.ContactSupportTlf;
            //_contactMail.TitleLabel.Text = Constants.ContactSupportTlf;
            _trans = new CorePlatform.Translate();
            Localize();
        }
コード例 #6
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            tableView.WeakDataSource = tableView.WeakDelegate = this;

            _goBack.TouchUpInside += (sender, e) => this.RevealViewController().RevealToggleAnimated(true);

            _innboxLabel.TouchUpInside += (sender, e) =>
            {
                try
                {
                    var controller =
                        Storyboard.InstantiateViewController("MessageboxIdentifier") as MessageboxController;
                    if (controller != null)
                    {
                        controller.MMBType = Constants.MMBType.Messagebox;
                        this.RevealViewController().SetFrontViewController(controller, true);
                    }
                }
                catch (Exception ex)
                {
                    Logger.Logg(ex);
                }
            };

            _trans = new Translate();
            View.AddGestureRecognizer(this.RevealViewController().PanGestureRecognizer);
            //Make sure the fields are blanked out
            _searchField.Placeholder = _trans.GetString("Misc_SearchboxPlaceholder");
            _searchField.TextChanged += SearchTextChanged;
            _searchField.OnEditingStopped += SearchStopped;
            _searchField.OnEditingStarted += SearchStarted;
            _searchField.CancelButtonClicked += CancelButtonClicked;
            _searchField.SearchButtonClicked += SearchButtonClicked;

            Localize();
        }
コード例 #7
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            //var tableView = _tableView;
            if (_tableView != null)
            {
                _tableView.Source = new FlyoutTablesource();
                _tableView.BackgroundColor = UIColor.FromRGB (108, 108, 108);
                this.View.BackgroundColor = UIColor.FromRGB (108, 108, 108);
            }

            if (Session.Organizations != null && Session.Organizations.Count == 1)
            {
                _actorLabel.Hidden = true;
                _actorForwardIcon.Hidden = true;
            }
            _trans = new CorePlatform.Translate();
        }
コード例 #8
0
 public override void ViewDidLoad()
 {
     base.ViewDidLoad();
     tableView.WeakDataSource = tableView.WeakDelegate = this;
     if (this.RevealViewController() != null)
     {
         _gobackButton.TouchUpInside += (sender, e) => this.RevealViewController().RevealToggleAnimated(true);
         View.AddGestureRecognizer(this.RevealViewController().PanGestureRecognizer);
     }
     _trans = new CorePlatform.Translate();
     Localize();
 }
コード例 #9
0
        /// <summary>
        /// The ViewDidLoad triggers every first time the view gets started (not in the view stack), if it's
        /// already on the view stack it uses that one and goes straigh to ViewWillAppear and ViewDidAppear
        /// </summary>
        public override async void ViewDidLoad()
        {
            BTProgressHUD.Show();

            _trans = new Translate();
            //Make sure the fields are blanked out

            _SearchField.TextChanged += SearchTextChanged;
            _SearchField.OnEditingStopped += SearchStopped;
            _SearchField.OnEditingStarted += SearchStarted;
            _SearchField.CancelButtonClicked += CancelButtonClicked;
            _SearchField.SearchButtonClicked += SearchButtonClicked;
            //tableView.Scrolled += DidScroll;

            tableView.WeakDataSource = tableView.WeakDelegate = this;

            //Reset the messagebox to load new inbox or archive
            Session.mmb = new Messagebox();

            if (this.RevealViewController() != null)
            {
                _goBack.TouchUpInside += (sender, e) => this.RevealViewController().RevealToggleAnimated(true);
                this.RevealViewController().RearViewRevealWidth =
                    (float) (UIScreen.MainScreen.Bounds.Width - UIScreen.MainScreen.Bounds.Width*0.15);
                View.AddGestureRecognizer(this.RevealViewController().PanGestureRecognizer);
            }

            Localize();

            try
            {
                var mess = await LoadMessagebox(0);
            }
            catch (AppException app)
            {
                Util.Util.HandleAppException(app, this);
                Logger.Logg("Connection failed when loading messagebox: " + app.Message);
            }
            catch (Exception ex)
            {
                Logger.Logg("Failed to load the messagebox: " + ex);
                Util.Util.ShowAlert(ErrorMessages.GeneralError);
            }
        }
コード例 #10
0
ファイル: SettingsCell.cs プロジェクト: elsewhat/AltinnApp
 public SettingsCell(IntPtr handle)
     : base(handle)
 {
     _trans = new CorePlatform.Translate();
 }
コード例 #11
0
 public override void ViewDidLoad()
 {
     _trans = new CorePlatform.Translate();
     Localize();
 }
コード例 #12
0
 public FlyoutTablesource()
 {
     _trans = new CorePlatform.Translate();
 }
コード例 #13
0
ファイル: LoginController.cs プロジェクト: elsewhat/AltinnApp
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();
            UIApplication.SharedApplication.SetStatusBarStyle(UIStatusBarStyle.LightContent, false);
            _trans = new CorePlatform.Translate();

            _loginIdPortenWebController =
                Storyboard.InstantiateViewController("LoginWebController") as LoginWebController;

            OpenLanguage.TouchUpInside += (sender, e) =>
            {
                var prompt = new UIAlertView(string.Empty, _trans.GetString("Popup_SelectLanguage"), null,
                    _trans.GetString("Misc_Cancel"),
                    new[]
                    {
                        _trans.GetString("Misc_Lang_Bokmaal"), _trans.GetString("Misc_Lang_Nynorsk"),
                        _trans.GetString("Misc_Lang_English")
                    })
                {
                    AlertViewStyle = UIAlertViewStyle.Default
                };

                prompt.Clicked += (s, b) =>
                {
                    Localize();
                    if (b.ButtonIndex == 0)
                    {
                    }
                    else if (b.ButtonIndex == 1)
                    {
                        AppContext.CurrentCulture = "nb-NO";
                        AppContext.CurrentLanguage = "1044";
                    }
                    else if (b.ButtonIndex == 2)
                    {
                        AppContext.CurrentCulture = "nn-NO";
                        AppContext.CurrentLanguage = "2068";
                    }
                    else if (b.ButtonIndex == 3)
                    {
                        AppContext.CurrentCulture = "en";
                        AppContext.CurrentLanguage = "1033";
                    }
                    Util.Util.SetLanguage();
                    Localize();
                };
                prompt.Show();
            };

            //Add this as an observer of the Settings
            NSNotificationCenter.DefaultCenter.AddObserver(new NSString("NSUserDefaultsDidChangeNotification"),
                // ReSharper disable once RedundantLambdaParameterType
                (NSNotification obj) =>
                {
                    NSUserDefaults.StandardUserDefaults.Synchronize();
                    LoadSettings();
                });

            Util.Util.Root = this;

            AppContext.hasLaunched = NSUserDefaults.StandardUserDefaults.BoolForKey("hasLaunched");

            if (!AppContext.hasLaunched)
            {
                NSUserDefaults.StandardUserDefaults.SetBool(true, "hasLaunched");
            }
        }