Ejemplo n.º 1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            //			TSCustomNavController nv = new TSCustomNavController ();
            //			nv.setData ();

            this.NavigationItem.HidesBackButton = true;
            NavigationController.SetNavigationBarHidden (false, true);
            var SettingsTableData = new List<TSSettingsItems> ();

            var accountItem = new TSSettingsItems {
                EntryData = new TableData {
                    Title = "Account Basics"
                },
                OnClickAction = "PushAccountbasic"
            };
            SettingsTableData.Add (accountItem);
            var setupItem = new TSSettingsItems {
                EntryData = new TableData {
                    Title = "Setup Codes"
                },
                OnClickAction = "PushSetupCodes"
            };

            SettingsTableData.Add (setupItem);

            var DepartmentsItem = new TSSettingsItems {
                EntryData = new TableData {
                    Title = "Departments"
                },
                OnClickAction = "PushDepartments"
            };
            SettingsTableData.Add (DepartmentsItem);

            var advancedItem = new TSSettingsItems {
                EntryData = new TableData {
                    Title = "Advanced"
                },
                OnClickAction = "PushAdvanced"
            };
            SettingsTableData.Add (advancedItem);

            var inviteAgentsItem = new TSSettingsItems {
                EntryData = new TableData {
                    Title = "Invite Agents"
                },
                OnClickAction = "PushInvite"
            };
            SettingsTableData.Add (inviteAgentsItem);

            var FooterView = new UIView (new CGRect (0, 0, View.Frame.Width, 100));
            FooterView.BackgroundColor = UIColor.White;

            var btnNew = new UIButton ();
            if (UserInterfaceIdiomIsPhone) {
                btnNew.Frame = new CGRect (TSPhoneSpec.ScreenWidth / 2 - 75, 50, 150, 50);
            } else {
                btnNew.Frame = new CGRect (tblSettingsIPad.Frame.Size.Width / 2 - 75, 25, 150, 50);
            }
            btnNew.SetTitle ("+ Adds Account", UIControlState.Normal);
            btnNew.SetTitleColor (UIColor.FromRGB (0, 32, 70), UIControlState.Normal);
            btnNew.Font = UIFont.SystemFontOfSize (15.0f);
            btnNew.TouchUpInside += (object sender, EventArgs e) => {
                Console.WriteLine("Add account clicked");
                if (UserInterfaceIdiomIsPhone) {
                    this.NavigationController.PushViewController(new TSAccountBasicView("AddnewAccount"),true);
                }else{
                    var obj= new TSAccountBasicView("AddnewAccount");
                    AddPartialView(obj.GetAcocuntBasicsView ());
                }
            };
            FooterView.Add (btnNew);

            var TableViewSource = new TSSettingsTableSource (this, SettingsTableData);

            if (UserInterfaceIdiomIsPhone) {
                tblSettings.SeparatorInset = new UIEdgeInsets (0, 0, 0, 0);
                tblSettings.BackgroundColor = UIColor.White;
                tblSettings.SeparatorStyle = UITableViewCellSeparatorStyle.SingleLine;
                tblSettings.TableFooterView = FooterView;
                tblSettings.Source = TableViewSource;
                tblSettings.ReloadData ();
            } else {

                tblSettingsIPad.SeparatorInset = new UIEdgeInsets (0, 0, 0, 0);
                tblSettingsIPad.BackgroundColor = UIColor.White;
                tblSettingsIPad.SeparatorStyle = UITableViewCellSeparatorStyle.SingleLine;
                tblSettingsIPad.TableFooterView = FooterView;
                tblSettingsIPad.Source = TableViewSource;
                tblSettingsIPad.ReloadData ();
                SetAccountBasicLayoytIPad ();
            }
            //	View.AddSubview(ChangeLoginTableView);
        }
Ejemplo n.º 2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var SettingsTableData = new List <TSSettingsItems> ();

            var accountItem = new TSSettingsItems {
                EntryData = new TableData {
                    Title = "Account Basics"
                },
                OnClickAction = "PushAccountbasic"
            };

            SettingsTableData.Add(accountItem);
            var setupItem = new TSSettingsItems {
                EntryData = new TableData {
                    Title = "Setup Codes"
                },
                OnClickAction = "push"
            };

            SettingsTableData.Add(setupItem);

            var DepartmentsItem = new TSSettingsItems {
                EntryData = new TableData {
                    Title = "Departments"
                },
                OnClickAction = "Push"
            };

            SettingsTableData.Add(DepartmentsItem);

            var advancedItem = new TSSettingsItems {
                EntryData = new TableData {
                    Title = "Advanced"
                },
                OnClickAction = "Push"
            };

            SettingsTableData.Add(advancedItem);

            var inviteAgentsItem = new TSSettingsItems {
                EntryData = new TableData {
                    Title = "Invite Agents"
                },
                OnClickAction = "Push"
            };

            SettingsTableData.Add(inviteAgentsItem);

            var FooterView = new UIView(new CGRect(0, 0, View.Frame.Width, 100));

            FooterView.BackgroundColor = UIColor.White;
            //	FooterView.Layer.BorderWidth = 1;
            //FooterView.Layer.BorderColor = UIColor.FromRGB(222, 222, 222).CGColor;

            var btnNew = new UIButton(new CGRect(TSPhoneSpec.ScreenWidth / 2 - 75, 50, 150, 50));

            btnNew.SetTitle("+ Add Account", UIControlState.Normal);
            btnNew.SetTitleColor(UIColor.FromRGB(0, 32, 70), UIControlState.Normal);
            btnNew.Font = UIFont.SystemFontOfSize(15.0f);
            FooterView.Add(btnNew);

            var TableViewSource = new TSSettingsTableSource(this, SettingsTableData);

            if (UserInterfaceIdiomIsPhone)
            {
                tblSettings.SeparatorInset = new UIEdgeInsets(0, 0, 0, 0);



                tblSettings.BackgroundColor = UIColor.White;
                tblSettings.SeparatorStyle  = UITableViewCellSeparatorStyle.SingleLine;
                tblSettings.TableFooterView = FooterView;
                tblSettings.Source          = TableViewSource;
                tblSettings.ReloadData();
            }
            else
            {
                tblSettingsIPad.SeparatorInset  = new UIEdgeInsets(0, 0, 0, 0);
                tblSettingsIPad.BackgroundColor = UIColor.White;
                tblSettingsIPad.SeparatorStyle  = UITableViewCellSeparatorStyle.SingleLine;
                tblSettingsIPad.TableFooterView = FooterView;
                tblSettingsIPad.Source          = TableViewSource;
                tblSettingsIPad.ReloadData();
                SetAccountBasicLayoytIPad();
            }
            //	View.AddSubview(ChangeLoginTableView);
        }
Ejemplo n.º 3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad ();

            var SettingsTableData = new List<TSSettingsItems> ();

            var accountItem = new TSSettingsItems {
                EntryData = new TableData {
                    Title = "Account Basics"
                },
                OnClickAction = "PushAccountbasic"
            };
            SettingsTableData.Add (accountItem);
            var setupItem = new TSSettingsItems {
                EntryData = new TableData {
                    Title = "Setup Codes"
                },
                OnClickAction = "push"
            };

            SettingsTableData.Add (setupItem);

            var DepartmentsItem = new TSSettingsItems {
                EntryData = new TableData {
                    Title = "Departments"
                },
                OnClickAction = "Push"
            };
            SettingsTableData.Add (DepartmentsItem);

            var advancedItem = new TSSettingsItems {
                EntryData = new TableData {
                    Title = "Advanced"
                },
                OnClickAction = "Push"
            };
            SettingsTableData.Add (advancedItem);

            var inviteAgentsItem = new TSSettingsItems {
                EntryData = new TableData {
                    Title = "Invite Agents"
                },
                OnClickAction = "Push"
            };
            SettingsTableData.Add (inviteAgentsItem);

            var FooterView = new UIView (new CGRect (0, 0, View.Frame.Width, 100));
            FooterView.BackgroundColor = UIColor.White;
            //	FooterView.Layer.BorderWidth = 1;
            //FooterView.Layer.BorderColor = UIColor.FromRGB(222, 222, 222).CGColor;

            var btnNew = new UIButton (new CGRect (TSPhoneSpec.ScreenWidth / 2 - 75, 50, 150, 50));
            btnNew.SetTitle ("+ Add Account", UIControlState.Normal);
            btnNew.SetTitleColor (UIColor.FromRGB (0, 32, 70), UIControlState.Normal);
            btnNew.Font = UIFont.SystemFontOfSize (15.0f);
            FooterView.Add (btnNew);

            var TableViewSource = new TSSettingsTableSource (this, SettingsTableData);

            if (UserInterfaceIdiomIsPhone) {
                tblSettings.SeparatorInset = new UIEdgeInsets (0, 0, 0, 0);

                tblSettings.BackgroundColor = UIColor.White;
                tblSettings.SeparatorStyle = UITableViewCellSeparatorStyle.SingleLine;
                tblSettings.TableFooterView = FooterView;
                tblSettings.Source = TableViewSource;
                tblSettings.ReloadData ();
            } else {

                tblSettingsIPad.SeparatorInset = new UIEdgeInsets (0, 0, 0, 0);
                tblSettingsIPad.BackgroundColor = UIColor.White;
                tblSettingsIPad.SeparatorStyle = UITableViewCellSeparatorStyle.SingleLine;
                tblSettingsIPad.TableFooterView = FooterView;
                tblSettingsIPad.Source = TableViewSource;
                tblSettingsIPad.ReloadData ();
                SetAccountBasicLayoytIPad ();
            }
            //	View.AddSubview(ChangeLoginTableView);
        }