My final project part3(PocketOutlook AppointmentApplication)

本文介绍了如何使用PocketOutlook API加载约会数据,并提供了获取指定时间范围内约会的方法。此外,还展示了利用HashTable进行特定类型约会搜索的技术实现。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >


PocketOutlook.Appointment

 

  thx Gabriel Minarik's help

 

感谢 Gabriel Minarik给与的帮助

 

从pocketOutlook获得约会:

ContractedBlock.gifExpandedBlockStart.gifload Appointment from pocketOutlook
public void LoadAppt()
ExpandedBlockStart.gifContractedBlock.gif        
{
            List
<Appointment> mylist = new List<Appointment>();

            
for (int i = 0; i < outlookSession.Appointments.Items.Count; ++i)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
{
                
// get an appointment from Pocket Outlook
                Appointment app = outlookSession.Appointments.Items[i];

                mylist.Add(app);
            }

        }

 

 从pocketOutlook获得指定时间的约会:

ContractedBlock.gifExpandedBlockStart.gifload Appointment from pocketOutlook by specific time
public void Load(DateTime tFrom, DateTime tTo)
ExpandedBlockStart.gifContractedBlock.gif        
{
            
if (mylist == null) mylist = new List<Appointment>();

            
if (mylist.Count > 0) mylist.Clear();


            
for (int i = 0; i < outlookSession.Appointments.Items.Count; ++i)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
{
                
// get an appointment from Pocket Outlook
                Appointment appt = outlookSession.Appointments.Items[i];

                
if (((appt.Start >= tFrom) &&
                    (appt.Start 
<= tTo)) ||
                    ((appt.End 
>= tFrom) &&
                    (appt.End 
<= tTo)))
ExpandedSubBlockStart.gifContractedSubBlock.gif                
{
                    mylist.Add(appt);
                }

            }

        }

 


 

using HashTable to search Appointment of specific type.

 用HashTable来查找指定类型的约会:


public enum DayEventType
ExpandedBlockStart.gifContractedBlock.gif
{
    
// define type here
}

 


ContractedBlock.gifExpandedBlockStart.gifcreate HashTable
public class AgendaHashTable
ExpandedBlockStart.gifContractedBlock.gif    
{
        
private Hashtable m_Events;
        
// recurring Appointments 
        private List<Appointment> m_recApps;

        
public AgendaHashTable()
ExpandedSubBlockStart.gifContractedSubBlock.gif        
{
            m_Events 
= new Hashtable();
            m_recApps 
= new List<Appointment>();
        }

 

 

ContractedBlock.gifExpandedBlockStart.gifreturn type
public DayEventType GetEventType(DateTime aDay)
ExpandedBlockStart.gifContractedBlock.gif        
{
            .
            .
            .

            
if ()
ExpandedSubBlockStart.gifContractedSubBlock.gif            
{
                
return DayEventType..;
            }

            
else
ExpandedSubBlockStart.gifContractedSubBlock.gif            
{
               
                
return data.DayEvents;
            }

        }

 

 

ContractedBlock.gifExpandedBlockStart.gifreturn Appointment
public List<Appointment> GetListOfEvents(DateTime aDay)
ExpandedBlockStart.gifContractedBlock.gif        
{
            .
            .
            .

            
if (.)
ExpandedSubBlockStart.gifContractedSubBlock.gif            
{
                
return data.Appointments;
            }

            
            
return null;
        }

 

 

My final project part3(PocketOutlook AppointmentApplication)

 

View Agenda:

 

 
 

View Day:

 

 

 View Week

 


 

View Month:

 

 

View Year:

 

 

View Detail: (Edit and New Appointment)

 

 








 to be continue....

 

 frank Avanel

 

 

转载于:https://www.cnblogs.com/frankavanel/archive/2009/04/09/frank_final_project_part3_Appointment.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值