当前位置: 首页>>代码示例>>C#>>正文


C# RootElement.Add方法代码示例

本文整理汇总了C#中MonoTouch.Dialog.RootElement.Add方法的典型用法代码示例。如果您正苦于以下问题:C# RootElement.Add方法的具体用法?C# RootElement.Add怎么用?C# RootElement.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MonoTouch.Dialog.RootElement的用法示例。


在下文中一共展示了RootElement.Add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LabelListScreen

        public LabelListScreen(IList<string> labels)
            : base(UITableViewStyle.Grouped, null)
        {
            // Navigation
            NavigationItem.LeftBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Cancel, (sender, args) =>
            {
                NavigationController.DismissViewController(true, null);
            });
            NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIBarButtonSystemItem.Done, DoneButtonClicked);

            Root = new RootElement("");
            var labelSection = new Section();
            Root.Add(labelSection);
            foreach (var label in labels)
            {
                var element = new StringElement(label);
                element.Tapped += () => {};
                labelSection.Add(element);
            }

            var customSection = new Section();
            Root.Add(customSection);
            var customElement = new StringElement("Add Custom Label");
            customElement.Tapped += () => {};
            customSection.Add(customElement);
        }
开发者ID:NamXH,项目名称:Graphy,代码行数:26,代码来源:LabelListScreen.cs

示例2: LoadView

		public override void LoadView ()
		{
			base.LoadView ();

			var root = new RootElement ("TARP Banks");

			var section = new Section ()
			{
				(usOnlyToggle = new BooleanElement("Show only US banks", false))
			};
			root.Add (section);

			//make a section from the banks. Keep a reference to it
			root.Add ((bankListSection = BuildBankSection (usOnlyToggle.Value)));

			//if the toggle changes, reload the items
			usOnlyToggle.ValueChanged += (sender, e) => {
				var newListSection = BuildBankSection(usOnlyToggle.Value);

				root.Remove(bankListSection, UITableViewRowAnimation.Fade);
				root.Insert(1, UITableViewRowAnimation.Fade, newListSection);
				bankListSection = newListSection;

			};


			Root = root;
		}
开发者ID:rmawani,项目名称:EvolveMonoTouchDialog,代码行数:28,代码来源:MixAndMatchViewController.cs

示例3: SettingsViewController

        public SettingsViewController()
            : base(new RootElement("Einstellungen"))
        {
            var root = new RootElement("Einstellungen");
            var userEntry = new EntryElement("Benutzername", "benutzername", ApplicationSettings.Instance.UserCredentials.Name);
            var passwordEntry = new EntryElement("Passwort", "passwort", ApplicationSettings.Instance.UserCredentials.Password, true);
            userEntry.AutocorrectionType = MonoTouch.UIKit.UITextAutocorrectionType.No;
            userEntry.AutocapitalizationType = MonoTouch.UIKit.UITextAutocapitalizationType.None;
            userEntry.Changed += UsernameChanged;
            passwordEntry.Changed += PasswordChanged;

            root.Add(new Section("Benutzerinformationen"){
                userEntry,
                passwordEntry
            });

            root.Add(new Section("Stundenplaneinstellungen"){
                new StyledStringElement("Andere Stundenpläne", () => {NavigationController.PushViewController(new SettingsTimetablesDetailViewController(), true);}){
                    Accessory = UITableViewCellAccessory.DisclosureIndicator
                }
            });
            Root = root;
            Title = "Einstellungen";
            NavigationItem.Title = "Einstellungen";
            TabBarItem.Image = UIImage.FromBundle("Settings-icon");
        }
开发者ID:buehler,项目名称:xamarin-hsr-challenge-project,代码行数:26,代码来源:SettingsViewController.cs

示例4: buildReport

        public void buildReport()
        {
            Root = new RootElement ("");
            var v = new UIView ();
            v.Frame = new RectangleF (10, 10, 600, 10);
            var dummy = new Section (v);
            Root.Add (dummy);
            var headerLabel = new UILabel (new RectangleF (10, 10, 800, 48)) {
                Font = UIFont.BoldSystemFontOfSize (18),
                BackgroundColor = ColorHelper.GetGPPurple (),
                TextAlignment = UITextAlignment.Center,
                TextColor = UIColor.White,
                Text = "Branch Matter Analysis"
            };
            var view = new UIViewBordered ();
            view.Frame = new RectangleF (10, 20, 800, 48);
            view.Add (headerLabel);
            Root.Add (new Section (view));
            //
            for (int i = 0; i < report.branches.Count; i++) {
                Branch branch = report.branches [i];

                Section s = new Section (branch.name + " Branch Totals");
                Root.Add (s);
                //
                if (branch.branchTotals.matterActivity != null) {
                    var matterActivitySection = new Section ();
                    var mTitle = new TitleElement ("Matter Activity");
                    matterActivitySection.Add (mTitle);
                    matterActivitySection.Add (new NumberElement (branch.branchTotals.matterActivity.active, "Active Matters: "));
                    matterActivitySection.Add (new NumberElement (
                        branch.branchTotals.matterActivity.deactivated,
                        "Deactivated Matters: "
                    ));
                    matterActivitySection.Add (new NumberElement (branch.branchTotals.matterActivity.newWork, "New Work: "));
                    matterActivitySection.Add (new NumberElement (branch.branchTotals.matterActivity.workedOn, "Worked On: "));

                    matterActivitySection.Add (new NumberElement (branch.branchTotals.matterActivity.noActivity, "No Activity: "));
                    matterActivitySection.Add (new StringElement ("No Activity Duration: " + branch.branchTotals.matterActivity.noActivityDuration));
                    Root.Add (matterActivitySection);
                }
                //
                if (branch.branchTotals.matterBalances != null) {
                    var matterBalancesSection = new Section ();
                    var mTitle = new TitleElement ("Matter Balances");
                    matterBalancesSection.Add (mTitle);
                    matterBalancesSection.Add (getElement (branch.branchTotals.matterBalances.business, S.GetText (S.BUSINESS) + ": "));
                    matterBalancesSection.Add (getElement (branch.branchTotals.matterBalances.trust, S.GetText (S.TRUST_BALANCE) + ": "));
                    matterBalancesSection.Add (getElement (branch.branchTotals.matterBalances.investment, S.GetText (S.INVESTMENTS) + ": "));
                    matterBalancesSection.Add (getElement (branch.branchTotals.matterBalances.unbilled, "Unbilled: "));
                    matterBalancesSection.Add (getElement (branch.branchTotals.matterBalances.pendingDisbursements, "Pending Disb.: "));
                    Root.Add (matterBalancesSection);
                }

            }

            for (var i = 0; i < 10; i++) {
                Root.Add (new Section (" "));
            }
        }
开发者ID:rajeshwarn,项目名称:GhostPractice-iPadRepo,代码行数:60,代码来源:MatterAnalysisBranchController.cs

示例5: buildReport

        public void buildReport()
        {
            Root = new RootElement ("");
            var v = new UIView ();
            v.Frame = new RectangleF (10, 10, 600, 10);
            var dummy = new Section (v);
            Root.Add (dummy);
            var headerLabel = new UILabel (new RectangleF (10, 10, 800, 48)) {
                Font = UIFont.BoldSystemFontOfSize (18),
                BackgroundColor = ColorHelper.GetGPPurple (),
                TextAlignment = UITextAlignment.Center,
                TextColor = UIColor.White,
                Text = "Owner Fee Target Progress"
            };
            var view = new UIViewBordered ();
            view.Frame = new RectangleF (10, 20, 800, 48);
            view.Add (headerLabel);
            Root.Add (new Section (view));

            //			NumberFormatInfo nfi = new CultureInfo ("en-US", false).NumberFormat;

            for (int i = 0; i < report.branches.Count; i++) {
                Branch branch = report.branches [i];
                Section s = new Section (branch.name);
                //var t1 = new StringElement(branch.name + " Branch Totals");
                //s.Add(t1);
                Root.Add (s);

                for (int j = 0; j < branch.owners.Count; j++) {
                    Owner o = branch.owners [j];
                    Section ownerSection = new Section (o.name);
                    ownerSection.Add (new BigFinanceElement ("Invoiced MTD Total:  ", o.invoicedMTDTotal));
                    StyledStringElement recMTD = new StyledStringElement ("Recorded MTD");
                    recMTD.BackgroundColor = UIColor.LightGray;
                    recMTD.TextColor = UIColor.White;
                    ownerSection.Add (recMTD);
                    ownerSection.Add (getElement (o.recordedMTD.achieved, "Achieved:  "));
                    ownerSection.Add (getElement (o.recordedMTD.estimatedTarget, "Estimated Target:  "));
                    ownerSection.Add (getElement (o.recordedMTD.invoicedDebits, "Invoiced Debits:  "));
                    ownerSection.Add (getElement (o.recordedMTD.unbilled, "Unbilled:  "));
                    ownerSection.Add (getElement (o.recordedMTD.total, "Total:  "));
                    //
                    StyledStringElement recYTD = new StyledStringElement ("Recorded YTD");
                    recYTD.BackgroundColor = UIColor.LightGray;
                    recYTD.TextColor = UIColor.White;
                    ownerSection.Add (recYTD);
                    ownerSection.Add (getElement (o.recordedYTD.achieved, "Achieved:  "));
                    ownerSection.Add (getElement (o.recordedYTD.estimatedTarget, "Estimated Target:  "));
                    ownerSection.Add (getElement (o.recordedYTD.invoiced, "Invoiced:  "));
                    ownerSection.Add (getElement (o.recordedYTD.unbilled, "Unbilled:  "));
                    ownerSection.Add (getElement (o.recordedYTD.total, "Total:  "));

                    Root.Add (ownerSection);

                }
            }
            for (var i = 0; i < 10; i++) {
                Root.Add (new Section (" "));
            }
        }
开发者ID:rajeshwarn,项目名称:GhostPractice-iPadRepo,代码行数:60,代码来源:FeeTargetBranchOwnerController.cs

示例6: ProvisioningDialog

        public ProvisioningDialog()
            : base(UITableViewStyle.Grouped, null)
        {
            Root = new RootElement ("GhostPractice Mobile");
            var topSec = new Section ("Welcome");
            topSec.Add (new StringElement ("Please enter activation code"));
            activation = new EntryElement ("Code", "Activation Code", "999998-zcrdbrkqwogh");
            topSec.Add (activation);
            var submit = new StringElement ("Send Code");
            submit.Alignment = UITextAlignment.Center;

            submit.Tapped += delegate {
                if (activation.Value == null || activation.Value == string.Empty) {
                    new UIAlertView ("Device Activation", "Please enter activation code", null, "OK", null).Show ();
                    return;
                }
                if (!isBusy) {
                    getAsyncAppAndPlatform ();
                } else {
                    Wait ();
                }

            };
            topSec.Add (submit);
            Root.Add (topSec);

            UIImage img = UIImage.FromFile ("Images/launch_small.png");
            UIImageView v = new UIImageView (new RectangleF (0, 0, 480, 600));
            v.Image = img;
            Root.Add (new Section (v));
        }
开发者ID:rajeshwarn,项目名称:GhostPractice-iPadRepo,代码行数:31,代码来源:ProvisioningDialog.cs

示例7: ViewDidLoad

        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            var root = new RootElement(Title);
            root.Add(new Section()
            {
                new MultilinedElement("AppreciateUI") { Value = About }
            });

            root.Add(new Section()
            {
                new StyledElement("Source Code", () => UIApplication.SharedApplication.OpenUrl(new NSUrl("https://github.com/thedillonb/appreciateui")))
            });

            if (MFMailComposeViewController.CanSendMail)
            {
                root.Add(new Section()
                {
                    new StyledElement("Contact Me", OpenMailer)
                });
            }

            root.Add(new Section(String.Empty, "Thank you for downloading. Enjoy!")
            {
                new StyledElement("Follow Me On Twitter", () => UIApplication.SharedApplication.OpenUrl(new NSUrl("https://twitter.com/thedillonb"))),
                new StyledElement("Rate This App", () => UIApplication.SharedApplication.OpenUrl(new NSUrl("https://itunes.apple.com/us/app/appreciateui/id651317060?ls=1&mt=8"))),
                new StyledElement("App Version", NSBundle.MainBundle.InfoDictionary.ValueForKey(new NSString("CFBundleVersion")).ToString())
            });

            root.UnevenRows = true;
            Root = root;
        }
开发者ID:GSerjo,项目名称:appreciateui,代码行数:33,代码来源:AboutController.cs

示例8: GetViewController

		public UIViewController GetViewController ()
		{
			var menu = new RootElement ("Test Runner");
			
			Section main = new Section ();
			foreach (TestSuite suite in suites) {
				main.Add (Setup (suite));
			}
			menu.Add (main);
			
			Section options = new Section () {
				new StringElement ("Run Everything", Run),
				new StyledStringElement ("Options", Options) { Accessory = UITableViewCellAccessory.DisclosureIndicator },
				new StyledStringElement ("Credits", Credits) { Accessory = UITableViewCellAccessory.DisclosureIndicator }
			};
			menu.Add (options);
			
			var dv = new DialogViewController (menu) { Autorotate = true };
			
			// AutoStart running the tests (with either the supplied 'writer' or the options)
			if (AutoStart) {
				ThreadPool.QueueUserWorkItem (delegate {
					window.BeginInvokeOnMainThread (delegate {
						Run ();	
						// optionally end the process, e.g. click "Touch.Unit" -> log tests results, return to springboard...
						// http://stackoverflow.com/questions/1978695/uiapplication-sharedapplication-terminatewithsuccess-is-not-there
						if (TerminateAfterExecution)
							TerminateWithSuccess ();
					});
				});
			}
			return dv;
		}
开发者ID:rolfbjarne,项目名称:Touch.Unit,代码行数:33,代码来源:TouchRunner.cs

示例9: LoadView

		public override void LoadView ()
		{
			base.LoadView ();

			var root = new RootElement ("Profile");

			root.Add (new Section() {
				new UIViewElement(null, new ProfileImageView(), true)
			});

			root.Add (new BackgroundImageSection () {
				new StyledStringElement("Projects", delegate {}) { BackgroundColor = UIColor.Clear }
			});

			root.Add (new BackgroundImageSection () {
				new StyledStringElement("Comments", delegate {}) { BackgroundColor = UIColor.Clear },
	            new StyledStringElement("Support", delegate {}) { BackgroundColor = UIColor.Clear },
	            new StyledStringElement("Lists", delegate {}) { BackgroundColor = UIColor.Clear }
			});

			root.Add (new Section () {
				new StyledStringElement("Projects", delegate {})
			});

			root.Add (new Section () {
				new StyledStringElement("Comments", delegate {}),
				new StyledStringElement("Support", delegate {}),
				new StyledStringElement("Lists", delegate {})
			});

			Root = root;

			NavigationItem.TitleView = new UIImageView (Resources.KickstarterLogo);
		}
开发者ID:rmawani,项目名称:EvolveMonoTouchDialog,代码行数:34,代码来源:ProfileViewController.cs

示例10: OnCreateMenu

		/// <summary>
		/// Invoked when it comes time to set the root so the child classes can create their own menus
		/// </summary>
		private void OnCreateMenu(RootElement root)
		{
            var addGistSection = new Section();
            root.Add(addGistSection);
            addGistSection.Add(new MenuElement("New Gist", () => {
                var gistController = new CreateGistController();
                gistController.Created = (id) => {
                    NavigationController.PushViewController(new GistInfoController(id), true);
                };
                var navController = new UINavigationController(gistController);
                PresentViewController(navController, true, null);
            }, Images.Buttons.NewGist));

            var gistMenuSection = new Section() { HeaderView = new MenuSectionView("Gists") };
            root.Add(gistMenuSection);
            gistMenuSection.Add(new MenuElement("My Gists", () => NavigationController.PushViewController(new MyGistsController(), true), Images.Buttons.MyGists));
            gistMenuSection.Add(new MenuElement("Starred", () => NavigationController.PushViewController(new StarredGistsController(), true), Images.Buttons.Star2));
            gistMenuSection.Add(new MenuElement("Public", () => NavigationController.PushViewController(new PublicGistsController(), true), Images.Buttons.Public));

//            var labelSection = new Section() { HeaderView = new MenuSectionView("Tags") };
//            root.Add(labelSection);
//            labelSection.Add(new MenuElement("Add New Tag", () => { }, null));

            var moreSection = new Section() { HeaderView = new MenuSectionView("Info") };
            root.Add(moreSection);
            moreSection.Add(new MenuElement("About", () => NavigationController.PushViewController(new AboutController(), true), Images.Buttons.Info));
            moreSection.Add(new MenuElement("Feedback & Support", () => { 
                var config = UserVoice.UVConfig.Create("http://gistacular.uservoice.com", "lYY6AwnzrNKjHIkiiYbbqA", "9iLse96r8yki4ZKknfHKBlWcbZAH9g8yQWb9fuG4");
                UserVoice.UserVoice.PresentUserVoiceInterface(this, config);
            }, Images.Buttons.Feedback));
            moreSection.Add(new MenuElement("Logout", Logout, Images.Buttons.Logout));
		}
开发者ID:envy4s,项目名称:Gistacular,代码行数:35,代码来源:MenuController.cs

示例11: FieldImage

        public FieldImage(string farmName,int farmID,FlyoutNavigationController fnc,SelectField sf)
            : base(UITableViewStyle.Grouped, null)
        {
            Root = new RootElement (null) {};
            this.Pushing = true;

            var section = new Section () {};
            var totalRainGuage = new StringElement ("Total Raid Guage(mm): " + DBConnection.getRain (farmID),()=>{});
            var rainGuage=new EntryElement ("New Rain Guage(mm): ",null,"         ");
            rainGuage.KeyboardType = UIKeyboardType.NumbersAndPunctuation;
            var update=new StringElement("Add",()=>{
                try{
                DBConnection.updateRain(farmID,Int32.Parse(rainGuage.Value));
                }
                catch(Exception e){
                    new UIAlertView ("Error", "Wrong input format!", null, "Continue").Show ();
                    return;
                }
                UIAlertView alert = new UIAlertView ();
                alert.Title = "Success";
                alert.Message = "Your Data Has Been Saved";
                alert.AddButton("OK");
                alert.Show();
            });
            var showDetail=new StringElement("Show Rain Guage Detail",()=>{
                RainDetail rd=new RainDetail(farmID,farmName);
                sf.NavigationController.PushViewController(rd,true);
            });
            section.Add (totalRainGuage);
            section.Add (rainGuage);
            section.Add (update);
            section.Add (showDetail);

            Root.Add (section);

            var section2 = new Section () { };
            var farmImg=UIImage.FromFile ("img/"+farmName+".jpg");
            if(farmImg==null)
                farmImg=UIImage.FromFile ("Icon.png");
            var imageView = new UIImageView (farmImg);
            if(farmImg==null)
                farmImg=UIImage.FromFile ("Icon.png");

            var scrollView=new UIScrollView (
                new RectangleF(0,0,fnc.View.Frame.Width-20,250)
            );

            scrollView.ContentSize = imageView.Image.Size;
            scrollView.AddSubview (imageView);

            scrollView.MaximumZoomScale = 3f;
            scrollView.MinimumZoomScale = .1f;
            scrollView.ViewForZoomingInScrollView += (UIScrollView sv) => { return imageView; };

            var imageElement=new UIViewElement(null,scrollView,false);
            section2.Add(imageElement);
            Root.Add (section2);
        }
开发者ID:Bibo77,项目名称:MADMUCfarm,代码行数:58,代码来源:SelectField.cs

示例12: SelectFarm

        public SelectFarm()
            : base(UITableViewStyle.Grouped, null)
        {
            Root = new RootElement (null){};
            this.Pushing=true;

            //farm section
            var farms = DBConnection.getAllFarms();
            int farmNumber=farms.Count();
            var section = new Section ("Farms:"){};

            foreach(Farm farm in farms){
                int farmID = farm.farmID;
                string farmName = farm.farmName;
                int fieldNumber = DBConnection.getAllFields(farmID).Count ();
                var farmImg=UIImage.FromFile ("img/"+farmName+".jpg");
                if(farmImg==null)
                    farmImg=UIImage.FromFile ("Icon.png");

                var theFarm=new BadgeElement(farmImg,farmName+"      "+fieldNumber+" fields",()=>{
                    Console.WriteLine("Farm Name is: "+farmName);
                    var field=new SelectField(farmName,farmID,fieldNumber);
                    this.NavigationController.PushViewController(field,true);
                });
                section.Add(theFarm);
            }
            Root.Add(section);

            //grain section
            var section2 = new Section ("Grain Inventory:"){};
            var grin1 = new StringElement ("Bin (1-15)", () => {
                var selectBin=new SelectBin(1);
                this.NavigationController.PushViewController(selectBin,true);
            });
            var grin2 = new StringElement ("Bin(16-30)", () => {
                var selectBin=new SelectBin(16);
                this.NavigationController.PushViewController(selectBin,true);
            });
            var grin3 = new StringElement ("Bin(31-45)", () => {
                var selectBin=new SelectBin(31);
                this.NavigationController.PushViewController(selectBin,true);
            });
            var grin4 = new StringElement ("Bin(46-60)", () => {
                var selectBin=new SelectBin(46);
                this.NavigationController.PushViewController(selectBin,true);
            });
            var grin5 = new StringElement ("Bin(61-75)", () => {
                var selectBin=new SelectBin(61);
                this.NavigationController.PushViewController(selectBin,true);
            });

            section2.Add (grin1);
            section2.Add (grin2);
            section2.Add (grin3);
            section2.Add (grin4);
            section2.Add (grin5);
            Root.Add (section2);
        }
开发者ID:Bibo77,项目名称:MADMUCfarm,代码行数:58,代码来源:SelectFarm.cs

示例13: CreateTable

		private void CreateTable()
		{
			var application = Mvx.Resolve<IApplicationService>();
			var vm = (SettingsViewModel)ViewModel;
			var currentAccount = application.Account;

			var saveCredentials = new TrueFalseElement("Save Credentials".t(), !currentAccount.DontRemember, e =>
				{ 
					currentAccount.DontRemember = !e.Value;
					application.Accounts.Update(currentAccount);
				});

			var showOrganizationsInEvents = new TrueFalseElement("Show Teams under Events".t(), currentAccount.ShowTeamEvents, e =>
			{ 
				currentAccount.ShowTeamEvents = e.Value;
				application.Accounts.Update(currentAccount);
			});

			var showOrganizations = new TrueFalseElement("List Teams & Groups in Menu".t(), currentAccount.ExpandTeamsAndGroups, e =>
			{ 
				currentAccount.ExpandTeamsAndGroups = e.Value;
				application.Accounts.Update(currentAccount);
			});

			var repoDescriptions = new TrueFalseElement("Show Repo Descriptions".t(), currentAccount.RepositoryDescriptionInList, e =>
			{ 
				currentAccount.RepositoryDescriptionInList = e.Value;
				application.Accounts.Update(currentAccount);
			});

			var startupView = new StyledStringElement("Startup View", vm.DefaultStartupViewName, MonoTouch.UIKit.UITableViewCellStyle.Value1)
			{ 
				Accessory = MonoTouch.UIKit.UITableViewCellAccessory.DisclosureIndicator,
			};
			startupView.Tapped += () => vm.GoToDefaultStartupViewCommand.Execute(null);

			//var pushNotifications = new TrueFalseElement("Push Notifications".t(), vm.PushNotificationsEnabled, e => vm.PushNotificationsEnabled = e.Value);

			var totalCacheSizeMB = vm.CacheSize.ToString("0.##");
			var deleteCache = new StyledStringElement("Delete Cache".t(), string.Format("{0} MB", totalCacheSizeMB), MonoTouch.UIKit.UITableViewCellStyle.Value1);
			deleteCache.Tapped += () =>
			{ 
				vm.DeleteAllCacheCommand.Execute(null);
				deleteCache.Value = string.Format("{0} MB", 0);
				ReloadData();
			};

			var usage = new TrueFalseElement("Send Anonymous Usage".t(), vm.AnalyticsEnabled, e => vm.AnalyticsEnabled = e.Value);

			//Assign the root
			var root = new RootElement(Title);
			root.Add(new Section("Account") { saveCredentials /*			, pushNotifications */ });
			root.Add(new Section("Apperance") { showOrganizationsInEvents, showOrganizations, repoDescriptions, startupView });
			root.Add(new Section ("Internal") { deleteCache, usage });
			Root = root;

		}
开发者ID:vbassini,项目名称:CodeBucket,代码行数:57,代码来源:SettingsView.cs

示例14: buildFeeTargetReport

        public void buildFeeTargetReport()
        {
            Root = new RootElement ("Practice Fee Target Progress");
            Stripper.SetReportHeader (Root, "Practice Fee Target Progress", null, contentWidth);

            PracticeTotals totals = this.report.practiceTotals;

            var totSection = new Section ("");
            var tot1 = new BigFinanceElement ("Invoiced MTD Total:  ", totals.invoicedMTDTotal);

            totSection.Add (tot1);
            Root.Add (totSection);
            //Fee Target Progress: The Invoiced Debits MTD field display the invoiced YTD value
            if (totals.recordedMTD != null) {

                var mtdSection = new Section ("Recorded MTD");
                mtdSection.Add (getElement (totals.recordedMTD.achieved, "Achieved: "));
                mtdSection.Add (getElement (totals.recordedMTD.estimatedTarget, "Estimated Target: "));
                mtdSection.Add (getElement (totals.recordedMTD.invoicedDebits, "Invoiced: "));
                mtdSection.Add (getElement (totals.recordedMTD.unbilled, "Unbilled: "));
                mtdSection.Add (getElement (totals.recordedMTD.total, "Total: "));
                Root.Add (mtdSection);
            }
            if (totals.recordedYTD != null) {

                var mtdSection = new Section ("Recorded YTD");
                mtdSection.Add (getElement (totals.recordedYTD.achieved, "Achieved: "));
                mtdSection.Add (getElement (totals.recordedYTD.estimatedTarget, "Estimated Target: "));
                mtdSection.Add (getElement (totals.recordedYTD.invoiced, "Invoiced: "));
                mtdSection.Add (getElement (totals.recordedYTD.unbilled, "Unbilled: "));
                mtdSection.Add (getElement (totals.recordedYTD.total, "Total: "));
                Root.Add (mtdSection);
            }
            if (totals.matterActivity != null) {
                var matterActivitySection = new Section ("Matter Activity");
                var tot2 = new NumberElement (totals.matterActivity.active, "Active Matters: ");
                matterActivitySection.Add (tot2);
                var tot3 = new NumberElement (totals.matterActivity.deactivated, "Deactivated Matters: ");
                matterActivitySection.Add (tot3);
                var tot4 = new NumberElement (totals.matterActivity.newWork, "New Work: ");
                matterActivitySection.Add (tot4);
                var tot5 = new NumberElement (totals.matterActivity.noActivity, "No Activity: ");
                matterActivitySection.Add (tot5);
                var tot6 = new StringElement ("No Activity Duration:   " + totals.matterActivity.noActivityDuration);
                matterActivitySection.Add (tot6);
                Root.Add (matterActivitySection);
            }
            //
            if (totals.matterBalances != null) {
                var matterBalancesSection = new Section ("Matter Balances");
                matterBalancesSection.Add (getElement (totals.matterBalances.business, "Business: "));
                matterBalancesSection.Add (getElement (totals.matterBalances.unbilled, "Unbilled: "));
                matterBalancesSection.Add (getElement (totals.matterBalances.trust, "Trust Balance: "));
                matterBalancesSection.Add (getElement (totals.matterBalances.investment, "Investments: "));
                Root.Add (matterBalancesSection);
            }
        }
开发者ID:rajeshwarn,项目名称:GhostPractice-iPadRepo,代码行数:57,代码来源:FeeTargetProgressController.cs

示例15: buildReport

        public void buildReport()
        {
            Root = new RootElement ("");
            var v = new UIView ();
            v.Frame = new RectangleF (10, 10, 600, 10);
            var dummy = new Section (v);
            Root.Add (dummy);
            var headerLabel = new UILabel (new RectangleF (10, 10, 800, 48)) {
                Font = UIFont.BoldSystemFontOfSize (18),
                BackgroundColor = ColorHelper.GetGPPurple (),
                TextAlignment = UITextAlignment.Center,
                TextColor = UIColor.White,
                Text = "Owner Matter Analysis"
            };
            var view = new UIViewBordered ();
            view.Frame = new RectangleF (10, 10, 800, 48);
            view.Add (headerLabel);
            Root.Add (new Section (view));

            //NumberFormatInfo nfi = new CultureInfo ("en-US", false).NumberFormat;
            for (int i = 0; i < report.branches.Count; i++) {
                Branch branch = report.branches [i];
                Section s = new Section (branch.name);
                Root.Add (s);

                for (int j = 0; j < branch.owners.Count; j++) {
                    Owner o = branch.owners [j];
                    Section seco = new Section (o.name);

                    var recMTD = new TitleElement ("Matter Activity");
                    seco.Add (recMTD);
                    seco.Add (new NumberElement (o.matterActivity.active, "Active:  "));
                    seco.Add (new NumberElement (o.matterActivity.deactivated, "Deactivated:  "));
                    seco.Add (new NumberElement (o.matterActivity.newWork, "New Work:  "));
                    seco.Add (new NumberElement (o.matterActivity.workedOn, "Worked On:  "));
                    seco.Add (new NumberElement (o.matterActivity.noActivity, "No Activity:  "));
                    seco.Add (new StringElement ("No Activity Duration:  " + o.matterActivity.noActivityDuration));
                    //
                    var recYTD = new TitleElement ("Matter Balances");
                    seco.Add (recYTD);
                    seco.Add (getElement (o.matterBalances.business, S.GetText (S.BUSINESS) + ":  "));
                    seco.Add (getElement (o.matterBalances.trust, S.GetText (S.TRUST) + ":  "));
                    seco.Add (getElement (o.matterBalances.investment, S.GetText (S.INVESTMENTS) + ":  "));
                    seco.Add (getElement (o.matterBalances.unbilled, "Unbilled:  "));
                    seco.Add (getElement (o.matterBalances.pendingDisbursements, "Pending Disb:  "));

                    Root.Add (seco);

                }

            }

            for (var i = 0; i < 10; i++) {
                Root.Add (new Section (" "));
            }
        }
开发者ID:rajeshwarn,项目名称:GhostPractice-iPadRepo,代码行数:56,代码来源:MatterAnalysisBranchOwnerController.cs


注:本文中的MonoTouch.Dialog.RootElement.Add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。