预览
代码
手机端效果
web端效果
demoNumeric.cs
demoNumeric.Designer.cs
web:demoNumeric.cs
web:demoNumeric.Designer.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Smobiler.Core;
using Smobiler.Core.Controls;
namespace Smobiler.Tutorials.Controls
{
partial class demoNumeric : Smobiler.Core.Controls.MobileForm
{
public demoNumeric()
: 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.Controls
{
partial class demoNumeric : 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.label1 = new Smobiler.Core.Controls.Label();
this.label2 = new Smobiler.Core.Controls.Label();
this.label3 = new Smobiler.Core.Controls.Label();
this.label4 = new Smobiler.Core.Controls.Label();
this.numeric1 = new Smobiler.Core.Controls.Numeric();
this.numeric2 = new Smobiler.Core.Controls.Numeric();
this.numeric3 = new Smobiler.Core.Controls.Numeric();
this.numeric4 = new Smobiler.Core.Controls.Numeric();
this.numeric5 = new Smobiler.Core.Controls.Numeric();
//
// 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 = "Numeric";
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.label1,
this.label2,
this.label3,
this.label4,
this.numeric1,
this.numeric2,
this.numeric3,
this.numeric4,
this.numeric5});
this.panel1.Location = new System.Drawing.Point(5, 9);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(290, 427);
//
// 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 = "Numeric控件";
//
// label1
//
this.label1.FontSize = 15F;
this.label1.Location = new System.Drawing.Point(0, 86);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(290, 35);
this.label1.Text = "FontSize属性可设置字体大小:\r\n";
//
// label2
//
this.label2.FontSize = 15F;
this.label2.Location = new System.Drawing.Point(0, 192);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(290, 35);
this.label2.Text = "IconVisible属性可设置是否显示加减图标:";
//
// label3
//
this.label3.FontSize = 15F;
this.label3.Location = new System.Drawing.Point(0, 270);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(295, 35);
this.label3.Text = "PlusIconColor、MinusIconColor属性可设置加号、减号图标字体颜色:\r\n";
//
// label4
//
this.label4.FontSize = 14F;
this.label4.Location = new System.Drawing.Point(0, 343);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(290, 48);
this.label4.Text = "MaxValue、MinValue、Value、Variation可设置数量控件可设置的最大值、最小值、显示的默认值、值变化时的增量";
//
// numeric1
//
this.numeric1.Location = new System.Drawing.Point(0, 121);
this.numeric1.Name = "numeric1";
this.numeric1.Size = new System.Drawing.Size(168, 25);
//
// numeric2
//
this.numeric2.FontSize = 13F;
this.numeric2.Location = new System.Drawing.Point(0, 156);
this.numeric2.Name = "numeric2";
this.numeric2.Size = new System.Drawing.Size(168, 25);
//
// numeric3
//
this.numeric3.IconVisible = false;
this.numeric3.Location = new System.Drawing.Point(0, 227);
this.numeric3.Name = "numeric3";
this.numeric3.Size = new System.Drawing.Size(168, 25);
//
// numeric4
//
this.numeric4.Location = new System.Drawing.Point(0, 305);
this.numeric4.MinusIconColor = System.Drawing.Color.Lime;
this.numeric4.Name = "numeric4";
this.numeric4.PlusIconColor = System.Drawing.Color.Red;
this.numeric4.Size = new System.Drawing.Size(168, 25);
//
// numeric5
//
this.numeric5.Location = new System.Drawing.Point(0, 391);
this.numeric5.MaxValue = new decimal(new int[] {
1000,
0,
0,
0});
this.numeric5.MinValue = new decimal(new int[] {
100,
0,
0,
0});
this.numeric5.Name = "numeric5";
this.numeric5.Size = new System.Drawing.Size(168, 28);
this.numeric5.Value = new decimal(new int[] {
100,
0,
0,
0});
this.numeric5.Variation = new decimal(new int[] {
100,
0,
0,
0});
//
// demoNumeric
//
this.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
this.title1,
this.panel10});
this.Size = new System.Drawing.Size(300, 1000);
this.Name = "demoNumeric";
}
#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.Label label1;
private Core.Controls.Label label2;
private Core.Controls.Label label3;
private Core.Controls.Label label4;
private Core.Controls.Numeric numeric1;
private Core.Controls.Numeric numeric2;
private Core.Controls.Numeric numeric3;
private Core.Controls.Numeric numeric4;
private Core.Controls.Numeric numeric5;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Smobiler.Core;
using Smobiler.Core.Controls;
namespace SmobilerTutorialsWeb.Components
{
partial class demoNumeric : Smobiler.Core.Controls.MobileForm
{
public demoNumeric() : base()
{
//This call is required by the SmobilerForm.
InitializeComponent();
}
private void title1_ImagePress(object sender, EventArgs e)
{
this.Close();
}
private void demoNumeric_Load(object sender, EventArgs e)
{
}
private void numeric7_ValueChanged(object sender, EventArgs e)
{
Toast(numeric7.Value.ToString());
}
}
}
using System;
using Smobiler.Core;
namespace SmobilerTutorialsWeb.Components
{
partial class demoNumeric : 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.label1 = new Smobiler.Core.Controls.Label();
this.label2 = new Smobiler.Core.Controls.Label();
this.label3 = new Smobiler.Core.Controls.Label();
this.label4 = new Smobiler.Core.Controls.Label();
this.numeric1 = new Smobiler.Core.Controls.Numeric();
this.numeric2 = new Smobiler.Core.Controls.Numeric();
this.numeric3 = new Smobiler.Core.Controls.Numeric();
this.numeric4 = new Smobiler.Core.Controls.Numeric();
this.numeric5 = new Smobiler.Core.Controls.Numeric();
this.labTitle = new Smobiler.Core.Controls.Label();
this.numeric6 = new Smobiler.Core.Controls.Numeric();
this.label5 = new Smobiler.Core.Controls.Label();
this.numeric7 = new Smobiler.Core.Controls.Numeric();
//
// 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 = "Numeric";
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.Flex = 1;
this.panel10.Name = "panel10";
this.panel10.Scrollable = true;
this.panel10.Size = new System.Drawing.Size(0, 0);
//
// 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.label1,
this.label2,
this.label3,
this.label4,
this.numeric1,
this.numeric2,
this.numeric3,
this.numeric4,
this.numeric5,
this.numeric6,
this.label5,
this.numeric7});
this.panel1.Location = new System.Drawing.Point(300, 57);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(600, 620);
//
// label1
//
this.label1.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
this.label1.Location = new System.Drawing.Point(0, 111);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(600, 35);
this.label1.Text = "FontSize属性可设置字体大小\r\n";
//
// label2
//
this.label2.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
this.label2.Location = new System.Drawing.Point(0, 213);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(600, 35);
this.label2.Text = "IconVisible属性可设置是否显示加减图标\r\n";
//
// label3
//
this.label3.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
this.label3.Location = new System.Drawing.Point(0, 315);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(600, 35);
this.label3.Text = "PlusIconColor、MinusIconColor属性可设置加号、减号图标字体颜色:\r\n";
//
// label4
//
this.label4.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
this.label4.Location = new System.Drawing.Point(0, 463);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(600, 35);
this.label4.Text = "MaxValue、MinValue、Value、Variation可设置数量控件可设置的最大值、最小值、显示的默认值、值变化时的增量";
//
// numeric1
//
this.numeric1.Location = new System.Drawing.Point(155, 19);
this.numeric1.MinusIconColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))));
this.numeric1.Name = "numeric1";
this.numeric1.PlusIconColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
this.numeric1.Size = new System.Drawing.Size(290, 25);
//
// numeric2
//
this.numeric2.FontSize = 13F;
this.numeric2.Location = new System.Drawing.Point(155, 65);
this.numeric2.MinusIconColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))));
this.numeric2.Name = "numeric2";
this.numeric2.PlusIconColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
this.numeric2.Size = new System.Drawing.Size(290, 25);
//
// numeric3
//
this.numeric3.IconVisible = false;
this.numeric3.Location = new System.Drawing.Point(155, 167);
this.numeric3.MinusIconColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))));
this.numeric3.Name = "numeric3";
this.numeric3.PlusIconColor = System.Drawing.Color.FromArgb(((int)(((byte)(254)))), ((int)(((byte)(192)))), ((int)(((byte)(78)))));
this.numeric3.Size = new System.Drawing.Size(290, 25);
//
// numeric4
//
this.numeric4.Location = new System.Drawing.Point(155, 269);
this.numeric4.MinusIconColor = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(229)))), ((int)(((byte)(99)))));
this.numeric4.Name = "numeric4";
this.numeric4.PlusIconColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(67)))), ((int)(((byte)(81)))));
this.numeric4.Size = new System.Drawing.Size(290, 25);
//
// numeric5
//
this.numeric5.Location = new System.Drawing.Point(155, 371);
this.numeric5.MaxValue = new decimal(new int[] {
1000,
0,
0,
0});
this.numeric5.MinusIconColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))));
this.numeric5.MinValue = new decimal(new int[] {
100,
0,
0,
0});
this.numeric5.Name = "numeric5";
this.numeric5.PlusIconColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
this.numeric5.Size = new System.Drawing.Size(290, 25);
this.numeric5.Value = new decimal(new int[] {
100,
0,
0,
0});
this.numeric5.Variation = new decimal(new int[] {
100,
0,
0,
0});
//
// labTitle
//
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.Size = new System.Drawing.Size(600, 26);
this.labTitle.Text = "不同样式的Numeric控件";
//
// numeric6
//
this.numeric6.Location = new System.Drawing.Point(155, 417);
this.numeric6.MinusIconColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))));
this.numeric6.MinValue = new decimal(new int[] {
10,
0,
0,
0});
this.numeric6.Name = "numeric6";
this.numeric6.PlusIconColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
this.numeric6.Size = new System.Drawing.Size(290, 25);
this.numeric6.Value = new decimal(new int[] {
10,
0,
0,
0});
this.numeric6.Variation = new decimal(new int[] {
5,
0,
0,
0});
//
// label5
//
this.label5.HorizontalAlignment = Smobiler.Core.Controls.HorizontalAlignment.Center;
this.label5.Location = new System.Drawing.Point(0, 565);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(600, 35);
this.label5.Text = "ValueChanged事件在值改变时触发";
//
// numeric7
//
this.numeric7.Location = new System.Drawing.Point(155, 519);
this.numeric7.MinusIconColor = System.Drawing.Color.FromArgb(((int)(((byte)(50)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))), ((int)(((byte)(102)))));
this.numeric7.MinValue = new decimal(new int[] {
10,
0,
0,
0});
this.numeric7.Name = "numeric7";
this.numeric7.PlusIconColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
this.numeric7.Size = new System.Drawing.Size(290, 25);
this.numeric7.Value = new decimal(new int[] {
10,
0,
0,
0});
this.numeric7.Variation = new decimal(new int[] {
5,
0,
0,
0});
this.numeric7.ValueChanged += new System.EventHandler(this.numeric7_ValueChanged);
//
// demoNumeric
//
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.Load += new System.EventHandler(this.demoNumeric_Load);
this.Name = "demoNumeric";
}
#endregion
private Smobiler.Core.Controls.Title title1;
private Smobiler.Core.Controls.Panel panel10;
private Smobiler.Core.Controls.Panel panel1;
private Smobiler.Core.Controls.Label label1;
private Smobiler.Core.Controls.Label label2;
private Smobiler.Core.Controls.Label label3;
private Smobiler.Core.Controls.Label label4;
private Smobiler.Core.Controls.Numeric numeric1;
private Smobiler.Core.Controls.Numeric numeric2;
private Smobiler.Core.Controls.Numeric numeric3;
private Smobiler.Core.Controls.Numeric numeric4;
private Smobiler.Core.Controls.Numeric numeric5;
private Smobiler.Core.Controls.Label labTitle;
private Smobiler.Core.Controls.Numeric numeric6;
private Smobiler.Core.Controls.Label label5;
private Smobiler.Core.Controls.Numeric numeric7;
}
}