Example #1
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);
        }
Example #2
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);
        }
Example #3
0
        public override void ViewDidLoad( )
        {
            base.ViewDidLoad ();

            var DepartmentTableData = new List<TSSettingsItems>();

            var salesItem = new TSSettingsItems
            {
                EntryData = new TableData
                {
                    Title = "Sales",
                    Detail="Round Robin",
                    Count="8",
                    IsChecked=true
                },
                OnClickAction = "PushSales"
            };
            DepartmentTableData.Add(salesItem);
            var serviceItem = new TSSettingsItems
            {
                EntryData = new TableData
                {
                    Title = "Service",
                    Detail="Live Support",
                    Count="9",
                    IsChecked=true
                },
                OnClickAction = "PushService"
            };

            DepartmentTableData.Add(serviceItem);

            var partsItem = new TSSettingsItems
            {
                EntryData = new TableData
                {
                    Title = "Parts",
                    IsChecked=false
                },
                OnClickAction = "PushParts"
            };
            DepartmentTableData.Add(partsItem);

            var FinanceItem = new TSSettingsItems
            {
                EntryData = new TableData
                {
                    Title = "Finance",
                    IsChecked=false
                },
                OnClickAction = "PushFinance"
            };
            DepartmentTableData.Add(FinanceItem);

             HeaderText = new UILabel (new CGRect (15, 10, View.Frame.Width - 30, 125)) {
                Text = "Please select the department that will use Textshield.The account admin will be asked to setup or confirm the departments upon opening thier welcome email. The account admin can also configure their departments at any time after account creation.",
                TextColor = UIColor.DarkGray,
                Lines=8,
                Font=UIFont.SystemFontOfSize(14)
            };

             sepratorView = new UIView (new CGRect (0, 129, TSPhoneSpec.ScreenWidth, 1)) {
                BackgroundColor=UIColor.LightGray,
                Alpha=0.3f,
            };
            HeaderView = new UIView (new CGRect (0, 0, View.Frame.Width, 130));
            HeaderView.BackgroundColor = UIColor.White;

            HeaderView.Add (sepratorView);
            HeaderView.Add (HeaderText);
            FooterView = new UIView (new CGRect (0, 0, View.Frame.Width, 40));
            FooterView.BackgroundColor = UIColor.White;

               sepratorFooterView = new UIView (new CGRect (0, 0, TSPhoneSpec.ScreenWidth, 1)) {
                BackgroundColor=UIColor.LightGray,
                Alpha=0.3f,
            };
            btnNew = new UIButton (new CGRect (10, 5, 220, 30));
            btnNew.SetTitle ("+ Add Another Department", UIControlState.Normal);
            btnNew.SetTitleColor(UIColor.FromRGB(0,32,70),UIControlState.Normal);
            btnNew.Font = UIFont.SystemFontOfSize (15.0f);
            btnNew.HorizontalAlignment = UIControlContentHorizontalAlignment.Left;
            btnNew.TouchUpInside += ((sender, e) => {
                if (UserInterfaceIsPhone) {
            //				NavigationController.SetNavigationBarHidden (true, true);
                NavController.PushViewController ( new TSAddDepartmentVC (this), true);
                }else{
                    var obj = new TSAddDepartmentVC(this,controller);

                    controller.AddPartialView(obj.getAddDepartmentView());
                }
                this.NavigationItem.HidesBackButton = true;
            });
            FooterView.Add (btnNew);
            FooterView.Add (sepratorFooterView);

            var TableViewSource = new TSDepartmentSource(this,controller, DepartmentTableData);

            if (UserInterfaceIsPhone) {
                tblDepartments.SeparatorInset = new UIEdgeInsets (0, 0, 0, 0);
                tblDepartments.BackgroundColor = UIColor.White;
                tblDepartments.AllowsSelection = true;
                tblDepartments.TableHeaderView = HeaderView;
                tblDepartments.TableFooterView = FooterView;
                tblDepartments.SeparatorStyle = UITableViewCellSeparatorStyle.SingleLine;
                tblDepartments.Source = TableViewSource;
                tblDepartments.ReloadData ();

                btnBack.TouchUpInside += ((sender, e) => {
                    this.NavigationController.PopViewController (true);
                });
            } else {

                tblDepartmentsIPad.SeparatorInset = new UIEdgeInsets (0, 0, 0, 0);
                tblDepartmentsIPad.BackgroundColor = UIColor.White;
                tblDepartmentsIPad.AllowsSelection = true;
                tblDepartmentsIPad.TableHeaderView = HeaderView;
                tblDepartmentsIPad.TableFooterView = FooterView;
                tblDepartmentsIPad.SeparatorStyle = UITableViewCellSeparatorStyle.SingleLine;
                tblDepartmentsIPad.Source = TableViewSource;
                tblDepartmentsIPad.ReloadData ();
            }
        }
Example #4
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);
        }