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


C# ILabel类代码示例

本文整理汇总了C#中ILabel的典型用法代码示例。如果您正苦于以下问题:C# ILabel类的具体用法?C# ILabel怎么用?C# ILabel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: Start

		/// <summary>
		/// Start this instance.
		/// <para xml:lang="es">
		/// Inicia la instancia del objeto Calendar.
		/// </para>
		/// </summary>
		public override void Start()
		{
			base.Start();

			// Create an Stack
			IStack stack = Platform.Current.Create<IStack>();

			// Creates an Label with text and a specific size and adds it to the stack.
			lblLabel = Platform.Current.Create<ILabel>();
			lblLabel.Text = "Select 1 day";
			lblLabel.Height = 30;
			stack.Children.Add(lblLabel);

			// Creates an Calendar with text specific and adds it to the stack.
			calendar = Platform.Current.Create<ICalendar>();
			calendar.Name = "calendar";
			calendar.Bold = true;
			stack.Children.Add(calendar);

			// Creates the Button cmdChange with text specific, with the event also click and adds it to the stack.
			IButton cmdChange = Platform.Current.Create<IButton>();
			cmdChange.Text = "Change";
			cmdChange.Click += CmdChange_Click;
			stack.Children.Add(cmdChange);

			// Creates the Button cmdClose with text specific, with the event also click and adds it to the stack.
			IButton cmdClose = Platform.Current.Create<IButton>();
			cmdClose.Text = "Close";
			cmdClose.Click += CmdClose_Click;
			stack.Children.Add(cmdClose);

			// Establishes the content and title of the page
			Platform.Current.Page.Title = "Test label";
			Platform.Current.Page.Content = stack;
		}
开发者ID:okhosting,项目名称:OKHOSTING.UI,代码行数:41,代码来源:CalendarController.cs

示例2: Start

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

			IStack stack = Platform.Current.Create<IStack>();

			cmdShow = Platform.Current.Create<IButton>();
			cmdShow.Text = "Show/Hide";
			cmdShow.Click += CmdShow_Click;
			cmdShow.BackgroundColor = new Color(1, 255, 0, 0);
			cmdShow.FontColor = new Color(1, 255, 255, 255);
			stack.Children.Add(cmdShow);

			lbltext = Platform.Current.Create<ILabel>();
			lbltext.Text = "I'm visible, i want an ice-cream";
			lbltext.Visible = false;
			
			stack.Children.Add(lbltext);

			IButton cmdClose = Platform.Current.Create<IButton>();
			cmdClose.Text = "Close";
			cmdClose.Click += CmdClose_Click;
			stack.Children.Add(cmdClose);

			Platform.Current.Page.Title = "Test label";
			Platform.Current.Page.Content = stack;
		}
开发者ID:okhosting,项目名称:OKHOSTING.UI,代码行数:27,代码来源:ButtonController.cs

示例3: Start

		/// <summary>
		/// Start this instance.
		/// <para xml:lang="es">
		/// Inicia la instancia del objeto CheckBox.
		/// </para>
		/// </summary>
		public override void Start()
		{
			base.Start();

			// Create a Stack
			IStack stack = Platform.Current.Create<IStack>();

			// Creates an Label with text and a specific size and adds it to the stack.
			lblLabel = Platform.Current.Create<ILabel>();
			lblLabel.Text = "Click on the checkbox";
			lblLabel.Height = 30;
			stack.Children.Add(lblLabel);

			// Creates an CheckBox selected with the event also click and adds it to the stack.
			checkBox = Platform.Current.Create<ICheckBox>();
			checkBox.Value = true;
			checkBox.ValueChanged += checkBox_ValueChanged;
			stack.Children.Add(checkBox);

			// Creates the Button cmdClose with text specific, with the event also click and adds it to the stack.
			IButton cmdClose = Platform.Current.Create<IButton>();
			cmdClose.Text = "Close";
			cmdClose.Click += CmdClose_Click;
			stack.Children.Add(cmdClose);

			// Establishes the content and title of the page
			Platform.Current.Page.Title = "Test checkbox";
			Platform.Current.Page.Content = stack;
		}
开发者ID:okhosting,项目名称:OKHOSTING.UI,代码行数:35,代码来源:CheckboxController.cs

示例4: UnnamedConcreteDependency

        public UnnamedConcreteDependency(ILabel regent, int regentIndex, ILabel dependent, int dependentIndex) :
            base(regent, dependent)
        {

            headIndex = regentIndex;
            depIndex = dependentIndex;
        }
开发者ID:gblosser,项目名称:OpenNlp,代码行数:7,代码来源:UnnamedConcreteDependency.cs

示例5: Learn

 /// <summary>
 /// Learns from the given example.
 /// </summary>
 /// <param name="example">The example to learn.</param>
 /// <param name="label">The optional label for this <paramref name="example"/>.</param>
 /// <param name="index">The optional index of the example, the <paramref name="label"/> should be attributed to.</param>
 public void Learn(object example, ILabel label = null, int? index = null)
 {
     using (var ex = GetOrCreateSerializer(example.GetType()).Serialize(example, label, index))
     {
         ex.Learn();
     }
 }
开发者ID:KaiWeiChang,项目名称:vowpal_wabbit,代码行数:13,代码来源:VowpalWabbitDynamic.cs

示例6: TaggedWord

 /// <summary>
 /// Create a new <code>TaggedWord</code>.
 /// </summary>
 /// <param name="oldLabel">
 /// A Label.  If it implements the HasWord and/or HasTag interface, then the corresponding value will be set
 /// </param>
 public TaggedWord(ILabel oldLabel) : base(oldLabel.Value())
 {
     if (oldLabel is IHasTag)
     {
         this.vTag = ((IHasTag) oldLabel).Tag();
     }
 }
开发者ID:gblosser,项目名称:OpenNlp,代码行数:13,代码来源:TaggedWord.cs

示例7: Parse

 /// <summary>
 /// Parses the example.
 /// </summary>
 /// <param name="json">The example to parse.</param>
 /// <param name="label">
 /// Optional label, taking precedence over "_label" property found in <paramref name="json"/>.
 /// If null, <paramref name="json"/> will be inspected and the "_label" property used as label.
 /// </param>
 /// <returns>The VowpalWabbit native example.</returns>
 public VowpalWabbitExample Parse(string json, ILabel label = null)
 {
     using (var textReader = new JsonTextReader(new StringReader(json)))
     {
         return this.Parse(textReader, label);
     }
 }
开发者ID:xiongxiongufl,项目名称:vowpal_wabbit,代码行数:16,代码来源:VowpalWabbitJsonSerializer.cs

示例8: Learn

 /// <summary>
 /// Learns from the given example.
 /// </summary>
 /// <param name="example">The example to learn.</param>
 /// <param name="label">The label for this <paramref name="example"/>.</param>
 public void Learn(object example, ILabel label)
 {
     using (var ex = GetOrCreateSerializer(example.GetType()).Serialize(example, label))
     {
         this.vw.Learn(ex);
     }
 }
开发者ID:adgaudio,项目名称:vowpal_wabbit,代码行数:12,代码来源:VowpalWabbitDynamic.cs

示例9: Validate

 public void Validate(string line, string json, IVowpalWabbitLabelComparator labelComparator = null, ILabel label = null)
 {
     using (var jsonSerializer = new VowpalWabbitJsonSerializer(this.vw))
     using (var jsonExample = jsonSerializer.ParseAndCreate(json, label))
     {
         this.Validate(line, jsonExample, labelComparator, label);
     }
 }
开发者ID:XkhldY,项目名称:vowpal_wabbit,代码行数:8,代码来源:VowpalWabbitExampleJsonValidator.cs

示例10: HotspotLabel

		public HotspotLabel(IGame game, ILabel label)
		{
			_label = label;
			_events = game.Events;
			_input = game.Input;
			_state = game.State;
			_game = game;
		}
开发者ID:tzachshabtay,项目名称:MonoAGS,代码行数:8,代码来源:HotspotLabel.cs

示例11: LabelState

        public LabelState(ILabel label)
        {
            Point = label.Point; Position = label.Position; Size = label.Size;
              IsVisible = label.IsVisible; IsMovable = label.IsMovable; PlotCenter = label.PlotCenter;

              if (label is LabelState)
            Energy = ((LabelState)label).Energy;
        }
开发者ID:mdjabirov,项目名称:C1Decompiled,代码行数:8,代码来源:LabelState.cs

示例12: Intersect

        internal static bool Intersect(ILabel label1, ILabel label2)
        {
            var rect1 = label1.RectFromLabel();

              var rect2 = label2.RectFromLabel();
              rect1.Intersect(rect2);

              return (!rect1.IsEmpty);
        }
开发者ID:mdjabirov,项目名称:C1Decompiled,代码行数:9,代码来源:BaseLabelArranger.cs

示例13: LabelViewModel

 public LabelViewModel(ILabel model, MainViewModel main)
     : base(main)
 {
     if (model == null)
         throw new ArgumentNullException("model");
     this.model = model;
     main.RegisterViewModel(model, this);
     LoadViewModels();
 }
开发者ID:TheProjecter,项目名称:sheet-dot-net,代码行数:9,代码来源:LabelViewModel.cs

示例14: StringLabel

 /// <summary>
 /// Create a new <code>StringLabel</code> with the
 /// <code>value()</code> of another label as its label.
 /// </summary>
 /// <param name="label">The other label</param>
 public StringLabel(ILabel label)
 {
     this.str = label.Value();
     if (label is IHasOffset)
     {
         var ofs = (IHasOffset) label;
         SetBeginPosition(ofs.BeginPosition());
         SetEndPosition(ofs.EndPosition());
     }
 }
开发者ID:gblosser,项目名称:OpenNlp,代码行数:15,代码来源:StringLabel.cs

示例15: MainTitleIconControlWin

        /// <summary>
        /// Constructs a <see cref="MainTitleIconControlWin"/>
        /// </summary>
        public MainTitleIconControlWin(IControlFactory controlFactory)
        {
            if (controlFactory == null) throw new ArgumentNullException("controlFactory");
            _controlFactory = controlFactory;
            _panel = _controlFactory.CreatePanel();
            ((PanelWin)_panel).BackgroundImage = CollapsiblePanelResource.headergradient;
            _panel.BackColor = Color.Transparent;
            _panel.Dock = Habanero.Faces.Base.DockStyle.Top;

            _panel.Height = 23;

            _icon = _controlFactory.CreateLabel();
            ((LabelWin)_icon).BackgroundImage = CollapsiblePanelResource.headergradient;
            _icon.BackColor = Color.Transparent;
            ((LabelWin)_icon).BackgroundImageLayout = ImageLayout.Center;
            _icon.Dock = Habanero.Faces.Base.DockStyle.Left;
            _icon.Size = new Size(20, 20);

            _title = _controlFactory.CreateLabel();
            _title.Dock = Habanero.Faces.Base.DockStyle.Fill;
            _title.BackColor = Color.Transparent;
            _title.TextAlign = ContentAlignment.MiddleLeft;
            _title.ForeColor = Color.White;

            _panel.Controls.Add(_title);
            _panel.Controls.Add(_icon);
            _panel.MaximumSize = new Size(2000, 23);
            this.Dock = DockStyleWin.GetDockStyle(DockStyle.Top);
            this.Controls.Add((PanelWin)_panel);
            this.Height = 23;
        }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:34,代码来源:MainTitleIconControlWin.cs


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