My final project part3(PocketOutlook AppointmentApplication)


PocketOutlook.Appointment

 

  thx Gabriel Minarik's help

 

感谢 Gabriel Minarik给与的帮助

 

从pocketOutlook获得约会:

ContractedBlock.gif ExpandedBlockStart.gif load 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.gif ExpandedBlockStart.gif load 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.gif ExpandedBlockStart.gif create 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.gif ExpandedBlockStart.gif return type
public DayEventType GetEventType(DateTime aDay)
ExpandedBlockStart.gifContractedBlock.gif        
{
            .
            .
            .

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

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

        }

 

 

ContractedBlock.gif ExpandedBlockStart.gif return 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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值