预览
代码
手机端效果
web端效果
demoFontIcon.cs
demoFontIcon.Designer.cs
web:demoFontIcon.cs
web:demoFontIcon.Designer.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Smobiler.Core;
using Smobiler.Core.Controls;
namespace Smobiler.Tutorials.Components
{
partial class demoFontIcon : Smobiler.Core.Controls.MobileForm
{
public demoFontIcon()
: base()
{
//This call is required by the SmobilerForm.
InitializeComponent();
}
private void title1_ImagePress(object sender, EventArgs e)
{
this.Close();
}
}
}
using System;
using Smobiler.Core;
namespace Smobiler.Tutorials.Components
{
partial class demoFontIcon : Smobiler.Core.Controls.MobileForm
{
#region "SmobilerForm generated code "
//SmobilerForm overrides dispose to clean up the component list.
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
//NOTE: The following procedure is required by the SmobilerForm
//It can be modified using the SmobilerForm.
//Do not modify it using the code editor.
[System.Diagnostics.DebuggerStepThrough()]
private void InitializeComponent()
{
this.title1 = new Smobiler.Core.Controls.Title();
this.panel10 = new Smobiler.Core.Controls.Panel();
this.panel1 = new Smobiler.Core.Controls.Panel();
this.labContent = new Smobiler.Core.Controls.Label();
this.labTitle = new Smobiler.Core.Controls.Label();
this.fontIcon1 = new Smobiler.Core.Controls.FontIcon();
this.fontIcon2 = new Smobiler.Core.Controls.FontIcon();
this.fontIcon3 = new Smobiler.Core.Controls.FontIcon();
this.fontIcon4 = new Smobiler.Core.Controls.FontIcon();
this.fontIcon5 = new Smobiler.Core.Controls.FontIcon();
this.fontIcon6 = new Smobiler.Core.Controls.FontIcon();
//
// title1
//
this.title1.ImageType = Smobiler.Core.Controls.ImageEx.ImageStyle.FontIcon;
this.title1.Name = "title1";
this.title1.ResourceID = "angle-left";
this.title1.Size = new System.Drawing.Size(300, 30);
this.title1.Text = "FontIcon";
this.title1.ImagePress += new System.EventHandler(this.title1_ImagePress);
//
// panel10
//
this.panel10.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
this.panel1});
this.panel10.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel10.Location = new System.Drawing.Point(0, 30);
this.panel10.Name = "panel10";
this.panel10.Scrollable = true;
this.panel10.Size = new System.Drawing.Size(300, 970);
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Border = new Smobiler.Core.Controls.Border(1F);
this.panel1.BorderColor = System.Drawing.Color.Silver;
this.panel1.BorderRadius = 5;
this.panel1.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
this.labContent,
this.labTitle,
this.fontIcon1,
this.fontIcon2,
this.fontIcon3,
this.fontIcon4,
this.fontIcon5,
this.fontIcon6});
this.panel1.Location = new System.Drawing.Point(5, 9);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(290, 213);
//
// labContent
//
this.labContent.BackColor = System.Drawing.Color.WhiteSmoke;
this.labContent.FontSize = 15F;
this.labContent.Location = new System.Drawing.Point(0, 26);
this.labContent.Name = "labContent";
this.labContent.Padding = new Smobiler.Core.Controls.Padding(5F);
this.labContent.Size = new System.Drawing.Size(290, 54);
this.labContent.Text = "字体图标控件,基础控件";
//
// labTitle
//
this.labTitle.BackColor = System.Drawing.Color.WhiteSmoke;
this.labTitle.Border = new Smobiler.Core.Controls.Border(0F, 0F, 0F, 1F);
this.labTitle.BorderColor = System.Drawing.Color.DarkSeaGreen;
this.labTitle.FontSize = 16F;
this.labTitle.Name = "labTitle";
this.labTitle.Padding = new Smobiler.Core.Controls.Padding(5F);
this.labTitle.Size = new System.Drawing.Size(290, 26);
this.labTitle.Text = "不同样式的字体图标";
//
// fontIcon1
//
this.fontIcon1.Location = new System.Drawing.Point(0, 89);
this.fontIcon1.Name = "fontIcon1";
this.fontIcon1.ResourceID = "angle-double-left";
this.fontIcon1.Size = new System.Drawing.Size(98, 60);
//
// fontIcon2
//
this.fontIcon2.ForeColor = System.Drawing.Color.Blue;
this.fontIcon2.Location = new System.Drawing.Point(98, 89);
this.fontIcon2.Name = "fontIcon2";
this.fontIcon2.ResourceID = "users";
this.fontIcon2.Size = new System.Drawing.Size(98, 60);
//
// fontIcon3
//
this.fontIcon3.ForeColor = System.Drawing.Color.Red;
this.fontIcon3.Location = new System.Drawing.Point(197, 89);
this.fontIcon3.Name = "fontIcon3";
this.fontIcon3.ResourceID = "times";
this.fontIcon3.Size = new System.Drawing.Size(98, 60);
//
// fontIcon4
//
this.fontIcon4.Location = new System.Drawing.Point(0, 165);
this.fontIcon4.Name = "fontIcon4";
this.fontIcon4.ResourceID = "hand-peace-o";
this.fontIcon4.Size = new System.Drawing.Size(100, 40);
//
// fontIcon5
//
this.fontIcon5.Location = new System.Drawing.Point(100, 165);
this.fontIcon5.Name = "fontIcon5";
this.fontIcon5.ResourceID = "hand-o-up";
this.fontIcon5.Size = new System.Drawing.Size(100, 40);
//
// fontIcon6
//
this.fontIcon6.Location = new System.Drawing.Point(200, 165);
this.fontIcon6.Name = "fontIcon6";
this.fontIcon6.ResourceID = "chevron-circle-left";
this.fontIcon6.Size = new System.Drawing.Size(100, 40);
//
// demoFontIcon
//
this.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
this.title1,
this.panel10});
this.Size = new System.Drawing.Size(300, 1000);
this.Name = "demoFontIcon";
}
#endregion
private Core.Controls.Title title1;
private Core.Controls.Panel panel10;
private Core.Controls.Panel panel1;
private Core.Controls.Label labContent;
private Core.Controls.Label labTitle;
private Core.Controls.FontIcon fontIcon1;
private Core.Controls.FontIcon fontIcon2;
private Core.Controls.FontIcon fontIcon3;
private Core.Controls.FontIcon fontIcon4;
private Core.Controls.FontIcon fontIcon5;
private Core.Controls.FontIcon fontIcon6;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Smobiler.Core;
using Smobiler.Core.Controls;
namespace SmobilerTutorialsWeb.Components
{
partial class demoFontIcon : Smobiler.Core.Controls.MobileForm
{
public demoFontIcon() : base()
{
//This call is required by the SmobilerForm.
InitializeComponent();
}
private void title1_ImagePress(object sender, EventArgs e)
{
this.Close();
}
}
}
using System;
using Smobiler.Core;
namespace SmobilerTutorialsWeb.Components
{
partial class demoFontIcon : Smobiler.Core.Controls.MobileForm
{
#region "SmobilerForm generated code "
//SmobilerForm overrides dispose to clean up the component list.
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
}
//NOTE: The following procedure is required by the SmobilerForm
//It can be modified using the SmobilerForm.
//Do not modify it using the code editor.
[System.Diagnostics.DebuggerStepThrough()]
private void InitializeComponent()
{
this.title1 = new Smobiler.Core.Controls.Title();
this.panel10 = new Smobiler.Core.Controls.Panel();
this.panel1 = new Smobiler.Core.Controls.Panel();
this.labContent = new Smobiler.Core.Controls.Label();
this.fontIcon1 = new Smobiler.Core.Controls.FontIcon();
this.fontIcon2 = new Smobiler.Core.Controls.FontIcon();
this.fontIcon3 = new Smobiler.Core.Controls.FontIcon();
this.fontIcon7 = new Smobiler.Core.Controls.FontIcon();
this.fontIcon4 = new Smobiler.Core.Controls.FontIcon();
this.fontIcon5 = new Smobiler.Core.Controls.FontIcon();
this.fontIcon6 = new Smobiler.Core.Controls.FontIcon();
this.fontIcon8 = new Smobiler.Core.Controls.FontIcon();
this.labTitle = new Smobiler.Core.Controls.Label();
//
// title1
//
this.title1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(246)))), ((int)(((byte)(246)))), ((int)(((byte)(246)))));
this.title1.ImageType = Smobiler.Core.Controls.ImageEx.ImageStyle.FontIcon;
this.title1.Name = "title1";
this.title1.ResourceID = "angle-left";
this.title1.Size = new System.Drawing.Size(0, 30);
this.title1.Text = "FontIcon";
this.title1.ImagePress += new System.EventHandler(this.title1_ImagePress);
//
// panel10
//
this.panel10.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
this.panel1,
this.labTitle});
this.panel10.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel10.Name = "panel10";
this.panel10.Scrollable = true;
this.panel10.Size = new System.Drawing.Size(0, 970);
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.White;
this.panel1.Border = new Smobiler.Core.Controls.Border(1F);
this.panel1.BorderColor = System.Drawing.Color.Silver;
this.panel1.BorderRadius = 5;
this.panel1.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
this.labContent,
this.fontIcon1,
this.fontIcon2,
this.fontIcon3,
this.fontIcon7,
this.fontIcon4,
this.fontIcon5,
this.fontIcon6,
this.fontIcon8});
this.panel1.Location = new System.Drawing.Point(300, 57);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(600, 300);
//
// labContent
//
this.labContent.BackColor = System.Drawing.Color.White;
this.labContent.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
this.labContent.Location = new System.Drawing.Point(0, 245);
this.labContent.Name = "labContent";
this.labContent.Padding = new Smobiler.Core.Controls.Padding(5F);
this.labContent.Size = new System.Drawing.Size(599, 54);
this.labContent.Text = "字体图标控件,基础控件,ResourceID设置Icon图标,ForeColor设置图标颜色\r\n";
//
// fontIcon1
//
this.fontIcon1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
this.fontIcon1.Location = new System.Drawing.Point(108, 121);
this.fontIcon1.Name = "fontIcon1";
this.fontIcon1.ResourceID = "angle-double-left";
this.fontIcon1.Size = new System.Drawing.Size(100, 60);
//
// fontIcon2
//
this.fontIcon2.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(229)))), ((int)(((byte)(99)))));
this.fontIcon2.Location = new System.Drawing.Point(208, 121);
this.fontIcon2.Name = "fontIcon2";
this.fontIcon2.ResourceID = "users";
this.fontIcon2.Size = new System.Drawing.Size(100, 60);
//
// fontIcon3
//
this.fontIcon3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(192)))), ((int)(((byte)(78)))));
this.fontIcon3.Location = new System.Drawing.Point(308, 121);
this.fontIcon3.Name = "fontIcon3";
this.fontIcon3.ResourceID = "times";
this.fontIcon3.Size = new System.Drawing.Size(100, 60);
//
// fontIcon7
//
this.fontIcon7.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(67)))), ((int)(((byte)(81)))));
this.fontIcon7.Location = new System.Drawing.Point(408, 121);
this.fontIcon7.Name = "fontIcon7";
this.fontIcon7.ResourceID = "exclamation-circle";
this.fontIcon7.Size = new System.Drawing.Size(100, 60);
//
// fontIcon4
//
this.fontIcon4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(192)))), ((int)(((byte)(78)))));
this.fontIcon4.Location = new System.Drawing.Point(308, 62);
this.fontIcon4.Name = "fontIcon4";
this.fontIcon4.ResourceID = "bell";
this.fontIcon4.Size = new System.Drawing.Size(100, 30);
//
// fontIcon5
//
this.fontIcon5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(229)))), ((int)(((byte)(99)))));
this.fontIcon5.Location = new System.Drawing.Point(208, 62);
this.fontIcon5.Name = "fontIcon5";
this.fontIcon5.ResourceID = "weixin";
this.fontIcon5.Size = new System.Drawing.Size(100, 30);
//
// fontIcon6
//
this.fontIcon6.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
this.fontIcon6.Location = new System.Drawing.Point(108, 62);
this.fontIcon6.Name = "fontIcon6";
this.fontIcon6.ResourceID = "comment-o";
this.fontIcon6.Size = new System.Drawing.Size(100, 30);
//
// fontIcon8
//
this.fontIcon8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(67)))), ((int)(((byte)(81)))));
this.fontIcon8.Location = new System.Drawing.Point(408, 62);
this.fontIcon8.Name = "fontIcon8";
this.fontIcon8.ResourceID = "cog";
this.fontIcon8.Size = new System.Drawing.Size(100, 30);
//
// labTitle
//
this.labTitle.BackColor = System.Drawing.Color.White;
this.labTitle.Bold = true;
this.labTitle.Border = new Smobiler.Core.Controls.Border(0F, 0F, 0F, 1F);
this.labTitle.BorderColor = System.Drawing.Color.White;
this.labTitle.FontSize = 16F;
this.labTitle.Location = new System.Drawing.Point(300, 30);
this.labTitle.Name = "labTitle";
this.labTitle.Padding = new Smobiler.Core.Controls.Padding(5F);
this.labTitle.Size = new System.Drawing.Size(600, 26);
this.labTitle.Text = "不同样式的字体图标";
//
// demoFontIcon
//
this.BackColor = System.Drawing.Color.White;
this.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
this.title1,
this.panel10});
this.Layout = Smobiler.Core.Controls.LayoutPosition.Relative;
this.Size = new System.Drawing.Size(1200, 800);
this.Name = "demoFontIcon";
}
#endregion
private Smobiler.Core.Controls.Title title1;
private Smobiler.Core.Controls.Panel panel10;
private Smobiler.Core.Controls.Panel panel1;
private Smobiler.Core.Controls.Label labContent;
private Smobiler.Core.Controls.FontIcon fontIcon1;
private Smobiler.Core.Controls.FontIcon fontIcon2;
private Smobiler.Core.Controls.FontIcon fontIcon3;
private Smobiler.Core.Controls.Label labTitle;
private Smobiler.Core.Controls.FontIcon fontIcon7;
private Smobiler.Core.Controls.FontIcon fontIcon4;
private Smobiler.Core.Controls.FontIcon fontIcon5;
private Smobiler.Core.Controls.FontIcon fontIcon6;
private Smobiler.Core.Controls.FontIcon fontIcon8;
}
}