预览
代码
手机端效果
web端效果
demoSpinner.cs
demoSpinner.Designer.cs
web:demoSpinner.cs
web:demoSpinner.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 demoSpinner : Smobiler.Core.Controls.MobileForm
{
public demoSpinner()
: base()
{
//This call is required by the SmobilerForm.
InitializeComponent();
}
private void title1_ImagePress(object sender, EventArgs e)
{
this.Close();
}
private void spinner3_ItemSelected(object sender, SpinnerItemSelectedEventArgs e)
{
Toast(e.Item);
}
}
}
using System;
using Smobiler.Core;
namespace Smobiler.Tutorials.Components
{
partial class demoSpinner : 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.spinner1 = new Smobiler.Core.Controls.Spinner();
this.spinner2 = new Smobiler.Core.Controls.Spinner();
this.panel2 = new Smobiler.Core.Controls.Panel();
this.label5 = new Smobiler.Core.Controls.Label();
this.label6 = new Smobiler.Core.Controls.Label();
this.spinner3 = new Smobiler.Core.Controls.Spinner();
//
// 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 = "Spinner";
this.title1.ImagePress += new System.EventHandler(this.title1_ImagePress);
//
// panel10
//
this.panel10.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
this.panel1,
this.panel2});
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.spinner1,
this.spinner2});
this.panel1.Location = new System.Drawing.Point(5, 9);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(290, 179);
//
// 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 = "下拉列表控件,基础控件,Text、FontSize、ForeColor属性设置不同样式";
//
// 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 = "不同样式的下拉列表控件";
//
// spinner1
//
this.spinner1.Items = new string[] {
"1",
"2",
"3",
"4",
"5"};
this.spinner1.Location = new System.Drawing.Point(11, 113);
this.spinner1.Name = "spinner1";
this.spinner1.Size = new System.Drawing.Size(120, 30);
//
// spinner2
//
this.spinner2.FontSize = 16F;
this.spinner2.ForeColor = System.Drawing.Color.Red;
this.spinner2.Items = new string[] {
"1",
"2",
"3",
"4",
"5"};
this.spinner2.Location = new System.Drawing.Point(158, 113);
this.spinner2.Name = "spinner2";
this.spinner2.Size = new System.Drawing.Size(120, 30);
this.spinner2.Text = "下拉列表控件";
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.White;
this.panel2.Border = new Smobiler.Core.Controls.Border(1F);
this.panel2.BorderColor = System.Drawing.Color.Silver;
this.panel2.BorderRadius = 5;
this.panel2.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
this.label5,
this.label6,
this.spinner3});
this.panel2.Location = new System.Drawing.Point(5, 203);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(290, 171);
//
// label5
//
this.label5.BackColor = System.Drawing.Color.WhiteSmoke;
this.label5.FontSize = 15F;
this.label5.Location = new System.Drawing.Point(0, 26);
this.label5.Name = "label5";
this.label5.Padding = new Smobiler.Core.Controls.Padding(5F);
this.label5.Size = new System.Drawing.Size(290, 54);
this.label5.Text = "ItemSelected在列表元素选择后发生";
//
// label6
//
this.label6.BackColor = System.Drawing.Color.WhiteSmoke;
this.label6.Border = new Smobiler.Core.Controls.Border(0F, 0F, 0F, 1F);
this.label6.BorderColor = System.Drawing.Color.DarkSeaGreen;
this.label6.FontSize = 16F;
this.label6.Name = "label6";
this.label6.Padding = new Smobiler.Core.Controls.Padding(5F);
this.label6.Size = new System.Drawing.Size(290, 26);
this.label6.Text = "下拉列表控件事件";
//
// spinner3
//
this.spinner3.Items = new string[] {
"1",
"2",
"3",
"4",
"5"};
this.spinner3.Location = new System.Drawing.Point(95, 111);
this.spinner3.Name = "spinner3";
this.spinner3.Size = new System.Drawing.Size(100, 30);
this.spinner3.Text = "选择后触发事件";
this.spinner3.ItemSelected += new System.EventHandler(this.spinner3_ItemSelected);
//
// demoSpinner
//
this.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
this.title1,
this.panel10});
this.Size = new System.Drawing.Size(300, 1000);
this.Name = "demoSpinner";
}
#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.Panel panel2;
private Core.Controls.Label label5;
private Core.Controls.Label label6;
private Core.Controls.Spinner spinner1;
private Core.Controls.Spinner spinner2;
private Core.Controls.Spinner spinner3;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Smobiler.Core;
using Smobiler.Core.Controls;
namespace SmobilerTutorialsWeb.Components
{
partial class demoSpinner : Smobiler.Core.Controls.MobileForm
{
public demoSpinner() : base()
{
//This call is required by the SmobilerForm.
InitializeComponent();
}
private void title1_ImagePress(object sender, EventArgs e)
{
this.Close();
}
private void spinner3_ItemSelected(object sender, SpinnerItemSelectedEventArgs e)
{
Toast(e.Item);
}
}
}
using System;
using Smobiler.Core;
namespace SmobilerTutorialsWeb.Components
{
partial class demoSpinner : 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.spinner1 = new Smobiler.Core.Controls.Spinner();
this.spinner2 = new Smobiler.Core.Controls.Spinner();
this.labContent = new Smobiler.Core.Controls.Label();
this.panel2 = new Smobiler.Core.Controls.Panel();
this.label5 = new Smobiler.Core.Controls.Label();
this.spinner3 = new Smobiler.Core.Controls.Spinner();
this.labTitle = new Smobiler.Core.Controls.Label();
this.label6 = 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 = "Spinner";
this.title1.ImagePress += new System.EventHandler(this.title1_ImagePress);
//
// panel10
//
this.panel10.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
this.panel1,
this.panel2,
this.labTitle,
this.label6});
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.spinner1,
this.spinner2,
this.labContent});
this.panel1.Location = new System.Drawing.Point(134, 57);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(427, 179);
//
// spinner1
//
this.spinner1.Items = new string[] {
"1",
"2",
"3",
"4",
"5"};
this.spinner1.Location = new System.Drawing.Point(61, 42);
this.spinner1.Name = "spinner1";
this.spinner1.Size = new System.Drawing.Size(120, 30);
//
// spinner2
//
this.spinner2.FontSize = 16F;
this.spinner2.ForeColor = System.Drawing.Color.Red;
this.spinner2.Items = new string[] {
"1",
"2",
"3",
"4",
"5"};
this.spinner2.Location = new System.Drawing.Point(203, 42);
this.spinner2.Name = "spinner2";
this.spinner2.Size = new System.Drawing.Size(120, 30);
this.spinner2.Text = "1";
//
// labContent
//
this.labContent.BackColor = System.Drawing.Color.White;
this.labContent.BorderColor = System.Drawing.Color.White;
this.labContent.Location = new System.Drawing.Point(0, 125);
this.labContent.Name = "labContent";
this.labContent.Padding = new Smobiler.Core.Controls.Padding(5F);
this.labContent.Size = new System.Drawing.Size(426, 54);
this.labContent.Text = "下拉列表控件,基础控件,Text、FontSize、ForeColor属性设置不同样式;设置默认选择项只需设置Text属性,所赋的值必需时Items中项,否侧we" +
"b版中将不会显示 ";
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.White;
this.panel2.Border = new Smobiler.Core.Controls.Border(1F);
this.panel2.BorderColor = System.Drawing.Color.Silver;
this.panel2.BorderRadius = 5;
this.panel2.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
this.label5,
this.spinner3});
this.panel2.Location = new System.Drawing.Point(659, 57);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(427, 179);
//
// label5
//
this.label5.BackColor = System.Drawing.Color.White;
this.label5.BorderColor = System.Drawing.Color.White;
this.label5.Location = new System.Drawing.Point(0, 125);
this.label5.Name = "label5";
this.label5.Padding = new Smobiler.Core.Controls.Padding(5F);
this.label5.Size = new System.Drawing.Size(425, 54);
this.label5.Text = "ItemSelected在列表元素选择后发生";
//
// spinner3
//
this.spinner3.Items = new string[] {
"1",
"2",
"3",
"4",
"5"};
this.spinner3.Location = new System.Drawing.Point(151, 45);
this.spinner3.Name = "spinner3";
this.spinner3.Size = new System.Drawing.Size(100, 30);
this.spinner3.Text = "选择后触发事件";
this.spinner3.ItemSelected += new System.EventHandler(this.spinner3_ItemSelected);
//
// 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(134, 30);
this.labTitle.Name = "labTitle";
this.labTitle.Size = new System.Drawing.Size(290, 26);
this.labTitle.Text = "不同样式的下拉列表控件";
//
// label6
//
this.label6.BackColor = System.Drawing.Color.White;
this.label6.Bold = true;
this.label6.Border = new Smobiler.Core.Controls.Border(0F, 0F, 0F, 1F);
this.label6.BorderColor = System.Drawing.Color.White;
this.label6.FontSize = 16F;
this.label6.Location = new System.Drawing.Point(659, 30);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(290, 26);
this.label6.Text = "下拉列表控件事件";
//
// demoSpinner
//
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 = "demoSpinner";
}
#endregion
private Smobiler.Core.Controls.Title title1;
private Smobiler.Core.Controls.Panel panel10;
private Smobiler.Core.Controls.Panel panel1;
private Smobiler.Core.Controls.Spinner spinner1;
private Smobiler.Core.Controls.Spinner spinner2;
private Smobiler.Core.Controls.Panel panel2;
private Smobiler.Core.Controls.Label label5;
private Smobiler.Core.Controls.Spinner spinner3;
private Smobiler.Core.Controls.Label labContent;
private Smobiler.Core.Controls.Label labTitle;
private Smobiler.Core.Controls.Label label6;
}
}