public override void ViewDidLoad() { base.ViewDidLoad(); // create the navigation items NavItemGroup navGroup = new NavItemGroup("UIView Animations"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Basic Animation", "", typeof(BasicUIViewAnimation.BasicUIViewAnimationScreen))); navGroup.Items.Add(new NavItem("Animation Customizer", "", typeof(CustomizableAnimationViewer.CustomizableAnimationViewerScreen))); navGroup.Items.Add(new NavItem("Transitions", "", typeof(ViewTransitions.Controller))); navGroup.Items.Add(new NavItem("Implicit Layer Animation", "", typeof(LayerAnimation.ImplicitAnimationScreen))); navGroup.Items.Add(new NavItem("Explicit Layer Animation", "", typeof(LayerAnimation.LayerAnimationScreen))); // create a table source from our nav items tableSource = new NavItemTableSource(navItems); // set the source on the table to our data source base.TableView.Source = tableSource; tableSource.RowClicked += (object sender, RowClickedEventArgs e) => { if (this.RowClicked != null) { this.RowClicked(sender, e); } }; }
public override void ViewDidLoad() { base.ViewDidLoad(); NavItemGroup navGroup; //---- create the navigation items navGroup = new NavItemGroup("ADO.NET"); this._navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Basic ADO.NET", "", typeof(ADONET.BasicOperations))); navGroup = new NavItemGroup("SQLite-Net"); this._navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Basic SQLite-Net", "", typeof(SQLiteNet.BasicOperations))); navGroup = new NavItemGroup("Vici CoolStorage"); this._navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Basic Vici CoolStorage", "", typeof(ViciCoolStorage.BasicOperations))); //---- create a table source from our nav items this._tableSource = new NavItemTableSource(this.NavigationController, this._navItems); //---- set the source on the table to our data source base.TableView.Source = this._tableSource; }
public override void ViewDidLoad() { base.ViewDidLoad(); NavItemGroup navGroup; this.CreateMTDItems(); //---- create the navigation items navGroup = new NavItemGroup("Three20"); this._navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Photo Viewer", "", typeof(Three20.PhotoViewerScreen))); navGroup = new NavItemGroup("MonoTouch.Dialog"); this._navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Basic List", new DialogViewController(this._mtDialogBasicMenu, true))); navGroup.Items.Add(new NavItem("Basic List, Lazy Loaded", typeof(DialogViewController), new object[] { this._mtDialogBasicMenu, true })); BindingContext bc = new BindingContext(this, this._accountInfo, "Account Information"); navGroup.Items.Add(new NavItem("Screen From a Bound Object", typeof(DialogViewController), new object[] { bc.Root, true })); navGroup.Items.Add(new NavItem("Element tree from LINQ", typeof(DialogViewController), new object[] { this._linqBuiltElementTree, true })); //---- create a table source from our nav items this._tableSource = new NavItemTableSource(this.NavigationController, this._navItems); //---- set the source on the table to our data source base.TableView.Source = this._tableSource; }
public override void ViewDidLoad() { base.ViewDidLoad(); // create the navigation items NavItemGroup navGroup = new NavItemGroup("Animations"); navItems.Add(navGroup); // navGroup.Items.Add (new NavItem ("Temp", "", typeof (TempViewController))); navGroup.Items.Add(new NavItem("PositionX", "", typeof(PositionXViewController))); navGroup.Items.Add(new NavItem("PositionY", "", typeof(PositionYViewController))); navGroup.Items.Add(new NavItem("Position", "", typeof(PositionViewController))); navGroup.Items.Add(new NavItem("Opacity", "", typeof(CanChangeOpacity))); navGroup.Items.Add(new NavItem("Scale", "", typeof(ScaleViewController))); // NavItemGroup caGroup = new NavItemGroup("CA Animations"); // navItems.Add( caGroup ); // create a table source from our nav items tableSource = new NavItemTableSource(navItems); // set the source on the table to our data source base.TableView.Source = tableSource; tableSource.RowClicked += (object sender, RowClickedEventArgs e) => { if (this.RowClicked != null) { this.RowClicked(sender, e); } }; }
public override void ViewDidLoad() { base.ViewDidLoad(); // create the navigation items NavItemGroup navGroup = new NavItemGroup("Form Controls"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Labels", "", typeof(Labels.LabelsScreen_iPhone))); navGroup.Items.Add(new NavItem("Text Fields", "", typeof(TextFields.TextFields_iPhone))); navGroup.Items.Add(new NavItem("Sliders", "", typeof(Sliders.Sliders_iPhone))); navGroup.Items.Add(new NavItem("Buttons", "", typeof(Buttons.ButtonsScreen_iPhone))); navGroup.Items.Add(new NavItem("Switches", "", typeof(Switches.Switches_iPhone))); navGroup.Items.Add(new NavItem("Segmented Buttons", "", typeof(SegmentedControl.SegmentedControls_iPhone))); navGroup.Items.Add(new NavItem("Segmented Buttons 2", "", typeof(SegmentedControl.SegmentedControls2_iPhone))); navGroup = new NavItemGroup("Content Controls"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Scroll View", "", typeof(ScrollView.Controller))); navGroup.Items.Add(new NavItem("Tap to Zoom Scroll View", "", typeof(TapToZoomScrollView.Controller))); navGroup.Items.Add(new NavItem("Pager Control", "", typeof(PagerControl.PagerControl_iPhone))); navGroup.Items.Add(new NavItem("Image Control", "", typeof(Images.Images_iPhone))); navGroup.Items.Add(new NavItem("More Image Controls", "", typeof(Images.Images2_iPhone))); navGroup = new NavItemGroup("Process Controls"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Activity Spinners", "", typeof(ActivitySpinner.ActivitySpinnerScreen_iPhone))); navGroup.Items.Add(new NavItem("Progress Bars", "", typeof(ProgressBars.ProgressBars_iPhone))); navGroup = new NavItemGroup("Popups"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Alert Views", "", typeof(AlertViews.AlertViewsScreen_iPhone))); navGroup.Items.Add(new NavItem("Action Sheets", "", typeof(ActionSheets.ActionSheets_iPhone))); navGroup = new NavItemGroup("Pickers"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Simple Date Picker", "", typeof(DatePicker.DatePickerSimple_iPhone))); navGroup.Items.Add(new NavItem("Date Picker", "", typeof(DatePicker.DatePicker_iPhone))); navGroup.Items.Add(new NavItem("Simple Custom Picker", "", typeof(PickerView.PickerView1_iPhone))); navGroup.Items.Add(new NavItem("Custom Picker with Multiple Components", "", typeof(PickerView.PickerWithMultipleComponents_iPhone))); navGroup.Items.Add(new NavItem("Picker with Custom Appearance", "", typeof(PickerView.PickerView_CustomAppearance))); navGroup = new NavItemGroup("Toolbars"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Toolbar 1", "", typeof(Toolbar.Toolbar1_iPhone))); navGroup.Items.Add(new NavItem("Programmatic Toolbar", "", typeof(Toolbar.ProgrammaticToolbar_Controller))); navGroup.Items.Add(new NavItem("Toolbar Items", "", typeof(Toolbar.ToolbarItems))); // create a table source from our nav items tableSource = new NavItemTableSource(this.NavigationController, navItems); // set the source on the table to our data source tableView = new UITableView(); tableView.Source = tableSource; View.Add(tableView); }
async Task DoLoadData() { try { Newtonsoft.Json.JsonSerializer serializer = new Newtonsoft.Json.JsonSerializer(); JsonClient client = new JsonClient(serializer); var response = await client.GetAsync <IEnumerable <ProjectEmployeeDTO> >(TimeCapServices.ActivityList, new Dictionary <string, string>() { { "timekeeperPersonnelNumber", timekprid.ToString() }, { "workDate", wrkdt.ToString() } }); navItems.Clear(); foreach (var item in response.Value.Select(x => new { pronum = x.ProjectNumber, prodesc = x.ProjectDescription }).Distinct().ToList()) { navGroup = new NavItemGroup(item.pronum, item.prodesc); if (navGroup.Name.Distinct().Count() != navGroup.Name.Count()) { navItems.Add(navGroup); foreach (var newitem in response.Value.Select(x => new { Transforactnum = x.TransformedActivityNumber, activitydesc = x.ActivityDescription }).Distinct().ToList()) { navItem = new NavItem(newitem.Transforactnum, newitem.activitydesc, AllocatedHrs.ToString()); navGroup.Items.Add(navItem); } } } tableSource = new NavItemTableSource(NavigationController, navItems); base.TableView.Source = tableSource; //TableView.SeparatorColor = UIColor.Blue; //TableView.SeparatorStyle = UITableViewCellSeparatorStyle.DoubleLineEtched; //TableView.SeparatorColor = UIColor.Black; TableView.ReloadData(); #region OnRowSelected tableSource.OnRowSelected += (object sender, NavItemTableSource.RowSelectedEventArgs e) => { var allocation = Storyboard.InstantiateViewController("AllocationsActualViewController") as AllocationsActualViewController; allocation.filltimekeeper(this, timekprid.ToString(), timekprname.ToString(), wrkdt.ToString(), navGroup.Name, navGroup.Description , navItem.Name); NavigationController.PushViewController(allocation, true); }; #endregion } catch (Exception ex) { new UIAlertView("Oops", "No Record Available", null, "OK", null).Show(); System.Console.WriteLine(ex.Message); } }
public override void ViewDidLoad() { base.ViewDidLoad(); // declare vars NavItemGroup navGroup; // create the navigation items navGroup = new NavItemGroup("Network"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Activity Indicator", "", typeof(Network.ActivityIndicatorScreen))); navGroup = new NavItemGroup("Battery"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Status", "", typeof(Battery.BatteryStatusScreen))); navGroup = new NavItemGroup("Contacts/Address Book"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Contact Picker/View Contact", "", typeof(Contacts.ContactPickerScreen))); navGroup.Items.Add(new NavItem("New/Unknown Contact", "", typeof(Contacts.NewAndUnknownContactScreen))); navGroup.Items.Add(new NavItem("Address Book", "", typeof(Contacts.AddressBookScreen))); navGroup = new NavItemGroup("Assets Library"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Photo/Video Album List", "", typeof(AVAssets.AssetGroupEnumerationScreen))); navGroup = new NavItemGroup("Photos and Camera Controllers"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Test Overlay", "", typeof(Photos.TestCameraOverlayController))); navGroup.Items.Add(new NavItem("Photo/Camera Picker", "", typeof(Photos.ImagePickerScreen))); navGroup.Items.Add(new NavItem("Custom Camera Overlay", "", typeof(Photos.CustomCameraViewScreen))); navGroup = new NavItemGroup("Accelerometer"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("XYZ Data", "", typeof(Accelerometer.XYZDataScreen))); navGroup.Items.Add(new NavItem("Shake Motion", "", typeof(Accelerometer.ShakeScreen))); navGroup = new NavItemGroup("File System"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("File system info", "", typeof(FileSystem.FileSystemInfo))); // create a table source from our nav items tableSource = new NavItemTableSource(this.NavigationController, navItems); // set the source on the table to our data source tableView = new UITableView(); tableView.Source = tableSource; View.AddSubview(tableView); }
public override void ViewDidLoad() { base.ViewDidLoad(); // create the navigation items NavItemGroup navGroup = new NavItemGroup("Table Styles"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Grouped", "", typeof(TableStyles.SimpleTableScreen), new object[] { UITableViewStyle.Grouped })); navGroup.Items.Add(new NavItem("Plain", "", typeof(TableStyles.SimpleTableScreen), new object[] { UITableViewStyle.Plain })); navGroup.Items.Add(new NavItem("Indexed Grouped", "", typeof(TableStyles.TableWithIndexScreen), new object[] { UITableViewStyle.Grouped })); navGroup.Items.Add(new NavItem("Indexed Plain", "", typeof(TableStyles.TableWithIndexScreen), new object[] { UITableViewStyle.Plain })); navGroup = new NavItemGroup("Cell Styles"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Default", "", typeof(CellStyles.TableScreen) , new object[] { UITableViewStyle.Plain, UITableViewCellStyle.Default, UITableViewCellAccessory.None })); navGroup.Items.Add(new NavItem("Subtitle", "", typeof(CellStyles.TableScreen) , new object[] { UITableViewStyle.Plain, UITableViewCellStyle.Subtitle, UITableViewCellAccessory.None })); navGroup.Items.Add(new NavItem("Value1 (Right-Aligned Subtitle)", "", typeof(CellStyles.TableScreen) , new object[] { UITableViewStyle.Plain, UITableViewCellStyle.Value1, UITableViewCellAccessory.None })); navGroup.Items.Add(new NavItem("Value2 (Contact Style)", "", typeof(CellStyles.TableScreen) , new object[] { UITableViewStyle.Plain, UITableViewCellStyle.Value2, UITableViewCellAccessory.None })); navGroup = new NavItemGroup("Accessory Styles"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Checkmark", "", typeof(CellStyles.TableScreen) , new object[] { UITableViewStyle.Plain, UITableViewCellStyle.Default, UITableViewCellAccessory.Checkmark })); navGroup.Items.Add(new NavItem("DetailDisclosureButton", "", typeof(CellStyles.TableScreen) , new object[] { UITableViewStyle.Plain, UITableViewCellStyle.Default, UITableViewCellAccessory.DetailDisclosureButton })); navGroup.Items.Add(new NavItem("DisclosureIndicator", "", typeof(CellStyles.TableScreen) , new object[] { UITableViewStyle.Plain, UITableViewCellStyle.Default, UITableViewCellAccessory.DisclosureIndicator })); navGroup = new NavItemGroup("Custom Cells"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Custom Cell from XIB", "", typeof(CustomCells.CustomCell1TableScreen))); navGroup.Items.Add(new NavItem("Custom Cell in code", "", typeof(CustomCells.CustomCell12TableScreen))); // create a table source from our nav items tableSource = new NavItemTableSource(this.NavigationController, navItems); // set the source on the table to our data source base.TableView.Source = tableSource; }
public override void ViewDidLoad() { base.ViewDidLoad(); this.Title = "Fonts"; //---- declare vars NavItemGroup navGroup; string fontName; UIFont font; NavItem navItem; Type controller; for (int i = 0; i < UIFont.FamilyNames.Length; i++) { //---- create a nav group navGroup = new NavItemGroup(UIFont.FamilyNames[i]); this._navItems.Add(navGroup); //---- loop through each font name in the family for (int j = 0; j < UIFont.FontNamesForFamilyName(UIFont.FamilyNames[i]).Length; j++) { //---- add an item of that font fontName = UIFont.FontNamesForFamilyName(UIFont.FamilyNames[i])[j]; font = UIFont.FromName(fontName, UIFont.SystemFontSize); if ((UIApplication.SharedApplication.Delegate as AppDelegate).CurrentDevice == DeviceType.iPad) { controller = typeof(Screens.iPad.FontViewer.FontViewerScreen_iPad); } else { controller = typeof(Screens.iPhone.FontViewer.FontViewerScreen_iPhone); } navItem = new NavItem(fontName, "", controller, new object[] { font }); navItem.Font = font; navGroup.Items.Add(navItem); } } //---- create a table source from our nav items this._tableSource = new NavItemTableSource(this.NavigationController, this._navItems); //---- set the source on the table to our data source base.TableView.Source = this._tableSource; }
public override void ViewDidLoad() { base.ViewDidLoad(); //---- create the navigation items NavItemGroup navGroup = new NavItemGroup("Form Controls"); // this._navItems.Add (navGroup); // navGroup.Items.Add (new NavItem ("Labels", "", typeof(Labels.LabelsScreen_iPhone))); // navGroup.Items.Add (new NavItem ("Text Fields", "", typeof(TextFields.TextFields_iPhone))); // navGroup.Items.Add (new NavItem ("Sliders", "", typeof(Sliders.Sliders_iPhone))); // navGroup.Items.Add (new NavItem ("Buttons", "", typeof(Buttons.ButtonsScreen_iPhone))); // navGroup.Items.Add (new NavItem ("Switches", "", typeof(Switches.Switches_iPhone))); // // navGroup = new NavItemGroup ("Content Controls"); // this._navItems.Add (navGroup); // navGroup.Items.Add (new NavItem ("Scroll View", "", typeof(ScrollView.Controller))); // navGroup.Items.Add (new NavItem ("Tap to Zoom Scroll View", "", typeof(TapToZoomScrollView.Controller))); // navGroup.Items.Add (new NavItem ("Pager Control", "", typeof(PagerControl.PagerControl_iPhone))); // // navGroup = new NavItemGroup ("Process Controls"); // this._navItems.Add (navGroup); // navGroup.Items.Add (new NavItem ("Activity Spinners", "", typeof(ActivitySpinner.ActivitySpinnerScreen_iPhone))); // navGroup.Items.Add (new NavItem ("Progress Bars", "", typeof(ProgressBars.ProgressBars_iPhone))); navGroup = new NavItemGroup("Popups"); this._navItems.Add(navGroup); //navGroup.Items.Add (new NavItem ("Alert Views", "", typeof(AlertViews.AlertViewsScreen_iPhone))); navGroup.Items.Add(new NavItem("Action Sheets", "", typeof(ActionSheets.ActionSheets_iPad))); navGroup = new NavItemGroup("Pickers"); this._navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Simple Date Picker", "", typeof(DatePicker.DatePickerSimple_iPad))); navGroup.Items.Add(new NavItem("Action Sheet Date Picker", "", typeof(DatePicker.ActionSheetDatePicker_iPad))); //---- create a table source from our nav items this._tableSource = new NavItemTableSource(this.NavigationController, this._navItems); //---- set the source on the table to our data source base.TableView.Source = this._tableSource; }
public override void ViewDidLoad() { base.ViewDidLoad(); // create the navigation items NavItemGroup navGroup = new NavItemGroup("Form Controls"); navGroup = new NavItemGroup("Popups"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Action Sheets", "", typeof(ActionSheets.ActionSheets_iPad))); navGroup = new NavItemGroup("Pickers"); navItems.Add(navGroup); navGroup.Items.Add(new NavItem("Simple Date Picker", "", typeof(DatePicker.DatePickerSimple_iPad))); // create a table source from our nav items tableSource = new NavItemTableSource(NavigationController, navItems); // set the source on the table to our data source TableView.Source = tableSource; }