This repository has been archived by the owner on Nov 7, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
item.cs
executable file
·86 lines (74 loc) · 2.12 KB
/
item.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*---------------------------------------------------------------------
Copyright (C) Microsoft Corporation. All rights reserved.
This source code is intended only as a supplement to Microsoft
Development Tools and/or on-line documentation. See these other
materials for detailed information regarding Microsoft code samples.
THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
-----------------------------------------------------------------------
* File: Item.class
*
* Purpose: Abstract superclass of the Pocket Outlook Items
* (Appointments, Contacts, Tasks)
*
*
* Notes:
* This is a wrapper around an ItemCollection
*
*/
namespace PocketOutlook
{
using System;
using System.Runtime.InteropServices;
public abstract class OutlookItem
{
private Application m_application;
private IntPtr m_pIItem;
public enum ItemType
{
AppointmentItem = 1,
ContactItem = 2,
TaskItem = 3,
CityItem = 102
}
protected OutlookItem(Application application, ref IntPtr pIItem)
{
m_application = application;
m_pIItem = pIItem;
}
public Application Application
{
get
{
return m_application;
}
}
/*
* Access to this object's raw data.
*/
protected IntPtr RawItemPtr
{
get
{
return m_pIItem;
}
}
public void Save()
{
this.doSave();
}
public void Delete()
{
this.doDelete();
}
public OutlookItem Copy()
{
return this.doCopy();
}
protected abstract void doSave();
protected abstract void doDelete();
protected abstract OutlookItem doCopy();
}
}