• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ILabel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



ILabel类属于命名空间,在下文中一共展示了ILabel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: NewLabel

 public virtual ILabel NewLabel(ILabel oldLabel)
 {
     if (oldLabel is IHasTag)
     {
         return new WordTag(oldLabel.Value(), ((IHasTag)oldLabel).Tag());
     }
     else
     {
         return new WordTag(oldLabel.Value());
     }
 }
开发者ID:sandily,项目名称:Stanford.NER.Net,代码行数:11,代码来源:WordTagFactory.cs


示例16: Validate

        public void Validate(string line, string json, IVowpalWabbitLabelComparator labelComparator = null, ILabel label = null)
        {
            using (var strExample = this.vw.ParseLine(line))
            using (var jsonSerializer = new VowpalWabbitJsonSerializer(this.vw))
            using (var jsonExample = (VowpalWabbitSingleLineExampleCollection)jsonSerializer.ParseAndCreate(json, label))
            using (var strJsonExample = this.vw.ParseLine(jsonExample.Example.VowpalWabbitString))
            {
                var diff = strExample.Diff(this.vw, jsonExample.Example, labelComparator);
                Assert.IsNull(diff, diff + " generated string: '" + jsonExample.Example.VowpalWabbitString + "'");

                diff = strExample.Diff(this.vw, strJsonExample, labelComparator);
                Assert.IsNull(diff, diff);
            }
        }
开发者ID:ansdma,项目名称:vowpal_wabbit,代码行数:14,代码来源:VowpalWabbitExampleJsonValidator.cs


示例17: GetViewModel

 public LabelViewModel GetViewModel(ILabel model)
 {
     LabelViewModel vm;
     if (labelViewModels.ContainsKey(model.ID))
     {
         vm = labelViewModels[model.ID];
         vm.Model = model;
     }
     else
     {
         vm = new LabelViewModel(model, this);
     }
     return vm;
 }
开发者ID:TheProjecter,项目名称:sheet-dot-net,代码行数:14,代码来源:ViewModelFactory.cs


示例18: AGSDialogOption

		//Parameter names for speakOption and showOnce are used in the factory, changing the names requires factory code change as well
		public AGSDialogOption(IDialogActions actions, ICharacter player, ILabel label, bool exitDialogOnFinish = false, 
                               bool speakOption = true, bool showOnce = false, ITextConfig hoverConfig = null, ITextConfig hasBeenChosenConfig = null)
		{
			_actions = actions;
			_player = player;
			Label = label;
			_normalConfig = label.TextConfig;
			HoverConfig = hoverConfig;
            HasBeenChosenConfig = hasBeenChosenConfig;
			ExitDialogWhenFinished = exitDialogOnFinish;
			SpeakOption = speakOption;
			ShowOnce = showOnce;
			label.MouseEnter.Subscribe(onMouseEnter);
			label.MouseLeave.Subscribe(onMouseLeave);
		}
开发者ID:tzachshabtay,项目名称:MonoAGS,代码行数:16,代码来源:AGSDialogOption.cs


示例19: 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


示例20: MainTitleIconControlVWG

        /// <summary>
        /// Constructs a <see cref="MainTitleIconControlVWG"/>
        /// </summary>
        public MainTitleIconControlVWG(IControlFactory controlFactory)
        {
            if (controlFactory == null) throw new ArgumentNullException("controlFactory");
            _controlFactory = controlFactory;
            _panel = _controlFactory.CreatePanel();
            ((PanelVWG)_panel).BackgroundImage = @"Images.headergradient.png";
            
            _panel.BackColor = Color.Transparent;
            _panel.Dock = Habanero.Faces.Base.DockStyle.Top;
            
            _panel.Height = 23;
            this.Size = new Size(_panel.Width,_panel.Height);
            _icon = _controlFactory.CreateLabel();
            ((LabelVWG)_icon).BackgroundImage = "";
            _icon.BackColor = Color.Transparent;
            ((LabelVWG)_icon).BackgroundImageLayout = ImageLayout.Center;
            _icon.Dock = Habanero.Faces.Base.DockStyle.Left;
            _icon.Size = new Size(20, 20);

            _title = _controlFactory.CreateLabel();
            _title.Font = new Font("Verdana", 10);
            _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);

            this.Dock = DockStyleVWG.GetDockStyle(DockStyle.Top);
            this.Controls.Add((PanelVWG)_panel);
            this.Height = 23;
        }
开发者ID:Chillisoft,项目名称:habanero.faces,代码行数:36,代码来源:MainTitleIconControlVWG.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ILandObject类代码示例发布时间:2022-05-24
下一篇:
C# ILVariable类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap