public void SetAccountBasicLayoytIPad() { if (scrollIPad != null) { // ContentViewIPad.Add (scrollIPad); var obj= new TSAccountBasicView(); AddPartialView(obj.GetAcocuntBasicsView ()); } // txtDealerShipName.Layer.CornerRadius = 15; // txtDealerShipName.ClipsToBounds = true; // txtDealerShipName.Layer.BorderWidth = 1; // // txtAddress1IPad.Layer.CornerRadius = 15; // txtAddress1IPad.ClipsToBounds = true; // txtAddress1IPad.Layer.BorderWidth = 1; // // txtAddress2IPad.Layer.CornerRadius = 15; // txtAddress2IPad.ClipsToBounds = true; // txtAddress2IPad.Layer.BorderWidth = 1; // // txtCityIPad.Layer.CornerRadius = 15; // txtCityIPad.ClipsToBounds = true; // txtCityIPad.Layer.BorderWidth = 1; }
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); }
public override void RowSelected (UITableView tableView, Foundation.NSIndexPath indexPath) { tableView.DeselectRow (indexPath, true); foreach (var item in tableView.VisibleCells) { var _cell=(TSSettingsTableViewCell)item; _cell.TextLabel.TextColor = UIColor.Black; } var cell = (TSSettingsTableViewCell)tableView.CellAt (indexPath); cell.TextLabel.TextColor = UIColor.Orange; cell.SelectedBackgroundView.BackgroundColor = UIColor.Clear; var imgView = new UIImageView (new CGRect(0,0,20,20)); imgView.HighlightedImage = new UIImage ("arrow.png"); //cell.AccessoryView = imgView; var changeLoginGroup = GroupedData [indexPath.Section]; var changeLoginEntry = changeLoginGroup.ElementAt (indexPath.Row); if (changeLoginEntry.OnClickAction != null) { if (TSPhoneSpec.UserInterfaceIsPhone) { if (changeLoginEntry.OnClickAction.Equals ("PushAccountbasic")) { controller.NavigationController.PushViewController (new TSAccountBasicView (), true); } else if (changeLoginEntry.OnClickAction.Equals ("PushSetupCodes")) { controller.NavigationController.PushViewController (new TSSetupCodeVC (), true); } else if (changeLoginEntry.OnClickAction.Equals ("PushDepartments")) { controller.NavigationController.PushViewController (new TSDepartmentsVC (controller), true); } else if (changeLoginEntry.OnClickAction.Equals ("PushInvite")) { controller.NavigationController.PushViewController (new TSInviteAgentVC (), true); } else if (changeLoginEntry.OnClickAction.Equals ("PushAdvanced")) { controller.NavigationController.PushViewController (new TSAdvancedVC (), true); } } else { if (settingVC == null) settingVC = new TSSettingsView (); if (changeLoginEntry.OnClickAction.Equals ("PushAccountbasic")) { //UITableViewCell cell = tableView.CellAt (indexPath); // cell.BackgroundColor = UIColor.FromRGB (220, 220, 220); // cell.TextLabel.TextColor = UIColor.Orange; // controller.SetAccountBasicLayoytIPad (); var obj= new TSAccountBasicView(); controller.AddPartialView(obj.GetAcocuntBasicsView ()); } else if (changeLoginEntry.OnClickAction.Equals ("PushSetupCodes")) { //controller.NavigationController.PushViewController (new TSSetupCodeVC (), true); var obj= new TSSetupCodeVC(); controller.AddPartialView(obj.GetSetupView ()); } else if (changeLoginEntry.OnClickAction.Equals ("PushDepartments")) { //controller.NavigationController.PushViewController (new TSDepartmentsVC (), true); var obj= new TSDepartmentsVC(controller); controller.AddPartialView(obj.GetDepartmentView ()); } else if (changeLoginEntry.OnClickAction.Equals ("PushInvite")) { //controller.NavigationController.PushViewController (new TSInviteAgentVC (), true); var obj= new TSInviteAgentVC(); controller.AddPartialView(obj.GetInviteAgentView ()); } else if (changeLoginEntry.OnClickAction.Equals ("PushAdvanced")) { //controller.NavigationController.PushViewController (new TSAdvancedVC (), true); var obj= new TSAdvancedVC(); controller.AddPartialView(obj.GetAdvanceView ()); } } } }