当前位置: 首页 > news >正文

中卫网站设计在哪里番禺移动网站建设

中卫网站设计在哪里,番禺移动网站建设,游戏定制公司,深圳哪里有可以做网站跳转的公司昨天闲来无视#xff0c;学习了一下WM的基本开发。看WM有约的那套教程心里痒痒#xff0c;于是下载了SDK#xff0c;看看DEMO#xff0c;在Sample中的示例进行加工。小有一点心得。其实总的来说难度也不是很大#xff0c;以前没有做过FORM的程序#xff0c;都是WEB上面的…  昨天闲来无视学习了一下WM的基本开发。看WM有约的那套教程心里痒痒于是下载了SDK看看DEMO在Sample中的示例进行加工。小有一点心得。其实总的来说难度也不是很大以前没有做过FORM的程序都是WEB上面的开发上手来看不是那么特别的困难也。 如果大家不明白安装了SDK之后如何简历新的项目如何做调整属性和模拟器的使用。可以参考我的文章下面的讲的非常的清楚。这里我就不过多的浪费时间做些重复的事情了。还是先看看效果好了功能是比较简单的。建立自己的OutLook联系人对其进行信息的发送和详细信息的管理。以上是功能的初始界面。没什么多说的。联系人的管理。ADD功能可以跳转到手机的电话簿进行添加。选中了联系人之后。进行编辑。或者是新建联系人界面也是如此的。OK保存也就是Update。ADD之后的界面。 Codeusing System;using System.Linq;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using Microsoft.WindowsMobile.PocketOutlook;using Microsoft.WindowsMobile.Forms;using Microsoft.WindowsMobile.PocketOutlook.MessageInterception;namespace SmsDefence{    public partial class Form1 : Form    {        private Contact contactSelect;        private OutlookSession outLookSession;        public Form1()        {            this.outLookSession  new OutlookSession();            InitializeComponent();            this.InitializeListBox();        }        public Contact Select()        {            this.ShowDialog();            return this.contactSelect;        }        private void InitializeListBox()        {            this.listBox1.DataSource  null;            this.listBox1.DataSource  this.outLookSession.Contacts.Items;            this.listBox1.DisplayMember  FileAs;            this.listBox1.ValueMember  ItemId;        }        private void button1_Click(object sender, EventArgs e)        {            MessageBox.Show(AlexLiu Software Development, Warning, MessageBoxButtons.OK,   MessageBoxIcon.Hand, MessageBoxDefaultButton.Button1);        }        private void menuItem1_Click(object sender, EventArgs e)        {            CreateNewConversation();        }        private void menuItem2_Click(object sender, EventArgs e)        {            this.Close();        }        private class Conversation        {            private Contact contact;            private string transcript;            private string phoneNumber;            public Conversation(Contact c)            {                contact  c;                phoneNumber  c.MobileTelephoneNumber;            }            public Contact Contact            {                get { return contact; }            }            public string Transcript            {                get { return transcript; }            }            public void AddToTranscript(string sender, string msg)            {                transcript  sender  :  msg  \r\n  transcript;            }            public string PhoneNumber            {                get { return phoneNumber; }            }            public override string ToString()            {                return contact.ToString();            }        }        private void CreateNewConversation()        {            Conversation currentConv  null;            ChooseContactDialog dlg  new ChooseContactDialog();            dlg.RequiredProperties  new ContactProperty[] { ContactProperty.AllTextMessaging };            if (dlg.ShowDialog()  DialogResult.OK)            {                foreach (Conversation conv in listBox1.Items)                {                    if (conv.Contact.ItemId  dlg.SelectedContact.ItemId)                    {                        currentConv  conv;                        break;                    }                }            }            if (currentConv  null)            {                currentConv  new Conversation(dlg.SelectedContact);                listBox1.Items.Add(currentConv);            }            SwitchToConversation(currentConv);        }        private void SwitchToConversation(Conversation conversion)        {            listBox1.SelectedItem  conversion;            txtMsg.Focus();                    }        private void button5_Click(object sender, EventArgs e)        {            this.Close();        }        private void btnNew_Click(object sender, EventArgs e)        {            this.contactSelect  new Contact();            this.outLookSession.Contacts.Items.Add(contactSelect);            ContactEdit contactDialog  new ContactEdit();            contactDialog.Edit(ref contactSelect);            this.InitializeListBox();        }        private void btnEdit_Click(object sender, EventArgs e)        {            if (this.listBox1.SelectedItem ! null)            {                contactSelect  this.listBox1.SelectedItem as Contact;                ContactEdit contactDialog  new ContactEdit();                contactDialog.Edit(ref contactSelect);            }            else { MessageBox.Show(you must select one contact); }        }        private void btnSend_Click(object sender, EventArgs e)        {            try            {                contactSelect  this.listBox1.SelectedItem as Contact;                if (null  this.outLookSession.SmsAccount)                {                    throw new ArgumentException(this account is not i);                }                SmsMessage s  new SmsMessage(contactSelect.MobileTelephoneNumber, this.txtMsg.Text);                s.Body  this.txtMsg.Text;                s.Send();                MessageBox.Show(Message Sent);            }            catch (NullReferenceException ex)            {                MessageBox.Show(ex.ToString());            }        }    }} 简要说明下首先是Send方法如果联系人的手机号码不为空的话就可以进行信息的发送了。如果不为空SDK中为我们提供了一个SmsMessage也是就是短信的发送类。新建一个对象s初始化要指定发送的信息的内容的收件人的手机号码。s的body属性也就是信息体是要发送的内容。对象的实例s调用Send方法即可发送了。在Mobile中常用的也是对话框的弹出了。MessageBox.Show方法有几个重载的使用其中最简单的就是指定弹出对话框所要显示的内容了。新建和编辑函数中的内容大体上面来说也是差不多的新建的话就是把选中的联系人加入到OutLookSession联系中去。CreateNewConversation函数也就是点击ADD之后触发这个函数了把联系人中的不重复加入进来。ChooseContactDialog这个类建立一个对象之后通过对象调用了ShowDialog方法即可进入到手机电话簿中联系人的选取中去。 Codeusing System;using System.Linq;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using Microsoft.WindowsMobile.Forms;using Microsoft.WindowsMobile.PocketOutlook;namespace SmsDefence{    public partial class ContactEdit : Form    {        private Contact contactCreate;        public ContactEdit()        {            InitializeComponent();        }        private void menuItem2_Click(object sender, EventArgs e)        {            this.Close();        }        private void menuItem1_Click(object sender, EventArgs e)        {            this.Close();        }        public void Edit(ref Contact contact)        {            contactCreate  contact;            this.ShowDialog();        }        private void ContactEdit_Load(object sender, EventArgs e)        {            this.txtFirstName.DataBindings.Add(text, this.contactCreate, FirstName);            this.txtLastName.DataBindings.Add(text, this.contactCreate, LastName);            this.txtCompany.DataBindings.Add(text, this.contactCreate, CompanyName);            this.txtEmail.DataBindings.Add(text, this.contactCreate, Email1Address);            this.txtWorkPhone.DataBindings.Add(text, this.contactCreate, BusinessTelephoneNumber);            this.txtMobile.DataBindings.Add(text, this.contactCreate, MobileTelephoneNumber);        }        private void btnOK_Click(object sender, EventArgs e)        {            this.contactCreate.FileAs  this.contactCreate.LastName  ,  this.contactCreate.FirstName;            this.contactCreate.Update();            this.Close();        }    }} 以上的代码是另一个FORM的内容。其主要功能就是对联系人进行编辑或者是新建当点击OK的时候触发的也就是BTNOK这个onclick时间了重要的一个方法就是Update对所做的操作进行更新。Close我想不必说了。FORM的关闭。Edit方法中无非就是数据的绑定。参考文章 WM有约http://www.cnblogs.com/allenlooplee/archive/2009/01/14/1375941.html?CommentID1440147#Post
http://www.zqtcl.cn/news/375097/

相关文章:

  • 哈市哪里网站做的好合作网站seo
  • 找苏州网站建设网站维护提醒php文件
  • 哪些网站做推广效果好与市场营销有关的网站
  • 有什么网站可以做设计赚钱吗专业vi设计公司哪家强
  • 一般的网站是由什么语言做的网站建设怎么问问题
  • 开源系统 网站阿里云虚拟主机网站
  • 摄影师作品网站网站怎么做搜素引擎
  • 做网站定金是多少钱开网站建设公司心得
  • 网站不备案怎么做网页淘宝客电子商务的网站建设的可用性
  • 傻瓜自助建站软件怎样进网站空间服务器
  • 黑龙江网站建站建设wordpress 邮件
  • 免费发布信息网站有哪些豆芽网站建设
  • 无锡做网站优化公司互动营销用在哪些推广上面
  • 每一个网站都是响应式吗销售渠道策略
  • 凡科平台网站怎么建设广州网站建设信科网络
  • 网站建设公司的服务特点seo实战密码电子书
  • 网站开发保密协议范本北京市建设工程信息网查询
  • 怎样跟网站做优化呢wordpress实现新闻列表
  • 济南手机网站定制费用wordpress安装文档下载
  • 麻涌镇网站仿做郑州做网页的公司
  • 做那个网站中山免备案网站建设
  • 软路由系统如何做网站全网营销式网站
  • 中国建设网官方网站视觉网站建设
  • 苏州乡村旅游网站建设策划书.docincapsula wordpress
  • 百度收录自适应网站滨海做网站哪家公司好
  • 东莞网站排名优化公司福田在线官网
  • 清湖网站建设天猫开店流程及费用2023
  • 邵阳建设网站公司网站建设构架
  • 怎样做网站卖网站网络营销概念
  • 怎样做网站能百度能搜到设计网站公司哪里好