NETCF开发之POOM应用开发——任务管理

使用Pocket Outlook .NET组件,我们可以利用三种Pocket Outlook数据实现三项PIM功能:任务、联系人和约会管理。本文介绍任务管理这种PIM功能的实现。

从开发人员的角度来看,使用任务可能出于多种不同的原因。例如,可以在Pocket PC应用程序内通过任务的方式记录某个项目中等待完成的后续工作。Pocket PC设备上的任务应用程序如图23-1所示。

NETCF开发之POOM应用开发——任务管理

<shapetype id="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><stroke joinstyle="miter"></stroke><formulas><f eqn="if lineDrawn pixelLineWidth 0"></f><f eqn="sum @0 1 0"></f><f eqn="sum 0 0 @1"></f><f eqn="prod @2 1 2"></f><f eqn="prod @3 21600 pixelWidth"></f><f eqn="prod @3 21600 pixelHeight"></f><f eqn="sum @0 0 1"></f><f eqn="prod @6 1 2"></f><f eqn="prod @7 21600 pixelWidth"></f><f eqn="sum @8 21600 0"></f><f eqn="prod @7 21600 pixelHeight"></f><f eqn="sum @10 21600 0"></f></formulas><path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></path><lock aspectratio="t" v:ext="edit"></lock></shapetype><shape id="_x0000_i1025" style="WIDTH: 155.25pt; HEIGHT: 207pt" type="#_x0000_t75"><imagedata o:title="" src="file:///C:%5CDOCUME~1%5CADMINI~1%5CLOCALS~1%5CTemp%5Cmsohtml1%5C02%5Cclip_image001.png"></imagedata></shape>

23-1:任务应用程序

InTheHandPocket Outlook .NET组件所提供的Task对象和OutlookSession对象的Tasks属性实现了对任务功能的编程访问。

显示任务

POOM所提供的一个非常有用的功能特性是能够在Pocket PC应用程序界面上显示本机的Pocket Outlook数据。也就是说,其显示效果就像用户进入Task应用程序并选择查看特定任务一样。

该功能通过Task对象的ShowDialog的方法实现,ShowDialog方法从Pocket Outlook .NET组件里的PimItem类继承而来。清单23-3演示了如何使用该方法。

清单23-3:显示任务

<group id="_x0000_s1026" style="WIDTH: 414pt; HEIGHT: 210.6pt; mso-position-horizontal-relative: char; mso-position-vertical-relative: line" coordsize="7200,3672" coordorigin="2526,7642" editas="canvas"><lock aspectratio="t" v:ext="edit"></lock><shapetype id="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><stroke joinstyle="miter"></stroke><formulas><f eqn="if lineDrawn pixelLineWidth 0"></f><f eqn="sum @0 1 0"></f><f eqn="sum 0 0 @1"></f><f eqn="prod @2 1 2"></f><f eqn="prod @3 21600 pixelWidth"></f><f eqn="prod @3 21600 pixelHeight"></f><f eqn="sum @0 0 1"></f><f eqn="prod @6 1 2"></f><f eqn="prod @7 21600 pixelWidth"></f><f eqn="sum @8 21600 0"></f><f eqn="prod @7 21600 pixelHeight"></f><f eqn="sum @10 21600 0"></f></formulas><path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></path><lock aspectratio="t" v:ext="edit"></lock></shapetype><shape id="_x0000_s1027" style="LEFT: 2526px; WIDTH: 7200px; POSITION: absolute; TOP: 7642px; HEIGHT: 3672px" o:preferrelative="f" type="#_x0000_t75"><fill o:detectmouseclick="t"></fill><path o:connecttype="none" o:extrusionok="t"></path><lock v:ext="edit" text="t"></lock></shape><rect id="_x0000_s1028" style="LEFT: 2526px; WIDTH: 7200px; POSITION: absolute; TOP: 7642px; HEIGHT: 3672px" strokecolor="#eaeaea" fillcolor="#eaeaea"><textbox style="mso-next-textbox: #_x0000_s1028"><table cellspacing="0" cellpadding="0" width="100%"><tbody><tr> <td style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent"> <div> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">Imports InTheHand.WindowsMobile.PocketOutlook <p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">……<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">Dim myOutlookSession As New OutlookSession<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">Dim myTasks As PimItemCollection<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><p><font face="Times New Roman"></font></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">Private Sub btnDisplay_Click(ByVal sender As System.Object, _<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">ByVal e As System.EventArgs) Handles btnDisplay.Click<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>Dim myTask As Task<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><p><font face="Times New Roman"></font></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>' </font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">显示任务</span><span lang="EN-US" style="FONT-SIZE: 9pt"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>myTask = myTasks.Item(0)<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>myTask.ShowDialog()<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>End Sub<p></p></font></span></p> </div> </td> </tr></tbody></table></textbox></rect><wrap type="none"></wrap><anchorlock></anchorlock></group>

与前面的两个示例一样,首先要添加Imports语句,并声明OutlookSessionPimItemCollection变量。

在清单23-3btnDisplay_Click过程中,首先从检索的所有任务集合中,将单个任务(即第一个任务)提取到Task对象变量中。该对象提供了ShowDialog方法,随后调用该方法在图23-2所示的界面里显示所选任务。

NETCF开发之POOM应用开发——任务管理

<shape id="_x0000_i1026" style="WIDTH: 155.25pt; HEIGHT: 207pt" type="#_x0000_t75"><imagedata o:title="" src="file:///C:%5CDOCUME~1%5CADMINI~1%5CLOCALS~1%5CTemp%5Cmsohtml1%5C02%5Cclip_image002.png"><font face="Times New Roman"></font></imagedata></shape>

23-2:显示任务

增加任务

增加新任务的过程包含三个步骤。首先,创建一个新任务。其次,配置新任务。最后,保存新任务。清单23-4演示了如何增加新任务。

清单23-4:增加任务

<group id="_x0000_s1029" style="WIDTH: 414pt; HEIGHT: 429pt; mso-position-horizontal-relative: char; mso-position-vertical-relative: line" coordsize="7200,7480" coordorigin="2526,7642" editas="canvas"><lock aspectratio="t" v:ext="edit"></lock><shapetype id="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><stroke joinstyle="miter"></stroke><formulas><f eqn="if lineDrawn pixelLineWidth 0"></f><f eqn="sum @0 1 0"></f><f eqn="sum 0 0 @1"></f><f eqn="prod @2 1 2"></f><f eqn="prod @3 21600 pixelWidth"></f><f eqn="prod @3 21600 pixelHeight"></f><f eqn="sum @0 0 1"></f><f eqn="prod @6 1 2"></f><f eqn="prod @7 21600 pixelWidth"></f><f eqn="sum @8 21600 0"></f><f eqn="prod @7 21600 pixelHeight"></f><f eqn="sum @10 21600 0"></f></formulas><path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></path><lock aspectratio="t" v:ext="edit"></lock></shapetype><shape id="_x0000_s1030" style="LEFT: 2526px; WIDTH: 7200px; POSITION: absolute; TOP: 7642px; HEIGHT: 7480px" o:preferrelative="f" type="#_x0000_t75"><fill o:detectmouseclick="t"></fill><path o:connecttype="none" o:extrusionok="t"></path><lock v:ext="edit" text="t"></lock></shape><rect id="_x0000_s1031" style="LEFT: 2526px; WIDTH: 7200px; POSITION: absolute; TOP: 7642px; HEIGHT: 7480px" strokecolor="#eaeaea" fillcolor="#eaeaea"><textbox style="mso-next-textbox: #_x0000_s1031"><table cellspacing="0" cellpadding="0" width="100%"><tbody><tr> <td style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent"> <div> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">Imports InTheHand.WindowsMobile.PocketOutlook <p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">……<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">Dim myOutlookSession As New OutlookSession<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">Dim myTasks As PimItemCollection<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><p><font face="Times New Roman"></font></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">Private Sub </font></span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-hansi-font-family: 'Times New Roman'; mso-font-kerning: 0pt; mso-no-proof: yes">btnAdd</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">_Click(ByVal sender As System.Object, _<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">ByVal e As System.EventArgs) Handles </font></span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-hansi-font-family: 'Times New Roman'; mso-font-kerning: 0pt; mso-no-proof: yes">btnAdd</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">.Click<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">Dim myTask As Task<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><p><font face="Times New Roman"></font></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">' </font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">创建一个新任务</span><span lang="EN-US" style="FONT-SIZE: 9pt"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">myTask = myOutlookSession.Tasks.Items.AddNew<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><p><font face="Times New Roman"></font></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">' </font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">配置新任务</span><span lang="EN-US" style="FONT-SIZE: 9pt"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">With myTask<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>.Body = "</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">添加一个简单的任务</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">"<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>.Categories = "demo"<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>.DueDate = Today.Date<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>.Importance = Importance.High<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>.ReminderOptions = ReminderOptions.Dialog<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>.ReminderSet = True<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>.StartDate = Today.Date<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>.Subject = "sample task"<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><p><font face="Times New Roman"></font></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>' </font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">最后,保存新任务</span><span lang="EN-US" style="FONT-SIZE: 9pt"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>.Update()<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">End With<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">End Sub<p></p></font></span></p> </div> </td> </tr></tbody></table></textbox></rect><wrap type="none"></wrap><anchorlock></anchorlock></group>

与前面的所有示例一样,首先要添加Imports语句,并声明OutlookSessionPimItemCollection变量。

在清单23-4btnAdd_Click过程中,完成了增加新任务所包括的三个步骤。首先,在OutlookSession对象的Tasks属性集合中增加一个新任务。其次,配置该新任务的各项属性。最后,调用Task对象的Update方法保存该任务。

修改任务

修改任务与增加任务类似,修改任务同样也包括的三个步骤。而与增加新任务的三个步骤唯一不同之处是修改任务的第一步是将现有任务加载到Task对象中。清单23-4演示了修改任务所执行的三个步骤。

清单23-5:修改任务

<group id="_x0000_s1026" style="WIDTH: 414pt; HEIGHT: 335.4pt; mso-position-horizontal-relative: char; mso-position-vertical-relative: line" coordsize="7200,5848" coordorigin="2526,7642" editas="canvas"><lock aspectratio="t" v:ext="edit"></lock><shape id="_x0000_s1027" style="LEFT: 2526px; WIDTH: 7200px; POSITION: absolute; TOP: 7642px; HEIGHT: 5848px" o:preferrelative="f" type="#_x0000_t75"><fill o:detectmouseclick="t"></fill><path o:connecttype="none" o:extrusionok="t"></path><lock v:ext="edit" text="t"></lock></shape><rect id="_x0000_s1028" style="LEFT: 2526px; WIDTH: 7200px; POSITION: absolute; TOP: 7642px; HEIGHT: 5848px" strokecolor="#eaeaea" fillcolor="#eaeaea"><textbox style="mso-next-textbox: #_x0000_s1028"><table cellspacing="0" cellpadding="0" width="100%"><tbody><tr> <td style="BORDER-RIGHT: #d4d0c8; BORDER-TOP: #d4d0c8; BORDER-LEFT: #d4d0c8; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent"> <div> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">Imports InTheHand.WindowsMobile.PocketOutlook <p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">……<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">Dim myOutlookSession As New OutlookSession<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">Dim myTasks As PimItemCollection<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><p><font face="Times New Roman"></font></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">Private Sub </font></span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-hansi-font-family: 'Times New Roman'; mso-font-kerning: 0pt; mso-no-proof: yes">btnModify</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">_Click(ByVal sender As System.Object, _<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">ByVal e As System.EventArgs) Handles </font></span><span lang="EN-US" style="FONT-SIZE: 9pt; FONT-FAMILY: 新宋体; mso-hansi-font-family: 'Times New Roman'; mso-font-kerning: 0pt; mso-no-proof: yes">btnModify</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">.Click<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">Dim myTask As Task<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><p><font face="Times New Roman"></font></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">' </font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">检索所有任务</span><span lang="EN-US" style="FONT-SIZE: 9pt"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">myTasks = myOutlookSession.Tasks.Items<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">myTask = myTasks.Item(0)<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><p><font face="Times New Roman"></font></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">' </font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">配置新任务</span><span lang="EN-US" style="FONT-SIZE: 9pt"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">With myTask<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>.Body = "</font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">修改任务</span><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">"<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><p><font face="Times New Roman"></font></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span>' </font></span><span style="FONT-SIZE: 9pt; FONT-FAMILY: 宋体; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">最后,保存新任务</span><span lang="EN-US" style="FONT-SIZE: 9pt"><p></p></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman"><span style="mso-spacerun: yes"> </span><span style="mso-spacerun: yes"></span>.Update()<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt 21pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">End With<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 21pt; LINE-HEIGHT: 14pt"><span lang="EN-US" style="FONT-SIZE: 9pt"><font face="Times New Roman">End Sub<p></p></font></span></p> <p class="MsoNormal" style="MARGIN: 0cm 0cm 0pt"><span lang="EN-US" style="mso-bidi-font-size: 9.0pt"><p><font face="Times New Roman" size="3"></font></p></span></p> </div> </td> </tr></tbody></table></textbox></rect><wrap type="none"></wrap><anchorlock></anchorlock></group>

你可能感兴趣的:(编程,项目管理,F#,配置管理,ext)