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


C# UILabel.Apply方法代码示例

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


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

示例1: ProjectReportCell

        public ProjectReportCell (IntPtr handle) : base (handle)
        {
            SelectionStyle = UITableViewCellSelectionStyle.None;

            projectTitleLabel = new UILabel ();
            projectTitleLabel.Apply (Style.ReportsView.ProjectCellTitleLabel);
            ContentView.Add (projectTitleLabel);

            timeLabel = new UILabel ();
            timeLabel.Apply (Style.ReportsView.ProjectCellTimeLabel);
            ContentView.Add (timeLabel);

            circleView = new UIView ();
            ContentView.Add (circleView);
            NormalSelectionMode = false;
        }
开发者ID:VDBBjorn,项目名称:toggl_mobile,代码行数:16,代码来源:ProjectReportCell.cs

示例2: ReloadTableViewFooter

        public ReloadTableViewFooter()
        {
            errorLabel = new UILabel ();
            errorLabel.Text = "FooterErrorLoadingLabel".Tr ();
            errorLabel.Apply (Style.Log.ReloadTableViewFooterLabel);

            syncButton = UIButton.FromType (UIButtonType.System);
            syncButton.Apply (Style.Log.ReloadTableViewFooterButton);
            syncButton.SetTitle ("FooterTryAgainLabel".Tr (), UIControlState.Normal);

            syncButton.TouchUpInside += (sender, e) => {
                if (SyncButtonPressedHandler != null) {
                    SyncButtonPressedHandler.Invoke ();
                }
            };

            Add (errorLabel);
            Add (syncButton);
        }
开发者ID:BradChang,项目名称:mobile,代码行数:19,代码来源:ReloadTableViewFooter.cs

示例3: BarChartView

        public BarChartView ()
        {
            ActivityList = new List<ReportActivity> ();

            titleTimeLabel = new UILabel ();
            titleTimeLabel.Text = "ReportsTotalLabel".Tr ();
            titleTimeLabel.Apply (Style.ReportsView.BarCharLabelTitle );
            Add (titleTimeLabel);

            totalTimeLabel = new UILabel ();
            totalTimeLabel.Apply (Style.ReportsView.BarCharLabelValue);
            Add (totalTimeLabel);

            titleMoneyLabel = new UILabel ();
            titleMoneyLabel.Apply (Style.ReportsView.BarCharLabelTitle);
            titleMoneyLabel.Text = "ReportsBillableLabel".Tr ();
            Add (titleMoneyLabel);
            moneyLabel = new UILabel ();
            moneyLabel.Apply (Style.ReportsView.BarCharLabelValue );
            Add (moneyLabel);

            barChart = new BarChart () {
                DataSource = this
            };
            Add (barChart);

            noProjectTitleLabel = new UILabel ();
            noProjectTitleLabel.Center = new CGPoint (barChart.Center.X, barChart.Center.Y - 20);
            noProjectTitleLabel.Apply (Style.ReportsView.NoProjectTitle);
            noProjectTitleLabel.Text = "ReportsLoadingTitle".Tr ();
            Add (noProjectTitleLabel);

            noProjectTextLabel = new UILabel ();
            noProjectTextLabel.Center = new CGPoint (barChart.Center.X, barChart.Center.Y + 5 );
            noProjectTextLabel.Apply (Style.ReportsView.DonutMoneyLabel);
            noProjectTextLabel.Lines = 2;
            noProjectTextLabel.Text = "ReportsLoadingText".Tr ();
            Add (noProjectTextLabel);
        }
开发者ID:VDBBjorn,项目名称:toggl_mobile,代码行数:39,代码来源:BarChartView.cs

示例4: CellDurationLabel

 public static void CellDurationLabel (UILabel v)
 {
     v.Apply (TimeEntryCell.DurationLabel);
 }
开发者ID:VDBBjorn,项目名称:toggl_mobile,代码行数:4,代码来源:Style.Log.cs

示例5: CellTaskLabel

 public static void CellTaskLabel (UILabel v)
 {
     v.Apply (TimeEntryCell.TaskLabel);
 }
开发者ID:VDBBjorn,项目名称:toggl_mobile,代码行数:4,代码来源:Style.Log.cs

示例6: CellClientLabel

 public static void CellClientLabel (UILabel v)
 {
     v.Apply (TimeEntryCell.ClientLabel);
 }
开发者ID:VDBBjorn,项目名称:toggl_mobile,代码行数:4,代码来源:Style.Log.cs

示例7: CellProjectLabel

 public static void CellProjectLabel (UILabel v)
 {
     v.Apply (TimeEntryCell.ProjectLabel);
 }
开发者ID:VDBBjorn,项目名称:toggl_mobile,代码行数:4,代码来源:Style.Log.cs

示例8: DonutChartView

        public DonutChartView ()
        {
            TableProjectList = new List<ReportProject> ();
            DonutProjectList = new List<ReportProject> ();

            grayCircle = new UIView ();
            grayCircle.Layer.AddSublayer (new CAShapeLayer () { FillColor = Color.DonutInactiveGray.CGColor});
            Add (grayCircle);

            donutChart = new XYDonutChart () {
                PieRadius = pieRadius,
                DonutLineStroke = lineStroke,
                DataSource = this,
                UserInteractionEnabled = true,
                SelectedSliceStroke = 0,
                ShowPercentage = false,
                StartPieAngle = (nfloat)Math.PI * 3/2,
                ShowLabel = false,
                AnimationSpeed = 1.0f,
                SelectedSliceOffsetRadius = 15f
            };
            Add (donutChart);

            donutChart.DidSelectSliceAtIndex += (sender, e) => {
                NormalSelectionMode = true;
                var selectedProject = DonutProjectList [e.Index];
                var idx = TableProjectList.FindIndex (p => AreEquals ( p, selectedProject));
                projectTableView.SelectRow (NSIndexPath.FromRowSection (idx, 0), true, UITableViewScrollPosition.Top);
                ((ProjectListSource)projectTableView.Source).LastSelectedIndex = idx;
                SetProjectInfo (selectedProject);
            };
            donutChart.DidDeselectSliceAtIndex += (sender, e) => {
                var selectedProject = DonutProjectList [e.Index];
                var idx = TableProjectList.FindIndex (p => AreEquals ( p, selectedProject));
                projectTableView.DeselectRow (NSIndexPath.FromRowSection (idx, 0), true);
            };
            donutChart.DidDeselectAllSlices += (sender, e) => DeselectAllProjects ();

            projectTableView = new UITableView ();
            projectTableView.RegisterClassForCellReuse (typeof (ProjectReportCell), ProjectReportCell.ProjectReportCellId);
            projectTableView.Source = new ProjectListSource (this);
            projectTableView.RowHeight = 40f;
            projectTableView.TableFooterView = new UIView ();
            var insets = projectTableView.ScrollIndicatorInsets;
            insets.Right -= 3.0f;
            projectTableView.ScrollIndicatorInsets = insets;
            Add (projectTableView);

            totalTimeLabel = new UILabel ();
            totalTimeLabel.Apply (Style.ReportsView.DonutTimeLabel);
            Add (totalTimeLabel);

            moneyLabel = new UILabel ();
            moneyLabel.Apply (Style.ReportsView.DonutMoneyLabel);
            Add (moneyLabel);

            noProjectTitleLabel = new UILabel ();
            noProjectTitleLabel.Apply (Style.ReportsView.NoProjectTitle);
            noProjectTitleLabel.Text = "ReportsLoadingTitle".Tr ();
            Add (noProjectTitleLabel);

            noProjectTextLabel = new UILabel ();
            noProjectTextLabel.Apply (Style.ReportsView.DonutMoneyLabel);
            noProjectTextLabel.Lines = 2;
            noProjectTextLabel.Text = "ReportsLoadingText".Tr ();
            Add (noProjectTextLabel);

            topBoder = new UIView ();
            bottomBoder = new UIView ();
            Add (topBoder);
            Add (bottomBoder);

            projectTableView.Alpha = 0;
            moneyLabel.Alpha = 0;
            totalTimeLabel.Alpha = 0;
        }
开发者ID:VDBBjorn,项目名称:toggl_mobile,代码行数:76,代码来源:DonutChartView.cs


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