[MERGE] manual outlook plugin no binary yet

bzr revid: al@openerp.com-20111209142839-wffacq9r3ckjxi3s
This commit is contained in:
Antony Lesuisse 2011-12-09 15:28:39 +01:00
parent 9c15cb860f
commit c3bbd5c2d7
101 changed files with 7529 additions and 10680 deletions

View File

@ -748,10 +748,11 @@ class crm_lead(crm_case, osv.osv):
self.write(cr, uid, [res_id], vals, context)
return res_id
def message_update(self, cr, uid, ids, msg, vals={}, default_act='pending', context=None):
def message_update(self, cr, uid, ids, msg, vals=None, default_act='pending', context=None):
if isinstance(ids, (str, int, long)):
ids = [ids]
if vals == None:
vals = {}
super(crm_lead, self).message_update(cr, uid, ids, msg, context=context)
if msg.get('priority') in dict(crm.AVAILABLE_PRIORITIES):

View File

@ -365,10 +365,11 @@ class hr_applicant(crm.crm_case, osv.osv):
self.write(cr, uid, [res_id], vals, context)
return res_id
def message_update(self, cr, uid, ids, msg, vals={}, default_act='pending', context=None):
def message_update(self, cr, uid, ids, msg, vals=None, default_act='pending', context=None):
if isinstance(ids, (str, int, long)):
ids = [ids]
if vals is None:
vals = {}
msg_from = msg['from']
vals.update({
'description': msg['body_text']

View File

@ -380,12 +380,16 @@ class mail_message(osv.osv):
if 'To' in fields:
msg['to'] = decode(msg_txt.get('To'))
if 'Delivered-To' in fields:
msg['to'] = decode(msg_txt.get('Delivered-To'))
if 'CC' in fields:
msg['cc'] = decode(msg_txt.get('CC'))
if 'Cc' in fields:
msg['cc'] = decode(msg_txt.get('Cc'))
if 'Reply-To' in fields:
msg['reply'] = decode(msg_txt.get('Reply-To'))
@ -455,6 +459,7 @@ class mail_message(osv.osv):
msg['sub_type'] = msg['subtype'] or 'plain'
return msg
def send(self, cr, uid, ids, auto_commit=False, context=None):
"""Sends the selected emails immediately, ignoring their current
state (mails that have already been sent should not be passed

View File

@ -58,6 +58,14 @@ class mail_thread(osv.osv):
'message_ids': fields.one2many('mail.message', 'res_id', 'Messages', readonly=True),
}
def message_capable_models(self, cr, uid, context=None):
ret_dict = {}
for model_name in self.pool.obj_list():
model = self.pool.get(model_name)
if 'mail.thread' in getattr(model, '_inherit', []):
ret_dict[model_name] = model._description
return ret_dict
def message_thread_followers(self, cr, uid, ids, context=None):
"""Returns a list of email addresses of the people following
this thread, including the sender of each mail, and the

View File

@ -1,29 +0,0 @@
OpenERP Outlook PLUG-IN Installation Guide
Pre requirements :
======================================================================================
1.Python 2.6+ . python can be downloaded from http://www.python.org/download/releases/ .
2.Python for Windows extensions - PyWin32 this module for python must be installed for appropriate version of the Python. It can be downloaded from
http://sourceforge.net/projects/pywin32/ or
http://starship.python.net/crew/mhammond/win32/
3.If you are using MS Outlook 2007 than you are required to install "Microsoft Exchange Server MAPI Client and Collaboration Data Objects 1.2.1 (CDO 1.21)". It can be downloaded from
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=2714320D-C997-4DE1-986F-24F081725D36&displaylang=en
and With MS Outlook2003 Install inbuilt Collaboration Data Objects(CDO) while installing Outlook.
To read more regarding Collaboration Data Objects(CDO) click following link:
+ http://support.microsoft.com/kb/171440
How to install openerp-outlook plug-in?
======================================================================================
1. Save the executable plug-in file.
2. Close Outlook Application if Running.
3. Run executable plug-in file and the folllow the instruction.
How to uninstall openerp-outlook plug-in?
=====================================================================================
1. Go to Control Panel Click "Add/Remove Programmes"
2. You will entry, you will find entry named 'OpenERP Outlook Addin 1.0' select it and click Uninstall.
Note : Plug In has been successfully tested with MS Office 2003 and MS Offcie 2007.
Enjoy Archiving your Outlook E-mails to OpenERP.

View File

@ -25,7 +25,7 @@
'version' : '1.0',
'author' : 'OpenERP SA',
'website' : 'http://www.openerp.com/',
'depends' : ['base', 'mail'],
'depends' : ['base', 'mail','plugin'],
'category' : 'Customer Relationship Management',
'description': '''
This module provides the Outlook Plug-in.
@ -33,7 +33,7 @@ This module provides the Outlook Plug-in.
Outlook plug-in allows you to select an object that youd like to add
to your email and its attachments from MS Outlook. You can select a partner, a task,
a project, an analytical account, or any other object and archive selected
mail into email.messages with attachments.
mail into mail.message with attachments.
''',
'init_xml' : [],
'demo_xml' : [],

View File

@ -32,7 +32,7 @@ class outlook_installer(osv.osv_memory):
def default_get(self, cr, uid, fields, context=None):
data = super(outlook_installer, self).default_get(cr, uid, fields, context=context)
data['doc_file'] = 'http://doc.openerp.com/book/2/2_6_Comms/2_6_Comms_outlook.html'
file = open(addons.get_module_resource('outlook','plugin','openerp-outlook-addin.exe'), 'r')
file = open(addons.get_module_resource('outlook','plugin','openerp-outlook-plugin_v2.0','OpenERPOutlookPluginSetup','Release','OpenERPOutlookPluginSetup.msi'), 'r')
data['plugin_file'] = base64.encodestring(file.read())
return data
@ -47,21 +47,18 @@ class outlook_installer(osv.osv_memory):
_defaults = {
'outlook' : True,
'name' : 'Openerp-Outlook-Addin.exe',
'name' : 'OpenERPOutlookPlugin.msi',
'doc_name' : 'Installation Guide to OpenERP Outlook Plug-in.doc',
'description' : """
System requirements:
1. Python 2.6+.
2. Python for Windows extensions (PyWin32); this module must be installed for the appropriate version of Python.
3.1 With MS Outlook 2007, install the package Collaboration Data Objects, version 1.2.1, http://www.microsoft.com/downloads/en/details.aspx?FamilyID=2714320D-C997-4DE1-986F-24F081725D36
3.2 With MS Outlook 2003, install the builtin Collaboration Data Objects(CDO) while installing Outlook.
1. MS Outlook 2005 or above.
2. MS .Net Framework 3.5 .
Plugin installation:
1. Save the executable plug-in file.
1. Save the msi plug-in file.
2. Close the Outlook application if it is open.
3. Run the executable plug-in file, and follow the given instructions.
Please refer to the README file for dependencies (external link: openobject-addons/outlook/README).
3. Run the executable plug-in file (OpenERPOutlookPlugin.msi).
"""
}
outlook_installer()

View File

@ -14,7 +14,9 @@
<attribute name="string">Install Outlook Plug-In</attribute>
</separator>
<xpath expr="//label[@string='description']" position="attributes">
<attribute name="string">This plug-in allows you to link your e-mail to OpenERP's documents. You can attach it to any existing one in OpenERP or create a new one.</attribute>
<attribute name="string">This plug-in allows you to create new contact or link contact to an existing partner.
Also allows to link your e-mail to OpenERP's documents.
You can attach it to any existing one in OpenERP or create a new one.</attribute>
</xpath>
<xpath expr="//button[@string='Install Modules']" position="replace">
<button colspan="1" icon="gtk-close" special="cancel" string="_Close"/>

View File

@ -1,2 +0,0 @@
python addin.py
pause

View File

@ -1,2 +0,0 @@
python addin.py --unregister
pause

View File

@ -1,301 +0,0 @@
# This module is part of the spambayes project, which is Copyright 2003
# The Python Software Foundation and is covered by the Python Software
# Foundation license.
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from win32com import universal
from win32com.client import gencache, DispatchWithEvents
import pythoncom
from win32com.client import constants
import sys
import os
from win32com.client import Dispatch
import win32con
sys.path.append(os.path.abspath(os.path.dirname(__file__))) #outlook
sys.path.append(os.path.abspath(__file__)) #outlook/addin
import manager
from win32com.client import CastTo
import win32ui
from tiny_xmlrpc import XMLRpcConn
import locale
locale.setlocale(locale.LC_NUMERIC, "C")
# Support for COM objects we use.
gencache.EnsureModule('{00062FFF-0000-0000-C000-000000000046}', 0, 9, 0, bForDemand=True) # Outlook 9
gencache.EnsureModule('{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}', 0, 2, 1, bForDemand=True) # Office 9
# The TLB defiining the interfaces we implement
universal.RegisterInterfaces('{AC0714F2-3D04-11D1-AE7D-00A0C90F26F4}', 0, 1, 0, ["_IDTExtensibility2"])
global NewConn
# Retrieves registered XMLRPC connection
def GetConn():
d=Dispatch("Python.OpenERP.XMLRpcConn")
return d
class Configuration:
def OnClick(self, button, cancel):
import win32ui
try:
mngr = manager.GetManager()
mngr.ShowManager()
except Exception,e:
win32ui.MessageBox("Fail to Initialize dialog.\n"+str(e),"OpenERP Configuration", win32con.MB_ICONERROR)
return cancel
#
class ViewPartners:
def OnClick(self, button, cancel):
from win32com.client import Dispatch
import win32con
mngr = manager.GetManager()
data = mngr.LoadConfig()
outlook = Dispatch("Outlook.Application")
ex = outlook.ActiveExplorer()
if ex:
is_login = str(data['login'])
if is_login == 'False':
win32ui.MessageBox("Please login to the database first", "OpenERP Connection", win32con.MB_ICONEXCLAMATION)
elif ex.Selection.Count == 1 or ex.Selection.Count == 0:
mngr = manager.GetManager()
mngr.ShowManager("IDD_VIEW_PARTNER_DIALOG")
elif ex.Selection.Count > 1:
win32ui.MessageBox("Multiple selection not allowed. Please select only one mail at a time.","Open Contact",win32con.MB_ICONINFORMATION)
return cancel
#
class OpenPartner:
def OnClick(self, button, cancel):
import win32ui
mngr = manager.GetManager()
data = mngr.LoadConfig()
outlook = Dispatch("Outlook.Application")
ex = outlook.ActiveExplorer()
if ex:
is_login = str(data['login'])
if is_login == 'False':
win32ui.MessageBox("Please login to the database first", "OpenERP Connection", win32con.MB_ICONEXCLAMATION)
elif ex.Selection.Count == 1:
mngr = manager.GetManager()
mngr.ShowManager("IDD_OPEN_PARTNER_DIALOG")
elif ex.Selection.Count == 0:
win32ui.MessageBox("No mail selected to push to OpenERP","Push to OpenERP",win32con.MB_ICONINFORMATION)
elif ex.Selection.Count > 1:
win32ui.MessageBox("Multiple selection not allowed. Please select only one mail at a time.","Push to OpenERP",win32con.MB_ICONINFORMATION)
return cancel
#
class OpenDocument:
def OnClick(self, button, cancel):
from win32com.client import Dispatch
import win32con
mngr = manager.GetManager()
data = mngr.LoadConfig()
outlook = Dispatch("Outlook.Application")
ex = outlook.ActiveExplorer()
if ex:
is_login = str(data['login'])
if is_login == 'False':
win32ui.MessageBox("Please login to the database first", "OpenERP Connection", win32con.MB_ICONEXCLAMATION)
elif ex.Selection.Count == 1 or ex.Selection.Count == 0:
mngr = manager.GetManager()
mngr.ShowManager("IDD_OPEN_DOCUEMNT_DIALOG")
elif ex.Selection.Count > 1:
win32ui.MessageBox("Multiple selection not allowed. Please select only one mail at a time.","Open Document",win32con.MB_ICONINFORMATION)
return cancel
#
class ArchiveEvent:
def OnClick(self, button, cancel):
from win32com.client import Dispatch
import win32con
mngr = manager.GetManager()
data=mngr.LoadConfig()
outlook = Dispatch("Outlook.Application")
ex = outlook.ActiveExplorer()
if ex:
is_login = str(data['login'])
if is_login == 'False':
win32ui.MessageBox("Please login to the database first", "OpenERP Connection", win32con.MB_ICONEXCLAMATION)
elif ex.Selection.Count == 1:
mngr = manager.GetManager()
mngr.ShowManager("IDD_SYNC")
elif ex.Selection.Count == 0:
win32ui.MessageBox("No mail selected to push to OpenERP","Push to OpenERP",win32con.MB_ICONINFORMATION)
elif ex.Selection.Count > 1:
win32ui.MessageBox("Multiple selection not allowed. Please select only one mail at a time.","Push to OpenERP",win32con.MB_ICONINFORMATION)
return cancel
#
class OutlookAddin:
_com_interfaces_ = ['_IDTExtensibility2']
_public_methods_ = ['OnConnection','GetAppDataPath']
_reg_clsctx_ = pythoncom.CLSCTX_INPROC_SERVER
_reg_clsid_ = "{0F47D9F3-598B-4d24-B7E3-92AC15ED27E8}"
_reg_progid_ = "Python.OpenERP.OutlookAddin"
_reg_policy_spec_ = "win32com.server.policy.EventHandlerPolicy"
def OnConnection(self, application, connectMode, addin, custom):
# ActiveExplorer may be none when started without a UI (eg, WinCE synchronisation)
activeExplorer = application.ActiveExplorer()
if activeExplorer is not None:
bars = activeExplorer.CommandBars
new_bar = bars.Add('Open ERP',0,0,0)
menu_bar = bars.Item("Menu Bar")
tools_menu = menu_bar.Controls(5)
tools_menu = CastTo(tools_menu, "CommandBarPopup")
item = tools_menu.Controls.Add(Type=constants.msoControlButton, Temporary=True)
# Hook events for the item
item = self.menu_bar_Button = DispatchWithEvents(item, Configuration)
item.Caption="Configuration"
item.TooltipText = "Click to configure OpenERP"
item.Enabled = True
item = tools_menu.Controls.Add(Type=constants.msoControlButton, Temporary=True)
# Hook events for the item
item = self.menu_bar_arch_Button = DispatchWithEvents(item, ArchiveEvent)
item.Caption="Push"
item.TooltipText = "Click to push to OpenERP"
item.Enabled = True
toolbar = bars.Item("Standard")
openerp_bar = bars.Item('Open ERP')
item = openerp_bar.Controls.Add(Type = constants.msoControlButton, Temporary = True)
item = self.toolbarButtonConfig = DispatchWithEvents(item, Configuration)
item.Caption = "Configuration"
item.TooltipText = "Click to configure OpenERP."
item.Enabled = True
item = openerp_bar.Controls.Add(Type=constants.msoControlButton, Temporary=True)
# Hook events for the item
item = self.toolbarButton = DispatchWithEvents(item, ArchiveEvent)
item.Caption="Push"
item.TooltipText = "Click to push to OpenERP"
item.Enabled = True
# Adding Menu in Menu Bar to the Web Menu of the Outlook
toolbarweb = bars.Item("Web")
item = openerp_bar.Controls.Add(Type = constants.msoControlButton, Temporary = True)
item = self.toolbarButtonOpenPartner = DispatchWithEvents(item, OpenPartner)
item.Caption = "Partner"
item.TooltipText = "Click to Open OpenERP Partner Contact Information."
item.Enabled = True
item = openerp_bar.Controls.Add(Type = constants.msoControlButton, Temporary = True)
item = self.toolbarButtonOpenDocument = DispatchWithEvents(item, OpenDocument)
item.Caption = "Document"
item.TooltipText = "Click to Open Document that has been pushed to server."
item.Enabled = True
# Hook events for the item
# item = toolbarweb.Controls.Add(Type = constants.msoControlButton, Temporary = True)
# item = self.toolbarButtonPartner = DispatchWithEvents(item, ViewPartners)
# item.Caption = "Open Contact"
# item.TooltipText = "Click to Open OpenERP Partner Contact Information."
# item.Enabled = True
# item = tools_menu.Controls.Add(Type=constants.msoControlButton, Temporary=True)
# # Hook events for the item
# item = self.menu_bar_viewpartner_Button = DispatchWithEvents(item, ViewPartners)
# item.Caption = "Open Contact"
# item.TooltipText = "Click to Open Partner detail"
# item.Enabled = True
item = tools_menu.Controls.Add(Type=constants.msoControlButton, Temporary=True)
# Hook events for the item
item = self.menu_bar_openpartner_Button = DispatchWithEvents(item, OpenPartner)
item.Caption = "Partner"
item.TooltipText = "Click to Open Partner detail"
item.Enabled = True
item = tools_menu.Controls.Add(Type=constants.msoControlButton, Temporary=True)
# Hook events for the item
item = self.menu_bar_opendocument_Button = DispatchWithEvents(item, OpenDocument)
item.Caption = "Document"
item.TooltipText = "Click to Open Document that has been pushed to server."
item.Enabled = True
def OnDisconnection(self, mode, custom):
mngr = manager.GetManager()
mngr.config['login'] = False
mngr.SaveConfig()
self.item.close()
pass
def OnAddInsUpdate(self, custom):
pass
def OnStartupComplete(self, custom):
pass
def OnBeginShutdown(self, custom):
pass
def GetAppDataPath(self):
mngr = manager.GetManager()
return mngr.data_directory
def RegisterAddin(klass):
import _winreg
key = _winreg.CreateKey(_winreg.HKEY_CURRENT_USER, "Software\\Microsoft\\Office\\Outlook\\Addins")
subkey = _winreg.CreateKey(key, klass._reg_progid_)
_winreg.SetValueEx(subkey, "CommandLineSafe", 0, _winreg.REG_DWORD, 0)
_winreg.SetValueEx(subkey, "LoadBehavior", 0, _winreg.REG_DWORD, 3)
_winreg.SetValueEx(subkey, "Description", 0, _winreg.REG_SZ, klass._reg_progid_)
_winreg.SetValueEx(subkey, "FriendlyName", 0, _winreg.REG_SZ, klass._reg_progid_)
def UnregisterAddin(klass):
import _winreg
try:
_winreg.DeleteKey(_winreg.HKEY_CURRENT_USER, "Software\\Microsoft\\Office\\Outlook\\Addins\\" + klass._reg_progid_)
except:
pass
def UnregisterXMLConn(klass):
import _winreg
try:
_winreg.DeleteKey(_winreg.HKEY_CURRENT_USER, "Software\\Microsoft\\Office\\Outlook\\Addins\\XMLConnection" + klass._reg_progid_)
except:
pass
def RegisterXMLConn(klass):
import _winreg
key = _winreg.CreateKey(_winreg.HKEY_CURRENT_USER, "Software\\Microsoft\\Office\\Outlook\\Addins\\XMLConnection")
subkey = _winreg.CreateKey(key, klass._reg_progid_)
_winreg.SetValueEx(subkey, "CommandLineSafe", 0, _winreg.REG_DWORD, 0)
_winreg.SetValueEx(subkey, "LoadBehavior", 0, _winreg.REG_DWORD, 3)
_winreg.SetValueEx(subkey, "Description", 0, _winreg.REG_SZ, klass._reg_progid_)
_winreg.SetValueEx(subkey, "FriendlyName", 0, _winreg.REG_SZ, klass._reg_progid_)
if __name__ == '__main__':
import win32com.server.register
NewConn=XMLRpcConn()
win32com.server.register.UseCommandLine(OutlookAddin)
win32com.server.register.UseCommandLine(NewConn)
if "--unregister" in sys.argv:
UnregisterAddin(OutlookAddin)
UnregisterXMLConn(NewConn)
print "\n \tPlug In Un-registered Successfully.\n\tThank You for Using PlugIn."
else:
RegisterAddin(OutlookAddin)
RegisterXMLConn(NewConn)
print "\n \tPlug In Registered Successfully.\n\tEnjoy Archiving with OpenERP.\n\tSee UserGuide for More. "
#mngr = manager.GetManager()
#mngr.ShowManager("IDD_MANAGER")
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

File diff suppressed because it is too large Load Diff

View File

@ -1,83 +0,0 @@
# This package defines dialog boxes used by the main
# This module is part of the spambayes project, which is Copyright 2003
# The Python Software Foundation and is covered by the Python Software
# Foundation license.
import os, sys, stat
#import dialog_map
def LoadDialogs(rc_name = "dialogs.rc"):
base_name = os.path.splitext(rc_name)[0]
mod_name = "dialogs.resources." + base_name
mod = None
# If we are running from source code, check the .py file is up to date
# wrt the .rc file passed in.
# If we are running from binaries, the rc name is not used at all - we
# assume someone running from source previously generated the .py!
if not hasattr(sys, "frozen"):
from resources import rc2py
rc_path = os.path.dirname( rc2py.__file__ )
if not os.path.isabs(rc_name):
rc_name = os.path.join( rc_path, rc_name)
py_name = os.path.join(rc_path, base_name + ".py")
mtime = size = None
if os.path.exists(py_name):
try:
mod = __import__(mod_name)
mod = sys.modules[mod_name]
mtime = mod._rc_mtime_
size = mod._rc_size_
except (ImportError, AttributeError):
mtime = None
try:
stat_data = os.stat(rc_name)
rc_mtime = stat_data[stat.ST_MTIME]
rc_size = stat_data[stat.ST_SIZE]
except OSError:
rc_mtime = rc_size = None
if rc_mtime!=mtime or rc_size!=size:
# Need to generate the dialog.
print "Generating %s from %s" % (py_name, rc_name)
rc2py.convert(rc_name, py_name)
if mod is not None:
reload(mod)
if mod is None:
mod = __import__(mod_name)
mod = sys.modules[mod_name]
return mod.FakeParser()
def ShowDialog(parent, manager, config, idd):
"""Displays another dialog"""
if manager.dialog_parser is None:
manager.dialog_parser = LoadDialogs()
import dialog_map
print dir(dialog_map)
commands = dialog_map.dialog_map[idd]
if not parent:
import win32gui
try:
parent = win32gui.GetActiveWindow()
except win32gui.error:
pass
import dlgcore
dlg = dlgcore.ProcessorDialog(parent, manager, config, idd, commands)
return dlg.DoModal()
def MakePropertyPage(parent, manager, config, idd, yoffset=24):
"""Creates a child dialog box to use as property page in a tab control"""
if manager.dialog_parser is None:
manager.dialog_parser = LoadDialogs()
import dialog_map
commands = dialog_map.dialog_map[idd]
if not parent:
raise "Parent must be the tab control"
import dlgcore
dlg = dlgcore.ProcessorPage(parent, manager, config, idd, commands, yoffset)
return dlg
import dlgutils
SetWaitCursor = dlgutils.SetWaitCursor
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,325 +0,0 @@
# A core, data-driven dialog.
# Driven completely by "Control Processor" objects.
# This module is part of the spambayes project, which is Copyright 2003
# The Python Software Foundation and is covered by the Python Software
# Foundation license.
import win32gui, win32api, win32con
import commctrl
import struct, array
from dlgutils import *
# Isolate the nasty stuff for tooltips somewhere.
class TooltipManager:
def __init__(self, dialog):
self.dialog = dialog
self.hwnd_tooltip = None
self.tooltip_tools = {}
def HideTooltip(self):
if self.hwnd_tooltip is not None:
win32gui.SendMessage(self.hwnd_tooltip, commctrl.TTM_TRACKACTIVATE, 0, 0)
def ShowTooltipForControl(self, control_id, text):
# Note sure this tooltip stuff is quite right!
# Hide an existing one, so the new one gets created.
# (new one empty is no big deal, but hiding the old one is, so
# we get re-queried for the text.
hwnd_dialog = self.dialog.hwnd
self.HideTooltip()
if self.hwnd_tooltip is None:
TTS_BALLOON = 0x40
self.hwnd_tooltip = win32gui.CreateWindowEx(0, "tooltips_class32", None,
win32con.WS_POPUP | TTS_BALLOON,
win32con.CW_USEDEFAULT, win32con.CW_USEDEFAULT,
win32con.CW_USEDEFAULT, win32con.CW_USEDEFAULT,
hwnd_dialog, 0, 0, None)
# 80 chars max for our tooltip
# hrm - how to measure this in pixels!
win32gui.SendMessage(self.hwnd_tooltip,
commctrl.TTM_SETMAXTIPWIDTH,
0, 300)
format = "iiiiiiiiiii"
tt_size = struct.calcsize(format)
buffer = array.array("c", text + "\0")
text_address, size = buffer.buffer_info()
uID = control_id
flags = commctrl.TTF_TRACK | commctrl.TTF_ABSOLUTE
data = struct.pack(format, tt_size, flags, hwnd_dialog, uID, 0,0,0,0, 0, text_address, 0)
# Add a tool for this control only if we haven't already
if control_id not in self.tooltip_tools:
win32gui.SendMessage(self.hwnd_tooltip,
commctrl.TTM_ADDTOOL,
0, data)
self.tooltip_tools[control_id] = 1
control = win32gui.GetDlgItem(hwnd_dialog, control_id)
child_rect = win32gui.GetWindowRect(control)
xOff = yOff = 15 # just below and right of the control
win32gui.SendMessage(self.hwnd_tooltip,
commctrl.TTM_TRACKPOSITION,
0,
MAKELONG(child_rect[0]+xOff, child_rect[1]+yOff))
win32gui.SendMessage(self.hwnd_tooltip,
commctrl.TTM_TRACKACTIVATE,
1,data)
# A base dialog class, that loads from resources. Has no real smarts.
class Dialog:
def __init__(self, parent, parser, idd):
win32gui.InitCommonControls()
self.hinst = win32api.GetModuleHandle(None)
self.parent = parent
self.dialog_parser = parser
self.template = parser.dialogs[idd]
def _GetIDName(self, cid):
return self.dialog_parser.names.get(cid, str(cid))
def CreateWindow(self):
return self._DoCreate(win32gui.CreateDialogIndirect)
def DoModal(self):
return self._DoCreate(win32gui.DialogBoxIndirect)
def GetMessageMap(self):
ret = {
win32con.WM_COMMAND: self.OnCommand,
win32con.WM_NOTIFY: self.OnNotify,
win32con.WM_INITDIALOG: self.OnInitDialog,
win32con.WM_CLOSE: self.OnClose,
win32con.WM_DESTROY: self.OnDestroy,
win32con.WM_RBUTTONUP: self.OnRButtonUp,
}
return ret
def DoInitialPosition(self):
# centre the dialog
desktop = win32gui.GetDesktopWindow()
l,t,r,b = win32gui.GetWindowRect(self.hwnd)
w = r-l
h = b-t
dt_l, dt_t, dt_r, dt_b = win32gui.GetWindowRect(desktop)
centre_x, centre_y = win32gui.ClientToScreen( desktop, ( (dt_r-dt_l)/2, (dt_b-dt_t)/2) )
win32gui.MoveWindow(self.hwnd, centre_x-(w/2), centre_y-(h/2), w, h, 0)
def OnInitDialog(self, hwnd, msg, wparam, lparam):
self.hwnd = hwnd
self.DoInitialPosition()
def OnCommand(self, hwnd, msg, wparam, lparam):
pass
def OnNotify(self, hwnd, msg, wparam, lparam):
pass
def OnClose(self, hwnd, msg, wparam, lparam):
pass
def OnDestroy(self, hwnd, msg, wparam, lparam):
pass
def OnRButtonUp(self, hwnd, msg, wparam, lparam):
pass
def _DoCreate(self, fn):
message_map = self.GetMessageMap()
return win32gui.DialogBoxIndirect(self.hinst, self.template, self.parent, message_map)
# A couple of helpers
def GetDlgItem(self, id):
if type(id)==type(''):
id = self.dialog_parser.ids[id]
return win32gui.GetDlgItem(self.hwnd, id)
def SetDlgItemText(self, id, text):
hchild = self.GetDlgItem(id)
win32gui.SendMessage(hchild, win32con.WM_SETTEXT, 0, text)
# A dialog with a tooltip manager
class TooltipDialog(Dialog):
def __init__(self, parent, parser, idd):
Dialog.__init__(self, parent, parser, idd)
self.tt = TooltipManager(self)
def GetMessageMap(self):
ret = Dialog.GetMessageMap(self)
ret.update( {
win32con.WM_HELP: self.OnHelp,
win32con.WM_LBUTTONDOWN: self.OnLButtonDown,
win32con.WM_ACTIVATE: self.OnActivate,
})
return ret
def OnLButtonDown(self, hwnd, msg, wparam, lparam):
self.tt.HideTooltip()
def OnActivate(self, hwnd, msg, wparam, lparam):
self.tt.HideTooltip()
def OnDestroy(self, hwnd, msg, wparam, lparam):
self.tt.HideTooltip()
def OnHelp(self, hwnd, msg, wparam, lparam):
format = "iiiiiii"
buf = win32gui.PyMakeBuffer(struct.calcsize(format), lparam)
cbSize, iContextType, iCtrlId, hItemHandle, dwContextID, x, y = \
struct.unpack(format, buf)
tt_text = self.GetPopupHelpText(iCtrlId)
if tt_text:
self.tt.ShowTooltipForControl(iCtrlId, tt_text)
else:
self.tt.HideTooltip()
return 1
def GetPopupHelpText(self, control_id):
return None
# A "Processor Dialog" works with Command Processors, to link Outlook-Plugin
# options with control IDS, giving a "data driven" dialog.
class ProcessorDialog(TooltipDialog):
def __init__(self, parent, manager, config, idd, option_handlers):
TooltipDialog.__init__(self, parent, manager.dialog_parser, idd)
parser = manager.dialog_parser
self.manager = manager
self.config = config
self.command_processors = {}
self.processor_message_map = {}
self.all_processors = []
for data in option_handlers:
klass = data[0]
id_names = data[1]
rest = data[2:]
ids = id_names.split()
int_ids = [ parser.ids[id] for id in ids]
instance = klass(self,int_ids, *rest)
self.all_processors.append(instance)
for int_id in int_ids:
self.command_processors[int_id] = instance
for message in instance.GetMessages():
existing = self.processor_message_map.setdefault(message, [])
existing.append(instance)
def GetMessageMap(self):
ret = TooltipDialog.GetMessageMap(self)
for key in self.processor_message_map.keys():
if key in ret:
print "*** WARNING: Overwriting message!!!"
ret[key] = self.OnCommandProcessorMessage
return ret
def OnInitDialog(self, hwnd, msg, wparam, lparam):
TooltipDialog.OnInitDialog(self, hwnd, msg, wparam, lparam)
if __debug__: # this is just a debugging aid
for int_id in self.command_processors:
try:
self.GetDlgItem(int_id)
except win32gui.error:
print "ERROR: Dialog item %s refers to an invalid control" % \
self._GetIDName(int_id)
self.LoadAllControls()
def GetPopupHelpText(self, iCtrlId):
cp = self.command_processors.get(iCtrlId)
tt_text = None
if cp is not None:
return cp.GetPopupHelpText(iCtrlId)
print "Can not get command processor for", self._GetIDName(iCtrlId)
return None
def OnRButtonUp(self, hwnd, msg, wparam, lparam):
for cp in self.command_processors.values():
cp.OnRButtonUp(wparam,lparam)
def OnCommandProcessorMessage(self, hwnd, msg, wparam, lparam):
for p in self.processor_message_map[msg]:
p.OnMessage(msg, wparam, lparam)
# Called back by a processor when it changes an option. We tell all other
# options on our page that the value changed.
def OnOptionChanged(self, changed_by, option):
for p in self.all_processors:
if p is not changed_by:
p.OnOptionChanged(option)
def OnDestroy(self, hwnd, msg, wparam, lparam):
for p in self.all_processors:
p.Term()
TooltipDialog.OnDestroy(self, hwnd, msg, wparam, lparam)
self.command_processors = None
self.all_processors = None
self.processor_message_map = None
def LoadAllControls(self):
for p in self.all_processors:
p.Init()
def ApplyHandlingOptionValueError(self, func, *args):
try:
return func(*args)
except ValueError, why:
mb_flags = win32con.MB_ICONEXCLAMATION | win32con.MB_OK
win32gui.MessageBox(self.hwnd, str(why), "OpenERP Configuration", mb_flags)
return False
def SaveAllControls(self):
for p in self.all_processors:
if not self.ApplyHandlingOptionValueError(p.Done):
win32gui.SetFocus(p.GetControl())
return False
return True
def OnClose(self, hwnd, msg, wparam, lparam):
if TooltipDialog.OnClose(self, hwnd, msg, wparam, lparam):
return 1
if not self.SaveAllControls():
return 1
win32gui.EndDialog(hwnd, 0)
def OnNotify(self, hwnd, msg, wparam, lparam):
# Parse the NMHDR
TooltipDialog.OnNotify(self, hwnd, msg, wparam, lparam)
format = "iii"
buf = win32gui.PyMakeBuffer(struct.calcsize(format), lparam)
hwndFrom, idFrom, code = struct.unpack(format, buf)
code += 0x4f0000 # hrm - wtf - commctrl uses this, and it works with mfc. *sigh*
# delegate rest to our commands.
self._GetIDName(idFrom)
if self.command_processors is not None:
handler = self.command_processors.get(idFrom)
if handler is None:
print "Ignoring OnNotify for", self._GetIDName(idFrom)
return
return handler.OnNotify( (hwndFrom, idFrom, code), wparam, lparam)
return
def OnCommand(self, hwnd, msg, wparam, lparam):
TooltipDialog.OnCommand(self, hwnd, msg, wparam, lparam)
id = win32api.LOWORD(wparam)
# Sometimes called after OnDestroy???
if self.command_processors is None:
print "Ignoring OnCommand for", self._GetIDName(id)
return
else:
handler = self.command_processors.get(id)
if handler is None:
print "Ignoring OnCommand for", self._GetIDName(id)
return
self.ApplyHandlingOptionValueError(handler.OnCommand, wparam, lparam)
class ProcessorPage(ProcessorDialog):
def __init__(self, parent, manager, config, idd, option_handlers, yoffset):
ProcessorDialog.__init__(self, parent, manager, config, idd,option_handlers)
self.yoffset = yoffset
def DoInitialPosition(self):
# The hardcoded values are a bit of a hack.
win32gui.SetWindowPos(self.hwnd, win32con.HWND_TOP, 1, self.yoffset, 0, 0, win32con.SWP_NOSIZE)
def CreateWindow(self):
# modeless. Pages should have the WS_CHILD window style
message_map = self.GetMessageMap()
# remove frame from dialog and make sure it is a child
self.template[0][2] = self.template[0][2] & ~(win32con.DS_MODALFRAME|win32con.WS_POPUP|win32con.WS_OVERLAPPED|win32con.WS_CAPTION)
self.template[0][2] = self.template[0][2] | win32con.WS_CHILD
return win32gui.CreateDialogIndirect(self.hinst, self.template, self.parent, message_map)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,20 +0,0 @@
# Generic utilities for dialog functions.
# This module is part of the spambayes project, which is Copyright 2003
# The Python Software Foundation and is covered by the Python Software
# Foundation license.
def MAKELONG(l,h):
return ((h & 0xFFFF) << 16) | (l & 0xFFFF)
MAKELPARAM=MAKELONG
def SetWaitCursor(wait):
import win32gui, win32con
if wait:
hCursor = win32gui.LoadCursor(0, win32con.IDC_WAIT)
else:
hCursor = win32gui.LoadCursor(0, 0)
win32gui.SetCursor(hCursor)
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,320 +0,0 @@
# Option Control Processors for our dialog.
# These are extensions to basic Control Processors that are linked with
# Outlook-Plugin options.
# This module is part of the spambayes project, which is Copyright 2003
# The Python Software Foundation and is covered by the Python Software
# Foundation license.
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import win32gui, win32api, win32con, win32ui
import commctrl
import struct, array
from dlgutils import *
import xmlrpclib
import processors
verbose = 0 # set to 1 to see option values fetched and set.
# A ControlProcessor that is linked up with options. These get a bit smarter.
class OptionControlProcessor(processors.ControlProcessor):
def __init__(self, window, control_ids):
processors.ControlProcessor.__init__(self, window, control_ids)
def GetPopupHelpText(self, idFrom):
doc = " ".join(self.option.doc().split())
if self.option.default_value:
doc += " (the default value is %s)" % self.option.default_value
return doc
# We override Init, and break it into 2 steps.
def Init(self):
self.UpdateControl_FromValue()
def Done(self):
self.UpdateValue_FromControl()
return True
# # Only sub-classes know how to update their controls from the value.
def UpdateControl_FromValue(self):
raise NotImplementedError
def UpdateValue_FromControl(self):
raise NotImplementedError
class ComboProcessor(OptionControlProcessor):
def __init__(self, window, control_ids, func, args):
self.func = func
self.args = args
OptionControlProcessor.__init__(self, window, control_ids)
def OnCommand(self, wparam, lparam):
code = win32api.HIWORD(wparam)
if code == win32con.CBN_SELCHANGE:
self.UpdateValue_FromControl()
def Init(self):
self.UpdateControl_FromValue()
def UpdateControl_FromValue(self):
pass
def UpdateValue_FromControl(self):
pass
class DBComboProcessor(ComboProcessor):
def Init(self):
self.UpdateControl_FromValue()
def UpdateControl_FromValue(self):
combo = self.GetControl()
conn = self.func()
list = conn.GetDBList()
db = conn.getitem('_dbname')
if list == -1:
hinst = win32gui.dllhandle
parent = self.window.hwnd
dwStyle = win32con.WS_CHILD | win32con.WS_VISIBLE | win32con.WS_TABSTOP | win32con.WS_BORDER | \
win32con.ES_AUTOHSCROLL | win32con.FF_ROMAN | win32con.FW_EXTRALIGHT
hwndImg = win32gui.CreateWindow (
"EDIT",
db,
dwStyle,
127,80,235,20,
parent,
7000,
0,
None);
self.active_control_id = 7000
win32gui.ShowWindow(combo, False)
else:
try:
txtbx = win32gui.GetDlgItem(self.window.hwnd, 7000)
win32gui.DestroyWindow(txtbx)
except Exception,e:
print "Exception : %s"%str(e)
pass
win32gui.ShowWindow(combo, True)
win32gui.SendMessage(combo, win32con.CB_RESETCONTENT,0, 0);
for item in list:
win32gui.SendMessage(combo, win32con.CB_ADDSTRING, 0, str(item))
sel = win32gui.SendMessage(combo, win32con.CB_SELECTSTRING, 0, db)
dbb=win32gui.GetDlgItemText(self.window.hwnd, 2004)
if sel == -1:
win32gui.SendMessage(combo, win32con.CB_SETCURSEL, 0, 0)
self.active_control_id = self.control_id
def UpdateValue_FromControl(self):
db = win32gui.GetDlgItemText(self.window.hwnd, self.active_control_id)
conn = self.func()
if conn.getitem('_dbname') != db:
conn.setitem('_dbname', db)
conn.setitem('_login', 'False')
class PartnersComboProcessor(ComboProcessor):
def UpdateControl_FromValue(self):
from manager import ustr
import win32ui
combo = self.GetControl()
conn = self.func()
win32gui.SendMessage(combo, win32con.CB_RESETCONTENT,0, 0);
id_list = {}
p_list=[]
try:
p_list = list(conn.GetPartners())
cnt=0
for item in p_list:
win32gui.SendMessage(combo, win32con.CB_ADDSTRING, 0, ustr(item[1]).encode('iso-8859-1'))
id_list[cnt] = item[0]
cnt+=1
conn.setitem('partner_id_list', str(id_list))
cnt = win32gui.SendMessage(combo, win32con.CB_GETCOUNT, 0, 0)
win32gui.SendMessage(combo, win32con.CB_SETCURSEL, -1, 0)
return
except xmlrpclib.Fault,e:
msg = str(e.faultCode) or e.faultString or e.message or str(e)
except Exception,e:
msg = str(e)
win32ui.MessageBox(str(e),"Partners",win32con.MB_ICONEXCLAMATION)
win32gui.DestroyWindow(self.window.hwnd)
def UpdateValue_FromControl(self):
combo = self.GetControl()
conn = self.func()
sel = win32gui.SendMessage(combo, win32con.CB_GETCURSEL)
conn.setitem('sel_id', sel)
class StateComboProcessor(ComboProcessor):
def Init(self):
self.UpdateControl_FromValue()
def UpdateControl_FromValue(self):
from manager import ustr
import win32ui
combo = self.GetControl()
conn = self.func()
win32gui.SendMessage(combo, win32con.CB_RESETCONTENT, 0, 0);
id_list = {}
state_list=[]
try:
state_list = list(conn.GetAllState())
for item in state_list:
win32gui.SendMessage(combo, win32con.CB_ADDSTRING, 0, ustr(item[1]).encode('iso-8859-1'))
win32gui.SendMessage(combo, win32con.CB_SETCURSEL, -1, 0)
cnt = win32gui.SendMessage(combo, win32con.CB_GETCOUNT, 0, 0)
return
except xmlrpclib.Fault,e:
msg = str(e.faultCode) or e.faultString or e.message or str(e)
win32ui.MessageBox(msg, "Open Partner")
except Exception,e:
win32ui.MessageBox(str(e), "Open Partner")
def UpdateValue_FromControl(self):
pass
class CountryComboProcessor(ComboProcessor):
def Init(self):
self.UpdateControl_FromValue()
def UpdateControl_FromValue(self):
from manager import ustr
import win32ui
combo = self.GetControl()
conn = self.func()
win32gui.SendMessage(combo, win32con.CB_RESETCONTENT, 0, 0);
id_list = {}
state_list=[]
try:
country_list = list(conn.GetAllCountry())
for item in country_list:
win32gui.SendMessage(combo, win32con.CB_ADDSTRING, 0, ustr(item[1]).encode('iso-8859-1'))
win32gui.SendMessage(combo, win32con.CB_SETCURSEL, -1, 0)
cnt = win32gui.SendMessage(combo, win32con.CB_GETCOUNT, 0, 0)
return
except xmlrpclib.Fault,e:
msg = str(e.faultCode) or e.faultString or e.message or str(e)
win32ui.MessageBox(msg, "Open Partner")
except Exception,e:
win32ui.MessageBox(str(e), "Open Partner")
def UpdateValue_FromControl(self):
pass
class CSComboProcessor(ComboProcessor):
def UpdateControl_FromValue(self):
combo = self.GetControl()
conn = self.func()
if str(conn.getitem('_iscrm')) == 'False':
win32gui.EnableWindow(combo, False)
return
try:
list=['CRM Lead']#, 'CRM Helpdesk', 'CRM Lead', 'CRM Meeting', 'CRM Opportunity', 'CRM Phonecall']
objlist = conn.GetAllObjects()
if'hr.applicant' in objlist:
list.append('HR Applicant')
if'project.issue' in objlist:
list.append('Project Issue')
win32gui.SendMessage(combo, win32con.CB_RESETCONTENT,0, 0);
for item in list:
win32gui.SendMessage(combo, win32con.CB_ADDSTRING, 0, str(item))
win32gui.SendMessage(combo, win32con.CB_SETCURSEL, 0, 0)
return
except xmlrpclib.Fault,e:
win32ui.MessageBox(str(e.faultCode),"CRM Case",win32con.MB_ICONEXCLAMATION)
except Exception,e:
win32ui.MessageBox(str(e),"CRM Case",win32con.MB_ICONEXCLAMATION)
def UpdateValue_FromControl(self):
pass
class TextProcessor(OptionControlProcessor):
def __init__(self, window, control_ids, func, args):
self.func = func
self.args = args
OptionControlProcessor.__init__(self, window, control_ids)
def UpdateControl_FromValue(self):
args = (self,)+(self.window,) + self.args
self.func(*args)
def UpdateValue_FromControl(self):
pass
class ListBoxProcessor(OptionControlProcessor):
def __init__(self, window, control_ids, func, args):
self.func = func
self.args = args
OptionControlProcessor.__init__(self, window, control_ids)
def Init(self):
args = (self,)+(self.window,) + self.args
if not self.init_done:
self.func(*args)
def UpdateControl_FromValue(self):
pass
def UpdateValue_FromControl(self):
pass
class ListBoxProcessor(OptionControlProcessor):
def __init__(self, window, control_ids, func, args):
self.func = func
self.args = args
OptionControlProcessor.__init__(self, window, control_ids)
def Init(self):
args = (self,)+(self.window,) + self.args
if not self.init_done:
self.func(*args)
def UpdateControl_FromValue(self):
pass
def UpdateValue_FromControl(self):
pass
class GroupProcessor(OptionControlProcessor):
def __init__(self, window, control_ids, func, args):
self.func = func
self.args = args
OptionControlProcessor.__init__(self, window, control_ids)
def Init(self):
args = (self,)+(self.window,) + self.args
self.func(*args)
def UpdateControl_FromValue(self):
pass
def UpdateValue_FromControl(self):
pass
class ProtocolComboProcessor(ComboProcessor):
def Init(self):
self.UpdateControl_FromValue()
def UpdateControl_FromValue(self):
combo = self.GetControl()
list = ['XML-RPC', 'XML-RPCS']
win32gui.ShowWindow(combo, True)
win32gui.SendMessage(combo, win32con.CB_RESETCONTENT, 0, 0);
for item in list:
win32gui.SendMessage(combo, win32con.CB_ADDSTRING, 0, str(item))
if sel == -1:
win32gui.SendMessage(combo, win32con.CB_SETCURSEL, 1, 0)
self.active_control_id = self.control_id
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,147 +0,0 @@
# Control Processors for our dialog.
# This module is part of the spambayes project, which is Copyright 2003
# The Python Software Foundation and is covered by the Python Software
# Foundation license.
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import win32gui, win32api, win32con
import commctrl
import struct, array
from dlgutils import *
import win32ui
# Cache our leaky bitmap handles
bitmap_handles = {}
# A generic set of "ControlProcessors". A control processor by itself only
# does a few basic things.
class ControlProcessor:
def __init__(self, window, control_ids):
self.control_id = control_ids[0]
self.other_ids = control_ids[1:]
self.window = window
self.init_done=False
def Init(self):
pass
def Done(self): # done with 'ok' - ie, save options. May return false.
return True
def Term(self): # closing - can't fail.
pass
def GetControl(self, control_id = None):
control_id = control_id or self.control_id
try:
h = win32gui.GetDlgItem(self.window.hwnd, control_id)
except:
hparent = win32gui.GetParent(self.window.hwnd)
hparent = win32gui.GetParent(hparent)
h = win32gui.GetDlgItem(hparent, control_id)
return h
def GetPopupHelpText(self, idFrom):
return None
def OnCommand(self, wparam, lparam):
pass
def OnNotify(self, nmhdr, wparam, lparam):
pass
def GetMessages(self):
return []
def OnMessage(self, msg, wparam, lparam):
raise RuntimeError, "I don't hook any messages, so I shouldn't be called"
def OnOptionChanged(self, option):
pass
def OnRButtonUp(self, wparam, lparam):
pass
class ImageProcessor(ControlProcessor):
def Init(self):
rcp = self.window.manager.dialog_parser;
bmp_id = int(win32gui.GetWindowText(self.GetControl()))
if bitmap_handles.has_key(bmp_id):
handle = bitmap_handles[bmp_id]
else:
import resources
mod_handle, mod_bmp, extra_flags = resources.GetImageParamsFromBitmapID(rcp, bmp_id)
load_flags = extra_flags|win32con.LR_COLOR|win32con.LR_SHARED
handle = win32gui.LoadImage(mod_handle, mod_bmp,win32con.IMAGE_BITMAP,0,0,load_flags)
bitmap_handles[bmp_id] = handle
win32gui.SendMessage(self.GetControl(), win32con.STM_SETIMAGE, win32con.IMAGE_BITMAP, handle)
def GetPopupHelpText(self, cid):
return None
class ButtonProcessor(ControlProcessor):
def OnCommand(self, wparam, lparam):
code = win32api.HIWORD(wparam)
id = win32api.LOWORD(wparam)
if code == win32con.BN_CLICKED:
self.OnClicked(id)
class RadioButtonProcessor(ControlProcessor):
def __init__(self, window, control_ids, func='', args=''):
self.func = func
self.args = args
ControlProcessor.__init__(self, window, control_ids)
def OnCommand(self, wparam, lparam):
code = win32api.HIWORD(wparam)
id = win32api.LOWORD(wparam)
if code == win32con.BN_CLICKED:
text=win32gui.GetDlgItemText(self.window.hwnd, self.control_id)
conn = self.func()
conn.setitem('protocol', text)
p=conn.getitem('protocol')
class CloseButtonProcessor(ButtonProcessor):
def OnClicked(self, id):
win32gui.EndDialog(self.window.hwnd, id)
class CancelButtonProcessor(ButtonProcessor):
def __init__(self, window, control_ids, func, args):
self.func = func
self.args = args
ControlProcessor.__init__(self, window, control_ids)
def OnClicked(self, id):
a=self.func(self.window)
win32gui.EndDialog(self.window.hwnd, id)
class CommandButtonProcessor(ButtonProcessor):
def __init__(self, window, control_ids, func, args):
self.func = func
self.args = args
ControlProcessor.__init__(self, window, control_ids)
def OnClicked(self, id):
# Bit of a hack - always pass the manager as the first arg.
self.id = id
args = (self, ) + self.args
self.func(*args)
def GetPopupHelpText(self, ctrlid):
assert ctrlid == self.control_id
doc = self.func.__doc__
if doc is None:
return ""
return " ".join(doc.split())
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

View File

@ -1,32 +0,0 @@
# This module is part of the spambayes project, which is Copyright 2003
# The Python Software Foundation and is covered by the Python Software
# Foundation license.
# Package that manages and defines dialog resources
def GetImageParamsFromBitmapID(rc_parser, bmpid):
import os, sys
import win32gui, win32con, win32api
if type(bmpid)==type(0):
bmpid = rc_parser.names[bmpid]
int_bmpid = rc_parser.ids[bmpid]
# For both binary and source versions, we currently load from files.
# In future py2exe built binary versions we will be able to load the
# bitmaps directly from our DLL.
filename = rc_parser.bitmaps[bmpid]
if hasattr(sys, "frozen"):
# in our .exe/.dll - load from that.
if sys.frozen=="dll":
hmod = sys.frozendllhandle
else:
hmod = win32api.GetModuleHandle(None)
return hmod, int_bmpid, 0
else:
# source code - load the .bmp directly.
if not os.path.isabs(filename):
# In this directory
filename = os.path.join( os.path.dirname( __file__ ), filename)
return 0, filename, win32con.LR_LOADFROMFILE
assert 0, "not reached"
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,224 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by dialogs.rc
//
#define IDD_MANAGER 101
#define IDD_TRAINING 102
#define IDD_FILTER 103
#define IDD_FILTER_NOW 104
#define IDD_FOLDER_SELECTOR 105
#define IDD_ABOUT 106
#define IDD_GENERAL 108
//#define IDD_FILTER_SPAM 110
#define IDD_FILTER_UNSURE 111
#define IDD_DIAGNOSTIC 113
#define IDD_WIZARD 114
#define IDD_WIZARD_WELCOME 115
#define IDD_WIZARD_FINISHED_UNTRAINED 116
#define IDD_WIZARD_FOLDERS_REST 117
#define IDD_WIZARD_FOLDERS_WATCH 118
#define IDD_WIZARD_FINISHED_UNCONFIGURED 119
#define IDD_WIZARD_FOLDERS_TRAIN 120
#define IDD_WIZARD_TRAIN 121
#define IDD_WIZARD_FINISHED_TRAINED 122
#define IDD_WIZARD_TRAINING_IS_IMPORTANT 123
#define IDD_WIZARD_FINISHED_TRAIN_LATER 124
#define IDB_SBWIZLOGO 125
#define IDB_FOLDERS 127
#define IDC_PROGRESS 1000
#define IDC_PROGRESS_TEXT 1001
#define IDC_STATIC_HAM 1002
#define IDC_STATIC_SPAM 1003
#define IDC_BROWSE_HAM 1004
#define IDC_BROWSE_SPAM 1005
#define IDC_START 1006
#define IDC_BUT_REBUILD 1007
#define IDC_BUT_RESCORE 1008
#define IDC_VERSION 1009
#define IDC_BUT_TRAIN_FROM_SPAM_FOLDER 1010
#define IDC_BUT_TRAIN_TO_SPAM_FOLDER 1011
#define IDC_BUT_TRAIN_NOW 1012
#define IDC_BUT_FILTER_ENABLE 1013
#define IDC_FILTER_STATUS 1014
#define IDC_BUT_FILTER_DEFINE 1016
#define IDC_BUT_ABOUT 1017
#define IDC_BUT_ACT_SCORE 1018
#define IDC_BUT_ACT_ALL 1019
#define IDC_BUT_UNREAD 1020
#define IDC_BUT_UNSEEN 1021
#define IDC_SLIDER_CERTAIN 1023
#define IDC_EDIT_CERTAIN 1024
#define IDC_ACTION_CERTAIN 1025
#define IDC_FOLDER_CERTAIN 1027
#define IDC_BROWSE_CERTAIN 1028
#define IDC_SLIDER_UNSURE 1029
#define IDC_EDIT_UNSURE 1030
#define IDC_ACTION_UNSURE 1031
#define IDC_FOLDER_UNSURE 1033
#define IDC_BROWSE_UNSURE 1034
#define IDC_TRAINING_STATUS 1035
#define IDC_FOLDER_NAMES 1036
#define IDC_BROWSE 1037
#define IDC_FOLDER_WATCH 1038
#define IDC_BROWSE_WATCH 1039
#define IDC_LIST_FOLDERS 1040
#define IDC_BUT_SEARCHSUB 1041
#define IDC_BUT_CLEARALL 1042
#define IDC_STATUS1 1043
#define IDC_STATUS2 1044
#define IDC_BUT_NEW 1046
#define IDC_MARK_SPAM_AS_READ 1047
#define IDC_SAVE_SPAM_SCORE 1048
#define IDC_MARK_UNSURE_AS_READ 1051
#define IDC_DELAY1_SLIDER 1056
#define IDC_DELAY1_TEXT 1057
#define IDC_DELAY2_SLIDER 1058
#define IDC_DELAY2_TEXT 1059
#define IDC_INBOX_TIMER_ONLY 1060
#define IDC_VERBOSE_LOG 1061
#define IDB_OPENERPLOGO 1062
#define IDC_TAB 1068
#define IDC_BACK_BTN 1069
#define IDC_BUT_WIZARD 1070
#define IDC_SHOW_DATA_FOLDER 1071
#define IDC_ABOUT_BTN 1072
#define IDC_BUT_RESET 1073
#define IDC_DEL_SPAM_RS 1074
#define IDC_RECOVER_RS 1075
#define IDC_FORWARD_BTN 1077
#define IDC_PAGE_PLACEHOLDER 1078
#define IDC_BUT_SHOW_DIAGNOSTICS 1080
#define IDC_BUT_PREPARATION 1081
#define IDC_FOLDER_HAM 1083
#define IDC_BUT_UNTRAINED 1088
#define IDC_BUT_TRAIN 1089
#define IDC_BUT_TIMER_ENABLED 1091
#define IDC_WIZ_GRAPHIC 1092
#define IDC_BUT_VIEW_LOG 1093
#define IDC_EDIT1 1094
#define IDC_STATISTICS 1095
#define ID_SERVER 2001
#define ID_PORT 2002
#define ID_SERVER_PORT 2003
#define ID_DB_DROPDOWNLIST 2004
#define ID_USERNAME 2005
#define ID_PASSWORD 2006
#define ID_BUT_TESTCONNECTION 2007
#define ID_DONE 2008
#define IDD_OBJECT_SETTINGS 2009
#define IDC_BUT_LOAD_IMAGE 2010
#define IDC_BUT_SAVE_OBJECT 2011
#define IDC_BUT_DEL_OBJECT 2012
#define IDC_OBJECT_TITLE 2013
#define IDC_OBJECT_NAME 2014
#define IDC_IMAGE_PATH 2015
#define IDC_LIST 2016
#define IDC_HEADER 2017
#define ID_CREATE_CONTACT 2018
#define ID_MAKE_ATTACHMENT 2019
#define ID_CREATE_CASE 2020
#define IDC_BUT_SET_SERVER_PORT 2021
#define IDD_SERVER_PORT_DIALOG 2022
#define IDC_CHKBX 2023
#define IDC_STATIC_GROUP 2024
#define ID_ATT_METHOD_DROPDOWNLIST 2025
#define IDC_NAME_LIST 2026
#define IDD_ABOUT 2027
#define IDC_ABOUT 2028
#define IDC_CONTACT_LIST 2029
#define ID_NAME_TEXT 2030
#define IDD_NEW_CONTACT_DIALOG 2031
#define ID_PARTNER_DROPDOWNLIST 2032
#define ID_NEW_PARTNER_BUTTON 2033
#define IDD_NEW_PARTNER_DIALOG 2034
#define ID_SAVE_PARTNER_BUTTON 2035
#define ID_PARTNER_NAME_TEXT 2036
#define IDC_NAME_LIST1 2037
#define IDC_RELOAD 2038
#define ID_PROTOCOL_GRP 2040
#define IDR_XML_PROTOCOL 2041
#define IDR_XMLS_PROTOCOL 2042
#define IDR_NETRPC_PROTOCOL 2043
#define IDD_VIEW_PARTNER_DIALOG 2044
#define IDET_PARTNER_NAME 2045
#define IDET_PARTNER_CONTACT_NAME 2046
#define IDET_PARTNER_EMAIL 2047
#define IDET_PARTNER_OFFICENO 2048
#define IDET_PARTNER_MOBILENO 2050
#define IDET_SEARCH_PARTNER 2051
#define IDPB_SEARCH_PARTNER 2052
#define IDET_PARTNER_STREET 2053
#define IDET_PARTNER_STREET2 2054
#define IDET_PARTNER_COUNTRY 2057
#define IDET_PARTNER_FAX 2058
#define IDPB_WRITE_CHANGES 2059
#define ID_ALL_STATE_DROPDOWNLIST 2060
#define ID_ALL_COUNTRY_DROPDOWNLIST 2061
#define IDET_PARTNER_STATE 2062
#define IDET_PARTNER_COUNTRY 2063
#define IDET_PARTNER 2064
//
#define ID_STREET_TEXT 2062
#define ID_STREET2_TEXT 2063
#define ID_FED_STATE_DROPLIST 2064
#define ID_COUNTRY_DROPLIST 2065
#define ID_FAX_TEXT 2066
#define ID_PARTNER_CITY_TEXT 2067
#define ID_ZIP_TEXT 2068
#define ID_PARTNER_DROPLIST 2069
#define ID_NEW_PART_BUTTON 2070
#define IDPB_NEWPARTNER_BUTTON 2071
#define IDD_SELECT_PARTNER 2073
#define IDC_LIST_PARTNER 2072
#define IDPB_SELECT_PARTNER 2075
#define IDET_PARTNER_SEARCH_NAME 2076
#define IDPB_PARTNER_SEARCH 2077
#define IDPB_CREATE_NEW_PARTNER 2078
#define ID_PARTNER_TEXT 2079
#define IDET_WED_SERVER 2080
#define IDET_WEB_PORT 2081
#define ID_SET_WEB_CONNECTION 2082
#define IDPB_WEB_CONNECTION 2083
#define IDD_OPEN_PARTNER_DIALOG 2084
#define IDET_PARTNER_LINK_TEXT 2085
#define IDEB_OPENDOC_LINK_TEXT 2086
#define IDD_OPEN_DOCUEMNT_DIALOG 2087
#define IDD_WEB_SERVER_PORT_DIALOG 2088
#define IDET_WEB_SERVER 2089
#define IDET_WEB_PORT 2090
#define ID_WEB_OK 2091
#define IDPB_NEW_PARTNER_BUTTON 2092
#define IDPB_NEW_PART_BUTTON 2093
#define IDD_SELECT_COUNTRY 2094
#define IDET_COUNTRY_SEARCH_NAME 2095
#define IDC_LIST_COUNTRY 2096
#define IDPB_SELECT_COUNTRY 2097
#define IDPB_SEARCH_COUNTRY 2098
#define IDD_SELECT_STATE 2099
#define IDET_STATE_SEARCH_NAME 2100
#define IDC_LIST_STATE 2101
#define IDPB_SELECT_STATE 2102
#define IDPB_SEARCH_STATE 2103
#define IDPB_SEARCH_STATE1 2104
#define IDPB_SEARCH_COUNTRY1 2105
#define IDET_NC_PARTNER_STATE 2106
#define IDPB_NC_SEARCH_STATE1 2107
#define IDET_NC_PARTNER_COUNTRY 2108
#define IDPB_NC_SEARCH_COUNTRY1 2109
#define ID_DROPDOWNLIST_PROTOCOL 2110
#define IDCB_WEB_SECURE 2111
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 128
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1096
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

File diff suppressed because one or more lines are too long

View File

@ -1,339 +0,0 @@
// Microsoft Visual C++ generated resource script.
//
#include "dialogs.h"
IDB_OPENERPLOGO BITMAP "OpenERP_Logo.bmp"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_MANAGER DIALOGEX 0, 0, 460, 260
STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU | DS_MODALFRAME
CAPTION "OpenERP Configuration"
FONT 8, "Tahoma", 1000, 0, 0x0
BEGIN
DEFPUSHBUTTON "Close",ID_DONE,400,239,50,14//,WS_VISIBLE //| WS_TABSTOP
CONTROL "",IDC_TAB,"SysTabControl32",0x0,8,7,440,228
CONTROL "",IDC_LIST,"SysListView32",WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL |
LVS_SHOWSELALWAYS | LVS_REPORT | LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES,0,0,0,0
END
IDD_GENERAL DIALOGEX 0, 0, 430, 210
STYLE DS_SETFONT | WS_CHILD | WS_CAPTION | WS_SYSMENU
CAPTION "Connection Parameters"
FONT 8, "Tahoma", 0, 0, 0x1
BEGIN
GROUPBOX "Connection Parameters",IDC_STATIC_GROUP, 10, 10,250,130
LTEXT "Server : ",IDC_STATIC,30,30,100,17
EDITTEXT ID_SERVER_PORT,85,30,120,12,ES_READONLY | WS_VISIBLE | WS_TABSTOP// left top width height
PUSHBUTTON "Change",IDC_BUT_SET_SERVER_PORT,210,30,30,13, WS_VISIBLE | WS_TABSTOP
LTEXT "Database : ",IDC_STATIC,30,50,100,17
COMBOBOX ID_DB_DROPDOWNLIST,85,50,154,40,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_VISIBLE | WS_TABSTOP
LTEXT "Username : ",IDC_STATIC,30,70,100,17
EDITTEXT ID_USERNAME,85,70,154,12,ES_AUTOHSCROLL | WS_VISIBLE | WS_TABSTOP
LTEXT "Password : ",IDC_STATIC,30,90,100,17
EDITTEXT ID_PASSWORD,85,90,154,12,ES_AUTOHSCROLL | WS_VISIBLE | WS_TABSTOP | ES_PASSWORD
PUSHBUTTON "Connect",ID_BUT_TESTCONNECTION,179,110,60,13, WS_VISIBLE | WS_TABSTOP
GROUPBOX "WebServer Parameters",IDC_STATIC_GROUP, 270, 10,150,130
LTEXT "Server : ",IDC_STATIC, 280, 30, 50, 15
EDITTEXT IDET_WED_SERVER,310, 29, 90, 12,ES_AUTOHSCROLL | ES_READONLY
PUSHBUTTON "Change",ID_SET_WEB_CONNECTION, 295, 50, 50, 12 , WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "Connect",IDPB_WEB_CONNECTION, 350, 50, 50, 12 , WS_VISIBLE | WS_TABSTOP
END
IDD_OBJECT_SETTINGS DIALOGEX 0, 0, 430, 210
STYLE DS_SETFONT | DS_MODALFRAME | WS_CHILD | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Documents Setting"
FONT 8, "Tahoma", 0, 0, 0x1
BEGIN
GROUPBOX "Document Attributes",IDC_STATIC_GROUP, 2, 2, 343, 32
LTEXT "Title:",IDC_STATIC,5,16,30,17
EDITTEXT IDC_OBJECT_TITLE,22,14,57,12,ES_AUTOHSCROLL | WS_TABSTOP// left top width height
LTEXT "Document Name:",IDC_STATIC,83,16,60,17
EDITTEXT IDC_OBJECT_NAME,138,14,57,12,ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Image:",IDC_STATIC,200,16,22,17
EDITTEXT IDC_IMAGE_PATH,223,14,57,12,ES_AUTOHSCROLL | WS_TABSTOP
PUSHBUTTON "Load Image",IDC_BUT_LOAD_IMAGE,289,13,50,15,WS_TABSTOP
PUSHBUTTON "Add",IDC_BUT_SAVE_OBJECT,350,13,38,15,WS_TABSTOP
PUSHBUTTON "Delete",IDC_BUT_DEL_OBJECT,392,13,38,15,WS_TABSTOP
CONTROL "List1",IDC_LIST,"SysListView32",WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL |
LVS_SHOWSELALWAYS | LVS_EX_GRIDLINES | LVS_REPORT | LVS_EX_FULLROWSELECT, 8,40,535,160
END
IDD_ABOUT DIALOGEX 0, 0, 430, 210
STYLE DS_SETFONT | DS_MODALFRAME | WS_CHILD | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "About"
FONT 8, "Tahoma", 400, 0, 0x0
BEGIN
GROUPBOX "About Plugin",IDC_STATIC,7,3,422,200
CONTROL 1062,IDB_OPENERPLOGO,"Static",SS_BITMAP | SS_REALSIZEIMAGE,60,30,20,20
LTEXT "",IDC_ABOUT,80,90,300,100
END
IDD_SERVER_PORT_DIALOG DIALOGEX 0, 0, 160, 90
STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "OpenERP Connection"
FONT 8, "Tahoma", 400, 0, 0x0
BEGIN
LTEXT "Server : ",IDC_STATIC,5,3,150,17
EDITTEXT ID_SERVER, 45, 3, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP
LTEXT " Port : ",IDC_STATIC,5,18,100,17
EDITTEXT ID_PORT, 45, 18, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP
GROUPBOX "", IDC_STATIC_GROUP, 5, 35, 150, 5
LTEXT "Protocol Connection :", IDC_STATIC, 5, 45, 80, 17
COMBOBOX ID_DROPDOWNLIST_PROTOCOL, 75, 43, 75, 50, CBS_DROPDOWNLIST |WS_VSCROLL | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "Close",IDCANCEL,60,70,45,14,WS_TABSTOP
DEFPUSHBUTTON "OK",IDOK,110,70,45,14,WS_TABSTOP
END
IDD_SYNC DIALOGEX 0, 0, 470, 320
STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Push to OpenERP"
FONT 8, "Tahoma", 1000, 0, 0x0
BEGIN
GROUPBOX "Link to an Existing Documents ", IDC_STATIC_GROUP, 8,5,250,290,WS_TABSTOP
LTEXT "Search : ",IDC_STATIC,15,17,40,12
EDITTEXT ID_SEARCH_TEXT,60,15,120,12,ES_AUTOHSCROLL | WS_TABSTOP// left top width height
PUSHBUTTON "Search",ID_SEARCH,187,15,40,14,WS_TABSTOP
LTEXT "Documents : ",IDC_STATIC,15,140,100,14
CONTROL "List1",IDC_NAME_LIST,"SysListView32",WS_CHILD | WS_VISIBLE | WS_BORDER | LVS_SHOWSELALWAYS | LVS_REPORT | WS_TABSTOP, 15,150,234,110
PUSHBUTTON "Push",ID_MAKE_ATTACHMENT,160,270,85,14,WS_TABSTOP
GROUPBOX " Create a New Document ", IDC_STATIC_GROUP, 263,5,202,100,WS_TABSTOP
LTEXT "Type of Document : ",IDC_STATIC,266,25,100,12
COMBOBOX ID_ATT_METHOD_DROPDOWNLIST,332,24,75,45,CBS_DROPDOWNLIST |
WS_VSCROLL | WS_TABSTOP
PUSHBUTTON "Create",ID_CREATE_CASE,412,23,50,14,WS_TABSTOP
GROUPBOX " Create a New Contact ", IDC_STATIC_GROUP, 263, 110,202,185,WS_TABSTOP
LTEXT "Create a New Contact : ",IDC_STATIC,280,140,100,12
PUSHBUTTON "Create Contact",ID_CREATE_CONTACT,360,138,60,14,WS_TABSTOP
PUSHBUTTON "Close",IDCANCEL,385,300,60,14,WS_TABSTOP
END
IDD_NEW_CONTACT_DIALOG DIALOGEX 0, 0, 350, 180
STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Create a New Contact"
FONT 8, "Tahoma", 1000, 0, 0x0
BEGIN
LTEXT "Select Partner : ",IDC_STATIC,13,20,50,17
EDITTEXT ID_PARTNER_TEXT, 70, 18, 150, 12 , ES_AUTOHSCROLL |ES_READONLY
PUSHBUTTON "Search Partner",ID_NEW_PARTNER_BUTTON,225,17,60,14, WS_TABSTOP
PUSHBUTTON "New Partner",IDPB_NEW_PARTNER_BUTTON,290, 17, 50, 14, WS_TABSTOP
GROUPBOX "Postal Address ", IDC_STATIC_GROUP,10,35,175,123
LTEXT "Contact Name : ",IDC_STATIC, 18, 53, 100, 17
EDITTEXT ID_CONTACT_NAME_TEXT, 76, 52, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Street : ",IDC_STATIC, 18, 67, 40, 17
EDITTEXT ID_STREET_TEXT, 76, 66, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Street2 : ",IDC_STATIC, 18, 81, 40, 17
EDITTEXT ID_STREET2_TEXT, 76, 80, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Zip : ",IDC_STATIC, 18, 94, 50, 17
EDITTEXT ID_ZIP_TEXT,76, 93, 100, 12,ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "City : ",IDC_STATIC, 18,106, 50, 17
EDITTEXT ID_PARTNER_CITY_TEXT,76,107,100,12,ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Fed. State : ",IDC_STATIC,18, 134, 50, 15
EDITTEXT IDET_NC_PARTNER_STATE, 76, 135, 54, 12,ES_AUTOHSCROLL |ES_READONLY
PUSHBUTTON "Search", IDPB_NC_SEARCH_STATE1 ,135, 136, 40, 12, WS_TABSTOP
LTEXT "Country :",IDC_STATIC, 18,121,35,15
EDITTEXT IDET_NC_PARTNER_COUNTRY, 76, 122, 54, 12,ES_AUTOHSCROLL |ES_READONLY
PUSHBUTTON "Search", IDPB_NC_SEARCH_COUNTRY1, 135, 121, 40, 12, WS_TABSTOP
GROUPBOX "Communication ", IDC_STATIC_GROUP, 188, 35, 150, 123
LTEXT "Office : ",IDC_STATIC,194, 53, 30, 17
EDITTEXT ID_CONTACT_OFFICE_TEXT, 224, 52, 100, 12,ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Mobile : ",IDC_STATIC,194, 67, 30, 17
EDITTEXT ID_CONTACT_MOBILE_TEXT, 224, 66, 100, 12,ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Fax : ",IDC_STATIC,194, 81, 30, 17
EDITTEXT ID_FAX_TEXT, 224, 80, 100, 12,ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Email : ",IDC_STATIC, 194, 95, 30, 17
EDITTEXT ID_CONTACT_EMAIL_TEXT, 224, 94, 100, 12,ES_AUTOHSCROLL | WS_TABSTOP
PUSHBUTTON "Cancel",IDCANCEL,290,162,45,13, WS_TABSTOP
PUSHBUTTON "Save",ID_CONTACT_SAVE_BUTTON,240,162,45,13, WS_TABSTOP
END
IDD_NEW_PARTNER_DIALOG DIALOGEX 0, 0, 140,40
STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Create a New Partner"
FONT 8, "Tahoma", 400, 0, 0x0
BEGIN
LTEXT "Name : ",IDC_STATIC,5,3,100,17
EDITTEXT ID_PARTNER_NAME_TEXT,40,3,94,12,ES_AUTOHSCROLL | WS_TABSTOP
PUSHBUTTON "Cancel",IDCANCEL,90,22,45,14,WS_TABSTOP
DEFPUSHBUTTON "Save",ID_SAVE_PARTNER_BUTTON,40,22,45,14,WS_TABSTOP
END
IDD_VIEW_PARTNER_DIALOG DIALOGEX 0, 0, 350, 215
STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Open Contact"
FONT 8, "Tahoma", 400, 0, 0x0
BEGIN
LTEXT "Email ID : ",IDC_STATIC,32,17,40,12
EDITTEXT IDET_SEARCH_PARTNER, 70, 15, 200, 12, ES_AUTOHSCROLL | WS_TABSTOP
PUSHBUTTON "Search Contact ",IDPB_SEARCH_PARTNER,280,15,60,14,WS_TABSTOP
LTEXT "Partner Name : ",IDC_STATIC,13,42,50,17
EDITTEXT IDET_PARTNER,70, 42, 150, 12,ES_AUTOHSCROLL |ES_READONLY
PUSHBUTTON "Search Partner",ID_NEW_PART_BUTTON,225,41,60,14, WS_TABSTOP
PUSHBUTTON "New Partner",IDPB_NEW_PART_BUTTON,290,41,50,14, WS_TABSTOP
GROUPBOX "Postal Address ", IDC_STATIC_GROUP,10,65,175,125
LTEXT "Contact Name : ",IDC_STATIC,18,83,50,17
EDITTEXT IDET_PARTNER_CONTACT_NAME,76,82,100,12,ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Street : ",IDC_STATIC,18,97,50,17
EDITTEXT IDET_PARTNER_STREET,76,96,100,12,ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Street2 : ",IDC_STATIC,18,112,50,17
EDITTEXT IDET_PARTNER_STREET2, 76, 111, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Zip : ",IDC_STATIC, 18, 126, 50,14
EDITTEXT IDET_ZIP, 76, 125, 100, 12 , ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "City : ",IDC_STATIC,18,140,50,17
EDITTEXT IDET_PARTNER_CITY,76,139,100,12,ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Fed. State : ",IDC_STATIC,18,154,50,17
EDITTEXT IDET_PARTNER_STATE, 76, 153, 54, 12,ES_AUTOHSCROLL |ES_READONLY
PUSHBUTTON "Search", IDPB_SEARCH_STATE1 ,135, 153, 40, 12, WS_TABSTOP
LTEXT "Country :",IDC_STATIC, 18, 169, 35, 17
EDITTEXT IDET_PARTNER_COUNTRY, 76, 168, 54, 12,ES_AUTOHSCROLL |ES_READONLY
PUSHBUTTON "Search", IDPB_SEARCH_COUNTRY1, 135, 168, 40, 12, WS_TABSTOP
GROUPBOX "Communication ", IDC_STATIC_GROUP, 188, 65, 152, 125
LTEXT "Phone : ",IDC_STATIC, 194, 83, 30, 17
EDITTEXT IDET_PARTNER_OFFICENO, 224, 82, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Mobile : ",IDC_STATIC, 194, 97, 30, 17
EDITTEXT IDET_PARTNER_MOBILENO, 224, 96, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Email : ",IDC_STATIC, 194, 111, 30, 17
EDITTEXT IDET_PARTNER_FAX, 224, 110, 100, 12, ES_AUTOHSCROLL |ES_READONLY
LTEXT "Fax : ",IDC_STATIC,194,125,30,17
EDITTEXT IDET_PARTNER_EMAIL, 224, 124, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP
PUSHBUTTON "Create a New Contact", IDPB_NEWPARTNER_BUTTON, 124, 195, 82, 14, WS_TABSTOP
PUSHBUTTON "Save", IDPB_WRITE_CHANGES, 213, 195, 60, 14, WS_TABSTOP
PUSHBUTTON "Cancel", IDCANCEL, 281, 195, 60, 14, WS_TABSTOP
END
IDD_SELECT_PARTNER DIALOGEX 0, 0, 220, 250
STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Search Partner"
FONT 8, "Tahoma", 400, 0, 0x0
BEGIN
LTEXT "Enter Name : ",IDC_STATIC,8,12,80,17
EDITTEXT IDET_PARTNER_SEARCH_NAME, 55, 10, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP
PUSHBUTTON "Search", IDPB_PARTNER_SEARCH, 160, 10, 50, 14, WS_TABSTOP
CONTROL "List1",IDC_LIST_PARTNER,"SysListView32",WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL |
LVS_SHOWSELALWAYS | LVS_EX_GRIDLINES | LVS_REPORT | LVS_EX_FULLROWSELECT, 8,40,200,185
PUSHBUTTON "Create New Partner", IDPB_CREATE_NEW_PARTNER, 10, 230, 100, 14, WS_TABSTOP
PUSHBUTTON "Select", IDPB_SELECT_PARTNER, 170, 230, 40, 14, WS_TABSTOP
END
IDD_OPEN_PARTNER_DIALOG DIALOGEX 0, 0, 200,65
STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Open Partner"
FONT 8, "Tahoma", 400, 0, 0x0
BEGIN
LTEXT "Link to Partner : (If this link does not opens directly in web browser then copy an the link and paste in web browser.) ",IDC_STATIC,5,3,190,25
EDITTEXT IDET_PARTNER_LINK_TEXT,5,31,190,12,ES_AUTOHSCROLL | WS_TABSTOP
PUSHBUTTON "Ok",IDCANCEL,150,45,45,13,WS_TABSTOP
END
IDD_OPEN_DOCUEMNT_DIALOG DIALOGEX 0, 0, 200,65
STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Open Document"
FONT 8, "Tahoma", 400, 0, 0x0
BEGIN
LTEXT "Link to Document : (If this link does not opens directly in web browser then copy an the link and paste in web browser.) ",IDC_STATIC,5,3,190,25
EDITTEXT IDEB_OPENDOC_LINK_TEXT,5,31,190,12,ES_AUTOHSCROLL | WS_TABSTOP
PUSHBUTTON "Ok",IDCANCEL,150,45,45,14,WS_TABSTOP
END
IDD_WEB_SERVER_PORT_DIALOG DIALOGEX 0, 0, 160, 80
STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "OpenERP Connection"
FONT 8, "Tahoma", 400, 0, 0x0
BEGIN
LTEXT "Server : ",IDC_STATIC,5,3,150,17
EDITTEXT IDET_WEB_SERVER,40,3,100,12,ES_AUTOHSCROLL | WS_TABSTOP
LTEXT "Port : ",IDC_STATIC,5,18,100,17
EDITTEXT IDET_WEB_PORT,40,18,100,12,ES_AUTOHSCROLL | WS_TABSTOP
PUSHBUTTON "Close",IDCANCEL,110,50,45,14,WS_TABSTOP
DEFPUSHBUTTON "OK",ID_WEB_OK,50,50,50,14,WS_TABSTOP
PUSHBUTTON "SSL (https)",IDCB_WEB_SECURE,20,35,100,14,BS_AUTOCHECKBOX | BST_CHECKED |WS_TABSTOP
END
IDD_SELECT_COUNTRY DIALOGEX 0, 0, 220, 250
STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Search Country"
FONT 8, "Tahoma", 400, 0, 0x0
BEGIN
LTEXT "Enter Name : ",IDC_STATIC,8,12,80,17
EDITTEXT IDET_COUNTRY_SEARCH_NAME, 55, 10, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP
PUSHBUTTON "Search", IDPB_SEARCH_COUNTRY, 160, 10, 50, 14, WS_TABSTOP
CONTROL "List1",IDC_LIST_COUNTRY,"SysListView32",WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL |
LVS_SHOWSELALWAYS | LVS_EX_GRIDLINES | LVS_REPORT | LVS_EX_FULLROWSELECT, 8,40,200,185
PUSHBUTTON "Select", IDPB_SELECT_COUNTRY, 170, 230, 40, 14, WS_TABSTOP
END
IDD_SELECT_STATE DIALOGEX 0, 0, 220, 250
STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_CONTEXTHELP
CAPTION "Search Fed. State"
FONT 8, "Tahoma", 400, 0, 0x0
BEGIN
LTEXT "Enter Name : ",IDC_STATIC,8,12,80,17
EDITTEXT IDET_STATE_SEARCH_NAME, 55, 10, 100, 12, ES_AUTOHSCROLL | WS_TABSTOP
PUSHBUTTON "Search", IDPB_STATE_SEARCH, 160, 10, 50, 14, WS_TABSTOP
CONTROL "List1",IDC_LIST_STATE,"SysListView32",WS_CHILD | WS_VISIBLE | WS_BORDER | WS_HSCROLL | WS_VSCROLL |
LVS_SHOWSELALWAYS | LVS_EX_GRIDLINES | LVS_REPORT | LVS_EX_FULLROWSELECT, 8,40,200,185
PUSHBUTTON "Select", IDPB_SELECT_STATE, 170, 230, 40, 14, WS_TABSTOP
END

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 306 B

View File

@ -1,41 +0,0 @@
# rc2py.py
# This module is part of the spambayes project, which is Copyright 2003
# The Python Software Foundation and is covered by the Python Software
# Foundation license.
__author__="Adam Walker"
__doc__=""""
Converts an .rc windows resource source file into a python source file
with the same basic public interface as the rcparser module.
"""
import sys, os, stat
import rcparser
def convert(inputFilename = None, outputFilename = None):
"""See the module doc string"""
if inputFilename is None:
inputFilename = "dialogs.rc"
if outputFilename is None:
outputFilename = "test.py"
rcp = rcparser.ParseDialogs(inputFilename)
in_stat = os.stat(inputFilename)
out = open(outputFilename, "wt")
out.write("#%s\n" % outputFilename)
out.write("#This is a generated file. Please edit %s instead.\n" % inputFilename)
out.write("_rc_size_=%d\n_rc_mtime_=%d\n" % (in_stat[stat.ST_SIZE], in_stat[stat.ST_MTIME]))
out.write("class FakeParser:\n")
out.write("\tdialogs = "+repr(rcp.dialogs)+"\n")
out.write("\tids = "+repr(rcp.ids)+"\n")
out.write("\tnames = "+repr(rcp.names)+"\n")
out.write("\tbitmaps = "+repr(rcp.bitmaps)+"\n")
out.write("def ParseDialogs(s):\n")
out.write("\treturn FakeParser()\n")
out.close()
if __name__=="__main__":
if len(sys.argv)>1:
convert(sys.argv[1], sys.argv[2])
else:
convert()
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,379 +0,0 @@
# Windows dialog .RC file parser, by Adam Walker.
# This module is part of the spambayes project, which is Copyright 2003
# The Python Software Foundation and is covered by the Python Software
# Foundation license.
__author__="Adam Walker"
import sys, os, shlex
import win32con
#import win32gui
import commctrl
_controlMap = {"DEFPUSHBUTTON":0x80,
"PUSHBUTTON":0x80,
"Button":0x80,
"GROUPBOX":0x80,
"Static":0x82,
"CTEXT":0x82,
"RTEXT":0x82,
"LTEXT":0x82,
"LISTBOX":0x83,
"SCROLLBAR":0x84,
"COMBOBOX":0x85,
"EDITTEXT":0x81,
}
_addDefaults = {"EDITTEXT":win32con.WS_BORDER,
"GROUPBOX":win32con.BS_GROUPBOX,
"LTEXT":win32con.SS_LEFT,
"DEFPUSHBUTTON":win32con.BS_DEFPUSHBUTTON,
"CTEXT":win32con.SS_CENTER,
"RTEXT":win32con.SS_RIGHT}
defaultControlStyle = win32con.WS_CHILD | win32con.WS_VISIBLE
class DialogDef:
name = ""
id = 0
style = 0
styleEx = None
caption = ""
font = "MS Sans Serif"
fontSize = 8
x = 0
y = 0
w = 0
h = 0
template = None
def __init__(self, n, i):
self.name = n
self.id = i
self.styles = []
self.stylesEx = []
self.controls = []
#print "dialog def for ",self.name, self.id
def createDialogTemplate(self):
t = None
self.template = [[self.caption, (self.x,self.y,self.w,self.h), self.style, self.styleEx, (self.fontSize, self.font)]]
# Add the controls
for control in self.controls:
self.template.append(control.createDialogTemplate())
return self.template
class ControlDef:
id = ""
controlType = ""
subType = ""
idNum = 0
style = defaultControlStyle
label = ""
x = 0
y = 0
w = 0
h = 0
def __init__(self):
self.styles = []
def toString(self):
s = "<Control id:"+self.id+" controlType:"+self.controlType+" subType:"+self.subType\
+" idNum:"+str(self.idNum)+" style:"+str(self.style)+" styles:"+str(self.styles)+" label:"+self.label\
+" x:"+str(self.x)+" y:"+str(self.y)+" w:"+str(self.w)+" h:"+str(self.h)+">"
return s
def createDialogTemplate(self):
ct = self.controlType
if "CONTROL"==ct:
ct = self.subType
if ct in _addDefaults:
self.style |= _addDefaults[ct]
if ct in _controlMap:
ct = _controlMap[ct]
t = [ct, self.label, self.idNum, (self.x, self.y, self.w, self.h), self.style]
#print t
return t
class RCParser:
next_id = 1001
dialogs = {}
_dialogs = {}
debugEnabled = False;
token = ""
def __init__(self):
self.ids = {"IDOK":1, "IDCANCEL":2, "IDC_STATIC": -1}
self.names = {1:"IDOK", 2:"IDCANCEL", -1:"IDC_STATIC"}
self.bitmaps = {}
def debug(self, *args):
if self.debugEnabled:
print args
def getToken(self):
self.token = self.lex.get_token()
self.debug("getToken returns:", self.token)
if self.token=="":
self.token = None
return self.token
def getCommaToken(self):
tok = self.getToken()
assert tok == ",", "Token '%s' should be a comma!" % tok
def loadDialogs(self, rcFileName):
"""
RCParser.loadDialogs(rcFileName) -> None
Load the dialog information into the parser. Dialog Definations can then be accessed
using the "dialogs" dictionary member (name->DialogDef). The "ids" member contains the dictionary of id->name.
The "names" member contains the dictionary of name->id
"""
hFileName = rcFileName[:-2]+"h"
try:
h = open(hFileName, "rU")
self.parseH(h)
h.close()
except OSError:
print "No .h file. ignoring."
f = open(rcFileName)
self.open(f)
self.getToken()
while self.token!=None:
self.parse()
self.getToken()
f.close()
def open(self, file):
self.lex = shlex.shlex(file)
self.lex.commenters = "//#"
def parseH(self, file):
lex = shlex.shlex(file)
lex.commenters = "//"
token = " "
while token is not None:
token = lex.get_token()
if token == "" or token is None:
token = None
else:
if token=='define':
n = lex.get_token()
i = int(lex.get_token())
self.ids[n] = i
if self.names.has_key(i):
# ignore AppStudio special ones.
if not n.startswith("_APS_"):
print "Duplicate id",i,"for",n,"is", self.names[i]
else:
self.names[i] = n
if self.next_id<=i:
self.next_id = i+1
def parse(self):
deep = 0
if self.token == None:
more == None
elif "BEGIN" == self.token:
deep = 1
while deep!=0:
self.getToken()
if "BEGIN" == self.token:
deep += 1
elif "END" == self.token:
deep -= 1
elif "IDD_" == self.token[:4]:
possibleDlgName = self.token
#print "possible dialog:", possibleDlgName
self.getToken()
if "DIALOG" == self.token or "DIALOGEX" == self.token:
self.dialog(possibleDlgName)
elif "IDB_" == self.token[:4]:
possibleBitmap = self.token
self.getToken()
if "BITMAP" == self.token:
self.getToken()
if self.token=="MOVEABLE":
self.getToken() # PURE
self.getToken() # bmpname
bmf = self.token[1:-1] # quotes
self.bitmaps[possibleBitmap] = bmf
print "BITMAP", possibleBitmap, bmf
#print win32gui.LoadImage(0, bmf, win32con.IMAGE_BITMAP,0,0,win32con.LR_DEFAULTCOLOR|win32con.LR_LOADFROMFILE)
def addId(self, id_name):
if id_name in self.ids:
id = self.ids[id_name]
else:
id = self.next_id
self.next_id += 1
self.ids[id_name] = id
self.names[id] = id_name
return id
def lang(self):
while self.token[0:4]=="LANG" or self.token[0:7]=="SUBLANG" or self.token==',':
self.getToken();
def dialog(self, name):
dlg = DialogDef(name,self.addId(name))
assert len(dlg.controls)==0
self._dialogs[name] = dlg
extras = []
self.getToken()
while not self.token.isdigit():
self.debug("extra", self.token)
extras.append(self.token)
self.getToken()
dlg.x = int(self.token)
self.getCommaToken()
self.getToken() # number
dlg.y = int(self.token)
self.getCommaToken()
self.getToken() # number
dlg.w = int(self.token)
self.getCommaToken()
self.getToken() # number
dlg.h = int(self.token)
self.getToken()
while not (self.token==None or self.token=="" or self.token=="END"):
if self.token=="STYLE":
self.dialogStyle(dlg)
elif self.token=="EXSTYLE":
self.dialogExStyle(dlg)
elif self.token=="CAPTION":
self.dialogCaption(dlg)
elif self.token=="FONT":
self.dialogFont(dlg)
elif self.token=="BEGIN":
self.controls(dlg)
else:
break
self.dialogs[name] = dlg.createDialogTemplate()
def dialogStyle(self, dlg):
dlg.style, dlg.styles = self.styles( [], win32con.WS_VISIBLE | win32con.DS_SETFONT)
def dialogExStyle(self, dlg):
self.getToken()
dlg.styleEx, dlg.stylesEx = self.styles( [], 0)
def styles(self, defaults, defaultStyle):
list = defaults
style = defaultStyle
if "STYLE"==self.token:
self.getToken()
i = 0
Not = False
while ((i%2==1 and ("|"==self.token or "NOT"==self.token)) or (i%2==0)) and not self.token==None:
Not = False;
if "NOT"==self.token:
Not = True
self.getToken()
i += 1
if self.token!="|":
if self.token in win32con.__dict__:
value = getattr(win32con,self.token)
else:
if self.token in commctrl.__dict__:
value = getattr(commctrl,self.token)
else:
value = 0
if Not:
list.append("NOT "+self.token)
self.debug("styles add Not",self.token, value)
style &= ~value
else:
list.append(self.token)
self.debug("styles add", self.token, value)
style |= value
self.getToken()
self.debug("style is ",style)
return style, list
def dialogCaption(self, dlg):
if "CAPTION"==self.token:
self.getToken()
self.token = self.token[1:-1]
self.debug("Caption is:",self.token)
dlg.caption = self.token
self.getToken()
def dialogFont(self, dlg):
if "FONT"==self.token:
self.getToken()
dlg.fontSize = int(self.token)
self.getCommaToken()
self.getToken() # Font name
dlg.font = self.token[1:-1] # it's quoted
self.getToken()
while "BEGIN"!=self.token:
self.getToken()
def controls(self, dlg):
if self.token=="BEGIN": self.getToken()
while self.token!="END":
control = ControlDef()
control.controlType = self.token;
#print self.token
self.getToken()
if self.token[0:1]=='"':
control.label = self.token[1:-1]
self.getCommaToken()
self.getToken()
elif self.token.isdigit():
control.label = self.token
self.getCommaToken()
self.getToken()
# msvc seems to occasionally replace "IDC_STATIC" with -1
if self.token=='-':
if self.getToken() != '1':
raise RuntimeError, \
"Negative literal in rc script (other than -1) - don't know what to do"
self.token = "IDC_STATIC"
control.id = self.token
control.idNum = self.addId(control.id)
self.getCommaToken()
if control.controlType == "CONTROL":
self.getToken()
control.subType = self.token[1:-1]
# Styles
self.getCommaToken()
self.getToken()
control.style, control.styles = self.styles([], defaultControlStyle)
#self.getToken() #,
# Rect
control.x = int(self.getToken())
self.getCommaToken()
control.y = int(self.getToken())
self.getCommaToken()
control.w = int(self.getToken())
self.getCommaToken()
self.getToken()
control.h = int(self.token)
self.getToken()
if self.token==",":
self.getToken()
control.style, control.styles = self.styles([], defaultControlStyle)
#print control.toString()
dlg.controls.append(control)
def ParseDialogs(rc_file):
rcp = RCParser()
try:
rcp.loadDialogs(rc_file)
except:
lex = getattr(rcp, "lex", None)
if lex:
print "ERROR parsing dialogs at line", lex.lineno
print "Next 10 tokens are:"
for i in range(10):
print lex.get_token(),
print
raise
return rcp
if __name__=='__main__':
rc_file = os.path.join(os.path.dirname(__file__), "dialogs.rc")
d = ParseDialogs(rc_file)
import pprint
for id, ddef in d.dialogs.items():
print "Dialog %s (%d controls)" % (id, len(ddef))
pprint.pprint(ddef)
print
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,95 +0,0 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
#!/usr/bin/python
#-*- encoding: utf-8 -*-
import sys
import chilkat
import os
from manager import ustr
import email
cemail = chilkat.CkEmail()
dt = chilkat.SYSTEMTIME()
def generateEML(mail):
sub = (mail.Subject).replace(' ','')
body = mail.Body.encode("utf-8")
recipients = mail.Recipients
sender_email = mail.SenderEmailAddress
attachments=mail.Attachments
cemail = chilkat.CkEmail()
cemail.put_Subject (ustr(sub).encode('iso-8859-1'))
cemail.put_Body (ustr(body).encode('utf-8'))
cemail.put_FromAddress (ustr(sender_email).encode('iso-8859-1'))
cemail.put_From (ustr(sender_email).encode('iso-8859-1'))
for i in xrange(1, recipients.Count+1):
name = ustr(recipients.Item(i).Name).encode('iso-8859-1')
address = ustr(recipients.Item(i).Address).encode('iso-8859-1')
cemail.AddTo(name,address)
eml_name= ustr(sub).encode('iso-8859-1')+'-'+str(mail.EntryID)[-9:]
ls = ['*', '/', '\\', '<', '>', ':', '?', '"', '|', '\t', '\n']
mails_folder_path = os.path.abspath("%temp%\\dialogs\\resources\\mails\\")
attachments_folder_path = mails_folder_path + "\\attachments\\"
if not os.path.exists(attachments_folder_path):
os.makedirs(attachments_folder_path)
for i in xrange(1, attachments.Count+1):
fn = eml_name + '-' + ustr(attachments[i].FileName).encode('iso-8859-1')
for c in ls:
fn = fn.replace(c,'')
if len(fn) > 64:
l = 64 - len(fn)
f = fn.split('-')
fn = '-'.join(f[1:])
if len(fn) > 64:
l = 64 - len(fn)
f = fn.split('.')
fn = f[0][0:l] + '.' + f[-1]
att_file = os.path.join(attachments_folder_path, fn)
if os.path.exists(att_file):
os.remove(att_file)
attachments[i].SaveAsFile(att_file)
contentType = cemail.addFileAttachment(att_file)
if (contentType == None ):
print mail.lastErrorText()
sys.exit()
if not os.path.exists(mails_folder_path):
os.makedirs(mails_folder_path)
for c in ls:
eml_name = eml_name.replace(c,'')
if len(eml_name) > 64:
l = 64 - len(eml_name)
f = eml_name.split('-')
eml_name = f[0][0:l] + '.' + f[-1]
eml_path = ustr(os.path.join(mails_folder_path,eml_name+".eml")).encode('iso-8859-1')
success = cemail.SaveEml(eml_path)
fp = open(eml_path, 'rb')
new_mail = email.message_from_file(fp)
fp.close()
if (success == False):
print cemail.lastErrorText()
sys.exit()
return new_mail, eml_path
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,195 +0,0 @@
# This module is part of the spambayes project, which is Copyright 2003
# The Python Software Foundation and is covered by the Python Software
# Foundation license.
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import os
import sys
import win32api, win32con
import win32com.client
import pythoncom
try:
True, False
except NameError:
# Maintain compatibility with Python 2.2
True, False = 1, 0
try:
filesystem_encoding = sys.getfilesystemencoding()
except AttributeError:
filesystem_encoding = "mbcs"
# Work out our "application directory", which is
# the directory of our main .py/.dll/.exe file we
# are running from.
if hasattr(sys, "frozen"):
assert sys.frozen == "dll", "outlook only supports inproc servers"
this_filename = win32api.GetModuleFileName(sys.frozendllhandle)
else:
try:
this_filename = os.path.abspath(__file__)
except NameError: # no __file__ - means Py2.2 and __name__=='__main__'
this_filename = os.path.abspath(sys.argv[0])
# See if we can use the new bsddb module. (The old one is unreliable
# on Windows, so we don't use that)
try:
import bsddb3 as bsddb
# bsddb3 is definitely not broken
use_db = True
except ImportError:
# Not using the 3rd party bsddb3, so try the one in the std library
try:
import bsddb
use_db = hasattr(bsddb, "db") # This name is not in the old one.
except ImportError:
# No DB library at all!
assert not hasattr(sys, "frozen"), \
"Don't build binary versions without bsddb!"
use_db = False
def ustr(value):
"""This method is similar to the builtin `str` method, except
it will return Unicode string.
@param value: the value to convert
@rtype: unicode
@return: unicode string
"""
if isinstance(value, unicode):
return value
if hasattr(value, '__unicode__'):
return unicode(value)
if not isinstance(value, str):
value = str(value)
try: # first try utf-8
return unicode(value, 'utf-8')
except:
pass
try: # then extened iso-8858
return unicode(value, 'iso-8859-15')
except:
pass
filesystem_encoding = sys.getfilesystemencoding()
d = unicode(value, filesystem_encoding)
return d
class OpenERPManager:
def __init__(self, config_base="default", outlook=None, verbose=0):
self.outlook = outlook
self.dialog_parser = None
self.application_directory = os.path.dirname(this_filename)
self.windows_data_directory = self.LocateDataDirectory()
self.data_directory = self.windows_data_directory
self.default_objects = [('Partners','res.partner',''),('Account Invoices','account.invoice',''), \
('Products', 'product.product',''),('Sale Orders','sale.order',''), \
('Leads','crm.lead','')]
self.config=self.LoadConfig()
def WorkerThreadStarting(self):
pythoncom.CoInitialize()
def WorkerThreadEnding(self):
pythoncom.CoUninitialize()
def LocateDataDirectory(self):
# Locate the best directory for our data files.
from win32com.shell import shell, shellcon
try:
appdata = shell.SHGetFolderPath(0,shellcon.CSIDL_APPDATA,0,0)
path = os.path.join(appdata, "OpenERP-Plugin")
if not os.path.isdir(path):
os.makedirs(path)
return path
except pythoncom.com_error:
# Function doesn't exist on early win95,
# and it may just fail anyway!
return self.application_directory
except EnvironmentError:
# Can't make the directory.
return self.application_directory
def ShowManager(self, id="IDD_MANAGER"):
import dialogs
dialogs.ShowDialog(0, self, self.config, id)
def LoadConfig(self):
import win32ui
path = os.path.join(self.data_directory, 'tiny.ini')
data = {'server' : 'localhost', 'port' : '8069', 'protocol' : 'http://', 'database' : '', 'objects' : self.default_objects, 'uname':'admin', 'pwd':'a', 'login':False,'webserver':'localhost','webport':'8080', 'webprotocol' : 'http:\\'}
if os.path.exists(path):
fp = open(path, 'r')
data = fp.readlines()
try:
data = eval(data[0])
return data
except e:
return data
else:
return data
def SaveConfig(self):
path = os.path.join(self.data_directory, 'tiny.ini')
fp = open(path, 'w')
fp.write(str(self.config))
fp.close()
_mgr = None
def GetManager(outlook = None):
global _mgr
if _mgr is None:
if outlook is None:
outlook = win32com.client.Dispatch("Outlook.Application")
_mgr = OpenERPManager(outlook=outlook)
return _mgr
def ShowManager(mgr):
mgr.c()
def main(verbose_level = 1):
mgr = GetManager()
ShowManager(mgr)
return 0
def usage():
print "Usage: manager [-v ...]"
sys.exit(1)
if __name__=='__main__':
verbose = 1
import getopt
opts, args = getopt.getopt(sys.argv[1:], "v")
if args:
usage()
for opt, val in opts:
if opt=="-v":
verbose += 1
else:
usage()
sys.exit(main(verbose))
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,105 +0,0 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{AF02E62E-3A5A-4E86-B4CF-03F2B2AC25BF}
AppName=Openerp Outlook Addin
AppVersion=1.0
AppVerName=Openerp Outlook Addin 1.0
AppPublisher=Openerp SA
AppPublisherURL=http://www.openerp.com/
AppSupportURL=http://www.openerp.com/
AppUpdatesURL=http://www.openerp.com/
DefaultDirName={pf}\Openerp Outlook Addin
DefaultGroupName=Openerp Outlook Addin
DisableProgramGroupPage=true
OutputBaseFilename=openerp-outlook-addin
Compression=lzma
SolidCompression=true
UserInfoPage=true
UninstallDisplayIcon={app}\*
VersionInfoVersion=1.0
VersionInfoCompany=OpenERP
VersionInfoDescription=OpenERP Outlook Addin
ChangesAssociations=true
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "basque"; MessagesFile: "compiler:Languages\Basque.isl"
Name: "brazilianportuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl"
Name: "catalan"; MessagesFile: "compiler:Languages\Catalan.isl"
Name: "czech"; MessagesFile: "compiler:Languages\Czech.isl"
Name: "danish"; MessagesFile: "compiler:Languages\Danish.isl"
Name: "dutch"; MessagesFile: "compiler:Languages\Dutch.isl"
Name: "finnish"; MessagesFile: "compiler:Languages\Finnish.isl"
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
Name: "hebrew"; MessagesFile: "compiler:Languages\Hebrew.isl"
Name: "hungarian"; MessagesFile: "compiler:Languages\Hungarian.isl"
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"
Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl"
Name: "norwegian"; MessagesFile: "compiler:Languages\Norwegian.isl"
Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl"
Name: "portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl"
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl"
Name: "slovak"; MessagesFile: "compiler:Languages\Slovak.isl"
Name: "slovenian"; MessagesFile: "compiler:Languages\Slovenian.isl"
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
[Files]
Source: "C:\openerp-outlook-plugin\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Messages]
AboutSetupNote=Inno Setup Preprocessor home page:%nhttp://ispp.sourceforge.net/
[Run]
Filename: "{app}\Register-plugin.bat"; StatusMsg: "Registering Outlook Addin";
[UninstallDelete]
Type: files; Name: "{app}\Openerp Outlook Addin\*"
Type: dirifempty; Name: "{app}\Openerp Outlook Addin"
[UninstallRun]
Filename: "{app}\Unregister-plugin.bat"; StatusMsg: "Unregistering Outlook Addin";
[Code]
function InitializeSetup(): Boolean;
begin
Result := true;
if not RegKeyExists( HKLM, 'Software\Python\PythonCore') then begin
Result := MsgBox(
'Python appears to not be installed.' + #13 + #13 +
'This addin requires Python 2.5 or above installed with compatible pywin32 for python for working.'+ #13 + #13 +
'If you know that Python is installed, you may with to continue.' + #13 + #13 +
'Continue with installation?',
mbConfirmation, MB_YESNO) = idYes;
end;
if not RegKeyExists( HKCU, 'Software\Microsoft\Office\Outlook') then begin
Result := MsgBox(
'Outlook appears to not be installed.' + #13 + #13 +
'This addin only works with Microsoft Outlook 2000 and later - it' + #13 +
'does not work with Outlook express.' + #13 + #13 +
'If you know that Outlook is installed, you may with to continue.' + #13 + #13 +
'Continue with installation?',
mbConfirmation, MB_YESNO) = idYes;
end;
while Result do begin
if not CheckForMutexes('_outlook_mutex_') then
break;
Result := MsgBox(
'You must close Outlook before OpenERP Outlook Addin can be installed.' + #13 + #13 +
'Please close all Outlook Windows (using "File->Exit and Log off"' + #13 +
'if available) and click Retry, or click Cancel to exit the installation.'+ #13 + #13 +
'If this message persists after closing all Outlook windows, you may' + #13 +
'need to log off from Windows, and try again.',
mbConfirmation, MB_RETRYCANCEL) = idRetry;
end;
end;

View File

@ -1,573 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import xmlrpclib
import binascii
import base64
import sys
import socket
import os
import time
from manager import ustr
from win32com.mapi import mapitags
import pythoncom
import win32com
import win32ui
waittime = 10
wait_count = 0
wait_limit = 12
def execute(connector, method, *args):
global wait_count
res = False
try:
res = getattr(connector,method)(*args)
except socket.error,e:
if e.args[0] == 111:
if wait_count > wait_limit:
print "Server is taking too long to start, it has exceeded the maximum limit of %d seconds."%(wait_limit)
clean()
sys.exit(1)
print 'Please wait %d sec to start server....'%(waittime)
wait_count += 1
time.sleep(waittime)
res = execute(connector, method, *args)
else:
return res
wait_count = 0
return res
class XMLRpcConn(object):
__name__ = 'XMLRpcConn'
_com_interfaces_ = ['_IDTExtensibility2']
_public_methods_ = ['GetDBList', 'login', 'GetAllObjects', 'GetObjList', 'InsertObj', 'DeleteObject', 'GetCSList', \
'ArchiveToOpenERP', 'IsCRMInstalled', 'GetPartners', 'GetObjectItems', \
'CreateCase', 'MakeAttachment', 'CreateContact', 'CreatePartner', 'getitem', 'setitem', \
'SearchPartnerDetail', 'WritePartnerValues', 'GetAllState', 'GetAllCountry', 'SearchPartner', 'SearchEmailResources', \
'GetCountry', 'GetStates', 'FindCountryForState','CreateEmailAttachment','SearchPartners']
_reg_clsctx_ = pythoncom.CLSCTX_INPROC_SERVER
_reg_clsid_ = "{C6399AFD-763A-400F-8191-7F9D0503CAE2}"
_reg_progid_ = "Python.OpenERP.XMLRpcConn"
_reg_policy_spec_ = "win32com.server.policy.EventHandlerPolicy"
def __init__(self,server='localhost',port=8069,uri='http://localhost:8069',webserver='localhost', webport=8080):
self._server=server
self._port=port
self._uri=uri
self._webserver=webserver
self._webport=webport
self._obj_list=[]
self._dbname=''
self._uname='admin'
self._pwd='a'
self._login=False
self._running=False
self._uid=False
self._iscrm=True
self.partner_id_list=None
self.protocol=None
self._webprotocol=None
self._weburi=None
def getitem(self, attrib):
v=self.__getattribute__(attrib)
return str(v)
def setitem(self, attrib, value):
return self.__setattr__(attrib, value)
def GetDBList(self):
conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/db')
try:
db_list = execute(conn, 'list')
if db_list == False:
self._running=False
return []
else:
self._running=True
except:
db_list=-1
self._running=True
return db_list
def login(self,dbname, user, pwd):
self._dbname = dbname
self._uname = user
self._pwd = pwd
conn = xmlrpclib.ServerProxy(str(self._uri) + '/xmlrpc/common')
try:
uid = execute(conn,'login',dbname, ustr(user), ustr(pwd))
except:
return False
return uid
def GetAllObjects(self):
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[])
objects = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','read',ids,['model'])
obj_list = [item['model'] for item in objects]
return obj_list
def GetObjList(self):
self._obj_list=list(self._obj_list)
self._obj_list.sort(reverse=True)
return self._obj_list
def InsertObj(self, obj_title,obj_name,image_path):
self._obj_list=list(self._obj_list)
self._obj_list.append((obj_title,obj_name,ustr(image_path)))
self._obj_list.sort(reverse=True)
def DeleteObject(self,sel_text):
self._obj_list=list(self._obj_list)
for obj in self._obj_list:
if obj[0] == sel_text:
self._obj_list.remove(obj)
break
def ArchiveToOpenERP(self, recs, mail):
import win32con
import win32ui
conn = xmlrpclib.ServerProxy(self._uri + '/xmlrpc/object')
flag = False
new_msg = ext_msg =""
message_id = referances = None
context = {}
try:
session = win32com.client.Dispatch("MAPI.session")
session.Logon('Outlook')
objMessage = session.GetMessage(mail.EntryID, mail.Parent.StoreID)
objFields = objMessage.Fields
strheader = objFields.Item(mapitags.PR_TRANSPORT_MESSAGE_HEADERS)
strheader = ustr(strheader).encode('iso-8859-1')
headers = {}
strheader = strheader.replace("\n ", " ").splitlines()
for line in strheader:
split_here = line.find(":")
headers[line[:split_here]] = line[split_here:]
temp1 = headers.get('Message-ID')
temp2 = headers.get('Message-Id')
referances = headers.get('References')
if temp1 == None: message_id = temp2
if temp2 == None: message_id = temp1
startCut = message_id.find("<")
endCut = message_id.find(">")
message_id = message_id[startCut:endCut+1]
if not referances == None:
startCut = referances.find("<")
endCut = referances.find(">")
referances = referances[startCut:endCut+1]
except Exception,e:
win32ui.MessageBox(str(e),"Archive To OpenERP")
return
attachments=mail.Attachments
for rec in recs: #[('res.partner', 3, 'Agrolait')]
model = rec[0]
res_id = rec[1]
#Check if mail installed
object_id = execute ( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[('model','=','mail.message')])
if not object_id:
win32ui.MessageBox("Mail is not installed on your configured database '%s' !!\n\nPlease install it to archive the mail."%(self._dbname),"Mail not installed",win32con.MB_ICONERROR)
return
object_ids = execute ( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[('model','=',model)])
object_name = execute( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','read',object_ids,['name'])[0]['name']
#Reading the Object ir.model Name
ext_ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'mail.message','search',[('message_id','=',message_id),('model','=',model),('res_id','=',res_id)])
if ext_ids:
name = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,model,'read',res_id,['name'])['name']
ext_msg += """This mail is already archived to {0} '{1}'.\n""".format(object_name,name)
flag = True
continue
msg = {
'subject':mail.Subject,
'date':str(mail.ReceivedTime),
'body':mail.Body,
'cc':mail.CC,
'from':mail.SenderEmailAddress,
'to':mail.To,
'message-id':message_id,
'references':ustr(referances),
}
result = {}
context['thread_model'] = model
if attachments:
result = self.MakeAttachment([rec], mail)
execute(conn, 'execute', self. _dbname, int(self._uid), self._pwd,
'mail.thread','message_append',[res_id],
msg.get('subject', False),
msg.get('body', False),
msg.get('to', False),
msg.get('from', False),
msg.get('cc', False),
False, # BCC
False, #reply-to
msg.get('date', False),
msg.get('message-id'),\
msg.get('references', False),
result, #attachments
#FIXME: properly handle plaintext/html body variants?
False, #body_html
False, #subtype
False, #headers
False, #original
context)
new_msg += """- {0} : {1}\n""".format(object_name,str(rec[2]))
flag = True
if flag:
t = """Mail archived Successfully with attachments.\n"""+ext_msg
t += "\n"+new_msg
win32ui.MessageBox(t,"Archived to OpenERP",win32con.MB_ICONINFORMATION)
return flag
def IsCRMInstalled(self):
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[('model','=','crm.lead')])
return id
def GetCSList(self):
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
ids = execute(conn,'execute',self._dbname,int(int(self._uid)),self._pwd,'crm.case.section','search',[])
objects = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'crm.case.section','read',ids,['name'])
obj_list = [ustr(item['name']).encode('iso-8859-1') for item in objects]
return obj_list
def GetPartners(self, search_partner=''):
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
ids=[]
obj_list=[]
domain = []
if not search_partner.strip() == '':
domain.append(('name','ilike',ustr(search_partner)))
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','search',domain)
if ids:
ids.sort()
obj_list.append((-999, ustr('')))
for id in ids:
object = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','read',[id],['id','name'])[0]
obj_list.append((object['id'], ustr(object['name'])))
obj_list.sort(lambda x, y: cmp(x[1],y[1]))
return obj_list
def GetObjectItems(self, search_list=[], search_text=''):
res = []
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
for obj in search_list:
object_ids = execute ( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','search',[('model','=',obj)])
object_name = execute( conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.model','read',object_ids,['name'])[0]['name']
if obj == "res.partner.address":
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,obj,'search',['|',('name','ilike',ustr(search_text)),('email','ilike',ustr(search_text))])
recs = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,obj,'read',ids,['id','name','street','city'])
for rec in recs:
name = ustr(rec['name'])
if rec['street']:
name += ', ' + ustr(rec['street'])
if rec['city']:
name += ', ' + ustr(rec['city'])
res.append((obj,rec['id'],name,object_name))
else:
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,obj,'search',[('name','ilike',ustr(search_text))])
recs = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,obj,'read',ids,['id','name'])
for rec in recs:
name = ustr(rec['name'])
res.append((obj,rec['id'],name,object_name))
return res
def CreateCase(self, section, mail, partner_ids, with_attachments=True):
import eml
flag = False
id = -1
try:
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
email, path = eml.generateEML(mail)
message_id = None
session = win32com.client.Dispatch("MAPI.session")
session.Logon('Outlook')
objMessage = session.GetMessage(mail.EntryID, mail.Parent.StoreID)
objFields = objMessage.Fields
strheader = objFields.Item(mapitags.PR_TRANSPORT_MESSAGE_HEADERS)
strheader = ustr(strheader).encode('iso-8859-1')
headers = {}
strheader = strheader.replace("\n ", " ").splitlines()
for line in strheader:
split_here = line.find(":")
headers[line[:split_here]] = line[split_here:]
temp1 = headers.get('Message-ID')
temp2 = headers.get('Message-Id')
if temp1 == None: message_id = temp2
if temp2 == None: message_id = temp1
startCut = message_id.find("<")
endCut = message_id.find(">")
message_id = message_id[startCut:endCut+1]
email.replace_header('Message-Id',message_id)
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'mail.thread','message_process',section, str(email))
if id > 0:
flag = True
return flag
else:
flag = False
return flag
except Exception,e:
win32ui.MessageBox("Create Case\n"+str(e),"Mail Reading Error")
return flag
def MakeAttachment(self, recs, mail):
attachments = mail.Attachments
attachment = {}
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
att_folder_path = os.path.abspath(os.path.dirname("%temp%\\"))
if not os.path.exists(att_folder_path):
os.makedirs(att_folder_path)
for rec in recs: #[('res.partner', 3, 'Agrolait')]
obj = rec[0]
obj_id = rec[1]
for i in xrange(1, attachments.Count+1):
fn = ustr(attachments[i].FileName)
if len(fn) > 64:
l = 64 - len(fn)
f = fn.split('.')
fn = f[0][0:l] + '.' + f[-1]
att_path = os.path.join(att_folder_path,fn)
attachments[i].SaveAsFile(att_path)
f=open(att_path,"rb")
content = "".join(f.readlines())
f.close()
attachment[fn] = content
return attachment
def CreateContact(self, res=None):
res=eval(str(res))
partner = res['partner_id']
state = res['state_id']
country = res['country_id']
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
if not partner.strip() == '':
partner_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner', 'search', [('name','=',ustr(partner))])
res.update({'partner_id' : partner_id[0]})
else:
res.pop('partner_id')
if not state == "":
country_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country', 'search', [('name','=',ustr(country))])
res.update({'country_id' : country_id[0]})
else:
res.pop('country_id')
if not country == "":
state_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country.state', 'search', [('name','=',ustr(state))])
res.update({'state_id' : state_id[0]})
else:
res.pop('state_id')
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner.address','create',res)
return id
def CreatePartner(self, res):
res=eval(str(res))
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','search',[('name','=',res['name'])])
if ids:
return False
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.partner','create',res)
return id
def SearchPartnerDetail(self, search_email_id):
res_vals = []
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
address_id = execute(conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'search', [('email','ilike',ustr(search_email_id))])
if not address_id :
return
address = execute(conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address','read',address_id[0],['id','partner_id','name','street','street2','city','state_id','country_id','phone','mobile','email','fax','zip'])
for key, vals in address.items():
res_vals.append([key,vals])
return res_vals
def WritePartnerValues(self, new_vals):
flag = -1
new_dict = dict(new_vals)
email=new_dict['email']
partner = new_dict['partner']
country_val = new_dict['country']
state_val = new_dict['state']
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
partner_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner', 'search', [('name','=',ustr(partner))])
country_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country', 'search', [('name','=',ustr(country_val))])
state_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country.state', 'search', [('name','=',ustr(state_val))])
address_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'search', [('email','=',ustr(email))])
if not partner_id or not address_id or not country_id or not state_id:
return flag
vals_res_address={
'partner_id' : partner_id[0],
'name' : new_dict['name'],
'street':new_dict['street'],
'street2' : new_dict['street2'],
'city' : new_dict['city'],
'phone' : new_dict['phone'],
'mobile' : new_dict['mobile'],
'fax' : new_dict['fax'],
'zip' : new_dict['zip'],
'country_id' : country_id[0],
'state_id' : state_id[0]
}
temp = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'write', address_id, vals_res_address)
if temp:
flag=1
else:
flag=0
return flag
def GetAllState(self):
state_list = []
state_ids = []
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
state_ids = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country.state', 'search', [])
for state_id in state_ids:
obj = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country.state', 'read', [state_id],['id','name'])[0]
state_list.append((obj['id'], ustr(obj['name'])))
return state_list
def GetAllCountry(self):
country_list = []
country_ids = []
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
country_ids = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country', 'search', [])
for country_id in country_ids:
obj = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.country','read', [country_id], ['id','name'])[0]
country_list.append((obj['id'], ustr(obj['name'])))
return country_list
def SearchPartner(self, mail_id = ""):
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
address = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'search', [('email','=',ustr(mail_id))])
if not address:
return False
add_rec = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'res.partner.address', 'read', address[0])
partner = add_rec.get('partner_id',False)
if partner: return partner[0]
else: return partner
def SearchEmailResources(self, message_id):
import win32ui
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
res_vals = []
mail_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'mail.message', 'search', [('message_id','=',message_id)])
ref_mail_id = None
if not mail_id:
ref_mail_id = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'mail.message', 'search', [('references','like','%'+message_id+'%')])
if ref_mail_id:
address = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'mail.message','read',ref_mail_id[0],['model','res_id'])
for key, vals in address.items():
res_vals.append([key,vals])
return res_vals
return None
address = execute( conn, 'execute', self._dbname, int(self._uid), self._pwd, 'mail.message','read',mail_id[0],['model','res_id'])
for key, vals in address.items():
res_vals.append([key,vals])
return res_vals
def GetCountry(self, country_search=''):
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
ids=[]
obj_list=[]
domain = []
if not country_search.strip() == '':
domain.append(('name','ilike',ustr(country_search)))
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.country','search',domain)
if ids:
ids.sort()
for id in ids:
object = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.country','read',[id],['id','name'])[0]
obj_list.append((object['id'], ustr(object['name'])))
obj_list.sort(lambda x, y: cmp(x[1],y[1]))
return obj_list
def GetStates(self, state_search='', country=None):
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
ids = []
c_id = []
obj_list = []
domain = []
if not state_search.strip() == '':
domain.append(('name','ilike',ustr(state_search)))
if country == None:
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.country.state','search',domain)
if not country == None:
c_id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.country','search',[('name','=',ustr(country))])
domain.append(('country_id','=',c_id[0]))
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.country.state','search',domain)
if ids:
ids.sort()
for id in ids:
object = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.country.state','read',[id],['id','name'])[0]
obj_list.append((object['id'], ustr(object['name'])))
obj_list.sort(lambda x, y: cmp(x[1],y[1]))
return obj_list
def FindCountryForState(self, state_search=''):
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.country.state','search',[('name','=',ustr(state_search))])
if not ids:
return None
object = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'res.country.state','read',ids)[0]
country = object['country_id'][1]
return country
def CreateEmailAttachment(self, rec, mail):
import eml
email, path = eml.generateEML(mail)
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
obj = rec[0]
obj_id = rec[1]
res = {}
res['res_model'] = obj
ls = ['*', '/', '\\', '<', '>', ':', '?', '"', '|', '\t', '\n',':','~']
fn = (mail.Subject).replace(' ','')
for c in ls:
fn = fn.replace(c,'')
if len(fn) > 64:
l = 64 - len(fn)
f = fn.split('-')
fn = '-'.join(f[1:])
if len(fn) > 64:
l = 64 - len(fn)
f = fn.split('.')
fn = f[0][0:l] + '.' + f[-1]
fn = fn[:-4]+".eml"
f = open(path)
content = "".join(f.readlines()).encode('base64')
f.close()
res['name'] = fn
res['datas_fname'] = fn
res['datas'] = content
res['res_id'] = obj_id
id = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,'ir.attachment','create',res)
return id
def SearchPartners(self):
res = []
conn = xmlrpclib.ServerProxy(self._uri+ '/xmlrpc/object')
obj = 'res.partner'
ids = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,obj,'search',[])
recs = execute(conn,'execute',self._dbname,int(self._uid),self._pwd,obj,'read',ids,['id','name'])
for rec in recs:
name = ustr(rec['name'])
res.append((obj,rec['id'],name,obj))
return res
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,78 @@
/*
OpenERP, Open Source Business Applications
Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections;
using System.Linq;
namespace OpenERPClient
{
public class Model
{
public string model;
public string name;
protected OpenERPConnect openerp_connect;
public OpenERPConnect Connection
{
set
{
this.openerp_connect = value;
}
get
{
return this.openerp_connect;
}
}
public Model()
{
}
public Model(string model)
{
/*
It gives the model name only.
:param model : madel name
*/
this.model = model;
}
public Model(string model, string name)
{
/*
It gives the model names with their descriptions.
:param model : model name
:param name : description of model
*/
this.name = name;
this.model = model;
}
public override string ToString()
{
/*
It overrides the name of model into ToString.
:return : String
*/
if (this.name != null) return this.name;
return this.model;
}
}
}

View File

@ -0,0 +1,69 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{8E62B8DF-E3A2-4429-A820-FB8A31C2EB00}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>OpenERPClient</RootNamespace>
<AssemblyName>OpenERPClient</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Model.cs" />
<Compile Include="OpenERPConnect.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Record.cs" />
<Compile Include="XMLRPCClient.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\xml-rpc.net.2.5.0\src\xmlrpc.csproj">
<Project>{1B4B0A58-0AFB-4090-91DD-18912CC7DE65}</Project>
<Name>xmlrpc</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,397 @@
/*
OpenERP, Open Source Business Applications
Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Windows.Forms;
using System.Collections;
using CookComputing.XmlRpc;
namespace OpenERPClient
{
public class ServiceUrl : System.Attribute
{
string _url;
public ServiceUrl(string url)
{
/*
It will contain the ServiceUrl.
:param url : url with server and port.
*/
this._url = url;
}
public string Url
{
/*
It will get and return the Url for the connection.
:return : String
*/
get
{
return _url;
}
}
public override string ToString()
{
/*
It will override the Tostring and return the _url.
*/
return this._url;
}
}
public enum OpenERPService
{
[ServiceUrl("/xmlrpc/object")]
Object = 1,
[ServiceUrl("/xmlrpc/db")]
DB = 2,
[ServiceUrl("/xmlrpc/common")]
Common = 3
}
public class OpenERPConnect
{
int uid;
string url;
string dbname;
string login;
string pwd;
bool chkpwd;
string password;
public string URL
{
/*
It will get and set the value of the url.
:return : String
*/
get
{
return url;
}
set
{
url = value;
}
}
public string DBName
{
/*
It will get and set the value of the Database Name.
:return : String
*/
get
{
return dbname;
}
set
{
dbname = value;
}
}
public string UserId
{
/*
It will get and set the value of the UserId.
:return : String
*/
get
{
return login;
}
set
{
login = value;
}
}
public string pswrd
{
/*
It will get and set the value of the Password.
:return : String
*/
get
{
return password;
}
set
{
password = value;
}
}
public bool rempwd
{
/*
It will get and set the value of the Remember Password.
:return : True or False
*/
get
{
return chkpwd;
}
set
{
chkpwd = value;
}
}
public string version;
XMLRPCClient rpcclient;
public void Open(Enum service)
{
/*
It opens the connetion by the url and service url.
:param service : enum service.
*/
string url = null;
Type type = service.GetType();
ServiceUrl[] _urls =
type.GetField(service.ToString()).GetCustomAttributes(typeof(ServiceUrl),
false) as ServiceUrl[];
if (_urls.Length > 0)
{
url = _urls[0].Url;
}
this.Open(url);
}
void Open(string service_url)
{
/*
It opens rpcclient by service url.
:param service_url : service url
*/
this.rpcclient = new XMLRPCClient(this.url + service_url);
}
void Close()
{
/*
It closes rpcclient.
*/
this.rpcclient = null;
}
public OpenERPConnect()
{
}
public OpenERPConnect(string url)
{
/*
It will contain the url wit the server and port.
:param url : url with the server and port.
*/
this.url = url;
}
public OpenERPConnect(string url, string dbname, string login, string pwd)
{
/*
It will do the connection with OpenERP server.
:param url : url with the server and port.
:param dbname : the list of database.
:param login : user name.
:param pwd : password.
*/
this.url = url;
this.dbname = dbname;
this.login = login;
this.pwd = pwd;
this.version = ServerVersion();
}
public Boolean isLoggedIn
{
/*
It will check whether successfully login to OpenERP is done or not.
:return : True or False.
*/
get
{
if (this.uid > 0) { return true; }
return false;
}
}
public int Login(string dbname, string userid, string pwd)
{
/*
It will check whether the entered dbname, userid and password are correct or not
and on that basis it will allow the user for connecting to OpenERP.
:param dbname : list of database
:param userid : userid
:param pwd : password of the user
:return : Integer
*/
this.Open(OpenERPClient.OpenERPService.Common);
object isLogin = this.rpcclient.Login(dbname, userid, pwd);
this.uid = 0;
if (Convert.ToBoolean(isLogin))
{
this.uid = Convert.ToInt32(isLogin);
}
this.pwd = pwd;
if (this.uid <= 0)
{
MessageBox.Show("Authentication Error!\nBad username and password.", Form.ActiveForm.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
this.Close();
return this.uid;
}
XmlRpcStruct ConvertAs(Hashtable value)
{
/*
It will convert the Hashtable into XmlRpcStruct and vise-versa.
:param value : Hasheable value.
:retutn : Hashtable values and vise versa the XmlRpcStruct value.
*/
XmlRpcStruct new_value;
new_value = new XmlRpcStruct();
foreach (string key in value.Keys)
{
object res;
if (value[key] == null)
{
res = "";
}
if (value[key].GetType() == typeof(Hashtable))
{
res = this.ConvertAs((Hashtable)value[key]);
}
else
{
res = value[key];
}
new_value.Add(key, res);
}
return new_value;
}
object[] ConvertArgs(object[] args)
{
/*
It will convert the arguments which are of type Hashtable into new arguments.
:param args : Objet value of arguments
:return : Object value of arguments.
*/
for (int i = 0; i < args.Length; i++)
{
object arg = args[i];
XmlRpcStruct new_arg;
if (arg.GetType() == typeof(Hashtable))
{
new_arg = this.ConvertAs((Hashtable)arg);
args[i] = new_arg;
}
}
return args;
}
public object Execute(string model, string method, params object[] args)
{
/*
It executes the model name, the method name and also the list of arrays arguments.
:param model : model name.
:param method : method name.
:params args : list of arrays of arguments.
:return : Object
*/
args = this.ConvertArgs(args);
this.Open(OpenERPClient.OpenERPService.Object);
object res = this.rpcclient.Execute(this.dbname, this.uid, this.pwd, model, method, args);
this.Close();
return res;
}
public object[] DBList()
{
/*
It will return the list of the database which will be created.
:return : Database List
*/
this.Open(OpenERPClient.OpenERPService.DB);
object[] res = this.rpcclient.DBList();
this.Close();
return res;
}
public string ServerVersion()
{
/*
It will give the version of the server which the user is using.
:return : String
*/
this.Open(OpenERPClient.OpenERPService.DB);
string version = this.rpcclient.ServerVersion();
this.Close();
return version;
}
public bool check_connectivity()
{
/*
It will check connection on given server url.
:return : True or False.
*/
this.Open(OpenERPClient.OpenERPService.Common);
bool flag = this.rpcclient.check_connectivity();
this.Close();
return flag;
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("OpenERPClient")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("OpenERPClient")]
[assembly: AssemblyCopyright("Copyright © 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("0b69b9a4-1bfc-45d5-9788-983fbf57a505")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,69 @@
/*
OpenERP, Open Source Business Applications
Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System.Collections;
namespace OpenERPClient
{
public class Record
{
public long id;
public string name;
public Model model;
public Hashtable columns;
public Record(long id, string name, Model model)
{
/*
It gives the record of id, name and model.
:param id : record id.
:param name : record name.
:param model : model name.
*/
this.id = id;
this.name = name;
this.model = model;
}
public Record(Hashtable columns, Model model)
{
/*
It gives the records in hashtable columns and also model name.
:param columns : hashtable column values.
:param model : model name.
*/
this.id = long.Parse(columns["id"].ToString());
if (columns.ContainsKey("name"))
{
this.name = columns["name"].ToString();
}
this.model = model;
this.columns = columns;
}
public override string ToString()
{
/*
It will override the Tostring.
*/
if (this.name != null) return this.name;
return this.id.ToString();
}
}
}

View File

@ -0,0 +1,388 @@
/*
OpenERP, Open Source Business Applications
Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Text;
using CookComputing.XmlRpc;
namespace OpenERPClient
{
public interface IOpenERPCommon : IXmlRpcProxy
{
[XmlRpcMethod("login")]
object Login(string dbname, string username, string pwd);
}
public interface IOpenERPObject : IXmlRpcProxy
{
[XmlRpcMethod("execute")]
Object Execute(string dbName, long userId, string pwd, string model, string method, params Object[] args);
}
public interface IOpenERPDB : IXmlRpcProxy
{
[XmlRpcMethod("list")]
Object[] DBList();
[XmlRpcMethod("server_version")]
string ServerVersion();
[XmlRpcMethod("check_connectivity")]
bool check_connectivity();
}
public interface Ixmlrpcconnect : IOpenERPCommon, IOpenERPDB, IOpenERPObject
{
}
public class XMLRPCClient : Ixmlrpcconnect
{
Ixmlrpcconnect rpcclient = (Ixmlrpcconnect)XmlRpcProxyGen.Create(typeof(Ixmlrpcconnect));
public XMLRPCClient(string ServiceUrl)
{
rpcclient.Url = ServiceUrl;
}
#region Ixmlrpcconnect Members
public object Login(string dbname, string username, string pwd)
{
return rpcclient.Login(dbname, username, pwd);
}
public object Execute(string dbName, long userId, string pwd, string model, string method, params object[] args)
{
return rpcclient.Execute(dbName, userId, pwd, model, method, args);
}
public object[] DBList()
{
return rpcclient.DBList();
}
public string ServerVersion()
{
return rpcclient.ServerVersion();
}
public bool check_connectivity()
{
return rpcclient.check_connectivity();
}
#endregion
#region IXmlRpcProxy Members
public bool AllowAutoRedirect
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public System.Security.Cryptography.X509Certificates.X509CertificateCollection ClientCertificates
{
get { throw new NotImplementedException(); }
}
public string ConnectionGroupName
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public System.Net.CookieContainer CookieContainer
{
get { throw new NotImplementedException(); }
}
public System.Net.ICredentials Credentials
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public bool EnableCompression
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public bool Expect100Continue
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public System.Net.WebHeaderCollection Headers
{
get { throw new NotImplementedException(); }
}
public Guid Id
{
get { throw new NotImplementedException(); }
}
public int Indentation
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public bool KeepAlive
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public XmlRpcNonStandard NonStandard
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public bool PreAuthenticate
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public Version ProtocolVersion
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public System.Net.IWebProxy Proxy
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public System.Net.CookieCollection ResponseCookies
{
get { throw new NotImplementedException(); }
}
public System.Net.WebHeaderCollection ResponseHeaders
{
get { throw new NotImplementedException(); }
}
public int Timeout
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public string Url
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public bool UseEmptyParamsTag
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public bool UseIndentation
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public bool UseIntTag
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public bool UseStringTag
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public string UserAgent
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public Encoding XmlEncoding
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public string XmlRpcMethod
{
get
{
throw new NotImplementedException();
}
set
{
throw new NotImplementedException();
}
}
public string[] SystemListMethods()
{
throw new NotImplementedException();
}
public object[] SystemMethodSignature(string MethodName)
{
throw new NotImplementedException();
}
public string SystemMethodHelp(string MethodName)
{
throw new NotImplementedException();
}
public event XmlRpcRequestEventHandler RequestEvent;
public event XmlRpcResponseEventHandler ResponseEvent;
#endregion
}
}

View File

@ -0,0 +1,36 @@

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenERPOutlookPlugin", "OpenERPOutlookPlugin\OpenERPOutlookPlugin.csproj", "{F4B2219B-F235-400F-81B4-92F15250BBA4}"
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "OpenERPOutlookPluginSetup", "OpenERPOutlookPluginSetup\OpenERPOutlookPluginSetup.vdproj", "{96333293-0156-4998-9065-42721CEB0368}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenERPClient", "OpenERPClient\OpenERPClient.csproj", "{8E62B8DF-E3A2-4429-A820-FB8A31C2EB00}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "xmlrpc", "xml-rpc.net.2.5.0\src\xmlrpc.csproj", "{1B4B0A58-0AFB-4090-91DD-18912CC7DE65}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F4B2219B-F235-400F-81B4-92F15250BBA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F4B2219B-F235-400F-81B4-92F15250BBA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F4B2219B-F235-400F-81B4-92F15250BBA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F4B2219B-F235-400F-81B4-92F15250BBA4}.Release|Any CPU.Build.0 = Release|Any CPU
{96333293-0156-4998-9065-42721CEB0368}.Debug|Any CPU.ActiveCfg = Debug
{96333293-0156-4998-9065-42721CEB0368}.Release|Any CPU.ActiveCfg = Release
{8E62B8DF-E3A2-4429-A820-FB8A31C2EB00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8E62B8DF-E3A2-4429-A820-FB8A31C2EB00}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8E62B8DF-E3A2-4429-A820-FB8A31C2EB00}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8E62B8DF-E3A2-4429-A820-FB8A31C2EB00}.Release|Any CPU.Build.0 = Release|Any CPU
{1B4B0A58-0AFB-4090-91DD-18912CC7DE65}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1B4B0A58-0AFB-4090-91DD-18912CC7DE65}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1B4B0A58-0AFB-4090-91DD-18912CC7DE65}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1B4B0A58-0AFB-4090-91DD-18912CC7DE65}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,52 @@
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Revision
// Build Number
//
// You can specify all the value or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified - the assembly cannot be signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine.
// (*) If the key file and a key name attributes are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP - that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the file is installed into the CSP and used.
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]

View File

@ -0,0 +1,55 @@
/*
OpenERP, Open Source Business Applications
Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System.Collections;
using OpenERPClient;
namespace OpenERPOutlookPlugin
{
static public class Cache
{
static private OpenERPOutlookPlugin _openerp;
static public OpenERPOutlookPlugin OpenERPOutlookPlugin
{
get
{
return _openerp;
}
set
{
_openerp = value;
}
}
static private Model[] document_models;
static public Model[] DocumentModelList
{
get
{
return document_models;
}
set
{
document_models = value;
}
}
}
}

View File

@ -0,0 +1,109 @@
/*
OpenERP, Open Source Business Applications
Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Windows.Forms;
using System.Text.RegularExpressions;
using OpenERPClient;
namespace OpenERPOutlookPlugin
{
public class ConfigManager
{
string openerp_config_file = "openerp_config.ini";
public void SaveConfigurationSetting()
{
string filepath = Tools.GetAppFolderPath();
OpenERPOutlookPlugin openerp_outlook = Cache.OpenERPOutlookPlugin;
OpenERPConnect openerp_connect = openerp_outlook.Connection;
filepath = Path.Combine(filepath, openerp_config_file);
string[] datas = { "url=" + openerp_connect.URL, "userid=" + openerp_connect.UserId, "dbname=" + openerp_connect.DBName,"rempwd="+openerp_connect.rempwd,"pswrd=" + openerp_connect.pswrd };
StreamWriter userfile = new StreamWriter(filepath, false);
foreach (string data in datas)
{
userfile.WriteLine(data);
}
userfile.Close();
}
public void LoadConfigurationSetting()
{
string filePath = Tools.GetAppFolderPath();
filePath = Path.Combine(filePath, this.openerp_config_file);
OpenERPConnect openerp_connect=null;
OpenERPOutlookPlugin openerp_outlook=null;
openerp_outlook = Cache.OpenERPOutlookPlugin;
if (openerp_outlook == null)
{
openerp_outlook = new OpenERPOutlookPlugin(openerp_connect);
}
openerp_connect = openerp_outlook.Connection;
if (openerp_connect == null)
{
openerp_connect = new OpenERPConnect();
}
if (File.Exists(filePath))
{
string line;
using (StreamReader file = new StreamReader(filePath))
{
while ((line = file.ReadLine()) != null)
{
char[] delimiters = new char[] { '=' };
string[] parts = line.Split(delimiters, 2);
for (int i = 0; i < parts.Length; i += 2)
{
if (parts[i] == "url")
openerp_connect.URL = parts[i + 1].Trim();
else if (parts[i] == "userid")
openerp_connect.UserId = parts[i + 1].Trim();
else if (parts[i] == "dbname")
openerp_connect.DBName = parts[i + 1].Trim();
else if (parts[i] == "pswrd")
openerp_connect.pswrd = parts[i + 1].Trim();
else if (parts[i] == "rempwd")
{
openerp_connect.rempwd = false;
if (parts[i + 1].Trim().ToLower() == "true")
openerp_connect.rempwd = true;
}
}
}
file.Close();
}
}
openerp_outlook.Connection = openerp_connect;
Cache.OpenERPOutlookPlugin = openerp_outlook;
}
}
}

View File

@ -0,0 +1,354 @@
/*
OpenERP, Open Source Business Applications
Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace OpenERPOutlookPlugin
{
using System;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows.Forms;
using office = Microsoft.Office.Core;
using outlook = Microsoft.Office.Interop.Outlook;
using OpenERPClient;
#region Read me for Add-in installation and setup information.
// When run, the Add-in wizard prepared the registry for the Add-in.
// At a later time, if the Add-in becomes unavailable for reasons such as:
// 1) You moved this project to a computer other than which is was originally created on.
// 2) You chose 'Yes' when presented with a message asking if you wish to remove the Add-in.
// 3) Registry corruption.
// you will need to re-register the Add-in by building the OpenERPOutlookPluginSetup project,
// right click the project in the Solution Explorer, then choose install.
#endregion
/// <summary>
/// The object for implementing an Add-in.
/// </summary>
/// <seealso class='IDTExtensibility2' />
[GuidAttribute("C86B5760-1254-4F40-BD25-2094A2A678C4"), ProgId("OpenERPOutlookPlugin.Connect")]
public class Connect : Object, Extensibility.IDTExtensibility2
{
/// <summary>
/// Implements the constructor for the Add-in object.
/// Place your initialization code within this method.
/// </summary>
public Connect()
{
}
public int cnt_mail = 0;
/// <summary>
/// Implements the OnConnection method of the IDTExtensibility2 interface.
/// Receives notification that the Add-in is being loaded.
/// </summary>
/// <param term='application'>
/// Root object of the host application.
/// </param>
/// <param term='connectMode'>
/// Describes how the Add-in is being loaded.
/// </param>
/// <param term='addInInst'>
/// Object representing this Add-in.
/// </param>
/// <seealso class='IDTExtensibility2' />
public void OnConnection(object application, Extensibility.ext_ConnectMode connectMode, object addInInst, ref System.Array custom)
{
applicationObject = application;
addInInstance = addInInst;
if (connectMode != Extensibility.ext_ConnectMode.ext_cm_Startup)
{
OnStartupComplete(ref custom);
}
}
/// <summary>
/// Implements the OnDisconnection method of the IDTExtensibility2 interface.
/// Receives notification that the Add-in is being unloaded.
/// </summary>
/// <param term='disconnectMode'>
/// Describes how the Add-in is being unloaded.
/// </param>
/// <param term='custom'>
/// Array of parameters that are host application specific.
/// </param>
/// <seealso class='IDTExtensibility2' />
public void OnDisconnection(Extensibility.ext_DisconnectMode disconnectMode, ref System.Array custom)
{
if (disconnectMode != Extensibility.ext_DisconnectMode.ext_dm_HostShutdown)
{
OnBeginShutdown(ref custom);
}
applicationObject = null;
}
/// <summary>
/// Implements the OnAddInsUpdate method of the IDTExtensibility2 interface.
/// Receives notification that the collection of Add-ins has changed.
/// </summary>
/// <param term='custom'>
/// Array of parameters that are host application specific.
/// </param>
/// <seealso class='IDTExtensibility2' />
public void OnAddInsUpdate(ref System.Array custom)
{
}
/// <summary>
/// Implements the OnStartupComplete method of the IDTExtensibility2 interface.
/// Receives notification that the host application has completed loading.
/// </summary>
/// <param term='custom'>
/// Array of parameters that are host application specific.
/// </param>
/// <seealso class='IDTExtensibility2' />
///
private office.CommandBarButton btn_open_partner;
private office.CommandBarButton btn_open_document;
private office.CommandBarButton btn_open_configuration_form;
private office.CommandBars oCommandBars;
private office.CommandBar menuBar;
private office.CommandBarPopup newMenuBar;
public int countMail()
{
/*
* Gives the number of selected mail.
* returns: Number of selected mail.
*/
cnt_mail = 0;
Microsoft.Office.Interop.Outlook.Application app = null;
app = new Microsoft.Office.Interop.Outlook.Application();
foreach (var selection in app.ActiveExplorer().Selection)
{
cnt_mail = app.ActiveExplorer().Selection.Count;
}
return cnt_mail;
}
public void OnStartupComplete(ref System.Array custom)
{
/*
* When outlook is opened it loads a Menu if Outlook plugin is installed.
* OpenERP - > Push, Partner ,Documents, Configuration
*/
Microsoft.Office.Interop.Outlook.Application app = null;
try
{
app = new Microsoft.Office.Interop.Outlook.Application();
object omissing = System.Reflection.Missing.Value;
menuBar = app.ActiveExplorer().CommandBars.ActiveMenuBar;
ConfigManager config = new ConfigManager();
config.LoadConfigurationSetting();
OpenERPOutlookPlugin openerp_outlook = Cache.OpenERPOutlookPlugin;
OpenERPConnect openerp_connect = openerp_outlook.Connection;
try
{
if (openerp_connect.URL != null && openerp_connect.DBName != null && openerp_connect.UserId != null && openerp_connect.pswrd != "")
{
string decodpwd = Tools.DecryptB64Pwd(openerp_connect.pswrd);
openerp_connect.Login(openerp_connect.DBName, openerp_connect.UserId, decodpwd);
}
}
catch(Exception )
{
MessageBox.Show("Unable to connect remote Server ' " + openerp_connect.URL + " '.", "OpenERP Connection",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
}
newMenuBar = (office.CommandBarPopup)menuBar.Controls.Add(office.MsoControlType.msoControlPopup, omissing, omissing, omissing, true);
if (newMenuBar != null)
{
newMenuBar.Caption = "OpenERP";
newMenuBar.Tag = "My";
btn_open_partner = (office.CommandBarButton)newMenuBar.Controls.Add(office.MsoControlType.msoControlButton, omissing, omissing, 1, true);
btn_open_partner.Style = office.MsoButtonStyle.msoButtonIconAndCaption;
btn_open_partner.Caption = "Contact";
//Face ID will use to show the ICON in the left side of the menu.
btn_open_partner.FaceId = 3710;
newMenuBar.Visible = true;
btn_open_partner.Click += new Microsoft.Office.Core._CommandBarButtonEvents_ClickEventHandler(this.btn_open_partner_Click);
btn_open_document = (office.CommandBarButton)newMenuBar.Controls.Add(office.MsoControlType.msoControlButton, omissing, omissing, 2, true);
btn_open_document.Style = office.MsoButtonStyle.msoButtonIconAndCaption;
btn_open_document.Caption = "Documents";
//Face ID will use to show the ICON in the left side of the menu.
btn_open_document.FaceId = 258;
newMenuBar.Visible = true;
btn_open_document.Click += new Microsoft.Office.Core._CommandBarButtonEvents_ClickEventHandler(this.btn_open_document_Click);
btn_open_configuration_form = (office.CommandBarButton)newMenuBar.Controls.Add(office.MsoControlType.msoControlButton, omissing, omissing, 3, true);
btn_open_configuration_form.Style = office.MsoButtonStyle.msoButtonIconAndCaption;
btn_open_configuration_form.Caption = "Configuration";
//Face ID will use to show the ICON in the left side of the menu.
btn_open_configuration_form.FaceId = 5644;
newMenuBar.Visible = true;
btn_open_configuration_form.Click += new Microsoft.Office.Core._CommandBarButtonEvents_ClickEventHandler(this.btn_open_configuration_form_Click);
}
}
catch (Exception)
{
object oActiveExplorer;
oActiveExplorer = applicationObject.GetType().InvokeMember("ActiveExplorer", BindingFlags.GetProperty, null, applicationObject, null);
oCommandBars = (office.CommandBars)oActiveExplorer.GetType().InvokeMember("CommandBars", BindingFlags.GetProperty, null, oActiveExplorer, null);
}
}
void btn_open_configuration_form_Click(Microsoft.Office.Core.CommandBarButton Ctrl, ref bool CancelDefault)
{
frm_openerp_configuration frm_config = new frm_openerp_configuration();
frm_config.Show();
}
public static bool isLoggedIn()
{
/*
* This will check that it is connecting with server or not.
* If wrong server name or port is given then it will throw the message.
* returns true If conneted with server, otherwise False.
*/
if (Cache.OpenERPOutlookPlugin == null || Cache.OpenERPOutlookPlugin.isLoggedIn == false)
{
throw new Exception("OpenERP Server is not connected!\nPlease connect OpenERP Server from Configuration Menu.");
}
return true;
}
public static void handleException(Exception e)
{
string Title;
if (Form.ActiveForm != null)
{
Title = Form.ActiveForm.Text;
}
else
{
Title = "OpenERP Addin";
}
MessageBox.Show(e.Message, Title, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
}
public static void displayMessage(string message)
{
string Title;
if (Form.ActiveForm != null)
{
Title = Form.ActiveForm.Text;
}
else
{
Title = "OpenERP Addin";
}
MessageBox.Show(message, Title, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
public void CheckMailCount()
{
if (countMail() == 0)
{
throw new Exception("No email selected.\nPlease select one email.");
}
if (countMail() > 1)
{
throw new Exception("Multiple selction is not allowed.\nPlease select only one email.");
}
}
void btn_open_partner_Click(Microsoft.Office.Core.CommandBarButton Ctrl, ref bool CancelDefault)
{
try
{
Connect.isLoggedIn();
this.CheckMailCount();
if (countMail() == 1)
{
foreach (outlook.MailItem mailitem in Tools.MailItems())
{
Object[] contact = Cache.OpenERPOutlookPlugin.RedirectPartnerPage(mailitem);
if ((int)contact[1] > 0)
{
Cache.OpenERPOutlookPlugin.RedirectWeb(contact[2]);
}
else
{
frm_contact contact_form = new frm_contact(mailitem.SenderName, mailitem.SenderEmailAddress);
contact_form.Show();
}
}
}
}
catch (Exception e)
{
Connect.handleException(e);
}
}
void btn_open_document_Click(Microsoft.Office.Core.CommandBarButton Ctrl, ref bool CancelDefault)
{
try
{
Connect.isLoggedIn();
this.CheckMailCount();
if (countMail() == 1)
{
frm_choose_document_opt frm_doc = new frm_choose_document_opt();
}
}
catch (Exception e)
{
Connect.handleException(e);
}
}
public void OnBeginShutdown(ref System.Array custom)
{
}
private object applicationObject;
private object addInInstance;
}
}

View File

@ -0,0 +1,223 @@
/*
OpenERP, Open Source Business Applications
Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections;
using System.Linq;
using OpenERPClient;
using outlook = Microsoft.Office.Interop.Outlook;
using System.Windows.Forms;
namespace OpenERPOutlookPlugin
{
public class OpenERPOutlookPlugin : Model
{
public Boolean isLoggedIn
{
/*
* This will check that user is logged in or not and gets the value
* returns : True if loggedIn, False otherwise.
*/
get
{
if (this.Connection != null) { return this.Connection.isLoggedIn; }
return false;
}
}
public OpenERPOutlookPlugin(OpenERPConnect connection)
{
this.Connection = connection;
//this.set_server_method();
}
public Record[] SearchRecord(string name,string model)
{
/*
* Gives name and model for search record.
*/
ArrayList object_list = new ArrayList();
Model parent_model;
parent_model = new Model(model);
ArrayList args = new ArrayList();
args.Add(parent_model.model);
if (name != null)
{
args.Add(name);
}
else
{
args.Add("");
}
object[] objects = (object[])this.openerp_connect.Execute("plugin.handler", "list_document_get", args.ToArray());
foreach (object obj in objects)
{
Hashtable document = new Hashtable();
object[] names = (object[])obj;
document.Add("id", names[0].ToString());
document.Add("name", names[1].ToString());
object_list.Add(new Record(document,parent_model));
}
return (Record[])object_list.ToArray(typeof(Record));
}
public string Name_get(outlook.MailItem mail)
{
string email = Tools.GetHeader(mail);
object doc = this.openerp_connect.Execute("plugin.handler", "document_get", email);
object[] name = (object[])doc;
return name[3].ToString();
}
public void RedirectWeb(object web_url)
{
/*
* Will open the url into the web browser.
*/
System.Diagnostics.Process.Start(web_url.ToString());
}
public object[] RedirectPartnerPage(outlook.MailItem mail)
{
/*
* Will Redirect to the web-browser and open partner.
* If it will not found partner in res.partner.address (in contact) then
it will open the contact form to create a partner.
:Param outlook.MailItem mailItem : Outlook Mail item
*/
string email_id = mail.SenderEmailAddress.ToString();
Object[] contact = (Object[])this.openerp_connect.Execute("plugin.handler", "partner_get", email_id);
return contact;
}
public void Open_Document(outlook.MailItem mail)
{
/*
* To open document attached in a url.returns the model_id and res_id of the document
:Param outlook.MailItem mail: Outlook mails.
*/
string email = Tools.GetHeader(mail);
object doc = this.openerp_connect.Execute("plugin.handler", "document_get", email);
object[] url = (object[])doc;
this.RedirectWeb(url[2].ToString());
}
public Boolean PushMail(outlook.MailItem mail, string model, int thread_id)
{
/*
* This will push the mail as per the selected items from the list.
:Param outlook.MailItem mail: selected mail from the outlook.
:Param string model : Model name to push.
:Param int thread_id : Thread id of the mail.
* If mail pushed successfully then it returns true.
* return False if mail Already Exist.
*/
OpenERPOutlookPlugin openerp_outlook = Cache.OpenERPOutlookPlugin;
OpenERPConnect openerp_connect = openerp_outlook.Connection;
ArrayList args = new ArrayList();
Hashtable vals = new Hashtable();
string email = Tools.GetHeader(mail); //TODO: Outlook.MailItem Should be Converted into MIME Message
args.Add(model);
args.Add(email.ToString());
args.Add(thread_id);
Hashtable attachments = Tools.GetAttachments(mail);
args.Add(mail.Body);
args.Add(mail.HTMLBody);
args.Add(attachments);
object push_mail = this.Connection.Execute("plugin.handler", "push_message_outlook", args.ToArray());
object[] push = (object[])push_mail;
this.RedirectWeb(push[2].ToString());
return true;
}
public long CreatePartnerRecord(string name)
{
/*
* Creates a partner record in res.partner as per the name given in the plugin form.
:Param String name: Name given to create a partner in the database.
* Returns a Long value : Partner id.
*/
Record[] partenr_list = this.SearchRecord(name,"res.partner");
int partner_id = 0;
foreach (Record partner in partenr_list)
{
partner_id = Convert.ToInt16(partner.id);
}
return partner_id;
}
public void CreateContactRecord(int partner_id, string name, string email_id)
{
/*
* Creates a Contact record in the res.partner.address as per the details given in the
plugin form of openERP outlook Plugin.
:Param string partner_id : Partner id for which it creates a contact
:Param string name : Contact name
:Param string email_id : Email address
*/
Hashtable values = new Hashtable();
values.Add("name", name);
values.Add("email", email_id);
ArrayList args = new ArrayList();
args.Add(values);
args.Add(partner_id);
object[] contact = (object[])this.openerp_connect.Execute("plugin.handler", "contact_create", args.ToArray());
this.RedirectWeb(contact[2].ToString());
}
public Model[] GetMailModels()
{
/*
* function to get objects to display in combo box
* returns the Array list of models.
*/
ArrayList obj_list = new ArrayList();
object mail_models = this.Connection.Execute("plugin.handler", "document_type");
foreach (object model in (object[])mail_models)
{
Model open_model;
string[] models = (string[])model;
open_model = new Model(models[0], models[1]);
open_model.Connection = this.Connection;
obj_list.Add(open_model);
}
return (Model[])obj_list.ToArray(typeof(Model));
}
}
}

View File

@ -0,0 +1,235 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{F4B2219B-F235-400F-81B4-92F15250BBA4}</ProjectGuid>
<OutputType>Library</OutputType>
<StartupObject>
</StartupObject>
<NoStandardLibraries>false</NoStandardLibraries>
<AssemblyName>OpenERPOutlookPlugin</AssemblyName>
<RootNamespace>OpenERPOutlookPlugin</RootNamespace>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<Optimize>false</Optimize>
<OutputPath>.\bin\Debug\</OutputPath>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<WarningLevel>4</WarningLevel>
<IncrementalBuild>false</IncrementalBuild>
<RegisterForComInterop>true</RegisterForComInterop>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<Optimize>true</Optimize>
<OutputPath>.\bin\Release\</OutputPath>
<EnableUnmanagedDebugging>false</EnableUnmanagedDebugging>
<DefineConstants>TRACE</DefineConstants>
<WarningLevel>4</WarningLevel>
<IncrementalBuild>false</IncrementalBuild>
<RegisterForComInterop>true</RegisterForComInterop>
</PropertyGroup>
<ItemGroup>
<Reference Include="Extensibility, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="System">
<HintPath>System.dll</HintPath>
<Name>System</Name>
</Reference>
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data">
<HintPath>System.Data.dll</HintPath>
<Name>System.Data</Name>
</Reference>
<Reference Include="System.Drawing" />
<Reference Include="System.Net">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Web" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.XML">
<HintPath>System.XML.dll</HintPath>
<Name>System.XML</Name>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="Cache.cs" />
<Compile Include="ConfigManager.cs" />
<Compile Include="frm_contact.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frm_contact.designer.cs">
<DependentUpon>frm_contact.cs</DependentUpon>
</Compile>
<Compile Include="frm_create_doc.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frm_create_doc.Designer.cs">
<DependentUpon>frm_create_doc.cs</DependentUpon>
</Compile>
<Compile Include="frm_openerp_connection.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frm_openerp_connection.Designer.cs">
<DependentUpon>frm_openerp_connection.cs</DependentUpon>
</Compile>
<Compile Include="frm_push_mail.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frm_push_mail.designer.cs">
<DependentUpon>frm_push_mail.cs</DependentUpon>
</Compile>
<Compile Include="frm_select_partner.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frm_select_partner.Designer.cs">
<DependentUpon>frm_select_partner.cs</DependentUpon>
</Compile>
<Compile Include="frm_choose_document_opt.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frm_choose_document_opt.Designer.cs">
<DependentUpon>frm_choose_document_opt.cs</DependentUpon>
</Compile>
<Compile Include="OpenERPOutlookPlugin.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Tools.cs" />
<Compile Include="Connect.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="frm_openerp_configuration.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frm_openerp_configuration.Designer.cs">
<DependentUpon>frm_openerp_configuration.cs</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="frm_contact.resx">
<DependentUpon>frm_contact.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="frm_create_doc.resx">
<DependentUpon>frm_create_doc.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="frm_openerp_configuration.resx">
<DependentUpon>frm_openerp_configuration.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="frm_openerp_connection.resx">
<DependentUpon>frm_openerp_connection.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="frm_push_mail.resx">
<DependentUpon>frm_push_mail.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="frm_select_partner.resx">
<DependentUpon>frm_select_partner.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="frm_choose_document_opt.resx">
<DependentUpon>frm_choose_document_opt.cs</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
<ItemGroup>
<COMReference Include="Microsoft.Office.Core">
<Guid>{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}</Guid>
<VersionMajor>2</VersionMajor>
<VersionMinor>4</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
</COMReference>
<COMReference Include="Microsoft.Office.Interop.Outlook">
<Guid>{00062FFF-0000-0000-C000-000000000046}</Guid>
<VersionMajor>9</VersionMajor>
<VersionMinor>3</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
</COMReference>
<COMReference Include="stdole">
<Guid>{00020430-0000-0000-C000-000000000046}</Guid>
<VersionMajor>2</VersionMajor>
<VersionMinor>0</VersionMinor>
<Lcid>0</Lcid>
<WrapperTool>primary</WrapperTool>
<Isolated>False</Isolated>
</COMReference>
</ItemGroup>
<ItemGroup>
<None Include="Resources\195737_152643643962_3595480_n.jpg" />
</ItemGroup>
<ItemGroup>
<Content Include="Resources\Account.png" />
<Content Include="Resources\Archive.png" />
<Content Include="Resources\Case.png" />
<Content Include="Resources\Contact.png" />
<Content Include="Resources\Create.png" />
<Content Include="Resources\developped_by.png" />
<Content Include="Resources\Error.gif" />
<Content Include="Resources\Invoice.png" />
<Content Include="Resources\logo.png" />
<Content Include="Resources\Move.gif" />
<Content Include="Resources\MoveDown.png" />
<Content Include="Resources\MoveLeft.png" />
<Content Include="Resources\openerp.png" />
<Content Include="Resources\Partner.png" />
<Content Include="Resources\perform.gif" />
<Content Include="Resources\Product.png" />
<Content Include="Resources\Project.png" />
<Content Include="Resources\Sale.png" />
<Content Include="Resources\Search.gif" />
<Content Include="Resources\settings.png" />
<Content Include="Resources\Success.gif" />
<Content Include="Resources\Task.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenERPClient\OpenERPClient.csproj">
<Project>{8E62B8DF-E3A2-4429-A820-FB8A31C2EB00}</Project>
<Name>OpenERPClient</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSHARP.Targets" />
<PropertyGroup>
<PreBuildEvent>
</PreBuildEvent>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<ProjectExtensions>
<VisualStudio>
</VisualStudio>
</ProjectExtensions>
</Project>

View File

@ -0,0 +1,12 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<StartWorkingDirectory>C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\</StartWorkingDirectory>
<StartProgram>C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe</StartProgram>
<StartAction>Program</StartAction>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<StartWorkingDirectory>C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\</StartWorkingDirectory>
<StartProgram>C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe</StartProgram>
<StartAction>Program</StartAction>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,119 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1433
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace OpenERPOutlookPlugin.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("OpenERPOutlookPlugin.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
internal static System.Drawing.Bitmap _195737_152643643962_3595480_n {
get {
object obj = ResourceManager.GetObject("195737_152643643962_3595480_n", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Archive {
get {
object obj = ResourceManager.GetObject("Archive", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Create {
get {
object obj = ResourceManager.GetObject("Create", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Error {
get {
object obj = ResourceManager.GetObject("Error", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap MoveDown {
get {
object obj = ResourceManager.GetObject("MoveDown", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap MoveLeft {
get {
object obj = ResourceManager.GetObject("MoveLeft", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Search {
get {
object obj = ResourceManager.GetObject("Search", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
internal static System.Drawing.Bitmap Success {
get {
object obj = ResourceManager.GetObject("Success", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="MoveLeft" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MoveLeft.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Archive" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Archive.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Create" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Create.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Success" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Success.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="195737_152643643962_3595480_n" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\195737_152643643962_3595480_n.jpg;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Error" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Error.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Search" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Search.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="MoveDown" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\MoveDown.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.3053
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace OpenERPOutlookPlugin.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@ -0,0 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
</SettingsFile>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 852 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 816 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 852 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 790 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 823 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 802 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 867 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,173 @@
/*
OpenERP, Open Source Business Applications
Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections;
using System.Drawing;
using System.IO;
using outlook = Microsoft.Office.Interop.Outlook;
namespace OpenERPOutlookPlugin
{
static public class Tools
{
static public outlook.MailItem[] MailItems()
{
Microsoft.Office.Interop.Outlook.Application app = null;
app = new Microsoft.Office.Interop.Outlook.Application();
ArrayList mailItems = new ArrayList();
foreach (var selection in app.ActiveExplorer().Selection)
{
if (selection is outlook.MailItem)
{
mailItems.Add((outlook.MailItem)selection);
}
}
return (outlook.MailItem[])mailItems.ToArray(typeof(outlook.MailItem));
}
static public string[] SplitURL(string url)
{
/*
* Split the url in three parts protocal host and port number.
:Param string url : url to split.
* returnts the string array which contains the protocol, host name and port number.
*/
string protocall = "";
string host = "localhost";
string port = "8069";
if (url != "")
{
string[] server = url.Split("://".ToCharArray());
protocall = server[0];
host = server[3];
port = "";
if (server.Length > 4) port = server[4];
}
return new string[] { protocall, host, port };
}
static public string JoinURL(string host, string port, bool ssl)
{
/*
* Join the url as per the host, port and protocols are given.
:Param string host : host name
:Param string port : port number
:Param boolean ssl : protocol
* reruns a string url combination of host, port and protocol.
*/
string protocall = "http";
if (ssl) protocall = "https";
string url = protocall + "://" + host;
if (port != "") url += ":" + port;
return url;
}
static public Hashtable GetAttachments(outlook.MailItem mail)
{
/*
* Gets the attachments of selected mail of outlook mail items.
:Param outlook.MailItem mail : gives the selected mail item from the outlook.
* returns the hashtable (dictionary) value of the attachemts.
*/
System.IO.FileStream inFile;
Hashtable attach = new Hashtable();
string[] strattch = new string[4];
foreach (outlook.Attachment attach1 in mail.Attachments)
{
string filename = Tools.GetAppFolderPath() + attach1.FileName;
attach1.SaveAsFile(filename);
inFile = new System.IO.FileStream(filename, System.IO.FileMode.Open, System.IO.FileAccess.Read);
byte[] datas = new Byte[inFile.Length];
long bytesRead = inFile.Read(datas, 0, (int)inFile.Length);
inFile.Close();
string fdata = System.Convert.ToBase64String(datas);
attach.Add(attach1.FileName, fdata);
strattch[0] = attach1.FileName;
System.IO.File.Delete(filename);
}
return attach;
}
static public string GetAppFolderPath()
{
/*
* Gets the path of Applicaion folder.
* returns String value of file path.
*/
string filePath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
filePath = System.IO.Path.Combine(filePath, "OpenERPOutlook");
if (!Directory.Exists(filePath))
{
Directory.CreateDirectory(filePath);
}
return filePath;
}
static public string GetMessageId(outlook.MailItem mail)
{
var propertyAccessor = mail.PropertyAccessor;
string message_id = propertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x1035001E").ToString();
return message_id;
}
static public string GetHeader(outlook.MailItem mail)
{
var propertyAccessor = mail.PropertyAccessor;
//string HEADERS = propertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/string/{3f0a69e0-7f56-11d2-b536-00aa00bbb6e6}/urn:schemas:httpmail:content-disposition-type").ToString();
string HEADERS = propertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x007D001E").ToString();
return HEADERS;
}
static public string EncryptB64Pwd(string pwd)
{
/*
* Accepts the string password and encrypt it into the base64 format.
:Param string pwd : A normal string Password.
* returns the encrypted base64 passwod from the normal string value.
*/
byte[] encbuff = System.Text.Encoding.UTF8.GetBytes(pwd);
string encodepwd = Convert.ToBase64String(encbuff);
return "[" + encodepwd + "]";
}
static public string DecryptB64Pwd(string pwd)
{
/*
* Accept the base64 fromat string value and decrypt it to normal string.
:Param : string pwd : A base64 value password.
* returns the decrypted string value from the base64 value.
*/
string pswd = pwd.Substring(1, (pwd.Length - 2));
byte[] decbuff = Convert.FromBase64String(pswd);
string decodpwd = System.Text.Encoding.UTF8.GetString(decbuff);
return decodpwd;
}
}
}

View File

@ -0,0 +1,137 @@
namespace OpenERPOutlookPlugin
{
partial class frm_choose_document_opt
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frm_choose_document_opt));
this.btn_doc = new System.Windows.Forms.Button();
this.btn_cncl = new System.Windows.Forms.Button();
this.btn_push = new System.Windows.Forms.Button();
this.btn_newdoc = new System.Windows.Forms.Button();
this.lbl_docname = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// btn_doc
//
this.btn_doc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_doc.Image = global::OpenERPOutlookPlugin.Properties.Resources.Archive;
this.btn_doc.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btn_doc.Location = new System.Drawing.Point(31, 146);
this.btn_doc.Name = "btn_doc";
this.btn_doc.Size = new System.Drawing.Size(169, 32);
this.btn_doc.TabIndex = 0;
this.btn_doc.Text = "&Open an existing Document";
this.btn_doc.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btn_doc.UseVisualStyleBackColor = true;
this.btn_doc.Click += new System.EventHandler(this.btn_doc_Click);
//
// btn_cncl
//
this.btn_cncl.Anchor = System.Windows.Forms.AnchorStyles.None;
this.btn_cncl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_cncl.Image = global::OpenERPOutlookPlugin.Properties.Resources.Error;
this.btn_cncl.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btn_cncl.Location = new System.Drawing.Point(463, 146);
this.btn_cncl.Name = "btn_cncl";
this.btn_cncl.Size = new System.Drawing.Size(105, 32);
this.btn_cncl.TabIndex = 1;
this.btn_cncl.Text = "&Cancel";
this.btn_cncl.UseVisualStyleBackColor = true;
this.btn_cncl.Click += new System.EventHandler(this.btn_cncl_Click);
//
// btn_push
//
this.btn_push.Anchor = System.Windows.Forms.AnchorStyles.None;
this.btn_push.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_push.Image = ((System.Drawing.Image)(resources.GetObject("btn_push.Image")));
this.btn_push.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btn_push.Location = new System.Drawing.Point(231, 146);
this.btn_push.Name = "btn_push";
this.btn_push.Size = new System.Drawing.Size(199, 32);
this.btn_push.TabIndex = 2;
this.btn_push.Text = "P&ush to an existing Document";
this.btn_push.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btn_push.UseVisualStyleBackColor = true;
this.btn_push.Click += new System.EventHandler(this.btn_push_Click);
//
// btn_newdoc
//
this.btn_newdoc.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.btn_newdoc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_newdoc.Image = global::OpenERPOutlookPlugin.Properties.Resources.Create;
this.btn_newdoc.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btn_newdoc.Location = new System.Drawing.Point(31, 146);
this.btn_newdoc.Name = "btn_newdoc";
this.btn_newdoc.Size = new System.Drawing.Size(169, 32);
this.btn_newdoc.TabIndex = 3;
this.btn_newdoc.Text = "Create a &new Document";
this.btn_newdoc.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btn_newdoc.UseVisualStyleBackColor = true;
this.btn_newdoc.Click += new System.EventHandler(this.btn_newdoc_Click);
//
// lbl_docname
//
this.lbl_docname.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.lbl_docname.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.lbl_docname.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbl_docname.Location = new System.Drawing.Point(12, 20);
this.lbl_docname.Name = "lbl_docname";
this.lbl_docname.Size = new System.Drawing.Size(570, 94);
this.lbl_docname.TabIndex = 7;
this.lbl_docname.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// frm_choose_document_opt
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(594, 204);
this.Controls.Add(this.lbl_docname);
this.Controls.Add(this.btn_newdoc);
this.Controls.Add(this.btn_push);
this.Controls.Add(this.btn_cncl);
this.Controls.Add(this.btn_doc);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "frm_choose_document_opt";
this.Text = "Document";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btn_doc;
private System.Windows.Forms.Button btn_cncl;
private System.Windows.Forms.Button btn_push;
private System.Windows.Forms.Button btn_newdoc;
private System.Windows.Forms.Label lbl_docname;
}
}

View File

@ -0,0 +1,98 @@
/*
OpenERP, Open Source Business Applications
Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using OpenERPClient;
using outlook = Microsoft.Office.Interop.Outlook;
using System.Collections;
namespace OpenERPOutlookPlugin
{
public partial class frm_choose_document_opt : Form
{
public frm_choose_document_opt()
{
InitializeComponent();
try
{
foreach (outlook.MailItem mail in Tools.MailItems())
{
string name_get = Cache.OpenERPOutlookPlugin.Name_get(mail);
this.Show();
if (name_get != "")
{
lbl_docname.Text = name_get;
btn_newdoc.Visible = false;
}
else
{
lbl_docname.Text = mail.Subject;
btn_doc.Visible = false;
}
}
}
catch (Exception ex)
{
Connect.handleException(ex);
}
}
private void btn_doc_Click(object sender, EventArgs e)
{
foreach (outlook.MailItem mailitem in Tools.MailItems())
{
Cache.OpenERPOutlookPlugin.Open_Document(mailitem);
}
this.Close();
}
private void btn_push_Click(object sender, EventArgs e)
{
frm_push_mail frm_push_mail = new frm_push_mail();
frm_push_mail.Show();
this.Close();
}
private void btn_cncl_Click(object sender, EventArgs e)
{
this.Close();
}
private void btn_newdoc_Click(object sender, EventArgs e)
{
frm_create_doc create_doc = new frm_create_doc();
create_doc.Show();
this.Close();
}
}
}

View File

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btn_push.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
R0lGODlhEAAQAIMAAG3E8G2t10a17BaL0ymp6kq78SB7uHa75UCr4zSi4R12sxZmpTy08B6Z3n7J8AAA
ACH/C05FVFNDQVBFMi4wAwEBAAAh+QQBAAAPACwAAAAAEAAQAAAIZwAfCBxIsKDBgwgHBjCQsKCBAwwb
CjQAAEBEggsNaNQIgIBFhwEOiHTgQAABBg4uPjAQYMCABgROFiggIOVAli9lzhQgAMGCmwcSIBAwc6dP
jAqSKqV5tKGCnj8lPo0qMQBViVizBgQAOw==
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAACAgICAAAAKwAAAGw8PDykT09Pu1BQULpAQEChAAAAYgAAAB0AAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAFBQUNAAAAanFxcdygoaH/l5eX/5OTk/+ZmJj/o6Kj/6alpv93d3jbCAgIVwkJ
CQMAAAAAAAAAAAAAAAAHBwcKIyQkhLCwr/2IiIv+Q0NH/zc4PP9KSlD/b29w/3l5eP+VlJX/srKy/rCw
sf87OztxEBAQAgAAAAD///8ADQ0NYMfGxf5lZXv+BwdS/hISdv8MDGb/EBBw/wgIUf8rK0D/X19g/4yM
jP7CwsL+xsbG/ywsLEYAAAAAAAAAFqioqdykpLn+ERGH/hsbo/8vMEj/srK5/4OEpP8cHJr/GRmh/w8P
Qv9RUVP/nJuc/trZ2f69vb7aAAAAAiQkI1D49/X/YWGp/yUlzv8WFo3/bW1w/9vb2//x8O//oqPH/yUl
xv8jI87/Dw9C/2loaP/Ly8v/8vLy/3FxcD2jo6OR/////1tbyf8uLuf/HByh/2VlaP/e3t7//f39////
//9dXc//LS3n/yIi0f8rKzj/pqal//7+/v/W1taEycnJqv////9wcOX/ODj3/ygoz/9ERE3/xMTE//v7
+//+/v//09Pz/zMz8v80NPn/EBBx/4KCgf/09PT/7e3to9bW1qn/////oqL6/0JC//9BQf//Hx9G/5aW
lP/u7u7///////////9MTPf/Ojr8/yIivv9hYWv/7u7u//X19aTY2NmI//////Hx/P84OPD/QED7/xkZ
kf9iYmb/xcXF//r6+v//////fX3n/zc3+/8pKdz/WVlm//Pz8//6+vmIvb29O//////////+jIzV/zMz
6P8rK+H/KChP/4yMiv/X19f/+Pj4/42Nyf8pKev/ICDN/3JygP7/////9/f3PgAAAAD5+fnd/////v//
//9SUqn/JCTH/xUVmv9SUmn/pqaj/8nJxv9LS4H/Hh7P/w4Oj/7KytH+/v7+5QAAAAAAAAAA5OTkNP//
///+/v7//////2Fhkv8PD4T/DQ1//yYmXP8xMVz/DAyA/xAQmf9iYob///////z8/DsAAAAAAAAAAAAA
AAD8/Pxc/v7+//7+/v7////+xcXL/0xMbP8ICEf/AAA+/xISS/6AgJD+//////7+/mgAAAAAAAAAAAAA
AAAAAAAAAAAAAPv7+zX+/v7m//////7+/v/////+/////v//////////////7P7+/j4AAAAA+fn5AAAA
AAAAAAAAAAAAAAAAAAD///8AAAAAAP7+/kj+/v6S/v7+s/7+/rT+/v6U/v7+TQAAAAAAAAAAAAAAAAAA
AAAAAAAA/D8AAPAPAADABwAAwAMAAIABAACAAQAAAAAAAAAAAAAAAAAAAAAAAIABAACAAQAAwAMAAOAH
AADwDwAA/D8AAA==
</value>
</data>
</root>

View File

@ -0,0 +1,77 @@
/*
OpenERP, Open Source Business Applications
Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections;
using System.Windows.Forms;
using OpenERPClient;
namespace OpenERPOutlookPlugin
{
public partial class frm_contact : Form
{
public frm_contact()
{
InitializeComponent();
}
public frm_contact(string contact_name, string email_id)
{
InitializeComponent();
txt_contactname_create_contact.Text = contact_name;
txtemail.Text = email_id;
}
private void btncancel_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnCreate_partner_Click(object sender, EventArgs e)
{
try
{
Cache.OpenERPOutlookPlugin.CreateContactRecord(0, txt_contactname_create_contact.Text, txtemail.Text);
this.Close();
}
catch (Exception ex)
{
Connect.handleException(ex);
}
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnLink_partner_Click(object sender, EventArgs e)
{
frm_select_partner select_partner = new frm_select_partner();
select_partner.parent_form = this;
select_partner.Show();
this.Close();
}
}
}

View File

@ -0,0 +1,166 @@
namespace OpenERPOutlookPlugin
{
partial class frm_contact
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frm_contact));
this.btnCancel = new System.Windows.Forms.Button();
this.btnCreate_partner = new System.Windows.Forms.Button();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txtemail = new System.Windows.Forms.TextBox();
this.lblemail = new System.Windows.Forms.Label();
this.txt_contactname_create_contact = new System.Windows.Forms.TextBox();
this.lblname = new System.Windows.Forms.Label();
this.btnLink_partner = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// btnCancel
//
this.btnCancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnCancel.Image = global::OpenERPOutlookPlugin.Properties.Resources.Error;
this.btnCancel.ImageAlign = System.Drawing.ContentAlignment.BottomLeft;
this.btnCancel.Location = new System.Drawing.Point(306, 127);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(70, 23);
this.btnCancel.TabIndex = 14;
this.btnCancel.Text = "&Cancel ";
this.btnCancel.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
//
// btnCreate_partner
//
this.btnCreate_partner.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnCreate_partner.Image = global::OpenERPOutlookPlugin.Properties.Resources.Success;
this.btnCreate_partner.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.btnCreate_partner.Location = new System.Drawing.Point(189, 127);
this.btnCreate_partner.Name = "btnCreate_partner";
this.btnCreate_partner.Size = new System.Drawing.Size(109, 23);
this.btnCreate_partner.TabIndex = 15;
this.btnCreate_partner.Text = "Create &Partner";
this.btnCreate_partner.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.btnCreate_partner.UseVisualStyleBackColor = true;
this.btnCreate_partner.Click += new System.EventHandler(this.btnCreate_partner_Click);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.txtemail);
this.groupBox1.Controls.Add(this.lblemail);
this.groupBox1.Controls.Add(this.txt_contactname_create_contact);
this.groupBox1.Controls.Add(this.lblname);
this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox1.Location = new System.Drawing.Point(12, 9);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(369, 110);
this.groupBox1.TabIndex = 16;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Address Detail";
//
// txtemail
//
this.txtemail.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txtemail.Location = new System.Drawing.Point(97, 66);
this.txtemail.Name = "txtemail";
this.txtemail.Size = new System.Drawing.Size(255, 20);
this.txtemail.TabIndex = 35;
//
// lblemail
//
this.lblemail.AutoSize = true;
this.lblemail.Location = new System.Drawing.Point(59, 69);
this.lblemail.Name = "lblemail";
this.lblemail.Size = new System.Drawing.Size(41, 13);
this.lblemail.TabIndex = 34;
this.lblemail.Text = "Email:";
//
// txt_contactname_create_contact
//
this.txt_contactname_create_contact.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_contactname_create_contact.Location = new System.Drawing.Point(97, 26);
this.txt_contactname_create_contact.Name = "txt_contactname_create_contact";
this.txt_contactname_create_contact.Size = new System.Drawing.Size(255, 20);
this.txt_contactname_create_contact.TabIndex = 33;
//
// lblname
//
this.lblname.AutoSize = true;
this.lblname.Location = new System.Drawing.Point(9, 29);
this.lblname.Name = "lblname";
this.lblname.Size = new System.Drawing.Size(91, 13);
this.lblname.TabIndex = 27;
this.lblname.Text = "Contact Name:";
//
// btnLink_partner
//
this.btnLink_partner.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnLink_partner.Image = global::OpenERPOutlookPlugin.Properties.Resources.Search;
this.btnLink_partner.ImageAlign = System.Drawing.ContentAlignment.BottomLeft;
this.btnLink_partner.Location = new System.Drawing.Point(63, 127);
this.btnLink_partner.Name = "btnLink_partner";
this.btnLink_partner.Size = new System.Drawing.Size(118, 23);
this.btnLink_partner.TabIndex = 19;
this.btnLink_partner.Text = "&Link To Partner";
this.btnLink_partner.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.btnLink_partner.UseVisualStyleBackColor = true;
this.btnLink_partner.Click += new System.EventHandler(this.btnLink_partner_Click);
//
// frm_contact
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(394, 159);
this.Controls.Add(this.btnLink_partner);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.btnCreate_partner);
this.Controls.Add(this.btnCancel);
this.Cursor = System.Windows.Forms.Cursors.Default;
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "frm_contact";
this.Text = "Create Contact";
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btnCancel;
private System.Windows.Forms.Button btnCreate_partner;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox txt_contactname_create_contact;
private System.Windows.Forms.Label lblname;
private System.Windows.Forms.TextBox txtemail;
private System.Windows.Forms.Label lblemail;
private System.Windows.Forms.Button btnLink_partner;
}
}

View File

@ -0,0 +1,180 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAAAAEAGACoDAAAFgAAACgAAAAgAAAAQAAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAxO+0UHsorMtUkJMo6LOY5JN81HsdDLM4/JMdINcBISKJCSpA+RpM9SJo6RJsxPJg2PJ84PKU4OadA
Pbs7L8lANd8qJNUiJtIZKModMNcUJOIUHu0iJvsaIOUaJsQuQMkXHNcvNOciJsstLNAvItJSQekqG6xQ
QchYSNKOg/3Cw//Q2f/P1f/S2P/T3P/R2P+iqP+7vv9vct8zM6k0Lbg6NcwcGroyN9oiLs4eLdccKOQg
KvMkKfYaIuEbJsgnOMkdGuUeHd4+PeseHLxAONI9N7p4edSzt//W1v/k4//h6P/f5v/Dw/+2tf+1t/+0
tv/Kzv/Y3f/S1f/U2P/Fyf8iKJlOVNMtM8IuM9UjKtgdJd0aI98bJN8nMOUqNN8dKc0pIPMnIOUvK9g5
N8w4NLWGiObR4P/k9//k7//K0/+JkeRWW8I5N78uKcAvLL4wMrxCR8hTWNKOlP/a4v/Z4//W4v+Ai+cx
OaooKr4mJ88sLuAjKNsWIMwoMt4yOusZI9QnHO42Le8lIME+Pb2Dg+fk7//o///b9/ff8v+OnN5ET6sx
NrE3MdIyKdcvKsszNscxOL0uN7YkKqdvduPc6f/Y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EiHtsl
H9w4Ktw1K9wxL90rMd4hL9wZKdoXJdscJt4fI9k8POwnJM41MNM5NNMiGro1Lc5GQNswLbkuKrE2MLdE
O8hLPNM/L9A0JM8sIdEjIc8wNd4pNNYcKcsVHsUgJdQ0M+0uKeg1KNAuJs0oJ9EnLtkdLtkWKdgWKt0i
MOYeJ9wZGs4zLuMwJdktIdVFNuwvH9gxIdo8KdxBLd1AK9s9Jdc6H9o7IOI5H+40IO4lH+I3O/EQH8IZ
Lcg2ROQeJ88eHtYoI+QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
</root>

View File

@ -0,0 +1,127 @@
namespace OpenERPOutlookPlugin
{
partial class frm_create_doc
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frm_create_doc));
this.grp_create_bx = new System.Windows.Forms.GroupBox();
this.btn_main_close = new System.Windows.Forms.Button();
this.cmboboxcreate = new System.Windows.Forms.ComboBox();
this.btn_create_doc = new System.Windows.Forms.Button();
this.lbtypedoc = new System.Windows.Forms.Label();
this.grp_create_bx.SuspendLayout();
this.SuspendLayout();
//
// grp_create_bx
//
this.grp_create_bx.Controls.Add(this.btn_main_close);
this.grp_create_bx.Controls.Add(this.cmboboxcreate);
this.grp_create_bx.Controls.Add(this.btn_create_doc);
this.grp_create_bx.Controls.Add(this.lbtypedoc);
this.grp_create_bx.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.grp_create_bx.Location = new System.Drawing.Point(12, 12);
this.grp_create_bx.Name = "grp_create_bx";
this.grp_create_bx.Size = new System.Drawing.Size(438, 104);
this.grp_create_bx.TabIndex = 0;
this.grp_create_bx.TabStop = false;
this.grp_create_bx.Text = "Create Document";
//
// btn_main_close
//
this.btn_main_close.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_main_close.Image = global::OpenERPOutlookPlugin.Properties.Resources.Error;
this.btn_main_close.ImageAlign = System.Drawing.ContentAlignment.BottomLeft;
this.btn_main_close.Location = new System.Drawing.Point(353, 63);
this.btn_main_close.Name = "btn_main_close";
this.btn_main_close.Size = new System.Drawing.Size(63, 23);
this.btn_main_close.TabIndex = 9;
this.btn_main_close.Text = "&Close ";
this.btn_main_close.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.btn_main_close.UseVisualStyleBackColor = true;
this.btn_main_close.Click += new System.EventHandler(this.btn_main_close_Click);
//
// cmboboxcreate
//
this.cmboboxcreate.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cmboboxcreate.FormattingEnabled = true;
this.cmboboxcreate.Items.AddRange(new object[] {
""});
this.cmboboxcreate.Location = new System.Drawing.Point(127, 30);
this.cmboboxcreate.Name = "cmboboxcreate";
this.cmboboxcreate.Size = new System.Drawing.Size(289, 21);
this.cmboboxcreate.TabIndex = 6;
//
// btn_create_doc
//
this.btn_create_doc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_create_doc.Image = global::OpenERPOutlookPlugin.Properties.Resources.Archive;
this.btn_create_doc.ImageAlign = System.Drawing.ContentAlignment.BottomLeft;
this.btn_create_doc.Location = new System.Drawing.Point(279, 63);
this.btn_create_doc.Name = "btn_create_doc";
this.btn_create_doc.Size = new System.Drawing.Size(68, 23);
this.btn_create_doc.TabIndex = 5;
this.btn_create_doc.Text = "&Create ";
this.btn_create_doc.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.btn_create_doc.UseVisualStyleBackColor = true;
this.btn_create_doc.Click += new System.EventHandler(this.btn_create_doc_Click);
//
// lbtypedoc
//
this.lbtypedoc.AutoSize = true;
this.lbtypedoc.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbtypedoc.Location = new System.Drawing.Point(6, 33);
this.lbtypedoc.Name = "lbtypedoc";
this.lbtypedoc.Size = new System.Drawing.Size(119, 13);
this.lbtypedoc.TabIndex = 4;
this.lbtypedoc.Text = "Type of Document :";
//
// frm_create_doc
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(462, 135);
this.Controls.Add(this.grp_create_bx);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "frm_create_doc";
this.Text = "Create new Document";
this.grp_create_bx.ResumeLayout(false);
this.grp_create_bx.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox grp_create_bx;
private System.Windows.Forms.ComboBox cmboboxcreate;
private System.Windows.Forms.Button btn_create_doc;
private System.Windows.Forms.Label lbtypedoc;
private System.Windows.Forms.Button btn_main_close;
}
}

View File

@ -0,0 +1,79 @@
/*
OpenERP, Open Source Business Applications
Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using OpenERPClient;
namespace OpenERPOutlookPlugin
{
public partial class frm_create_doc : Form
{
public frm_create_doc()
{
InitializeComponent();
foreach (Model model in Cache.OpenERPOutlookPlugin.GetMailModels())
{
if (model.ToString() != "")
{
cmboboxcreate.Items.Add(model);
cmboboxcreate.Items.Remove("");
}
}
}
private void btn_create_doc_Click(object sender, EventArgs e)
{
try
{
if (cmboboxcreate.SelectedItem == null)
{
throw new Exception("Please select a document from the document list.");
}
else
{
frm_push_mail pushmail = new frm_push_mail();
Model model = (Model)cmboboxcreate.SelectedItem;
pushmail.push_mail(model.model, 0);
this.Close();
}
}
catch (Exception ex)
{
Connect.handleException(ex);
}
}
private void btn_main_close_Click(object sender, EventArgs e)
{
this.Close();
}
}
}

View File

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAACAgICAAAAKwAAAGw8PDykT09Pu1BQULpAQEChAAAAYgAAAB0AAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAFBQUNAAAAanFx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/v7m//////7+/v/////+/////v//////////////7P7+/j4AAAAA+fn5AAAA
AAAAAAAAAAAAAAAAAAD///8AAAAAAP7+/kj+/v6S/v7+s/7+/rT+/v6U/v7+TQAAAAAAAAAAAAAAAAAA
AAAAAAAA/D8AAPAPAADABwAAwAMAAIABAACAAQAAAAAAAAAAAAAAAAAAAAAAAIABAACAAQAAwAMAAOAH
AADwDwAA/D8AAA==
</value>
</data>
</root>

View File

@ -0,0 +1,334 @@
namespace OpenERPOutlookPlugin
{
partial class frm_openerp_configuration
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frm_openerp_configuration));
this.btn_main_close = new System.Windows.Forms.Button();
this.tbabout = new System.Windows.Forms.TabPage();
this.groupBox3 = new System.Windows.Forms.GroupBox();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.tbconfigsetting = new System.Windows.Forms.TabPage();
this.pnconfig = new System.Windows.Forms.Panel();
this.chkpwd = new System.Windows.Forms.CheckBox();
this.txt_dbname = new System.Windows.Forms.TextBox();
this.combo_config_database = new System.Windows.Forms.ComboBox();
this.btn_openerp_connect = new System.Windows.Forms.Button();
this.txt_password = new System.Windows.Forms.TextBox();
this.txt_username = new System.Windows.Forms.TextBox();
this.btn_open_server_url_form = new System.Windows.Forms.Button();
this.txt_server_config = new System.Windows.Forms.TextBox();
this.lbn_password = new System.Windows.Forms.Label();
this.lbn_username = new System.Windows.Forms.Label();
this.lbn_dbname = new System.Windows.Forms.Label();
this.lbn_server = new System.Windows.Forms.Label();
this.tb1 = new System.Windows.Forms.TabControl();
this.tbabout.SuspendLayout();
this.groupBox3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.tbconfigsetting.SuspendLayout();
this.pnconfig.SuspendLayout();
this.tb1.SuspendLayout();
this.SuspendLayout();
//
// btn_main_close
//
this.btn_main_close.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_main_close.Image = global::OpenERPOutlookPlugin.Properties.Resources.Error;
this.btn_main_close.ImageAlign = System.Drawing.ContentAlignment.BottomLeft;
this.btn_main_close.Location = new System.Drawing.Point(801, 420);
this.btn_main_close.Name = "btn_main_close";
this.btn_main_close.Size = new System.Drawing.Size(63, 23);
this.btn_main_close.TabIndex = 8;
this.btn_main_close.Text = "Close ";
this.btn_main_close.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.btn_main_close.UseVisualStyleBackColor = true;
this.btn_main_close.Click += new System.EventHandler(this.btn_main_close_Click);
//
// tbabout
//
this.tbabout.Controls.Add(this.groupBox3);
this.tbabout.Location = new System.Drawing.Point(4, 22);
this.tbabout.Name = "tbabout";
this.tbabout.Padding = new System.Windows.Forms.Padding(3);
this.tbabout.Size = new System.Drawing.Size(434, 315);
this.tbabout.TabIndex = 2;
this.tbabout.Text = "About";
this.tbabout.UseVisualStyleBackColor = true;
//
// groupBox3
//
this.groupBox3.Controls.Add(this.pictureBox1);
this.groupBox3.Controls.Add(this.richTextBox1);
this.groupBox3.Dock = System.Windows.Forms.DockStyle.Fill;
this.groupBox3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox3.Location = new System.Drawing.Point(3, 3);
this.groupBox3.Name = "groupBox3";
this.groupBox3.Size = new System.Drawing.Size(428, 309);
this.groupBox3.TabIndex = 0;
this.groupBox3.TabStop = false;
this.groupBox3.Text = "OpenERP Outlook Plugin";
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(109, 92);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(194, 50);
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;
//
// richTextBox1
//
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Location = new System.Drawing.Point(3, 16);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.ReadOnly = true;
this.richTextBox1.Size = new System.Drawing.Size(422, 290);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = resources.GetString("richTextBox1.Text");
this.richTextBox1.LinkClicked += new System.Windows.Forms.LinkClickedEventHandler(this.richTextBox1_LinkClicked);
//
// tbconfigsetting
//
this.tbconfigsetting.Controls.Add(this.pnconfig);
this.tbconfigsetting.Location = new System.Drawing.Point(4, 22);
this.tbconfigsetting.Name = "tbconfigsetting";
this.tbconfigsetting.Padding = new System.Windows.Forms.Padding(3);
this.tbconfigsetting.Size = new System.Drawing.Size(434, 315);
this.tbconfigsetting.TabIndex = 0;
this.tbconfigsetting.Text = "Configuration Settings";
this.tbconfigsetting.UseVisualStyleBackColor = true;
//
// pnconfig
//
this.pnconfig.Controls.Add(this.chkpwd);
this.pnconfig.Controls.Add(this.txt_dbname);
this.pnconfig.Controls.Add(this.combo_config_database);
this.pnconfig.Controls.Add(this.btn_openerp_connect);
this.pnconfig.Controls.Add(this.txt_password);
this.pnconfig.Controls.Add(this.txt_username);
this.pnconfig.Controls.Add(this.btn_open_server_url_form);
this.pnconfig.Controls.Add(this.txt_server_config);
this.pnconfig.Controls.Add(this.lbn_password);
this.pnconfig.Controls.Add(this.lbn_username);
this.pnconfig.Controls.Add(this.lbn_dbname);
this.pnconfig.Controls.Add(this.lbn_server);
this.pnconfig.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnconfig.Location = new System.Drawing.Point(3, 3);
this.pnconfig.Name = "pnconfig";
this.pnconfig.Size = new System.Drawing.Size(428, 309);
this.pnconfig.TabIndex = 53;
//
// chkpwd
//
this.chkpwd.AutoSize = true;
this.chkpwd.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.chkpwd.Location = new System.Drawing.Point(105, 142);
this.chkpwd.Name = "chkpwd";
this.chkpwd.Size = new System.Drawing.Size(143, 17);
this.chkpwd.TabIndex = 67;
this.chkpwd.Text = "Remember Password";
this.chkpwd.UseVisualStyleBackColor = true;
//
// txt_dbname
//
this.txt_dbname.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_dbname.Location = new System.Drawing.Point(105, 57);
this.txt_dbname.Name = "txt_dbname";
this.txt_dbname.Size = new System.Drawing.Size(269, 20);
this.txt_dbname.TabIndex = 58;
this.txt_dbname.Visible = false;
//
// combo_config_database
//
this.combo_config_database.AllowDrop = true;
this.combo_config_database.Location = new System.Drawing.Point(105, 57);
this.combo_config_database.Name = "combo_config_database";
this.combo_config_database.Size = new System.Drawing.Size(269, 21);
this.combo_config_database.TabIndex = 59;
//
// btn_openerp_connect
//
this.btn_openerp_connect.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_openerp_connect.Image = global::OpenERPOutlookPlugin.Properties.Resources.Success;
this.btn_openerp_connect.ImageAlign = System.Drawing.ContentAlignment.BottomLeft;
this.btn_openerp_connect.Location = new System.Drawing.Point(295, 137);
this.btn_openerp_connect.Name = "btn_openerp_connect";
this.btn_openerp_connect.Size = new System.Drawing.Size(79, 23);
this.btn_openerp_connect.TabIndex = 62;
this.btn_openerp_connect.Text = "C&onnect ";
this.btn_openerp_connect.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.btn_openerp_connect.UseVisualStyleBackColor = true;
this.btn_openerp_connect.Click += new System.EventHandler(this.btn_openerp_connect_Click);
//
// txt_password
//
this.txt_password.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_password.Location = new System.Drawing.Point(105, 111);
this.txt_password.Name = "txt_password";
this.txt_password.PasswordChar = '*';
this.txt_password.Size = new System.Drawing.Size(269, 20);
this.txt_password.TabIndex = 61;
//
// txt_username
//
this.txt_username.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_username.Location = new System.Drawing.Point(105, 84);
this.txt_username.Name = "txt_username";
this.txt_username.Size = new System.Drawing.Size(269, 20);
this.txt_username.TabIndex = 60;
//
// btn_open_server_url_form
//
this.btn_open_server_url_form.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_open_server_url_form.Image = global::OpenERPOutlookPlugin.Properties.Resources.Search;
this.btn_open_server_url_form.ImageAlign = System.Drawing.ContentAlignment.BottomLeft;
this.btn_open_server_url_form.Location = new System.Drawing.Point(299, 28);
this.btn_open_server_url_form.Name = "btn_open_server_url_form";
this.btn_open_server_url_form.Size = new System.Drawing.Size(75, 23);
this.btn_open_server_url_form.TabIndex = 57;
this.btn_open_server_url_form.Text = "C&hange ";
this.btn_open_server_url_form.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.btn_open_server_url_form.UseVisualStyleBackColor = true;
this.btn_open_server_url_form.Click += new System.EventHandler(this.btn_open_server_url_form_Click);
//
// txt_server_config
//
this.txt_server_config.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_server_config.Location = new System.Drawing.Point(105, 30);
this.txt_server_config.Name = "txt_server_config";
this.txt_server_config.ReadOnly = true;
this.txt_server_config.Size = new System.Drawing.Size(186, 20);
this.txt_server_config.TabIndex = 56;
this.txt_server_config.TabStop = false;
this.txt_server_config.TextChanged += new System.EventHandler(this.txt_server_config_TextChanged);
//
// lbn_password
//
this.lbn_password.AutoSize = true;
this.lbn_password.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbn_password.Location = new System.Drawing.Point(33, 114);
this.lbn_password.Name = "lbn_password";
this.lbn_password.Size = new System.Drawing.Size(69, 13);
this.lbn_password.TabIndex = 66;
this.lbn_password.Text = "Password :";
//
// lbn_username
//
this.lbn_username.AutoSize = true;
this.lbn_username.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbn_username.Location = new System.Drawing.Point(34, 86);
this.lbn_username.Name = "lbn_username";
this.lbn_username.Size = new System.Drawing.Size(71, 13);
this.lbn_username.TabIndex = 65;
this.lbn_username.Text = "Username :";
//
// lbn_dbname
//
this.lbn_dbname.AutoSize = true;
this.lbn_dbname.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbn_dbname.Location = new System.Drawing.Point(34, 57);
this.lbn_dbname.Name = "lbn_dbname";
this.lbn_dbname.Size = new System.Drawing.Size(69, 13);
this.lbn_dbname.TabIndex = 64;
this.lbn_dbname.Text = "Database :";
//
// lbn_server
//
this.lbn_server.AutoSize = true;
this.lbn_server.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbn_server.Location = new System.Drawing.Point(34, 30);
this.lbn_server.Name = "lbn_server";
this.lbn_server.Size = new System.Drawing.Size(72, 13);
this.lbn_server.TabIndex = 63;
this.lbn_server.Text = "Server :";
//
// tb1
//
this.tb1.Controls.Add(this.tbconfigsetting);
this.tb1.Controls.Add(this.tbabout);
this.tb1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tb1.Location = new System.Drawing.Point(0, 0);
this.tb1.Name = "tb1";
this.tb1.SelectedIndex = 0;
this.tb1.Size = new System.Drawing.Size(442, 341);
this.tb1.TabIndex = 40;
this.tb1.Tag = "";
//
// frm_openerp_configuration
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(442, 341);
this.Controls.Add(this.btn_main_close);
this.Controls.Add(this.tb1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "frm_openerp_configuration";
this.Text = "OpenERP Configuration";
this.Load += new System.EventHandler(this.frm_openerp_configuration_Load);
this.tbabout.ResumeLayout(false);
this.groupBox3.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.tbconfigsetting.ResumeLayout(false);
this.pnconfig.ResumeLayout(false);
this.pnconfig.PerformLayout();
this.tb1.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btn_main_close;
private System.Windows.Forms.TabPage tbabout;
private System.Windows.Forms.GroupBox groupBox3;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.TabPage tbconfigsetting;
private System.Windows.Forms.Panel pnconfig;
private System.Windows.Forms.CheckBox chkpwd;
private System.Windows.Forms.TextBox txt_dbname;
private System.Windows.Forms.ComboBox combo_config_database;
private System.Windows.Forms.Button btn_openerp_connect;
private System.Windows.Forms.TextBox txt_password;
private System.Windows.Forms.TextBox txt_username;
private System.Windows.Forms.Button btn_open_server_url_form;
private System.Windows.Forms.TextBox txt_server_config;
private System.Windows.Forms.Label lbn_password;
private System.Windows.Forms.Label lbn_username;
private System.Windows.Forms.Label lbn_dbname;
private System.Windows.Forms.Label lbn_server;
private System.Windows.Forms.TabControl tb1;
}
}

View File

@ -0,0 +1,216 @@
/*
OpenERP, Open Source Business Applications
Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Diagnostics;
using OpenERPClient;
namespace OpenERPOutlookPlugin
{
public partial class frm_openerp_configuration : Form
{
public string combodb_val;
public string url;
private ConfigManager config_manager;
public frm_openerp_configuration()
{
InitializeComponent();
}
void load_dbname_list()
{
combo_config_database.Items.Clear();
OpenERPOutlookPlugin openerp_outlook = Cache.OpenERPOutlookPlugin;
OpenERPConnect openerp_connect = openerp_outlook.Connection;
try
{
if (openerp_connect.URL != null && openerp_connect.URL != "")
{
object[] res_dblist = openerp_connect.DBList();
foreach (var selection in res_dblist)
{
combo_config_database.Items.Add(selection);
}
}
}
catch
{
this.setdblist(openerp_connect.DBName);
}
}
public void setdblist(string dbname)
{
txt_dbname.Visible = true;
txt_dbname.Text = dbname;
combo_config_database.Visible = false;
}
private void frm_openerp_configuration_Load(object sender, EventArgs e)
{
try
{
this.config_manager = new ConfigManager();
this.config_manager.LoadConfigurationSetting();
OpenERPOutlookPlugin openerp_outlook = Cache.OpenERPOutlookPlugin;
OpenERPConnect openerp_connect = openerp_outlook.Connection;
if (this.txt_server_config.Text != "")
{
openerp_connect.URL = this.txt_server_config.Text;
}
if (openerp_connect.rempwd == true)
{
this.txt_password.Text = Tools.DecryptB64Pwd(openerp_connect.pswrd);
this.chkpwd.Checked = true;
}
if (openerp_connect.URL != null)
{
this.txt_server_config.Text = openerp_connect.URL;
this.txt_username.Text = openerp_connect.UserId;
try
{
object[] res_dblist = openerp_connect.DBList();
foreach (string selection in res_dblist)
{
if (openerp_connect.DBName != "" && selection == openerp_connect.DBName)
this.combo_config_database.SelectedText = openerp_connect.DBName;
}
this.load_dbname_list();
}
catch
{
this.setdblist(openerp_connect.DBName);
}
}
}
catch(Exception ex)
{
Connect.handleException(ex);
}
}
private void btn_main_close_Click(object sender, EventArgs e)
{
this.Close();
}
private void btn_openerp_connect_Click(object sender, EventArgs e)
{
try
{
url = txt_server_config.Text;
string dbname;
if (txt_dbname.Visible == true)
{
dbname = txt_dbname.Text;
}
else
{
dbname = combo_config_database.Text;
}
OpenERPOutlookPlugin openerp_outlook = Cache.OpenERPOutlookPlugin;
OpenERPConnect openerp_connect = openerp_outlook.Connection;
openerp_connect.URL = url;
openerp_connect.DBName = dbname;
openerp_connect.UserId = txt_username.Text;
openerp_connect.rempwd = chkpwd.Checked;
if (chkpwd.Checked)
{
openerp_connect.pswrd = Tools.EncryptB64Pwd(txt_password.Text);
}
else
openerp_connect.pswrd = "";
if (openerp_connect.Login(openerp_connect.DBName, openerp_connect.UserId, txt_password.Text) != 0)
{
openerp_outlook.Connection = openerp_connect;
Cache.OpenERPOutlookPlugin = openerp_outlook;
this.config_manager.SaveConfigurationSetting();
Connect.displayMessage("Successfully login to OpenERP.");
this.Close();
}
}
catch (Exception)
{
MessageBox.Show("Authentication Error!\nInvalid Database.", Form.ActiveForm.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
private void btn_open_server_url_form_Click(object sender, EventArgs e)
{
frm_openerp_connection openerp_connection = new frm_openerp_connection(this.txt_server_config);
openerp_connection.Show();
}
private void txt_server_config_TextChanged(object sender, EventArgs e)
{
try
{
OpenERPOutlookPlugin openerp_outlook = Cache.OpenERPOutlookPlugin;
OpenERPConnect openerp_connect = openerp_outlook.Connection;
openerp_connect.URL = txt_server_config.Text;
this.combo_config_database.Text = "";
this.txt_dbname.Text = "";
try
{
openerp_connect.DBList();
this.load_dbname_list();
if (txt_dbname.Visible)
txt_dbname.Visible = false;
combo_config_database.Visible = true;
}
catch
{
if (combo_config_database.Visible)
combo_config_database.Visible = false;
this.txt_dbname.Visible = true;
}
this.txt_username.Text = "";
this.txt_password.Text = "";
}
catch (Exception ex)
{
Connect.handleException(ex);
}
}
private void richTextBox1_LinkClicked(object sender, LinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("http://www.openerp.com",e.LinkText);
}
}
}

View File

@ -0,0 +1,455 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAL4AAAAuCAYAAACWEqPeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAFERJREFUeF7tnWus
VcUVx9vEL37zm59M4web1tKIzxqx1JKQlNaQ2MSm1NpGTUhpKWithlLbWqKmvtAYn41W4rsG0JJiLbX4
AIpWqYAvRLgCl/cFvPeC78d0fsP5b9eZO3P23oeDveUekp19z95rr1mz5j9r1mP25vPOuc91/3U1MOI0
APC7R1cHIw0DXdB3J/6IxMCI7PRIs27d/g5d0bvA71r8EYmBEdnprgXsxjRd4Hct/ojEQEc63f/aa65v
/jy3/eab3NYrZrltf7jK7bz9Vrd78T/d3p07vYE9tCzMypUr3WWXXebGjRvnrrvu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8bvxRrI7qC9fhrz7xnNWX4iOAFtMm9FjEU0aXRT+sbFYfDd5BNrXNOV6l6F9Mi9zqq2S142l1zfUP
9sdTxT9+v7s/Bixkh0795Tpy5NputFWsZKnfPK9+SX4zPkW/JWsrHahvnEvz+Ja4+3e3qHSoYKALfD/7
D5XB7Paj+lh2B70L/BGJgf8CyTGQGzlDYYgAAAAASUVORK5CYII=
</value>
</data>
<data name="richTextBox1.Text" xml:space="preserve">
<value>
This Outlook Plugin For OpenERP Presently (2011-Today) developed By OpenERP SA.
For More Information, Please Visit Our Website
http://www.openerp.com/
Copyright 2006-TODAY OpenERP SA ALL Rights Reserved.</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>39</value>
</metadata>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAQEAAAAEAGAAoMgAAFgAAACgAAABAAAAAgAAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAD////////////////////////////+/v7+/v79/f37+/v7+/v7+/v7+/v9/f39/f3+/v7+/v7+/v7+
/v7+/v7+/v7+/v7+/v79/f39/f39/f79/f79/f79/f7+/v79/f3+/v7////9/f38/Pz+/v7+/v7+/v7/
///+/v7+/v7+/v7+/v7+/v7////+/v7+/v7+/v79/f3+/v7+/v7+/v7/////////////////////////
///////////////////////////////////////////////+/v7////+/v719fXw8PDx8fH09PT7+/v/
///////9/f39/f39/f3+/v39/f3+/v7t7u3d3dv8/Pr///7///3///39/f78/f3u7u7q6ur8/P35+fro
6en7+/v////+/v7+/v7+/v79/f39/f3+/v7+/v7+/v7+/v7+/v79/f3////////+/v7+/v7/////////
///////////////////////////////////////////////////////////////9/f3+/v7U1NRvb29e
Xl5hYWFycnKTk5O1tbXS0tLo6Oj9/f3////////7/P/u7/7AwdRmZnS2tczV1f/S0//U1f/X2P3a2/OS
kpC3t7T////AwLqHiIP09PX+/v77+/z9/f39/f3////////+/v7+/v7+/v79/f3////7+/utra3q6ur/
///9/f3////////////////////////////////////////////////////////////////////////8
/Pz+/v6goKAAAAAAAAAAAAAAAAAAAAAHBwcoKChNTU14eHioqKayssePkeJtb+xYWvNCRMpBQok7Pa0u
MKM+QbJKTNVaW7ZPUJ55e/SrrN1wcYLMzdz////////////////////GxsaOjo78/Pz////9/f38/Pz/
//+goKAAAAC2trb////7+/v/////////////////////////////////////////////////////////
///////////////9/f3+/v7Ly8shISEAAAABAQEAAAAAAAAAAAAAAAAAAAAAAAAQEA4XFyQQEToUFVMV
FmccHFsRESAEBBcAABIHBhsQETk6O300NsQqLKJAQXw3OcdPUfWIi++5uc2urquSkpJhYWEjIyMVFRX4
+Pj////7+/v///+6uroMDAxSUlLr6+v////9/f3/////////////////////////////////////////
///////////////////////////////9/f39/f34+Phubm4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB
AQEAAAEAAAAJCQAKChEBAQAAAAAAAAAAAAEAAAABAQALCxUUFCE3OHkuMd0zNegxM50dHkATExgSEhEK
CgoCAgIAAABjY2X////6+vn////CwsITExNkZGTr6+v////9/f3+/v7/////////////////////////
///////////////////////////////////////////////+/v79/f3////S0tIqKioAAAABAQIAAAAA
AAAAAAAAAAAAAAEAAAAAAAAoKDg5O8EuL4ADAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAWFjU+P5YmJjwE
BAYAAAEAAAACAgIEBAQAAAANDRDl5eX////////GxsYSEhJra2vx8fH7+/v+/v7+/v7+/v7/////////
///////////////////////////////////////////////////////////////+/v7+/v39/f3///+4
uLQXFxgAAAEAAAAAAAEAAAAAAAAAAAASEgw1NnwyNOMjJuUpKo8GBgAAAAAAAAAAAAAAAAAAAAAAAAAA
AAABAQAAAAAAAAAAAAEBAQEAAAAAAAEAAAEAAAEPDxWBg9vu7v/IyMQPDxBnZ2f29vb7+/v9/f3+/v7+
/v7////+/v7////////////////////////////////////////////////////////////+/v7////9
/f7+/v79/f79/f25uv9BRLYiIkALCxYEBBAHBxIUFCMqK2M6PcUrLuodINclKNhoadVCQkUAAAAAAAAB
AQEBAQEAAAAAAAAAAABHR0hmZmgODg4AAAAAAAAAAAAAAAERESFDRZ0WFh8dHmtNT68TEwhiYmT7+/r+
/v79/f3+/v7+/v7////+/v7/////////////////////////////////////////////////////////
///+/v/////+/v7+/v/9/f38/P6ys/EqLdggI+QwNOI1N8ElJ6csLrQyNNQsL+khJOEaHdVDRt6ys/H/
///b29plZWUuLi4VFRUFBQUAAAAAAAAAAACWlpb///+Li4sxMTEjIyQ1NTNNTWQ1N7slKfYyNJcREQMN
DQshImOho/H5+f7//v3+/v7+/v7+/v7////+/v7/////////////////////////////////////////
///////////////////////+/v/+/v79/f79/f7ExfQzNtscINgkJ9chJNojJuIlKOQkJ+MiJd4jJtgY
G9VgYuPc3Pj////9/f3////////b29uvr6+NjY1nZ2dJSUlra2vf39/////////f39/Gxsbj4+L09P+W
mPUnKtksLuMzNFwpK3gvM+YjJt2Iiun39/3+/v7+/v7+/v7+/v7////+/v//////////////////////
///////////////////////////////+/v////7+/v/9/f79/f7p6ftKTd8ZHNclKNkkJ9olKNkkJ9gk
J9gjJtclKNgVGdZlaOTo6Pr////8/P3+/v79/f3+/v7////////////5+fno6Ojz8/P////9/f39/f3/
//////////////7+/v21t/EqLt0tMNQrL90iJdwhJNcdINiAguj7/P39/f3+/v7+/v7+/v/////+/v//
///////////////////////////////////////////////////+/v/+/v77+/3///+Bg+kUF9YmKdkk
J9kkJ9klKNolKNokJ9omKdoZHNdQU+Hf4Pn8/f79/f3+/v7+/v/////+/v7+/v79/f3+/v7+/v79/f3+
/v7+/v7+/v7+/v7+/v7+/v79/f7+/v79/f7///+/wPMgItkhJNklKNkkJ9kkJ9kYG9eIiur////7+/3+
/v7+/v/+/v////7///////////////////////////////////////////////////7+/v/9/f7////Q
0fcfItgiJdklKNokJ9klKNokJ9kkJ9kkJ9kgI9gxM9vGxvX///79/f3+/v7+/v////7////+/v7////+
/v7+/v7+/v7+/v7+/v7+/v7+/v7+/v7////////+/v/+/v7+/v78/P7///+ur/AUGNcmKdokJ9kkJ9km
KdkWGdaen+7////8/P7+/v7+/v7////+/v7/////////////////////////////////////////////
///+/v78/P3///9hY+MUF9YoK9kkJ9klKNokJ9olKNolKNokJ9kgI9mIier+/v79/f7+/v7+/v/////+
/v/////////////////////////////////////////////////////+/v7////+/v7///77+/7///9/
gekSFdYnKtkjJtgkJ9klKNoYG9fAwfT////8/P7+/v7+/v7///////7/////////////////////////
//////////////7+/v/8/P7////X1/gdINglKNkkJ9klKNokJ9klKNokJ9olKNkjJtk9P93Y2fj////+
/v7+/v7////+/v////////////////////////////////////////////////////////////////7+
/v/+/v/+/v7+/v7y8/xGSd8ZHNcmKdkjJtkmKdkhJNkxNNvi4/n////9/f7+/v7+/v7/////////////
///////////////////////+/v/////+/v78/f7///99f+gUGNYoK9okJ9klKNolKNolKNokJ9kmKdkg
I9iEhen////+/v79/f7+/v/+/v7/////////////////////////////////////////////////////
///////////+/v/////+/v/+/v78/P39/f65uvIgI9kiJdklKNkjJtknKtkcH9heYeP4+P3///79/f7+
/v7+/v7////////////////////////////////////+/v/9/f7///76+v09QN0gI9glKNolKNokJ9kk
J9olKNokJ9omKdksL9rQ0fb////8/P3+/v7+/v//////////////////////////////////////////
///////////////////////////////+/v/////+/v7+/v79/f7z8/xqbOUZHdclKNklKNojJtgmKdkg
I9iYmu3////+/v7+/v7////+/v7///////////////////////////////7+/v/9/f7////KzPUhJdgm
KdokJ9klKNolKNolKNokJ9omKdofIthYWuL///////79/f7+/v7/////////////////////////////
///////////////////////////////////////////////////+/v7////9/f/9/f3///6+vvMsL9oh
JNkkJ9okJ9kkJ9khJNg9QN3W1/f////+/v7+/v7////////////////////////////////////+/v78
/P3///+Ymu0bHtcnKtokJ9olKNolKNolKNokJ9ooK9oXGteVl+z////8/P3+/v7+/v////7/////////
///////////////////////////////////////////////////////////////////////////+/v/9
/f3+/v7v8PxiZOQeIdgkJ9klKNokJ9klKNkdINh7fej29v39/f7+/v7////+/v7/////////////////
///////////+/v7+/v7///91duccH9gnKtokJ9okJ9olKNokJ9okJ9klKNogI9nKy/X////9/f7/////
///+/v//////////////////////////////////////////////////////////////////////////
///////+/v/////9/f79/f3///+nqO8lKNkkJ9kkJ9okJ9kkJ9khJNgsL9rJyvX////+/v7+/v7/////
///////////////////////////+/v7//v7///5bXeIgI9kmKdokJ9olKNolKNokJ9olKNohJNgwM9v3
9/3///79/f7+/v//////////////////////////////////////////////////////////////////
///////////////////////////+/v/+/v79/f3///7i4vlER94iJdklKNolKNokJ9kmKNkXGdZrbuXy
8vz8/P7+/v////7////////////////////////////+/v7///729v1GSN8jJtkkJ9olKNolKNokJ9ok
J9omKdobHtdRVOD//////v7+/v7////+/v//////////////////////////////////////////////
///////////////////////////////////////////////+/v/+/v7+/v7///96fOgfItkmKdkkJ9kk
J9okJ9ohJNggI9jLy/X+/v79/f3+/v7////+/v/////////////////////+/v7///7w8Pw8P90lKNkk
J9klKNolKNolKNokJ9onKtoVGNdwc+b////9/f3+/v7/////////////////////////////////////
///////////////////////////////////////////////////////////////////+/v78/P7///+3
ufIjJtknKtkkJ9klKNokJ9knKtkTFtZuceb8/P78/P7+/v7+/v/////////////////////////9/f7/
///j5Po5O9wlKNkkJ9olKNolKNolKNokJ9ooK9oQFNaHiOr////7+/7+/v7/////////////////////
////////////////////////////////////////////////////////////////////////////////
//7+/v/9/f7////q6vo6PN0kJtkkJ9olKNklKNolKNogI9kkJ9nf3/n////9/f7+/v////7/////////
///////////9/f7////e3/k2OdwkJ9kkJ9olKNolKNokJ9okJ9ooK9oSFtadnu3////7+/7+/v////7/
////////////////////////////////////////////////////////////////////////////////
///////////////////+/v/+/v7+/v7///9laOQcINgmKdokJ9olKNokJ9knKtoRFNaGiOn////7+/3+
/v7////+/v/////////////////9/f7////o6Po6PdwlKNkkJ9olKNolKNolKNokJ9onKtoTFtaipO7/
///7+/7/////////////////////////////////////////////////////////////////////////
///////////////////////////////+/v/////+/v78/P3///+am+0WGtcoK9okJ9olKNokJ9klKNoe
Idg2Odz09P3///79/f7+/v/////////////////////+/v7///7y8vw9P90lKNkkJ9klKNolKNolKNok
J9omKdoWGdewsfH////8/P7////+/v//////////////////////////////////////////////////
///////////////////////////////////////////////////////////9/f7////Cw/QeIdgmKdok
J9kkJ9klKNokJ9knKtkWGda5ufL////8/P7///////7////////////////+/v7///739/1HSt8jJtgl
KNokJ9olKNolKNokJ9omKdoZHNe/wPP////8/P7/////////////////////////////////////////
///////////////////////////////////////////////////////////////////////+/v/9/f7/
///t7fsrLtoiJdklKNokJ9okJ9kkJ9onKtoXGtZvceX////8/P3+/v7////+/v/////////////+/v7/
//7///5bXuMgI9kmKdokJ9olKNolKNokJ9omKdoWGdexsvH////8/P7/////////////////////////
////////////////////////////////////////////////////////////////////////////////
///+/v/////+/v7///7///9DRd4eIdgmKdokJ9olKNokJ9olKNohJNk5PNz09P3////9/f7/////////
///////////+/v7+/v7///9xdOYdINgmKdokJ9olKNolKNokJ9onKtoTFtaio+7////7+/7/////////
////////////////////////////////////////////////////////////////////////////////
///////////////////////////+/v7+/v7///9kZuQXGtcnKtokJ9okJ9olKNokJ9kmKdogI9jMzfX/
///8/P7+/v////7////////////+/v78/P7///+LjesaHdcnKtokJ9olKNokJ9okJ9ooK9oTFtahou7/
///7+/7////+/v7/////////////////////////////////////////////////////////////////
///////////////////////////////////////////+/v77/P3///9+f+gSFdYoK9okJ9olKNolKNok
J9onKtobHteZmu3////8/P7///7///////////////7+/v/8/P7///+ztPEeIdgnKtokJ9olKNolKNok
J9ooK9oQE9aOkOv////7+/7+/v7/////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////77+/7///+TlOwRFNYo
K9okJ9olKNolKNokJ9omKdocH9d0dub////+/v7+/v7////////////////////9/f7////h4fkmKdkm
KdokJ9klKNolKNokJ9ooK9oSFdZ6fOf////8/P3+/v7/////////////////////////////////////
///////////////////////////////////////////////////////////////////////+/v7////7
+/7///+io+8TFtYnKtokJ9okJ9olKNokJ9olKNogI9hVV+H9/f7///7+/v7////////////+/v/////+
/v7///7///5ISt8eIdgmKdokJ9okJ9okJ9onKtoXG9djZeT////+/v7+/v7/////////////////////
////////////////////////////////////////////////////////////////////////////////
///////////////8/P7///+3uPIXGtcmKdokJ9olKNolKNolKNokJ9okJ9k+Qd3x8fz///79/f7/////
///////////////+/v/7+/7///97fegWGdYnKtokJ9okJ9kkJ9omKdoeIdhFSN7///////7+/v7/////
////////////////////////////////////////////////////////////////////////////////
///////////////////////////////8/P7///+9vvIYG9cmKdokJ9olKNolKNolKNokJ9kkJ9k3Odzg
4Pn////9/f7////////////////////////8/P7////Cw/MXGtcmKdkkJ9klKNolKNolKNojJtksLtrx
8fz////9/f7////+/v//////////////////////////////////////////////////////////////
///////////////////////////////////////////////8/P7///+8vfIYG9cmKdokJ9olKNolKNol
KNokJ9olKdkwNNvQ0Pb////9/f7////////////////////+/v/9/f7///739/07Pt0dINgmKdokJ9kl
KNokJ9kmKdogI9jKy/X////8/P7///////7/////////////////////////////////////////////
///////////////////////////////////////////////////////////////8/P7///+8vfIYG9cm
KdokJ9olKNolKNolKNokJ9olKNkvMtvMzfb////9/f7////////////////+/v/////+/v77+/3///+E
hekRFNYnKtokJ9klKNokJ9ooK9oXGtebne3////8/P7+/v7////+/v//////////////////////////
///////////////////////////////////////////////////////////////////////+/v/////8
/P7///+9vvMYG9cmKdokJ9olKNolKNolKNokJ9olKNkwMtvNzvb////9/f7/////////////////////
//7+/v/9/f7////X2PcfItgiJdklKNolKNokJ9kmKdodINhpa+T////+/v7+/v7+/v//////////////
////////////////////////////////////////////////////////////////////////////////
///////////+/v/7+/7///+2t/IXGtcmKdokJ9olKNolKNolKNokJ9olKNkwMtvNzvb////9/f7/////
///////////////////+/v/+/v78/P75+v5hY+MUGNYnKtkkJ9klKNolKNojJtk/Qd3w8Pz///79/f7+
/v////7/////////////////////////////////////////////////////////////////////////
//////////////////////////7////7+/7///+jpO4TFtYnKtokJ9olKNolKNolKNokJ9olKNkvMtvN
zfX////9/f7////////////////////+/v/////+/v78/P3+/v6+vvMaHtcjJdklKNokKNokJ9knKtkl
J9m9vfP////8/P3+/v7/////////////////////////////////////////////////////////////
///////////////////////////////////////////+/v77+/3///+MjesQE9YoK9okJ9olKNolKNol
KNokJ9olKNk1N9za2vj////9/f7///////////////////////////////7+/v/8/P7t7vxWWeIXGtcm
KdkkJ9kjJtolKNkgItiAgen////+/v79/f7+/v//////////////////////////////////////////
///////////////////////////////////////////////////////////+/v79/f3///9vceUVGNYn
KtokJ9olKNolKNolKNokJ9kkKNk7Pt3t7fv///79/f7////////////////////////////////+/v79
/f7+/v60tfIiJdkjJtklKNklKNkkJ9oiJdlFR9/j4/r///79/f3+/v7///7/////////////////////
//////////////////////////////////////////////////////////////////////7////+/v7/
//7///9IS+AdINcmKdokJ9olKNolKNokJ9olKNoiJdhQUuH7+/7///7+/v7/////////////////////
//////////7+/v/+/v7+/v7s7PtgYuMcH9ckJ9kkJ9klKNolKNkmKdmoqfD////9/f39/f7////+/v//
////////////////////////////////////////////////////////////////////////////////
///////+/v79/f7////o6PopLNojJtklKNolKNolKNokJ9kkJ9omKdodINdxc+b////+/v7+/v7/////
///////////////////////+/v/////+/v7+/v7///+8vfMuMdoiJdkkJ9klKNokJ9keIdhfYePt7fv/
/v79/f3+/v//////////////////////////////////////////////////////////////////////
///////////////+/v/////+/v78/P3///+vsPEaHdcnKtokJ9klKNolKNolKNokJ9knKtobHteZm+3/
///8/P7+/v7////////////////////////////////+/v7////+/v7+/v77+/53eeceIdgmKdkkJ9kk
J9oiJdknKtm1tvL///79/f79/f/////+/v7/////////////////////////////////////////////
///////////////////////////////////+/v/+/v79/f7///9xc+YbHtgnKtokJ9olKNolKNolKNok
J9kmKdoiJdjQ0Pf////8/P7+/v////7////////////////////////////////+/v7+/v7+/v7////i
4vk8P90iJdklKNkkJ9klKNkaHddfYePv8Pz9/f7+/v/+/v7////+/v7/////////////////////////
/////////////////////////////////////////////////////v/9/f7////l5Pk3OdwkJ9klKNok
J9olKNokJ9kkJ9omKdoeIdhHSt////7///79/f7+/v//////////////////////////////////////
///+/v7+/v79/f7///+ztfEdINgoK9okJ9klKNkjJtkbHtiur/D9/f78/P7///7+/v7////+/v//////
///////////////////////////////////////////////////////////+/v/+/v7+/v79/f3///+X
mO0gI9gmKdkkJ9klKNolKNolKNokJ9koK9oUF9aNj+v////8/P7+/v/////+/v//////////////////
///////////////////////+/v7+/v79/f7///+Ag+kTFtYoK9ojJtgmKdkcH9g2Otzo6Pr///79/f7+
/v/+/v/////+/v/////////////////////////////////////////////////////////+/v/////+
/v/+/v7///7m5/pHSt8iJdklKNokJ9klKNokJ9klKNolKNojJtkkJ9nm5vr////9/f3+/v7/////////
//////////////////////////////////////7+/v/+/v/+/v7+/v7///9bXuIXGtcnKtkjJtgoK9kS
FdZjZeP7+/78/P7+/v7+/v/+/v7///7////////////////////////////////////////////////+
/v/////+/v79/f/+/v7+/v7///+PkewgJNglKNkkJ9klKNokJ9klKNokJ9knKtkTFtZ5e+f////8/P3+
/v7////+/v7////////////////////////////////////////+/v/////+/v/+/v79/f7///7u7/xJ
S+AaHdcmKdkkJ9koK9oRFNaDhOn7+/79/f79/f7+/v7+/v7+/v7////+/v//////////////////////
///////////+/v7////+/v/+/v/+/v79/f3+/v7Cw/QyNNsgI9gkJ9klKNokJ9klKNokJ9klKNoeItgr
Ltrj5Pr///79/f7///////7////////////////////////////////////////////////+/v/////+
/v7+/v78/P7///7e3vlER98aHdclKNkkJ9kmKdoWGdaOj+v29v3///79/f79/f7///7+/v7////////+
/v/////////////////+/v/////////+/v7+/v7+/v78/P3+/v7X2PhMT+AaHdclKNkkJ9olKNolKNok
J9kkJ9kkJ9kWGdecne3////8/P3+/v/+/v7/////////////////////////////////////////////
///////////+/v7////+/v7+/v79/f7+//7R0vdKTd8ZHNcmKNklJ9kkJ9kfIth6e+fs7Pv////9/f79
/f7+/v/////+/v////////////////7///7////+/v/+/v/+/v79/f77+/3////c3PlQUuEZHNclKNkk
J9kkJ9kkJ9klKNokJ9klKNkWGddjZeTx8fz+/v7+/v7+/v/////+/v//////////////////////////
///////////////////////////////+/v7////9/f7+/v79/v7+/v7Z2fhXWeIWGdYmKdklKNojJtkg
I9hWWOHIyfX///////78/P78/P79/f7+/v7+/v7+/v7+/v/+/v/+/v7+/v79/f78/P7+/v7////HyPVF
SN8bHtclKNkkJ9kkJ9klKNolKNokJ9kmKdkZHdhCRd7V1vj9/f7+/v7+/v7+/v//////////////////
//////////////////////////////////////////////////////7+/v/9/f7+/v7+/v7///7r7Ptx
c+YUF9YjJtkoK9okJ9kgI9gqLdp6fOjk5Pr///////7///78/f38/P78/P78/P78/P78/P39/f7///7/
///4+f2PkessL9sgI9glKNkkJ9kkJ9klKNolKNojJtknKtkeIdg1ONzHyPX+/v79/v7+/v7+/v7////+
/v/////////////////////////////////////////////////////////////////+/v////7+/v/+
/v7+/v7+/v78/P3///+kpe8iJtgXG9coK9omKdolKNkaHdcoK9pwcubExfT09Pz///7///7/////////
//////7////l5vqam+0+Qd0bHtgmKdkkJ9kkJ9klKNolKNokJ9kkJ9koK9oeIdgxM9vIyfX////9/f3+
/v79/f7////+/v7/////////////////////////////////////////////////////////////////
///////////+/v7////+/v7+/v79/f77+/3////h4fldX+MaHdggI9gmKdkoK9okJ9kWGtYVGNYyNdxZ
W+F9fuiUleyZmu2Vlu13eOdPUeAmKdoTFtYfItgnKtkkJ9okJ9klKNolKNokJ9olKNkmKdkaHddKTd/d
3vn////8/P3+/v7+/v////7+/v//////////////////////////////////////////////////////
///////////////////////////////+/v7////+/v7+/v7+/v78/P7///////61tvJPUeAmKdofItgi
JdkmKdknKtkfItgXG9cTF9YRFNUQE9UQE9UTFtYYG9chJdgoK9olKNokJ9klKNolKNolKNkjJtkiJdke
ItgtMNuIiur8/P3////8/P3+/v7+/v/+/v7/////////////////////////////////////////////
///////////////////////////////////////////////////+/v7////+/v/+/v/+/v79/f79/f7/
///4+P21tvJsbuU8Pt0kJ9kcH9ceIdghJNgkJ9kmKdknKtkoK9ooK9onKtomKdolKNokJ9kjJtkgI9kd
IdgcH9ghJdg7Pt11d+fT0/f////+/v78/P7+/v7+/v/+/v7////+/v//////////////////////////
///////////////////////////////////////////////////////////////////////+/v//////
///+/v7////9/f39/f7///7////9/f7T1Pepq/B8fuhVV+E5O90oK9obHtcYG9cXG9cXGtcXGtcXG9cX
GtcXGtcbHdcpLNlAQt5oauScne3V1vf///7////8/P3+/v7+/v7+/v7////////+/v//////////////
////////////////////////////////////////////////////////////////////////////////
///////////////+/v7////+/v7+/v7+/v79/f79/f7+/v7///7////5+v3l5fnU1ffCwvSurvCanO2K
jOp9fuh+f+h9f+iBg+mTleyrrPDDxfTZ2fjv7/v////////+/v79/f79/f3////+/v7////+/v7/////
////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////+/v7+/v7+/v7+/v79/f79/f39/f79/f7+
/v7////+/v77+/74+P319f319f319f329v35+f79/f7////+/v78/P79/f7+/v7+/v7+/v7+/v7/////
///+/v7/////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////+/v7////////+/v/+/v/+
/v/+/v7+/v7+/v79/f39/f79/f79/f78/P78/P78/P78/P78/P78/P79/f7+/v79/f7+/v/+/v7///7+
/v7+/v7////+/v7///////////////////////////////////////////////////8AAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
</root>

View File

@ -0,0 +1,162 @@
namespace OpenERPOutlookPlugin
{
partial class frm_openerp_connection
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frm_openerp_connection));
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.chkSSL = new System.Windows.Forms.CheckBox();
this.txt_server_port = new System.Windows.Forms.TextBox();
this.txt_server_host = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.btn_server_ok = new System.Windows.Forms.Button();
this.btn_server_close = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.chkSSL);
this.groupBox1.Controls.Add(this.txt_server_port);
this.groupBox1.Controls.Add(this.txt_server_host);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox1.Location = new System.Drawing.Point(22, 13);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(202, 123);
this.groupBox1.TabIndex = 14;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Connection Parameter";
//
// chkSSL
//
this.chkSSL.AutoSize = true;
this.chkSSL.Location = new System.Drawing.Point(15, 86);
this.chkSSL.Name = "chkSSL";
this.chkSSL.Size = new System.Drawing.Size(89, 17);
this.chkSSL.TabIndex = 19;
this.chkSSL.Text = "SSL (https)";
this.chkSSL.UseVisualStyleBackColor = true;
//
// txt_server_port
//
this.txt_server_port.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_server_port.Location = new System.Drawing.Point(58, 60);
this.txt_server_port.Name = "txt_server_port";
this.txt_server_port.Size = new System.Drawing.Size(138, 20);
this.txt_server_port.TabIndex = 18;
this.txt_server_port.Text = "8069";
//
// txt_server_host
//
this.txt_server_host.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_server_host.Location = new System.Drawing.Point(58, 34);
this.txt_server_host.Name = "txt_server_host";
this.txt_server_host.Size = new System.Drawing.Size(138, 20);
this.txt_server_host.TabIndex = 17;
this.txt_server_host.Text = "localhost";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(24, 59);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(34, 13);
this.label3.TabIndex = 16;
this.label3.Text = "Port:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 34);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(48, 13);
this.label2.TabIndex = 15;
this.label2.Text = "Server:";
//
// btn_server_ok
//
this.btn_server_ok.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_server_ok.Image = global::OpenERPOutlookPlugin.Properties.Resources.Success;
this.btn_server_ok.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.btn_server_ok.Location = new System.Drawing.Point(96, 149);
this.btn_server_ok.Name = "btn_server_ok";
this.btn_server_ok.Size = new System.Drawing.Size(49, 23);
this.btn_server_ok.TabIndex = 13;
this.btn_server_ok.Text = "&OK ";
this.btn_server_ok.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.btn_server_ok.UseVisualStyleBackColor = true;
this.btn_server_ok.Click += new System.EventHandler(this.btn_server_ok_Click);
//
// btn_server_close
//
this.btn_server_close.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_server_close.Image = global::OpenERPOutlookPlugin.Properties.Resources.Error;
this.btn_server_close.ImageAlign = System.Drawing.ContentAlignment.BottomLeft;
this.btn_server_close.Location = new System.Drawing.Point(160, 149);
this.btn_server_close.Name = "btn_server_close";
this.btn_server_close.Size = new System.Drawing.Size(64, 23);
this.btn_server_close.TabIndex = 12;
this.btn_server_close.Text = "&Close ";
this.btn_server_close.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.btn_server_close.UseVisualStyleBackColor = true;
this.btn_server_close.Click += new System.EventHandler(this.btn_server_close_Click);
//
// frm_openerp_connection
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(246, 184);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.btn_server_ok);
this.Controls.Add(this.btn_server_close);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "frm_openerp_connection";
this.Text = "OpenERP Connection";
this.Load += new System.EventHandler(this.frm_openerp_connection_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btn_server_ok;
private System.Windows.Forms.Button btn_server_close;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.CheckBox chkSSL;
private System.Windows.Forms.TextBox txt_server_port;
private System.Windows.Forms.TextBox txt_server_host;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
}
}

View File

@ -0,0 +1,79 @@
/*
OpenERP, Open Source Business Applications
Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Windows.Forms;
using OpenERPClient;
namespace OpenERPOutlookPlugin
{
public partial class frm_openerp_connection : Form
{
TextBox txtServerURL;
public frm_openerp_connection()
{
InitializeComponent();
}
public frm_openerp_connection(TextBox txt)
{
InitializeComponent();
this.txtServerURL = txt;
}
private void frm_openerp_connection_Load(object sender, EventArgs e)
{
if (this.txtServerURL.Text != "")
{
string[] url = Tools.SplitURL(this.txtServerURL.Text);
this.txt_server_port.Text = url[2];
this.txt_server_host.Text = url[1];
if (url[0] == "https")
this.chkSSL.Checked = true;
else
this.chkSSL.Checked = false;
}
}
private void btn_server_ok_Click(object sender, EventArgs e)
{
try
{
OpenERPOutlookPlugin openerp_outlook = Cache.OpenERPOutlookPlugin;
OpenERPConnect openerp_connect = openerp_outlook.Connection;
string url = Tools.JoinURL(this.txt_server_host.Text, this.txt_server_port.Text, this.chkSSL.Checked);
this.txtServerURL.Text = url;
openerp_connect.check_connectivity();
this.Close();
}
catch (Exception ex)
{
Connect.handleException(ex);
}
}
private void btn_server_close_Click(object sender, EventArgs e)
{
this.Close();
}
}
}

View File

@ -0,0 +1,180 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAAAAEAGACoDAAAFgAAACgAAAAgAAAAQAAAAAEAGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAxO+0UHsorMtUkJMo6LOY5JN81HsdDLM4/JMdINcBISKJCSpA+RpM9SJo6RJsxPJg2PJ84PKU4OadA
Pbs7L8lANd8qJNUiJtIZKModMNcUJOIUHu0iJvsaIOUaJsQuQMkXHNcvNOciJsstLNAvItJSQekqG6xQ
QchYSNKOg/3Cw//Q2f/P1f/S2P/T3P/R2P+iqP+7vv9vct8zM6k0Lbg6NcwcGroyN9oiLs4eLdccKOQg
KvMkKfYaIuEbJsgnOMkdGuUeHd4+PeseHLxAONI9N7p4edSzt//W1v/k4//h6P/f5v/Dw/+2tf+1t/+0
tv/Kzv/Y3f/S1f/U2P/Fyf8iKJlOVNMtM8IuM9UjKtgdJd0aI98bJN8nMOUqNN8dKc0pIPMnIOUvK9g5
N8w4NLWGiObR4P/k9//k7//K0/+JkeRWW8I5N78uKcAvLL4wMrxCR8hTWNKOlP/a4v/Z4//W4v+Ai+cx
OaooKr4mJ88sLuAjKNsWIMwoMt4yOusZI9QnHO42Le8lIME+Pb2Dg+fk7//o///b9/ff8v+OnN5ET6sx
NrE3MdIyKdcvKsszNscxOL0uN7YkKqdvduPc6f/Y6v/f8P/F0v9PUMg1MMc0MNY4OOQ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L9wZKdoXJdscJt4fI9k8POwnJM41MNM5NNMiGro1Lc5GQNswLbkuKrE2MLdE
O8hLPNM/L9A0JM8sIdEjIc8wNd4pNNYcKcsVHsUgJdQ0M+0uKeg1KNAuJs0oJ9EnLtkdLtkWKdgWKt0i
MOYeJ9wZGs4zLuMwJdktIdVFNuwvH9gxIdo8KdxBLd1AK9s9Jdc6H9o7IOI5H+40IO4lH+I3O/EQH8IZ
Lcg2ROQeJ88eHtYoI+QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
</root>

View File

@ -0,0 +1,77 @@
/*
OpenERP, Open Source Business Applications
Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Windows.Forms;
using OpenERPClient;
namespace OpenERPOutlookPlugin
{
public partial class frm_partner : Form
{
public frm_partner()
{
InitializeComponent();
}
public Form parent_form = null;
private void btnsave_Click(object sender, EventArgs e)
{
try
{
if (txt_create_partner.Text == "")
{
throw new Exception ("You must enter a Partner Name.");
}
else
{
Record[] partners = Cache.OpenERPOutlookPlugin.SearchPartnerByName(txt_create_partner.Text);
if (partners != null && partners.Length > 0)
{
throw new Exception("Partner already exist.");
}
else
{
frm_select_partner sel_partner = (frm_select_partner)this.parent_form;
sel_partner.SelectPartnerText = txt_create_partner.Text;
sel_partner.search_lst_partner();
this.Close();
}
}
}
catch (Exception ex)
{
Connect.handleException(ex);
}
}
private void btncncl_Click(object sender, EventArgs e)
{
this.Close();
}
}
}

View File

@ -0,0 +1,106 @@
namespace OpenERPOutlookPlugin
{
partial class frm_partner
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frm_partner));
this.txt_create_partner = new System.Windows.Forms.TextBox();
this.lablname = new System.Windows.Forms.Label();
this.btncncl = new System.Windows.Forms.Button();
this.btnsave = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// txt_create_partner
//
this.txt_create_partner.Location = new System.Drawing.Point(87, 26);
this.txt_create_partner.Name = "txt_create_partner";
this.txt_create_partner.Size = new System.Drawing.Size(185, 20);
this.txt_create_partner.TabIndex = 0;
//
// lablname
//
this.lablname.AutoSize = true;
this.lablname.Location = new System.Drawing.Point(43, 29);
this.lablname.Name = "lablname";
this.lablname.Size = new System.Drawing.Size(38, 13);
this.lablname.TabIndex = 1;
this.lablname.Text = "Name:";
//
// btncncl
//
this.btncncl.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btncncl.Image = global::OpenERPOutlookPlugin.Properties.Resources.Error;
this.btncncl.ImageAlign = System.Drawing.ContentAlignment.BottomLeft;
this.btncncl.Location = new System.Drawing.Point(205, 75);
this.btncncl.Name = "btncncl";
this.btncncl.Size = new System.Drawing.Size(67, 23);
this.btncncl.TabIndex = 3;
this.btncncl.Text = "&Cancel";
this.btncncl.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.btncncl.UseVisualStyleBackColor = true;
this.btncncl.Click += new System.EventHandler(this.btncncl_Click);
//
// btnsave
//
this.btnsave.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btnsave.Image = global::OpenERPOutlookPlugin.Properties.Resources.Success;
this.btnsave.ImageAlign = System.Drawing.ContentAlignment.TopLeft;
this.btnsave.Location = new System.Drawing.Point(139, 75);
this.btnsave.Name = "btnsave";
this.btnsave.Size = new System.Drawing.Size(60, 23);
this.btnsave.TabIndex = 2;
this.btnsave.Text = "&Save ";
this.btnsave.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.btnsave.UseVisualStyleBackColor = true;
this.btnsave.Click += new System.EventHandler(this.btnsave_Click);
//
// frm_partner
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(284, 110);
this.Controls.Add(this.btncncl);
this.Controls.Add(this.btnsave);
this.Controls.Add(this.lablname);
this.Controls.Add(this.txt_create_partner);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "frm_partner";
this.Text = "Create a new Partner";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox txt_create_partner;
private System.Windows.Forms.Label lablname;
private System.Windows.Forms.Button btnsave;
private System.Windows.Forms.Button btncncl;
}
}

View File

@ -0,0 +1,180 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAAAAEAGACoDAAAFgAAACgAAAAgAAAAQAAAAAEAGAA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
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
</root>

View File

@ -0,0 +1,149 @@
/*
OpenERP, Open Source Business Applications
Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections;
using System.Drawing;
using System.Windows.Forms;
using OpenERPClient;
using outlook = Microsoft.Office.Interop.Outlook;
namespace OpenERPOutlookPlugin
{
public partial class frm_push_mail : Form
{
public frm_push_mail()
{
InitializeComponent();
cmboboxcreate.Items.Remove("");
}
public bool push_mail(string model, int thread_id)
{
foreach (outlook.MailItem mailItem in Tools.MailItems())
{
Cache.OpenERPOutlookPlugin.PushMail(mailItem, model, thread_id);
}
return true;
}
private void btn_attach_mail_to_partner_Click(object sender, EventArgs e)
{
try
{
if (lstview_object.SelectedItems.Count <= 0)
{
throw new Exception("Plese select item from the list to push");
}
foreach (ListViewItem lv in lstview_object.SelectedItems)
{
this.push_mail(lv.SubItems[1].Name, Convert.ToInt32(lv.Name));
}
this.Close();
}
catch (Exception ex)
{
Connect.handleException(ex);
}
}
private void frm_push_mail_Load(object sender, EventArgs e)
{
try
{
Model[] document_models = Cache.OpenERPOutlookPlugin.GetMailModels();
OpenERPOutlookPlugin openerp_outlook = Cache.OpenERPOutlookPlugin;
OpenERPConnect openerp_connect = openerp_outlook.Connection;
foreach (Model model in document_models)
{
ListViewItem item = new ListViewItem();
item.Name = model.model;
item.Text = model.name;
cmboboxcreate.Items.Add(model);
}
}
catch (Exception ex)
{
Connect.handleException(ex);
}
}
private void add_item_recordlist(Record record)
{
ListViewItem item = new ListViewItem(record.name);
item.Name = record.id.ToString();
item.Text = record.name;
ListViewItem.ListViewSubItem subitem = new ListViewItem.ListViewSubItem();
subitem.Name = record.model.model;
subitem.Text = cmboboxcreate.SelectedItem.ToString();
item.SubItems.Add(subitem);
lstview_object.Items.Add(item);
}
void load_data_list()
{
lstview_object.Items.Clear();
Model model = (Model)cmboboxcreate.SelectedItem;
ArrayList condition_list = new ArrayList();
string name = null;
if (txt_doc_search.Text != "")
{
name = txt_doc_search.Text;
}
foreach (Record record in Cache.OpenERPOutlookPlugin.SearchRecord(name,model.model))
{
this.add_item_recordlist(record);
}
if (lstview_object.Items.Count <= 0)
{
Connect.displayMessage("No matching Document(s) found.");
}
lstview_object.Sort();
}
private void cmboboxcreate_SelectedIndexChanged(object sender, EventArgs e)
{
try
{
this.load_data_list();
}
catch (Exception ex)
{ Connect.handleException(ex); }
}
private void btn_search_Click(object sender, EventArgs e)
{
try
{
this.load_data_list();
}
catch
{ Connect.displayMessage("Please Enter Search Text"); }
}
}
}

View File

@ -0,0 +1,202 @@
namespace OpenERPOutlookPlugin
{
partial class frm_push_mail
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frm_push_mail));
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btn_search = new System.Windows.Forms.Button();
this.txt_doc_search = new System.Windows.Forms.TextBox();
this.lbtsrch = new System.Windows.Forms.Label();
this.cmboboxcreate = new System.Windows.Forms.ComboBox();
this.lbtypedoc = new System.Windows.Forms.Label();
this.lstview_object = new System.Windows.Forms.ListView();
this.colheadname = new System.Windows.Forms.ColumnHeader();
this.colheadmodelname = new System.Windows.Forms.ColumnHeader();
this.btn_attach_mail_to_partner = new System.Windows.Forms.Button();
this.lbldocs = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.btn_search);
this.groupBox1.Controls.Add(this.txt_doc_search);
this.groupBox1.Controls.Add(this.lbtsrch);
this.groupBox1.Controls.Add(this.cmboboxcreate);
this.groupBox1.Controls.Add(this.lbtypedoc);
this.groupBox1.Controls.Add(this.lstview_object);
this.groupBox1.Controls.Add(this.btn_attach_mail_to_partner);
this.groupBox1.Controls.Add(this.lbldocs);
this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox1.Location = new System.Drawing.Point(13, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(440, 460);
this.groupBox1.TabIndex = 3;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Link to an Existing Document";
//
// btn_search
//
this.btn_search.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_search.Image = global::OpenERPOutlookPlugin.Properties.Resources.Search;
this.btn_search.ImageAlign = System.Drawing.ContentAlignment.BottomLeft;
this.btn_search.Location = new System.Drawing.Point(364, 59);
this.btn_search.Name = "btn_search";
this.btn_search.Size = new System.Drawing.Size(70, 23);
this.btn_search.TabIndex = 15;
this.btn_search.Text = "&Search ";
this.btn_search.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.btn_search.UseVisualStyleBackColor = true;
this.btn_search.Click += new System.EventHandler(this.btn_search_Click);
//
// txt_doc_search
//
this.txt_doc_search.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.txt_doc_search.Location = new System.Drawing.Point(104, 59);
this.txt_doc_search.Name = "txt_doc_search";
this.txt_doc_search.Size = new System.Drawing.Size(254, 20);
this.txt_doc_search.TabIndex = 14;
//
// lbtsrch
//
this.lbtsrch.AutoSize = true;
this.lbtsrch.Location = new System.Drawing.Point(32, 59);
this.lbtsrch.Name = "lbtsrch";
this.lbtsrch.Size = new System.Drawing.Size(51, 13);
this.lbtsrch.TabIndex = 13;
this.lbtsrch.Text = "Search:";
//
// cmboboxcreate
//
this.cmboboxcreate.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.cmboboxcreate.FormattingEnabled = true;
this.cmboboxcreate.Items.AddRange(new object[] {
""});
this.cmboboxcreate.Location = new System.Drawing.Point(104, 24);
this.cmboboxcreate.Name = "cmboboxcreate";
this.cmboboxcreate.Size = new System.Drawing.Size(330, 21);
this.cmboboxcreate.TabIndex = 12;
this.cmboboxcreate.SelectedIndexChanged += new System.EventHandler(this.cmboboxcreate_SelectedIndexChanged);
//
// lbtypedoc
//
this.lbtypedoc.AutoSize = true;
this.lbtypedoc.Location = new System.Drawing.Point(15, 24);
this.lbtypedoc.Name = "lbtypedoc";
this.lbtypedoc.Size = new System.Drawing.Size(68, 13);
this.lbtypedoc.TabIndex = 11;
this.lbtypedoc.Text = "Document:";
//
// lstview_object
//
this.lstview_object.Alignment = System.Windows.Forms.ListViewAlignment.Default;
this.lstview_object.AllowColumnReorder = true;
this.lstview_object.BackgroundImageTiled = true;
this.lstview_object.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.colheadname,
this.colheadmodelname});
this.lstview_object.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lstview_object.FullRowSelect = true;
this.lstview_object.GridLines = true;
this.lstview_object.HideSelection = false;
this.lstview_object.Location = new System.Drawing.Point(9, 110);
this.lstview_object.Name = "lstview_object";
this.lstview_object.Size = new System.Drawing.Size(425, 299);
this.lstview_object.TabIndex = 10;
this.lstview_object.UseCompatibleStateImageBehavior = false;
this.lstview_object.View = System.Windows.Forms.View.Details;
//
// colheadname
//
this.colheadname.Text = "Name";
this.colheadname.Width = 247;
//
// colheadmodelname
//
this.colheadmodelname.Text = "Model Name";
this.colheadmodelname.Width = 400;
//
// btn_attach_mail_to_partner
//
this.btn_attach_mail_to_partner.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_attach_mail_to_partner.Image = global::OpenERPOutlookPlugin.Properties.Resources.Archive;
this.btn_attach_mail_to_partner.ImageAlign = System.Drawing.ContentAlignment.BottomLeft;
this.btn_attach_mail_to_partner.Location = new System.Drawing.Point(377, 424);
this.btn_attach_mail_to_partner.Name = "btn_attach_mail_to_partner";
this.btn_attach_mail_to_partner.Size = new System.Drawing.Size(57, 23);
this.btn_attach_mail_to_partner.TabIndex = 4;
this.btn_attach_mail_to_partner.Text = "P&ush ";
this.btn_attach_mail_to_partner.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.btn_attach_mail_to_partner.UseVisualStyleBackColor = true;
this.btn_attach_mail_to_partner.Click += new System.EventHandler(this.btn_attach_mail_to_partner_Click);
//
// lbldocs
//
this.lbldocs.AutoSize = true;
this.lbldocs.Location = new System.Drawing.Point(9, 91);
this.lbldocs.Name = "lbldocs";
this.lbldocs.Size = new System.Drawing.Size(74, 13);
this.lbldocs.TabIndex = 0;
this.lbldocs.Text = "Documents:";
//
// frm_push_mail
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(467, 484);
this.Controls.Add(this.groupBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.KeyPreview = true;
this.MaximizeBox = false;
this.Name = "frm_push_mail";
this.Text = "Push Mail";
this.Load += new System.EventHandler(this.frm_push_mail_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.ListView lstview_object;
private System.Windows.Forms.ColumnHeader colheadname;
private System.Windows.Forms.ColumnHeader colheadmodelname;
private System.Windows.Forms.Button btn_attach_mail_to_partner;
private System.Windows.Forms.Label lbldocs;
private System.Windows.Forms.ComboBox cmboboxcreate;
private System.Windows.Forms.Label lbtypedoc;
private System.Windows.Forms.Button btn_search;
private System.Windows.Forms.TextBox txt_doc_search;
private System.Windows.Forms.Label lbtsrch;
}
}

View File

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAEBAAAAEAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAACAgICAAAAKwAAAGw8PDykT09Pu1BQULpAQEChAAAAYgAAAB0AAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAFBQUNAAAAanFxcdygoaH/l5eX/5OTk/+ZmJj/o6Kj/6alpv93d3jbCAgIVwkJ
CQMAAAAAAAAAAAAAAAAHBwcKIyQkhLCwr/2IiIv+Q0NH/zc4PP9KSlD/b29w/3l5eP+VlJX/srKy/rCw
sf87OztxEBAQAgAAAAD///8ADQ0NYMfGxf5lZXv+BwdS/hISdv8MDGb/EBBw/wgIUf8rK0D/X19g/4yM
jP7CwsL+xsbG/ywsLEYAAAAAAAAAFqioqdykpLn+ERGH/hsbo/8vMEj/srK5/4OEpP8cHJr/GRmh/w8P
Qv9RUVP/nJuc/trZ2f69vb7aAAAAAiQkI1D49/X/YWGp/yUlzv8WFo3/bW1w/9vb2//x8O//oqPH/yUl
xv8jI87/Dw9C/2loaP/Ly8v/8vLy/3FxcD2jo6OR/////1tbyf8uLuf/HByh/2VlaP/e3t7//f39////
//9dXc//LS3n/yIi0f8rKzj/pqal//7+/v/W1taEycnJqv////9wcOX/ODj3/ygoz/9ERE3/xMTE//v7
+//+/v//09Pz/zMz8v80NPn/EBBx/4KCgf/09PT/7e3to9bW1qn/////oqL6/0JC//9BQf//Hx9G/5aW
lP/u7u7///////////9MTPf/Ojr8/yIivv9hYWv/7u7u//X19aTY2NmI//////Hx/P84OPD/QED7/xkZ
kf9iYmb/xcXF//r6+v//////fX3n/zc3+/8pKdz/WVlm//Pz8//6+vmIvb29O//////////+jIzV/zMz
6P8rK+H/KChP/4yMiv/X19f/+Pj4/42Nyf8pKev/ICDN/3JygP7/////9/f3PgAAAAD5+fnd/////v//
//9SUqn/JCTH/xUVmv9SUmn/pqaj/8nJxv9LS4H/Hh7P/w4Oj/7KytH+/v7+5QAAAAAAAAAA5OTkNP//
///+/v7//////2Fhkv8PD4T/DQ1//yYmXP8xMVz/DAyA/xAQmf9iYob///////z8/DsAAAAAAAAAAAAA
AAD8/Pxc/v7+//7+/v7////+xcXL/0xMbP8ICEf/AAA+/xISS/6AgJD+//////7+/mgAAAAAAAAAAAAA
AAAAAAAAAAAAAPv7+zX+/v7m//////7+/v/////+/////v//////////////7P7+/j4AAAAA+fn5AAAA
AAAAAAAAAAAAAAAAAAD///8AAAAAAP7+/kj+/v6S/v7+s/7+/rT+/v6U/v7+TQAAAAAAAAAAAAAAAAAA
AAAAAAAA/D8AAPAPAADABwAAwAMAAIABAACAAQAAAAAAAAAAAAAAAAAAAAAAAIABAACAAQAAwAMAAOAH
AADwDwAA/D8AAA==
</value>
</data>
</root>

View File

@ -0,0 +1,141 @@
namespace OpenERPOutlookPlugin
{
partial class frm_select_partner
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frm_select_partner));
this.txt_select_partner = new System.Windows.Forms.TextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.lstbox_select_partner = new System.Windows.Forms.ListBox();
this.btn_select_partner_select = new System.Windows.Forms.Button();
this.btn_select_partner_close = new System.Windows.Forms.Button();
this.btn_select_partner_search = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// txt_select_partner
//
this.txt_select_partner.Location = new System.Drawing.Point(19, 20);
this.txt_select_partner.Name = "txt_select_partner";
this.txt_select_partner.Size = new System.Drawing.Size(209, 20);
this.txt_select_partner.TabIndex = 0;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.lstbox_select_partner);
this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox1.Location = new System.Drawing.Point(13, 51);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(307, 368);
this.groupBox1.TabIndex = 7;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "Partner Name";
//
// lstbox_select_partner
//
this.lstbox_select_partner.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lstbox_select_partner.FormattingEnabled = true;
this.lstbox_select_partner.Location = new System.Drawing.Point(6, 27);
this.lstbox_select_partner.Name = "lstbox_select_partner";
this.lstbox_select_partner.Size = new System.Drawing.Size(295, 329);
this.lstbox_select_partner.TabIndex = 4;
//
// btn_select_partner_select
//
this.btn_select_partner_select.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_select_partner_select.Image = global::OpenERPOutlookPlugin.Properties.Resources.Success;
this.btn_select_partner_select.ImageAlign = System.Drawing.ContentAlignment.BottomLeft;
this.btn_select_partner_select.Location = new System.Drawing.Point(192, 432);
this.btn_select_partner_select.Name = "btn_select_partner_select";
this.btn_select_partner_select.Size = new System.Drawing.Size(53, 23);
this.btn_select_partner_select.TabIndex = 6;
this.btn_select_partner_select.Text = "&Link";
this.btn_select_partner_select.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.btn_select_partner_select.UseVisualStyleBackColor = true;
this.btn_select_partner_select.Click += new System.EventHandler(this.btn_select_partner_select_Click);
//
// btn_select_partner_close
//
this.btn_select_partner_close.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_select_partner_close.Image = global::OpenERPOutlookPlugin.Properties.Resources.Error;
this.btn_select_partner_close.ImageAlign = System.Drawing.ContentAlignment.BottomLeft;
this.btn_select_partner_close.Location = new System.Drawing.Point(251, 432);
this.btn_select_partner_close.Name = "btn_select_partner_close";
this.btn_select_partner_close.Size = new System.Drawing.Size(64, 23);
this.btn_select_partner_close.TabIndex = 5;
this.btn_select_partner_close.Text = "&Close ";
this.btn_select_partner_close.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.btn_select_partner_close.UseVisualStyleBackColor = true;
this.btn_select_partner_close.Click += new System.EventHandler(this.btn_select_partner_close_Click);
//
// btn_select_partner_search
//
this.btn_select_partner_search.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.btn_select_partner_search.Image = ((System.Drawing.Image)(resources.GetObject("btn_select_partner_search.Image")));
this.btn_select_partner_search.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btn_select_partner_search.Location = new System.Drawing.Point(245, 19);
this.btn_select_partner_search.Name = "btn_select_partner_search";
this.btn_select_partner_search.Size = new System.Drawing.Size(75, 23);
this.btn_select_partner_search.TabIndex = 1;
this.btn_select_partner_search.Text = "&Search ";
this.btn_select_partner_search.TextAlign = System.Drawing.ContentAlignment.TopRight;
this.btn_select_partner_search.UseVisualStyleBackColor = true;
this.btn_select_partner_search.Click += new System.EventHandler(this.btn_select_partner_search_Click);
//
// frm_select_partner
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(350, 467);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.btn_select_partner_select);
this.Controls.Add(this.btn_select_partner_close);
this.Controls.Add(this.btn_select_partner_search);
this.Controls.Add(this.txt_select_partner);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "frm_select_partner";
this.Text = "Select Partner";
this.Load += new System.EventHandler(this.frm_select_partner_Load);
this.groupBox1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox txt_select_partner;
private System.Windows.Forms.Button btn_select_partner_search;
private System.Windows.Forms.Button btn_select_partner_close;
private System.Windows.Forms.Button btn_select_partner_select;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.ListBox lstbox_select_partner;
}
}

View File

@ -0,0 +1,121 @@
/*
OpenERP, Open Source Business Applications
Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
using System;
using System.Collections;
using System.Windows.Forms;
using OpenERPClient;
using outlook = Microsoft.Office.Interop.Outlook;
namespace OpenERPOutlookPlugin
{
public partial class frm_select_partner : Form
{
public frm_select_partner()
{
InitializeComponent();
}
public Form parent_form = null;
private void btn_select_partner_select_Click(object sender, EventArgs e)
{
try
{
if (lstbox_select_partner.SelectedItem == null)
{
throw new Exception("Please select a partner from the list.");
}
else
{
txt_select_partner.Text = lstbox_select_partner.SelectedItem.ToString();
int partner_id = (int)Cache.OpenERPOutlookPlugin.CreatePartnerRecord(lstbox_select_partner.SelectedItem.ToString());
foreach (outlook.MailItem mailItem in Tools.MailItems())
{
Cache.OpenERPOutlookPlugin.CreateContactRecord(partner_id, mailItem.SenderName, mailItem.SenderEmailAddress);
}
this.Close();
}
}
catch (Exception ex)
{
Connect.handleException(ex);
}
}
private void btn_select_partner_close_Click(object sender, EventArgs e)
{
this.Close();
}
public void search_lst_partner()
{
/*
* Will search the list of partners as per the given search criteria.
*/
try
{
lstbox_select_partner.Items.Clear();
foreach (Record oo in Cache.OpenERPOutlookPlugin.SearchRecord(txt_select_partner.Text, "res.partner"))
{
lstbox_select_partner.Items.Add(oo.name);
}
if (lstbox_select_partner.Items.Count == 0)
{
Connect.displayMessage("No matching Partner(s) found.");
}
}
catch (Exception ex)
{
Connect.handleException(ex);
}
}
private void btn_select_partner_search_Click(object sender, EventArgs e)
{
search_lst_partner();
}
public string SelectPartnerText
{
/*
* Will gets and sets the selected partner from the list of partners.
*/
get
{
return this.txt_select_partner.Text;
}
set
{
this.txt_select_partner.Text = value;
}
}
private void frm_select_partner_Load(object sender, EventArgs e)
{
Record[] partenr_list = Cache.OpenERPOutlookPlugin.SearchRecord(null,"res.partner");
foreach (Record partner in partenr_list)
{
lstbox_select_partner.Items.Add(partner.name);
}
}
}
}

View File

@ -0,0 +1,194 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="btn_select_partner_search.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
R0lGODlhEAAQAPYAAPb29v7+/v39/fr6+t///+P//+T//9zc3IKDkfP//8X3//Pz99P//5Zxf5qqwZiZ
nc98R5K03KS83aG60bbr/8f5/7C61fX09OXm5rzx/////qzI6sr2/7TO6vr//7vt/9n//7rt/+Xl5LLm
//2rRKihla683sx6SXp/iuzs9P/+/aC4xd/w+LHl/4+ewuTk5Ih1jpKhucjh7cHAwaGepcfH2bHe+2ps
ft7f4Pz8/Ih1jZmYot7d3PPy+Nb//9T//4WJm97f38v5/8LE3cD0/8v9///pybnb8fjgv9z///////v7
+/urRnt7hLnk/9Tk86zg/5mZpn+Ajbvm//j+/7nt///aof/58f/589v//5m75dH//8P3/8L3/2trg8z8
/4uiwadtSIGMrMaAXZ6hvqKhouz///ysRbvr//39/v/XnZaotvPOmbSwtpl0hv2mOcjO5bu7vry8yd7e
7K+tsLC83ZiuzqyEacrW6P///wAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAHkALAAAAAAQABAAAAejgHmC
g4SFhoILFnYSJjUAh3lpQyw+RB9aZBeGAXBPVE5QI1wRcoY9HRxTIRVCXwoOA4VzRxQtRVkFBCArj4Qp
GxlVPwYJZgRrvYMBdTZdDAUeSjJAsYNXSHEuaFtJBnheM4QaaiR3TWJgEzE3ZTmDKkZnEA07PG00dAdL
g1hWTGMwpGDIE0CAgEJs3pzQgeIFJEElwrhBIOKhIBwPogSxyNFQIAA7
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
</value>
</data>
</root>

View File

@ -0,0 +1,988 @@
"DeployProject"
{
"VSVersion" = "3:800"
"ProjectType" = "8:{978C614F-708E-4E1A-B201-565925725DBA}"
"IsWebType" = "8:FALSE"
"ProjectName" = "8:OpenERPOutlookPluginSetup"
"LanguageId" = "3:1033"
"CodePage" = "3:1252"
"UILanguageId" = "3:1033"
"SccProjectName" = "8:"
"SccLocalPath" = "8:"
"SccAuxPath" = "8:"
"SccProvider" = "8:"
"Hierarchy"
{
"Entry"
{
"MsmKey" = "8:_6AC61E6DAA74BD8A62A56739851214E7"
"OwnerKey" = "8:_D219AD7AB7924D44B7E2945648C76CF7"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_7588D46F3D97B108090A11D1415DE5EC"
"OwnerKey" = "8:_D219AD7AB7924D44B7E2945648C76CF7"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_9BA1227571F16B6ABCB102A098A4B13F"
"OwnerKey" = "8:_6AC61E6DAA74BD8A62A56739851214E7"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_9BA1227571F16B6ABCB102A098A4B13F"
"OwnerKey" = "8:_D219AD7AB7924D44B7E2945648C76CF7"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_B66CD6B8E834B37C2AFA64398688811D"
"OwnerKey" = "8:_D219AD7AB7924D44B7E2945648C76CF7"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_B66CD6B8E834B37C2AFA64398688811D"
"OwnerKey" = "8:_7588D46F3D97B108090A11D1415DE5EC"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_D219AD7AB7924D44B7E2945648C76CF7"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_7588D46F3D97B108090A11D1415DE5EC"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_9BA1227571F16B6ABCB102A098A4B13F"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_6AC61E6DAA74BD8A62A56739851214E7"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_B66CD6B8E834B37C2AFA64398688811D"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_UNDEFINED"
"OwnerKey" = "8:_D219AD7AB7924D44B7E2945648C76CF7"
"MsmSig" = "8:_UNDEFINED"
}
}
"Configurations"
{
"Debug"
{
"DisplayName" = "8:Debug"
"IsDebugOnly" = "11:TRUE"
"IsReleaseOnly" = "11:FALSE"
"OutputFilename" = "8:Debug\\OpenERPOutlookPluginSetup.msi"
"PackageFilesAs" = "3:2"
"PackageFileSize" = "3:-2147483648"
"CabType" = "3:1"
"Compression" = "3:2"
"SignOutput" = "11:FALSE"
"CertificateFile" = "8:"
"PrivateKeyFile" = "8:"
"TimeStampServer" = "8:"
"InstallerBootstrapper" = "3:2"
"BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"
{
"Enabled" = "11:TRUE"
"PromptEnabled" = "11:TRUE"
"PrerequisitesLocation" = "2:1"
"Url" = "8:"
"ComponentsUrl" = "8:"
"Items"
{
"{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Net.Framework.3.5"
{
"Name" = "8:.NET Framework 3.5"
"ProductCode" = "8:Microsoft.Net.Framework.3.5"
}
"{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.3.1"
{
"Name" = "8:Windows Installer 3.1"
"ProductCode" = "8:Microsoft.Windows.Installer.3.1"
}
}
}
}
"Release"
{
"DisplayName" = "8:Release"
"IsDebugOnly" = "11:FALSE"
"IsReleaseOnly" = "11:TRUE"
"OutputFilename" = "8:Release\\OpenERPOutlookPluginSetup.msi"
"PackageFilesAs" = "3:2"
"PackageFileSize" = "3:-2147483648"
"CabType" = "3:1"
"Compression" = "3:2"
"SignOutput" = "11:FALSE"
"CertificateFile" = "8:"
"PrivateKeyFile" = "8:"
"TimeStampServer" = "8:"
"InstallerBootstrapper" = "3:2"
"BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"
{
"Enabled" = "11:TRUE"
"PromptEnabled" = "11:TRUE"
"PrerequisitesLocation" = "2:1"
"Url" = "8:"
"ComponentsUrl" = "8:"
"Items"
{
"{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Net.Framework.3.5"
{
"Name" = "8:.NET Framework 3.5"
"ProductCode" = "8:Microsoft.Net.Framework.3.5"
}
"{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:Microsoft.Windows.Installer.3.1"
{
"Name" = "8:Windows Installer 3.1"
"ProductCode" = "8:Microsoft.Windows.Installer.3.1"
}
}
}
}
}
"Deployable"
{
"CustomAction"
{
}
"DefaultFeature"
{
"Name" = "8:DefaultFeature"
"Title" = "8:"
"Description" = "8:"
}
"ExternalPersistence"
{
"LaunchCondition"
{
"{A06ECF26-33A3-4562-8140-9B0E340D4F24}:_BFDD92B2291E48D1A8B52DFCA8631CD4"
{
"Name" = "8:.NET Framework"
"Message" = "8:[VSDNETMSG]"
"Version" = "8:3.5.21022"
"AllowLaterVersions" = "11:FALSE"
"InstallUrl" = "8:http://go.microsoft.com/fwlink/?LinkId=76617"
}
}
}
"File"
{
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_6AC61E6DAA74BD8A62A56739851214E7"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:TRUE"
"AssemblyAsmDisplayName" = "8:Microsoft.Office.Interop.Outlook, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
"ScatterAssemblies"
{
"_6AC61E6DAA74BD8A62A56739851214E7"
{
"Name" = "8:Microsoft.Office.Interop.Outlook.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:Microsoft.Office.Interop.Outlook.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_F8355F1930014BA7AC04125197F9FCF8"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_7588D46F3D97B108090A11D1415DE5EC"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:OpenERPClient, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_7588D46F3D97B108090A11D1415DE5EC"
{
"Name" = "8:OpenERPClient.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:OpenERPClient.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_F8355F1930014BA7AC04125197F9FCF8"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_9BA1227571F16B6ABCB102A098A4B13F"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:TRUE"
"AssemblyAsmDisplayName" = "8:office, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
"ScatterAssemblies"
{
"_9BA1227571F16B6ABCB102A098A4B13F"
{
"Name" = "8:office.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:office.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_F8355F1930014BA7AC04125197F9FCF8"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
"{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_B66CD6B8E834B37C2AFA64398688811D"
{
"AssemblyRegister" = "3:1"
"AssemblyIsInGAC" = "11:FALSE"
"AssemblyAsmDisplayName" = "8:CookComputing.XmlRpcV2, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL"
"ScatterAssemblies"
{
"_B66CD6B8E834B37C2AFA64398688811D"
{
"Name" = "8:CookComputing.XmlRpcV2.dll"
"Attributes" = "3:512"
}
}
"SourcePath" = "8:CookComputing.XmlRpcV2.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_F8355F1930014BA7AC04125197F9FCF8"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:TRUE"
"IsolateTo" = "8:"
}
}
"FileType"
{
}
"Folder"
{
"{1525181F-901A-416C-8A58-119130FE478E}:_0AB219A94AD9480C8B328A36290F8500"
{
"Name" = "8:#1916"
"AlwaysCreate" = "11:FALSE"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Property" = "8:DesktopFolder"
"Folders"
{
}
}
"{1525181F-901A-416C-8A58-119130FE478E}:_BE76AEAED62647E882A7E7E462208B6C"
{
"Name" = "8:#1919"
"AlwaysCreate" = "11:FALSE"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Property" = "8:ProgramMenuFolder"
"Folders"
{
}
}
"{3C67513D-01DD-4637-8A68-80971EB9504F}:_F8355F1930014BA7AC04125197F9FCF8"
{
"DefaultLocation" = "8:[ProgramFilesFolder][Manufacturer]\\[ProductName]"
"Name" = "8:#1925"
"AlwaysCreate" = "11:FALSE"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Property" = "8:TARGETDIR"
"Folders"
{
}
}
}
"LaunchCondition"
{
}
"Locator"
{
}
"MsiBootstrapper"
{
"LangId" = "3:1033"
"RequiresElevation" = "11:FALSE"
}
"Product"
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:OpenERPOutlookPluginSetup"
"ProductCode" = "8:{DB110066-1D22-421E-AE6E-008EFC7D9BA3}"
"PackageCode" = "8:{01C16D46-10C4-4867-9DA7-158EA0851BA2}"
"UpgradeCode" = "8:{D423841B-05E6-4B05-93A7-3AF0D3F87416}"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:FALSE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:1.0.0"
"Manufacturer" = "8:OpenERP"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
"Title" = "8:OpenERPOutlookPluginSetup"
"Subject" = "8:"
"ARPCONTACT" = "8:OpenERP"
"Keywords" = "8:"
"ARPCOMMENTS" = "8:"
"ARPURLINFOABOUT" = "8:"
"ARPPRODUCTICON" = "8:"
"ARPIconIndex" = "3:0"
"SearchPath" = "8:"
"UseSystemSearchPath" = "11:TRUE"
"TargetPlatform" = "3:0"
"PreBuildEvent" = "8:"
"PostBuildEvent" = "8:"
"RunPostBuildEvent" = "3:0"
}
"Registry"
{
"HKLM"
{
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_85BD67F9F053414A885B4BD155C3503A"
{
"Name" = "8:Software"
"Condition" = "8:"
"AlwaysCreate" = "11:FALSE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_EBCD33B942DF4A239ACC7022DD3FEAA6"
{
"Name" = "8:Microsoft"
"Condition" = "8:"
"AlwaysCreate" = "11:TRUE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_5B7FCC91FAAA4F64BB7C83492A6F2AF0"
{
"Name" = "8:Office"
"Condition" = "8:"
"AlwaysCreate" = "11:TRUE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_1064D50BF01A4D51B868E982FC220247"
{
"Name" = "8:Outlook"
"Condition" = "8:"
"AlwaysCreate" = "11:TRUE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_137204EE56DC497088E348674D3D8B7F"
{
"Name" = "8:AddIns"
"Condition" = "8:"
"AlwaysCreate" = "11:TRUE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_D274EDB843AA45D79536215DBFA689AE"
{
"Name" = "8:OpenERPOutlookPlugin.Connect"
"Condition" = "8:"
"AlwaysCreate" = "11:TRUE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
}
"Values"
{
"{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_7DAB0B878C2B4AD6961544515CF9F67F"
{
"Name" = "8:LoadBehavior"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"ValueTypes" = "3:3"
"Value" = "3:3"
}
"{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_E727FA9F9AE4473B86EC5F2749DA6E00"
{
"Name" = "8:Description"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"ValueTypes" = "3:1"
"Value" = "8:OpenERP Outlook Plugin"
}
"{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_F8A784A42EA24C908396CFE4B36C9F21"
{
"Name" = "8:FriendlyName"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"ValueTypes" = "3:1"
"Value" = "8:OpenERP Outlook Plugin"
}
}
}
}
"Values"
{
}
}
}
"Values"
{
}
}
}
"Values"
{
}
}
}
"Values"
{
}
}
}
"Values"
{
}
}
}
}
"HKCU"
{
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_65C75F62BA5342D88380AD586D8CB4A2"
{
"Name" = "8:Software"
"Condition" = "8:"
"AlwaysCreate" = "11:FALSE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
}
"Values"
{
}
}
}
}
"HKCR"
{
"Keys"
{
}
}
"HKU"
{
"Keys"
{
}
}
"HKPU"
{
"Keys"
{
}
}
}
"Sequences"
{
}
"Shortcut"
{
}
"UserInterface"
{
"{DF760B10-853B-4699-99F2-AFF7185B4A62}:_05A1A869F1C748A0AA4687CF7DF17408"
{
"Name" = "8:#1902"
"Sequence" = "3:1"
"Attributes" = "3:3"
"Dialogs"
{
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_5F37EBB554844174BFF8F45DB2607A7D"
{
"Sequence" = "3:100"
"DisplayName" = "8:Finished"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdFinishedDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
"UpdateText"
{
"Name" = "8:UpdateText"
"DisplayName" = "8:#1058"
"Description" = "8:#1158"
"Type" = "3:15"
"ContextData" = "8:"
"Attributes" = "3:0"
"Setting" = "3:1"
"Value" = "8:#1258"
"DefaultValue" = "8:#1258"
"UsePlugInResources" = "11:TRUE"
}
}
}
}
}
"{DF760B10-853B-4699-99F2-AFF7185B4A62}:_2237F99549C04193ADB5655D7E6FD5B4"
{
"Name" = "8:#1901"
"Sequence" = "3:1"
"Attributes" = "3:2"
"Dialogs"
{
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_8A6734448CF54465BD37D45C0CFF5000"
{
"Sequence" = "3:100"
"DisplayName" = "8:Progress"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdProgressDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
"ShowProgress"
{
"Name" = "8:ShowProgress"
"DisplayName" = "8:#1009"
"Description" = "8:#1109"
"Type" = "3:5"
"ContextData" = "8:1;True=1;False=0"
"Attributes" = "3:0"
"Setting" = "3:0"
"Value" = "3:1"
"DefaultValue" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
}
}
}
}
"{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_4B62B60C5A10485EBB000ABEF6F8B0E1"
{
"UseDynamicProperties" = "11:FALSE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdUserInterface.wim"
}
"{DF760B10-853B-4699-99F2-AFF7185B4A62}:_7355B2D19A0B4B13A75AFF1D63E8FA4E"
{
"Name" = "8:#1900"
"Sequence" = "3:1"
"Attributes" = "3:1"
"Dialogs"
{
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_77890D6A5244491A93629AEBF7575094"
{
"Sequence" = "3:300"
"DisplayName" = "8:Confirm Installation"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdConfirmDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
}
}
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_8B76EAAF28A844BBA54D063D07BA2FF8"
{
"Sequence" = "3:200"
"DisplayName" = "8:Installation Folder"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdFolderDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
"InstallAllUsersVisible"
{
"Name" = "8:InstallAllUsersVisible"
"DisplayName" = "8:#1059"
"Description" = "8:#1159"
"Type" = "3:5"
"ContextData" = "8:1;True=1;False=0"
"Attributes" = "3:0"
"Setting" = "3:0"
"Value" = "3:1"
"DefaultValue" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
}
}
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_A16110FB2319496FA65112471161C0FB"
{
"Sequence" = "3:100"
"DisplayName" = "8:Welcome"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdWelcomeDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
"CopyrightWarning"
{
"Name" = "8:CopyrightWarning"
"DisplayName" = "8:#1002"
"Description" = "8:#1102"
"Type" = "3:3"
"ContextData" = "8:"
"Attributes" = "3:0"
"Setting" = "3:1"
"Value" = "8:#1202"
"DefaultValue" = "8:#1202"
"UsePlugInResources" = "11:TRUE"
}
"Welcome"
{
"Name" = "8:Welcome"
"DisplayName" = "8:#1003"
"Description" = "8:#1103"
"Type" = "3:3"
"ContextData" = "8:"
"Attributes" = "3:0"
"Setting" = "3:1"
"Value" = "8:#1203"
"DefaultValue" = "8:#1203"
"UsePlugInResources" = "11:TRUE"
}
}
}
}
}
"{DF760B10-853B-4699-99F2-AFF7185B4A62}:_8BDB1DC6B45345D6A00F54A75DEF1A6B"
{
"Name" = "8:#1900"
"Sequence" = "3:2"
"Attributes" = "3:1"
"Dialogs"
{
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_51562FA73CD74420B54B17BDC66F6983"
{
"Sequence" = "3:200"
"DisplayName" = "8:Installation Folder"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminFolderDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
}
}
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_6E30DC2B3F284C148AE722C0E78228F8"
{
"Sequence" = "3:300"
"DisplayName" = "8:Confirm Installation"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminConfirmDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
}
}
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_A66D47C411F0411780817D51CF722A22"
{
"Sequence" = "3:100"
"DisplayName" = "8:Welcome"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminWelcomeDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
"CopyrightWarning"
{
"Name" = "8:CopyrightWarning"
"DisplayName" = "8:#1002"
"Description" = "8:#1102"
"Type" = "3:3"
"ContextData" = "8:"
"Attributes" = "3:0"
"Setting" = "3:1"
"Value" = "8:#1202"
"DefaultValue" = "8:#1202"
"UsePlugInResources" = "11:TRUE"
}
"Welcome"
{
"Name" = "8:Welcome"
"DisplayName" = "8:#1003"
"Description" = "8:#1103"
"Type" = "3:3"
"ContextData" = "8:"
"Attributes" = "3:0"
"Setting" = "3:1"
"Value" = "8:#1203"
"DefaultValue" = "8:#1203"
"UsePlugInResources" = "11:TRUE"
}
}
}
}
}
"{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_A6A71D2398304B649269B7E50D8A0EC4"
{
"UseDynamicProperties" = "11:FALSE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdBasicDialogs.wim"
}
"{DF760B10-853B-4699-99F2-AFF7185B4A62}:_B854718158D047B6B2E6FE698112EC93"
{
"Name" = "8:#1901"
"Sequence" = "3:2"
"Attributes" = "3:2"
"Dialogs"
{
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_BD7FC1FCE04048D986EC3E4F21D525C6"
{
"Sequence" = "3:100"
"DisplayName" = "8:Progress"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminProgressDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
"ShowProgress"
{
"Name" = "8:ShowProgress"
"DisplayName" = "8:#1009"
"Description" = "8:#1109"
"Type" = "3:5"
"ContextData" = "8:1;True=1;False=0"
"Attributes" = "3:0"
"Setting" = "3:0"
"Value" = "3:1"
"DefaultValue" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
}
}
}
}
"{DF760B10-853B-4699-99F2-AFF7185B4A62}:_C3C153DE1CA647C6B2075A0C59ABBBA6"
{
"Name" = "8:#1902"
"Sequence" = "3:2"
"Attributes" = "3:3"
"Dialogs"
{
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_5E814962060F4BDBAEF5C6BD43D6DE3E"
{
"Sequence" = "3:100"
"DisplayName" = "8:Finished"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminFinishedDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
}
}
}
}
}
"MergeModule"
{
}
"ProjectOutput"
{
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_D219AD7AB7924D44B7E2945648C76CF7"
{
"SourcePath" = "8:..\\OpenERPOutlookPlugin\\obj\\Debug\\OpenERPOutlookPlugin.dll"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_F8355F1930014BA7AC04125197F9FCF8"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
"ProjectOutputGroupRegister" = "3:2"
"OutputConfiguration" = "8:"
"OutputGroupCanonicalName" = "8:Built"
"OutputProjectGuid" = "8:{F4B2219B-F235-400F-81B4-92F15250BBA4}"
"ShowKeyOutput" = "11:TRUE"
"ExcludeFilters"
{
}
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More