示例#1
0
        public override void PrepareForSegue(UIStoryboardSegue segue, NSObject sender)
        {
            base.PrepareForSegue(segue, sender);

            if (string.IsNullOrEmpty(urlTextField.Text))
            {
                showAlert("Error", "Please enter URL");
                return;
            }
            if (accounts != null && accounts.Count > 0)
            {
                accounts.Clear();
            }
            var al = new AccountsLoader(urlTextField.Text);

            accounts = al.LoadAccounts();

            abContoller = segue.DestinationViewController as addressBookController;
            if (abContoller != null)
            {
                abContoller.accounts      = accounts;
                abContoller.isSelectMode  = true;
                abContoller.ValueChanged += SettingsAddressChanged;
            }
        }
示例#2
0
        public override void PrepareForSegue(UIStoryboardSegue segue, NSObject sender)
        {
            base.PrepareForSegue(segue, sender);

            if (accounts == null || accounts.Count < 1)
            {
                var al = new AccountsLoader(Settings.ServiceEndpoint);
                accounts = al.LoadAccounts();
            }

            try
            {
                abContoller          = segue.DestinationViewController as addressBookController;
                abContoller.accounts = accounts;
                if (sender == sendcoinsButton)
                {
                    abContoller.isSelectMode  = true;
                    abContoller.ValueChanged += SendCoidAddressChanged;
                }
            }
            catch (Exception) { }

            try
            {
                if (sender == settingsButton)
                {
                    sController                  = segue.DestinationViewController as SettingsViewController;
                    sController.accounts         = accounts;
                    sController.SettingsChanged += SettingsChanged;
                }
            }
            catch (Exception) { }
        }