预览
代码
手机端效果
web端效果
demoMapTagView.cs
demoMapTagView.Designer.cs
web:demoMapTagView.cs
web:demoMapTagView.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 demoMapTagView : Smobiler.Core.Controls.MobileForm
{
public demoMapTagView()
: base()
{
//This call is required by the SmobilerForm.
InitializeComponent();
}
private void title1_ImagePress(object sender, EventArgs e)
{
this.Close();
}
private void mapTagView1_Press(object sender, EventArgs e)
{
Toast("Press");
}
private void button1_Press(object sender, EventArgs e)
{
mapTagView1.Longitude =double.Parse(textBox1.Text);
mapTagView1.Latitude = double.Parse(textBox2.Text);
mapTagView1.Description = textBox3.Text;
}
}
}
using System;
using Smobiler.Core;
namespace Smobiler.Tutorials.Components
{
partial class demoMapTagView : 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.textBox1 = new Smobiler.Core.Controls.TextBox();
this.textBox2 = new Smobiler.Core.Controls.TextBox();
this.textBox3 = new Smobiler.Core.Controls.TextBox();
this.button1 = new Smobiler.Core.Controls.Button();
this.mapTagView1 = new Smobiler.Core.Controls.MapTagView();
this.label1 = new Smobiler.Core.Controls.Label();
this.panel2 = new Smobiler.Core.Controls.Panel();
this.label13 = new Smobiler.Core.Controls.Label();
this.label14 = new Smobiler.Core.Controls.Label();
//
// 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 = "MapTagView";
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.textBox1,
this.textBox2,
this.textBox3,
this.button1,
this.mapTagView1,
this.label1});
this.panel1.Location = new System.Drawing.Point(5, 9);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(290, 553);
//
// 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 = "地理位置标签,基础控件,Description、Longitude、Latitude设置地理位置标签描述、经度、纬度";
//
// 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 = "地理位置标签";
//
// textBox1
//
this.textBox1.KeyboardType = Smobiler.Core.Controls.KeyboardType.Numeric;
this.textBox1.Location = new System.Drawing.Point(31, 429);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 35);
this.textBox1.WaterMarkText = "经度";
//
// textBox2
//
this.textBox2.KeyboardType = Smobiler.Core.Controls.KeyboardType.Numeric;
this.textBox2.Location = new System.Drawing.Point(157, 429);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(100, 35);
this.textBox2.WaterMarkText = "纬度";
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(31, 475);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(226, 35);
this.textBox3.WaterMarkText = "位置描述";
//
// button1
//
this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(185)))), ((int)(((byte)(229)))), ((int)(((byte)(99)))));
this.button1.FontSize = 15F;
this.button1.Location = new System.Drawing.Point(31, 517);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(226, 30);
this.button1.Text = "设置";
this.button1.Press += new System.EventHandler(this.button1_Press);
//
// mapTagView1
//
this.mapTagView1.Description = "东方明珠";
this.mapTagView1.Latitude = 31.239666D;
this.mapTagView1.Location = new System.Drawing.Point(11, 93);
this.mapTagView1.Longitude = 121.499809D;
this.mapTagView1.Name = "mapTagView1";
this.mapTagView1.Size = new System.Drawing.Size(270, 288);
this.mapTagView1.Press += new System.EventHandler(this.mapTagView1_Press);
//
// label1
//
this.label1.Location = new System.Drawing.Point(31, 394);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(226, 35);
this.label1.Text = "可设置经纬度调整MapTagView";
//
// 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.label13,
this.label14});
this.panel2.Location = new System.Drawing.Point(5, 569);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(290, 87);
//
// label13
//
this.label13.BackColor = System.Drawing.Color.WhiteSmoke;
this.label13.FontSize = 15F;
this.label13.Location = new System.Drawing.Point(0, 26);
this.label13.Name = "label13";
this.label13.Padding = new Smobiler.Core.Controls.Padding(5F);
this.label13.Size = new System.Drawing.Size(290, 54);
this.label13.Text = "Press在点击地理位置标签时发生。";
//
// label14
//
this.label14.BackColor = System.Drawing.Color.WhiteSmoke;
this.label14.Border = new Smobiler.Core.Controls.Border(0F, 0F, 0F, 1F);
this.label14.BorderColor = System.Drawing.Color.DarkSeaGreen;
this.label14.FontSize = 16F;
this.label14.Name = "label14";
this.label14.Padding = new Smobiler.Core.Controls.Padding(5F);
this.label14.Size = new System.Drawing.Size(290, 26);
this.label14.Text = "地理位置标签事件";
//
// demoMapTagView
//
this.Controls.AddRange(new Smobiler.Core.Controls.MobileControl[] {
this.title1,
this.panel10});
this.Size = new System.Drawing.Size(300, 1000);
this.Name = "demoMapTagView";
}
#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 label13;
private Core.Controls.Label label14;
private Core.Controls.TextBox textBox1;
private Core.Controls.TextBox textBox2;
private Core.Controls.TextBox textBox3;
private Core.Controls.Button button1;
private Core.Controls.MapTagView mapTagView1;
private Core.Controls.Label label1;
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Smobiler.Core;
using Smobiler.Core.Controls;
namespace SmobilerTutorialsWeb.Components
{
partial class demoMapTagView : Smobiler.Core.Controls.MobileForm
{
public demoMapTagView() : base()
{
//This call is required by the SmobilerForm.
InitializeComponent();
}
private void title1_ImagePress(object sender, EventArgs e)
{
this.Close();
}
private void button1_Press(object sender, EventArgs e)
{
mapTagView1.Longitude = double.Parse(textBox1.Text);
mapTagView1.Latitude = double.Parse(textBox2.Text);
mapTagView1.Description = textBox3.Text;
}
private void mapTagView1_Press(object sender, EventArgs e)
{
Toast("Press");
}
}
}
using System;
using Smobiler.Core;
namespace SmobilerTutorialsWeb.Components
{
partial class demoMapTagView : 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.textBox1 = new Smobiler.Core.Controls.TextBox();
this.textBox2 = new Smobiler.Core.Controls.TextBox();
this.textBox3 = new Smobiler.Core.Controls.TextBox();
this.button1 = new Smobiler.Core.Controls.Button();
this.mapTagView1 = new Smobiler.Core.Controls.MapTagView();
this.label1 = new Smobiler.Core.Controls.Label();
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 = "MapTagView";
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.labContent,
this.textBox1,
this.textBox2,
this.textBox3,
this.button1,
this.mapTagView1,
this.label1});
this.panel1.Location = new System.Drawing.Point(300, 57);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(600, 441);
//
// labContent
//
this.labContent.BackColor = System.Drawing.Color.White;
this.labContent.Location = new System.Drawing.Point(0, 372);
this.labContent.Name = "labContent";
this.labContent.Padding = new Smobiler.Core.Controls.Padding(5F);
this.labContent.Size = new System.Drawing.Size(599, 68);
this.labContent.Text = "地理位置标签,基础控件,Description、Longitude、Latitude设置地理位置标签描述、经度、纬度;点击控件,触发Press事件";
//
// textBox1
//
this.textBox1.KeyboardType = Smobiler.Core.Controls.KeyboardType.Numeric;
this.textBox1.Location = new System.Drawing.Point(329, 114);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(100, 35);
this.textBox1.WaterMarkText = "经度";
//
// textBox2
//
this.textBox2.KeyboardType = Smobiler.Core.Controls.KeyboardType.Numeric;
this.textBox2.Location = new System.Drawing.Point(455, 114);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(100, 35);
this.textBox2.WaterMarkText = "纬度";
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(329, 160);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(226, 35);
this.textBox3.WaterMarkText = "位置描述";
//
// button1
//
this.button1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(76)))), ((int)(((byte)(176)))), ((int)(((byte)(249)))));
this.button1.Location = new System.Drawing.Point(329, 202);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(226, 30);
this.button1.Text = "设置";
this.button1.Press += new System.EventHandler(this.button1_Press);
//
// mapTagView1
//
this.mapTagView1.Description = "东方明珠";
this.mapTagView1.Latitude = 31.239666D;
this.mapTagView1.Location = new System.Drawing.Point(31, 23);
this.mapTagView1.Longitude = 121.499809D;
this.mapTagView1.Name = "mapTagView1";
this.mapTagView1.Size = new System.Drawing.Size(270, 288);
this.mapTagView1.Press += new System.EventHandler(this.mapTagView1_Press);
//
// label1
//
this.label1.Location = new System.Drawing.Point(329, 79);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(226, 35);
this.label1.Text = "可设置经纬度调整MapTagView";
//
// 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.Size = new System.Drawing.Size(600, 26);
this.labTitle.Text = "地理位置标签";
//
// demoMapTagView
//
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 = "demoMapTagView";
}
#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.TextBox textBox1;
private Smobiler.Core.Controls.TextBox textBox2;
private Smobiler.Core.Controls.TextBox textBox3;
private Smobiler.Core.Controls.Button button1;
private Smobiler.Core.Controls.MapTagView mapTagView1;
private Smobiler.Core.Controls.Label label1;
private Smobiler.Core.Controls.Label labTitle;
}
}