Example #1
0
		public TSDepartmentSource (TSDepartmentsVC tvc,TSSettingsView _settingView, List<TSSettingsItems> data)
		{
			controller = tvc;
			Data = data;
			settingView = _settingView;
			GroupedData = GetEntriesBySectionName ();
		}
Example #2
0
        public override void RowSelected(UITableView tableView, Foundation.NSIndexPath indexPath)
        {
            tableView.DeselectRow(indexPath, true);
            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 (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();
                    }
                }
            }
        }
Example #3
0
        public TSSplitVCIPad()
            : base()
        {
            // create our master and detail views
            masterView = new TSSettingsView ();
            detailView = new TSAccountBasicView ();
            this.HidesBottomBarWhenPushed = false;
            this.PreferredDisplayMode = UISplitViewControllerDisplayMode.AllVisible;
            // in this example, i expose an event on the master view called RowClicked, and i listen
            // for it in here, and then call a method on the detail view to update. this class thereby
            // becomes the defacto controller for the screen (both views).
            //			masterView.RowClicked += (object sender, MasterView.MasterTableView.RowClickedEventArgs e) => {
            //				detailView.Text = e.Item;
            //			};
            //
            // when the master view controller is hid (portrait mode), we add a button to
            // the detail view that when clicked will show the master view in a popover controller
            this.WillHideViewController += (object sender, UISplitViewHideEventArgs e) => {
                //detailView.AddContentsButton (e.BarButtonItem);
            };

            //this.hid
            // when the master view controller is shown (landscape mode), remove the button
            // since the controller is shown.
            this.WillShowViewController += (object sender, UISplitViewShowEventArgs e) => {
                //detailView.RemoveContentsButton ();
            };

            // this method was introduced in iOS5
            // return true to hide the master list (can still be 'dragged out') or false to force it to show
            this.ShouldHideViewController = (svc, vc, orientation) => {
                return false;//orientation == UIInterfaceOrientation.Portrait || orientation == UIInterfaceOrientation.PortraitUpsideDown;
            };

            // ALWAYS SET THIS LAST (since iOS5.1)
            // https://bugzilla.xamarin.com/show_bug.cgi?id=3803
            // http://spouliot.wordpress.com/2012/03/26/events-vs-objective-c-delegates/
            // create an array of controllers from them and then assign it to the
            // controllers property
            ViewControllers = new UIViewController[] { masterView, detailView };
        }
Example #4
0
        public TSSplitVCIPad() : base()
        {
            // create our master and detail views
            masterView = new TSSettingsView();
            detailView = new TSAccountBasicView();
            this.HidesBottomBarWhenPushed = false;
            this.PreferredDisplayMode     = UISplitViewControllerDisplayMode.AllVisible;
            // in this example, i expose an event on the master view called RowClicked, and i listen
            // for it in here, and then call a method on the detail view to update. this class thereby
            // becomes the defacto controller for the screen (both views).
//			masterView.RowClicked += (object sender, MasterView.MasterTableView.RowClickedEventArgs e) => {
//				detailView.Text = e.Item;
//			};
//
            // when the master view controller is hid (portrait mode), we add a button to
            // the detail view that when clicked will show the master view in a popover controller
            this.WillHideViewController += (object sender, UISplitViewHideEventArgs e) => {
                //detailView.AddContentsButton (e.BarButtonItem);
            };

            //this.hid
            // when the master view controller is shown (landscape mode), remove the button
            // since the controller is shown.
            this.WillShowViewController += (object sender, UISplitViewShowEventArgs e) => {
                //detailView.RemoveContentsButton ();
            };

            // this method was introduced in iOS5
            // return true to hide the master list (can still be 'dragged out') or false to force it to show
            this.ShouldHideViewController = (svc, vc, orientation) => {
                return(false);               //orientation == UIInterfaceOrientation.Portrait || orientation == UIInterfaceOrientation.PortraitUpsideDown;
            };

            // ALWAYS SET THIS LAST (since iOS5.1)
            // https://bugzilla.xamarin.com/show_bug.cgi?id=3803
            // http://spouliot.wordpress.com/2012/03/26/events-vs-objective-c-delegates/
            // create an array of controllers from them and then assign it to the
            // controllers property
            ViewControllers = new UIViewController[] { masterView, detailView };
        }
 public override void RowSelected(UITableView tableView, Foundation.NSIndexPath indexPath)
 {
     tableView.DeselectRow (indexPath, true);
     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 (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 ();
             }
         }
     }
 }
Example #6
0
 public TSDepartmentsVC(TSSettingsView _controller)
     : base(UserInterfaceIsPhone ? "TSDepartmentsVC_iPhone" : "TSDepartmentsVC_iPad", null)
 {
     controller = _controller;
 }
Example #7
0
 public TSSettingsTableSource(TSSettingsView tvc, List <TSSettingsItems> data)
 {
     controller  = tvc;
     Data        = data;
     GroupedData = GetEntriesBySectionName();
 }
 public TSSettingsTableSource(TSSettingsView tvc, List<TSSettingsItems> data)
 {
     controller = tvc;
     Data = data;
     GroupedData = GetEntriesBySectionName ();
 }
		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 ());
					}
				}
			}
		}
Example #10
0
		public TSAddDepartmentVC (TSDepartmentsVC _controller, TSSettingsView _settingView=null) : base (UserInterfaceIsPhone ? "TSAddDepartmentVC_iPhone" : "TSAddDepartmentVC_iPad", null)
		{
			controller = _controller;
			settingView = _settingView;
		}