From: <ep...@us...> - 2011-09-11 10:51:01
|
Revision: 4287 http://mp-plugins.svn.sourceforge.net/mp-plugins/?rev=4287&view=rev Author: epstone Date: 2011-09-11 10:50:51 +0000 (Sun, 11 Sep 2011) Log Message: ----------- Rebuild for MP 1.2 RC Modified Paths: -------------- trunk/plugins/Outlook Mail/ContentController.cs trunk/plugins/Outlook Mail/OutlookLayer.cs trunk/plugins/Outlook Mail/OutlookMailPlugin.cs trunk/plugins/Outlook Mail/Setup/OutlookMailSetup.Designer.cs trunk/plugins/Outlook Mail/Setup/OutlookMailSetup.resx trunk/plugins/Outlook Mail/Skin/Blue3/OutlookMail.xml trunk/plugins/Outlook Mail/Skin/Blue3wide/OutlookMail.xml trunk/plugins/Outlook Mail/Util/Utility.cs Added Paths: ----------- trunk/plugins/Outlook Mail/OutlookMail.csproj trunk/plugins/Outlook Mail/OutlookMail.csproj.user trunk/plugins/Outlook Mail/OutlookMail.sln trunk/plugins/Outlook Mail/OutlookMail.suo trunk/plugins/Outlook Mail/Skin/Default/ trunk/plugins/Outlook Mail/Skin/Default/OutlookMail.xml trunk/plugins/Outlook Mail/Skin/DefaultWide/ trunk/plugins/Outlook Mail/Skin/DefaultWide/OutlookMail.xml Removed Paths: ------------- trunk/plugins/Outlook Mail/Outlook Mail.csproj trunk/plugins/Outlook Mail/Outlook Mail.csproj.user Modified: trunk/plugins/Outlook Mail/ContentController.cs =================================================================== --- trunk/plugins/Outlook Mail/ContentController.cs 2011-09-11 10:45:26 UTC (rev 4286) +++ trunk/plugins/Outlook Mail/ContentController.cs 2011-09-11 10:50:51 UTC (rev 4287) @@ -32,743 +32,743 @@ using System.Windows.Forms; namespace OutlookMail { - public class ContentController - { - //********** PRIVATE VARIABLES **************** - #region PRIVATE VARIABLES - OutlookLayer _olContent; - - List<GUIListItem> _guiItemList; - Thread _threadAddContent; - bool _threadLocked; - int _allrShownMail; - int _itemsToShow; - int _mailsCountSpan; - Outlook.MAPIFolder _folderToShow; - User _currentUser; - UserMgmt _userManagment; - bool _error = false; - int _allrShownItems; - bool _pstsShowing; - List<string> _history; - - - - #endregion - //********** EVENTS *************************** - #region EVENTS - public event EventHandler GuiListReady; - public event EventHandler NextItemsReady; - - /// <summary> - /// - /// </summary> - /// <param name="e"></param> - protected virtual void OnGuiListReady(EventArgs e) + public class ContentController { - EventHandler myEvent = GuiListReady; - if (myEvent != null) - { - myEvent(this, e); - } - } + //********** PRIVATE VARIABLES **************** + #region PRIVATE VARIABLES + OutlookLayer _olContent; - /// <summary> - /// Fires when the next items can get added to the GuiItemList - /// </summary> - /// <param name="e"></param> - protected virtual void OnNextItemsReady(EventArgs e) - { - EventHandler myEvent = NextItemsReady; - if (myEvent != null) - { - myEvent(this, e); - } - } - #endregion - //********** GETTER/SETTER ******************** - #region GETTER/SETTER + List<GUIListItem> _guiItemList; + Thread _threadAddContent; + bool _threadLocked; + int _allrShownMail; + int _itemsToShow; + int _mailsCountSpan; + Outlook.MAPIFolder _folderToShow; + User _currentUser; + UserMgmt _userManagment; + bool _error = false; + int _allrShownItems; + bool _pstsShowing; + List<string> _history; - public int AllreadyShownItems - { - get { return _allrShownItems; } - set { _allrShownItems = value; } - } - public string MapiFolderName - { - get { return _olContent.CurrentFolderHandler.MapiFolder.Name; } - } + #endregion + //********** EVENTS *************************** + #region EVENTS + public event EventHandler GuiListReady; + public event EventHandler NextItemsReady; + /// <summary> + /// + /// </summary> + /// <param name="e"></param> + protected virtual void OnGuiListReady(EventArgs e) + { + EventHandler myEvent = GuiListReady; + if (myEvent != null) + { + myEvent(this, e); + } + } - public bool Error - { - get { return _error; } - set { _error = value; } - } + /// <summary> + /// Fires when the next items can get added to the GuiItemList + /// </summary> + /// <param name="e"></param> + protected virtual void OnNextItemsReady(EventArgs e) + { + EventHandler myEvent = NextItemsReady; + if (myEvent != null) + { + myEvent(this, e); + } + } + #endregion + //********** GETTER/SETTER ******************** + #region GETTER/SETTER - public User CurrentUser - { - get { return _currentUser; } - set { _currentUser = value; } - } + public int AllreadyShownItems + { + get { return _allrShownItems; } + set { _allrShownItems = value; } + } - public int MapiFolderCount - { - get { return _olContent.CurrentFolderHandler.FolderCount; } - } + public string MapiFolderName + { + get { return _olContent.CurrentFolderHandler.MapiFolder.Name; } + } - public List<GUIListItem> GuiItemList - { - get { return _guiItemList; } - set { _guiItemList = value; } - } - public bool ThreadLocked - { - get { return _threadLocked; } - set { _threadLocked = value; } - } - #endregion - //********** CONSTRUCTORS / DESTRUCTORS ******* - #region CONSTRUCTORS / DESTRUCTORS + public bool Error + { + get { return _error; } + set { _error = value; } + } - public ContentController() - { - _olContent = new OutlookLayer(); - _userManagment = new UserMgmt(); - _history = new List<string>(); - Init(); + public User CurrentUser + { + get { return _currentUser; } + set { _currentUser = value; } + } - } + public int MapiFolderCount + { + get { return _olContent.CurrentFolderHandler.FolderCount; } + } - ~ContentController() - { - _threadAddContent = null; + public List<GUIListItem> GuiItemList + { + get { return _guiItemList; } + set { _guiItemList = value; } + } - if (!_userManagment.UserCount().Equals(1)) - { - _olContent = null; + public bool ThreadLocked + { + get { return _threadLocked; } + set { _threadLocked = value; } + } - } - } + #endregion + //********** CONSTRUCTORS / DESTRUCTORS ******* + #region CONSTRUCTORS / DESTRUCTORS - #endregion - //********** PRIVATE METHODS ****************** - #region PRIVATE METHODS + public ContentController() + { + _olContent = new OutlookLayer(); + _userManagment = new UserMgmt(); + _history = new List<string>(); + Init(); + } + ~ContentController() + { + _threadAddContent = null; - /// <summary> - /// Inits this object - /// </summary> - private void Init() - { - //if (_userManagment.UserCount() > 1) - //{ - // if (_olContent.OlNamespace != null) - // { - // _olContent.CloseOutlook(); - // } + if (!_userManagment.UserCount().Equals(1)) + { + _olContent = null; - //} - InitVariables(); - } + } + } - private void InitVariables() - { - _mailsCountSpan = 10; - } + #endregion + //********** PRIVATE METHODS ****************** + #region PRIVATE METHODS - /// <summary> - /// Returns an email Item as GuilistItem - /// </summary> - private GUIListItem CreateMailItem(int i, Outlook.MailItem emailItem) - { - //Create new Email GuiListItem for GuiList - GUIListItem GliItem = new GUIListItem(); - try - { - GliItem.ItemId = i + _olContent.CurrentFolderHandler.FolderCount + 1; //+ 1 because of ".." - GliItem.Path = ConstStr.Mail; - // Set Label and Date format - string Date = string.Format("{0:g}", emailItem.ReceivedTime); - GliItem.Label = (Date + " " + emailItem.SenderName + " " + emailItem.Subject); - //Set Red/Unread state - if (emailItem.UnRead) + /// <summary> + /// Inits this object + /// </summary> + private void Init() { - GliItem.IconImage = "outlook_unread_mail.png"; + //if (_userManagment.UserCount() > 1) + //{ + // if (_olContent.OlNamespace != null) + // { + // _olContent.CloseOutlook(); + // } + + //} + InitVariables(); } - else + + private void InitVariables() { - GliItem.IconImage = "outlook_read_mail.png"; + _mailsCountSpan = 10; } - } - catch (Exception ex) - { - Utility.ShowMessageBox(ex.Message); - } - return GliItem; - } - /// <summary> - /// Returns an Rss Item as GuilistItem - /// </summary> - /// <param name="allrShownItems">currently shown itemcount in folder</param> - /// <param name="rssItem">the rss/PostItem from Outlook</param> - /// <returns>Returns an Rss Item as GuilistItem</returns> - private GUIListItem CreateRSSItem(int i, Outlook.PostItem rssItem) - { - //Create new Rss GuiListItem for GuiList - GUIListItem GliItem = new GUIListItem(); - try - { - GliItem.ItemId = i + _olContent.CurrentFolderHandler.FolderCount + 1; //+ 1 because of ".." - GliItem.Path = ConstStr.Rss; + /// <summary> + /// Returns an email Item as GuilistItem + /// </summary> + private GUIListItem CreateMailItem(int i, Outlook.MailItem emailItem) + { + //Create new Email GuiListItem for GuiList + GUIListItem GliItem = new GUIListItem(); + try + { + GliItem.ItemId = i + _olContent.CurrentFolderHandler.FolderCount + 1; //+ 1 because of ".." + GliItem.Path = ConstStr.Mail; - // Set Label and Date format - string Date = string.Format("{0:g}", rssItem.ReceivedTime); - GliItem.Label = (Date + " " + rssItem.Subject); + // Set Label and Date format + string Date = string.Format("{0:g}", emailItem.ReceivedTime); + GliItem.Label = Date + " " + Utility.SubjectCleaner(emailItem.SenderName) + " " + Utility.SubjectCleaner(emailItem.Subject); - //Set Red/Unread state - if (rssItem.UnRead) - { - GliItem.IconImage = "outlook_unread_rss.png"; + //Set Red/Unread state + if (emailItem.UnRead) + { + GliItem.IconImage = "outlook_unread_mail.png"; + } + else + { + GliItem.IconImage = "outlook_read_mail.png"; + } + } + catch (Exception ex) + { + Utility.ShowMessageBox(ex.Message); + } + return GliItem; } - else + + /// <summary> + /// Returns an Rss Item as GuilistItem + /// </summary> + /// <param name="allrShownItems">currently shown itemcount in folder</param> + /// <param name="rssItem">the rss/PostItem from Outlook</param> + /// <returns>Returns an Rss Item as GuilistItem</returns> + private GUIListItem CreateRSSItem(int i, Outlook.PostItem rssItem) { - GliItem.IconImage = "outlook_read_rss.png"; + //Create new Rss GuiListItem for GuiList + GUIListItem GliItem = new GUIListItem(); + try + { + GliItem.ItemId = i + _olContent.CurrentFolderHandler.FolderCount + 1; //+ 1 because of ".." + GliItem.Path = ConstStr.Rss; + + // Set Label and Date format + string Date = string.Format("{0:g}", rssItem.ReceivedTime); + GliItem.Label = (Date + " " + rssItem.Subject); + + //Set Red/Unread state + if (rssItem.UnRead) + { + GliItem.IconImage = "outlook_unread_rss.png"; + } + else + { + GliItem.IconImage = "outlook_read_rss.png"; + } + } + catch (Exception ex) + { + Utility.ShowMessageBox(ex.Message); + } + return GliItem; } - } - catch (Exception ex) - { - Utility.ShowMessageBox(ex.Message); - } - return GliItem; - } - private void ListFolderItemsThreaded() - { - try - { - _pstsShowing = false; - if (_olContent.OlItemList != null) _olContent.OlItemList.Clear(); - _olContent.CurrentFolderHandler.MapiFolder = _folderToShow; + private void ListFolderItemsThreaded() + { + try + { + _pstsShowing = false; + if (_olContent.OlItemList != null) _olContent.OlItemList.Clear(); + _olContent.CurrentFolderHandler.MapiFolder = _folderToShow; - if (_history.Count.Equals(0) || !_history[_history.Count - 1].Equals(_folderToShow.FullFolderPath.Remove(0, 2))) - _history.Add(_folderToShow.FullFolderPath.Remove(0, 2)); + if (_history.Count.Equals(0) || !_history[_history.Count - 1].Equals(_folderToShow.FullFolderPath.Remove(0, 2))) + _history.Add(_folderToShow.FullFolderPath.Remove(0, 2)); - _folderToShow = null; - _guiItemList = new List<GUIListItem>(); - _olContent.OlItemList = new List<ItemWrapper>(); + _folderToShow = null; + _guiItemList = new List<GUIListItem>(); + _olContent.OlItemList = new List<ItemWrapper>(); - AddFolders(); - AddItems(); - OnGuiListReady(EventArgs.Empty); - } - catch (ThreadAbortException) { } - catch (Exception ex) - { - Log.Error("List folder items, error: " + ex.Message); - } - } + AddFolders(); + AddItems(); + OnGuiListReady(EventArgs.Empty); + } + catch (ThreadAbortException) { } + catch (Exception ex) + { + Log.Error("List folder items, error: " + ex.Message); + } + } - /// <summary> - /// List Outlook Folders in gfcItemList - /// </summary> - /// <param name="olFolder"></param> - private void AddFolders() - { - //gfcItemList.Clear(); - // Get the right sort order for this folder + /// <summary> + /// List Outlook Folders in gfcItemList + /// </summary> + /// <param name="olFolder"></param> + private void AddFolders() + { + //gfcItemList.Clear(); + // Get the right sort order for this folder - //Level Higher Button - //If next higher level is the pst level, insert ".." with id -4 else -3 - if (_currentUser.PstList.Contains(_olContent.CurrentFolderHandler.MapiFolder.Name)) - { - GUIListItem dots = new GUIListItem(".."); - dots.Path = ConstStr.UpPst; - dots.IconImage = "defaultFolderBack.png"; - _guiItemList.Add(dots); - } - else - { - GUIListItem dots = new GUIListItem(".."); - dots.Path = ConstStr.UpFolder; - dots.IconImage = "defaultFolderBack.png"; - _guiItemList.Add(dots); - } + //Level Higher Button + //If next higher level is the pst level, insert ".." with id -4 else -3 + if (_currentUser.PstList.Contains(_olContent.CurrentFolderHandler.MapiFolder.Name)) + { + GUIListItem dots = new GUIListItem(".."); + dots.Path = ConstStr.UpPst; + dots.IconImage = "defaultFolderBack.png"; + _guiItemList.Add(dots); + } + else + { + GUIListItem dots = new GUIListItem(".."); + dots.Path = ConstStr.UpFolder; + dots.IconImage = "defaultFolderBack.png"; + _guiItemList.Add(dots); + } - //Add all folders to gfcItemList - _olContent.CurrentFolderHandler.FolderCount = 0; - if (_olContent.CurrentFolderHandler.MapiFolder.Folders.Count > 0) - { - try - { - for (int i = 1; i <= _olContent.CurrentFolderHandler.MapiFolder.Folders.Count; i++) - { - if (_olContent.CurrentFolderHandler.MapiFolder.Folders[i].DefaultMessageClass.Equals("IPM.Note")) + //Add all folders to gfcItemList + _olContent.CurrentFolderHandler.FolderCount = 0; + if (_olContent.CurrentFolderHandler.MapiFolder.Folders.Count > 0) { - GUIListItem FolderItem = new GUIListItem(_olContent.CurrentFolderHandler.MapiFolder.Folders[i].Name); - FolderItem.ItemId = i; - FolderItem.IsFolder = true; - FolderItem.Path = ConstStr.Folder; - FolderItem.IconImage = "defaultFolderNF.png"; - _guiItemList.Add(FolderItem); - _olContent.CurrentFolderHandler.FolderCount++; + try + { + for (int i = 1; i <= _olContent.CurrentFolderHandler.MapiFolder.Folders.Count; i++) + { + if (_olContent.CurrentFolderHandler.MapiFolder.Folders[i].DefaultMessageClass.Equals("IPM.Note")) + { + GUIListItem FolderItem = new GUIListItem(_olContent.CurrentFolderHandler.MapiFolder.Folders[i].Name); + FolderItem.ItemId = i; + FolderItem.IsFolder = true; + FolderItem.Path = ConstStr.Folder; + FolderItem.IconImage = "defaultFolderNF.png"; + _guiItemList.Add(FolderItem); + _olContent.CurrentFolderHandler.FolderCount++; + } + } + } + catch (IndexOutOfRangeException) + { + } } - } + + // Fill the FolderInfo Fadelabel + //FolderStatusBar(); TODO } - catch (IndexOutOfRangeException) + + /// <summary> + /// Main Method for adding items to GuiItemList + /// </summary> + private void AddItems() { - } - } + _allrShownItems = _olContent.OlItemList.Count; - // Fill the FolderInfo Fadelabel - //FolderStatusBar(); TODO - } + //Get the next Items to the OutlookList + _olContent.GetNextItems(_itemsToShow); - /// <summary> - /// Main Method for adding items to GuiItemList - /// </summary> - private void AddItems() - { - _allrShownItems = _olContent.OlItemList.Count; + //Adds a new Outlook Item to the gfcItemList + for (int i = _allrShownItems; i < _olContent.OlItemList.Count; i++) + { + if (_olContent.OlItemList[i].ItemType.Equals("rss")) + { + _guiItemList.Add(CreateRSSItem(i, _olContent.OlItemList[i].RssItem)); + } + else if (_olContent.OlItemList[i].ItemType.Equals("mail")) + { + _guiItemList.Add(CreateMailItem(i, _olContent.OlItemList[i].MailItem)); + } + } - //Get the next Items to the OutlookList - _olContent.GetNextItems(_itemsToShow); + // Let the programm know how many mails are currently listed + _allrShownMail = _olContent.OlItemList.Count; - //Adds a new Outlook Item to the gfcItemList - for (int i = _allrShownItems; i < _olContent.OlItemList.Count; i++) - { - if (_olContent.OlItemList[i].ItemType.Equals("rss")) + } + + /// <summary> + /// Starts a new thread if no old is active + /// </summary> + /// <param name="methodToStart"></param> + private void ThreadStarter(MethodInvoker methodToStart) { - _guiItemList.Add(CreateRSSItem(i, _olContent.OlItemList[i].RssItem)); + if (_threadAddContent == null || !_threadAddContent.IsAlive) + { + _threadAddContent = new Thread(new ThreadStart(methodToStart)); + GUIWaitCursor.Show(); + _threadLocked = true; + _threadAddContent.Priority = ThreadPriority.Highest; + _threadAddContent.Start(); + + } } - else if (_olContent.OlItemList[i].ItemType.Equals("mail")) + + /// <summary> + /// Loads the next folder items with the user defined amount + /// </summary> + private void LoadNextFolderItemsThreaded() { - _guiItemList.Add(CreateMailItem(i, _olContent.OlItemList[i].MailItem)); + _pstsShowing = false; + _guiItemList.Clear(); + AddItems(); + OnNextItemsReady(EventArgs.Empty); } - } - // Let the programm know how many mails are currently listed - _allrShownMail = _olContent.OlItemList.Count; + /// <summary> + /// Loads all elements of a folder if user wants that + /// </summary> + private void LoadAllFolderItemsThreaded() + { + _pstsShowing = false; + _guiItemList.Clear(); + int SaveCount = _itemsToShow; + _itemsToShow = 0; + AddItems(); + _itemsToShow = SaveCount; + OnNextItemsReady(EventArgs.Empty); + } + #endregion + //********** PUBLIC METHODS ******************* + # region PUBLIC METHODS - } + public void PluginStartup() + { + if (_userManagment.UserCount() > 1) + { + Utility.CloseOutlookSoft(); + } + } - /// <summary> - /// Starts a new thread if no old is active - /// </summary> - /// <param name="methodToStart"></param> - private void ThreadStarter(MethodInvoker methodToStart) - { - if (_threadAddContent == null || !_threadAddContent.IsAlive) - { - _threadAddContent = new Thread(new ThreadStart(methodToStart)); - GUIWaitCursor.Show(); - _threadLocked = true; - _threadAddContent.Priority = ThreadPriority.Highest; - _threadAddContent.Start(); - } - } + /// <summary> + /// Connects the user to Outlook and shows what he wants to see at beginning + /// </summary> + public void UserStartupView() + { + //User Variables + _itemsToShow = _currentUser.OutlookItemCount; + _olContent.CurrentUserName = _currentUser.Name; - /// <summary> - /// Loads the next folder items with the user defined amount - /// </summary> - private void LoadNextFolderItemsThreaded() - { - _pstsShowing = false; - _guiItemList.Clear(); - AddItems(); - OnNextItemsReady(EventArgs.Empty); - } + //Connect to Outlook with defined user - /// <summary> - /// Loads all elements of a folder if user wants that - /// </summary> - private void LoadAllFolderItemsThreaded() - { - _pstsShowing = false; - _guiItemList.Clear(); - int SaveCount = _itemsToShow; - _itemsToShow = 0; - AddItems(); - _itemsToShow = SaveCount; - OnNextItemsReady(EventArgs.Empty); - } - #endregion - //********** PUBLIC METHODS ******************* - # region PUBLIC METHODS + //If no user has been configured yet + if ((_userManagment.UserCount().Equals(0))) + { + _olContent.FastConnectOutlook(); + RefreshUserPstList(); + } - public void PluginStartup() - { - if (_userManagment.UserCount() > 1) - { - Utility.CloseOutlookSoft(); - } - } - - - /// <summary> - /// Connects the user to Outlook and shows what he wants to see at beginning - /// </summary> - public void UserStartupView() - { - //User Variables - _itemsToShow = _currentUser.OutlookItemCount; - _olContent.CurrentUserName = _currentUser.Name; + //FastConnect if just 1 User account without defined outlook profile + if ((_userManagment.UserCount().Equals(1)) && (string.IsNullOrEmpty(_currentUser.OlProfileName))) + { + if (_olContent.OlNamespace == null) + { + _olContent.FastConnectOutlook(); + } + } + // Fast Connect if just 1 user account, but with defined outlook profile + else if ((_userManagment.UserCount().Equals(1)) && (!string.IsNullOrEmpty(_currentUser.OlProfileName))) + { + if (_olContent.OlNamespace == null) + { + _olContent.ConnectOutlook(_currentUser.OlProfileName, _currentUser.OlProfilePw); + } + } + // Normal Connect if several Outlook Accounts are existing + else if (_userManagment.UserCount() > 1) + { + //Utility.CloseOutlookSoft(); + int time = 0; + while (Utility.OutlookRunning()) // Thanks to Ardy :D + { - //Connect to Outlook with defined user + Thread.Sleep(100); + time++; - //If no user has been configured yet - if ((_userManagment.UserCount().Equals(0))) - { - _olContent.FastConnectOutlook(); - RefreshUserPstList(); - } + if (time > 150) + { + Utility.ShowMessageBox(GUILocalizeStrings.Get(16)); + _error = true; + return; + } + } - //FastConnect if just 1 User account without defined outlook profile - if ((_userManagment.UserCount().Equals(1)) && (string.IsNullOrEmpty(_currentUser.OlProfileName))) - { - if (_olContent.OlNamespace == null) - { - _olContent.FastConnectOutlook(); - } - } - // Fast Connect if just 1 user account, but with defined outlook profile - else if ((_userManagment.UserCount().Equals(1)) && (!string.IsNullOrEmpty(_currentUser.OlProfileName))) - { - if (_olContent.OlNamespace == null) - { - _olContent.ConnectOutlook(_currentUser.OlProfileName, _currentUser.OlProfilePw); - } - } - // Normal Connect if several Outlook Accounts are existing - else if (_userManagment.UserCount() > 1) - { - //Utility.CloseOutlookSoft(); - int time = 0; - while (Utility.OutlookRunning()) // Thanks to Ardy :D - { - Thread.Sleep(100); - time++; + _olContent.ConnectOutlook(_currentUser.OlProfileName, _currentUser.OlProfilePw); - if (time > 150) - { - Utility.ShowMessageBox(GUILocalizeStrings.Get(16)); - _error = true; - return; - } - } + } + // Show user defined startup content + switch (_currentUser.StartupOption) + { + case "Nothing": + { + //GUIControl.SetControlLabel(GetID, lbInfo.GetID, GUILocalizeStrings.Get(13)); + break; + } + case "Folder": + { + ShowFolderByPathOrID(_currentUser.StartupPath, _currentUser.StartupID); - _olContent.ConnectOutlook(_currentUser.OlProfileName, _currentUser.OlProfilePw); - - } + break; + } + case "StandardInb": + { + ShowStandardInbox(); - // Show user defined startup content - switch (_currentUser.StartupOption) - { - case "Nothing": - { - //GUIControl.SetControlLabel(GetID, lbInfo.GetID, GUILocalizeStrings.Get(13)); - break; + break; + } + default: + { + ShowStandardInbox(); + break; + } + } } - case "Folder": + + /// <summary> + /// Shows a folder by its name + /// </summary> + /// <param name="ItemName"></param> + public void ShowFolderByName(string ItemName) { - ShowFolderByPathOrID(_currentUser.StartupPath, _currentUser.StartupID); + try + { + _folderToShow = _olContent.CurrentFolderHandler.MapiFolder.Folders[ItemName]; + } + catch (Exception) { } + ThreadStarter(ListFolderItemsThreaded); - break; } - case "StandardInb": + + /// <summary> + /// shows the parent of the current folder + /// </summary> + public void ShowParentFolder() { - ShowStandardInbox(); + try + { + _folderToShow = (Outlook.MAPIFolder)_olContent.CurrentFolderHandler.MapiFolder.Parent; + } + catch (Exception) { } - break; + ThreadStarter(ListFolderItemsThreaded); } - default: + + /// <summary> + /// shows a list of all available pst files + /// </summary> + public void ShowPstList() { - ShowStandardInbox(); - break; - } - } - } + GUIWaitCursor.Show(); + _pstsShowing = true; + if (!_history[_history.Count - 2].Equals(ConstStr.Pst)) + { + _history.Add(ConstStr.Pst); + } + _guiItemList.Clear(); + RefreshUserPstList(); - /// <summary> - /// Shows a folder by its name - /// </summary> - /// <param name="ItemName"></param> - public void ShowFolderByName(string ItemName) - { - try - { - _folderToShow = _olContent.CurrentFolderHandler.MapiFolder.Folders[ItemName]; - } - catch (Exception) { } - ThreadStarter(ListFolderItemsThreaded); + List<string> pstList = _currentUser.PstList; - } + foreach (string PstName in pstList) + { + GUIListItem PstItem = new GUIListItem(PstName); + PstItem.Path = ConstStr.Pst; + PstItem.IconImage = "defaultHardDiskBig.png"; + _guiItemList.Add(PstItem); + } + OnGuiListReady(EventArgs.Empty); + } - /// <summary> - /// shows the parent of the current folder - /// </summary> - public void ShowParentFolder() - { - try - { - _folderToShow = (Outlook.MAPIFolder)_olContent.CurrentFolderHandler.MapiFolder.Parent; - } - catch (Exception) { } + private void RefreshUserPstList() + { + if (_currentUser.PstList == null) + { + _currentUser.PstList = _olContent.GatherUserPsts(); + if (_currentUser.CachePst) + { + _currentUser.SaveSettings(); + } + } + } - ThreadStarter(ListFolderItemsThreaded); - } + /// <summary> + /// Shows a folder by its path or its entryID + /// </summary> + /// <param name="path"></param> + /// <param name="ID"></param> + public void ShowFolderByPathOrID(string path, string ID) + { + if (!string.IsNullOrEmpty(ID)) + { + try + { + // Faster then the path version, but not always successfull + _folderToShow = _olContent.OlNamespace.GetFolderFromID(ID, null); + ThreadStarter(ListFolderItemsThreaded); + return; + } + catch (Exception) + { + } + } - /// <summary> - /// shows a list of all available pst files - /// </summary> - public void ShowPstList() - { - GUIWaitCursor.Show(); - _pstsShowing = true; - if (!_history[_history.Count - 2].Equals(ConstStr.Pst)) - { - _history.Add(ConstStr.Pst); - } - _guiItemList.Clear(); - RefreshUserPstList(); + if (!string.IsNullOrEmpty(path)) + { + try + { + _folderToShow = _olContent.GetMapiFolderByPath(path); + ThreadStarter(ListFolderItemsThreaded); + return; + } + catch (Exception) + { + } + } + Utility.ShowMessageBox("Could not open folder"); + } - List<string> pstList = _currentUser.PstList; - - foreach (string PstName in pstList) - { - GUIListItem PstItem = new GUIListItem(PstName); - PstItem.Path = ConstStr.Pst; - PstItem.IconImage = "defaultHardDiskBig.png"; - _guiItemList.Add(PstItem); - } - OnGuiListReady(EventArgs.Empty); - } - - private void RefreshUserPstList() - { - if (_currentUser.PstList == null) - { - _currentUser.PstList = _olContent.GatherUserPsts(); - if (_currentUser.CachePst) + /// <summary> + /// Shows the standard inbox of an outlook profile + /// </summary> + public void ShowStandardInbox() { - _currentUser.SaveSettings(); + _folderToShow = _olContent.Inbox; + ThreadStarter(ListFolderItemsThreaded); } - } - } - /// <summary> - /// Shows a folder by its path or its entryID - /// </summary> - /// <param name="path"></param> - /// <param name="ID"></param> - public void ShowFolderByPathOrID(string path, string ID) - { - if (!string.IsNullOrEmpty(ID)) - { - try + /// <summary> + /// Shows the content of a pst file + /// </summary> + /// <param name="ItemName"></param> + public void ShowPSTContent(string ItemName) { - // Faster then the path version, but not always successfull - _folderToShow = _olContent.OlNamespace.GetFolderFromID(ID, null); - ThreadStarter(ListFolderItemsThreaded); - return; + + _folderToShow = _olContent.OlNamespace.Folders[ItemName]; + ThreadStarter(ListFolderItemsThreaded); } - catch (Exception) + + /// <summary> + /// Checks if the next items should get loaded + /// </summary> + /// <param name="CurrentPosition"></param> + public void ShowNextFolderItems(int CurrentPosition) { + + if (((CurrentPosition >= (_allrShownMail - _mailsCountSpan)) && (!_olContent.AllItemsShown))) + { + ThreadStarter(LoadNextFolderItemsThreaded); + } } - } - if (!string.IsNullOrEmpty(path)) - { - try + /// <summary> + /// Deletes a folder from Outlook + /// </summary> + /// <param name="Name"></param> + public void DeleteOutlookFolder(string Name) { - _folderToShow = _olContent.GetMapiFolderByPath(path); - ThreadStarter(ListFolderItemsThreaded); - return; + _olContent.CurrentFolderHandler.MapiFolder.Folders[Name].Delete(); + _olContent.CurrentFolderHandler.FolderCount--; } - catch (Exception) + + /// <summary> + /// Shows all following items which have not been loaded yet + /// </summary> + public void ShowAllFolderItems() { + ThreadStarter(LoadAllFolderItemsThreaded); } - } - Utility.ShowMessageBox("Could not open folder"); - } - /// <summary> - /// Shows the standard inbox of an outlook profile - /// </summary> - public void ShowStandardInbox() - { - _folderToShow = _olContent.Inbox; - ThreadStarter(ListFolderItemsThreaded); - } + /// <summary> + /// Returns the info text dependend on the current folder/pst + /// </summary> + /// <returns></returns> + public string GetInfoText() + { + string Info; + if (!_pstsShowing) + { + string folders; + string elements; - /// <summary> - /// Shows the content of a pst file - /// </summary> - /// <param name="ItemName"></param> - public void ShowPSTContent(string ItemName) - { + if (_olContent.CurrentFolderHandler.FolderCount.Equals(1)) + { + folders = GUILocalizeStrings.Get(171); + } + else + { + folders = GUILocalizeStrings.Get(172); + } - _folderToShow = _olContent.OlNamespace.Folders[ItemName]; - ThreadStarter(ListFolderItemsThreaded); - } + if (_olContent.CurrentFolderHandler.MapiFolder.Items.Count.Equals(1)) + { + elements = GUILocalizeStrings.Get(181); + } + else + { + elements = GUILocalizeStrings.Get(182); + } - /// <summary> - /// Checks if the next items should get loaded - /// </summary> - /// <param name="CurrentPosition"></param> - public void ShowNextFolderItems(int CurrentPosition) - { + string FCount = Convert.ToString(_olContent.CurrentFolderHandler.FolderCount); + string MCount = Convert.ToString(_olContent.CurrentFolderHandler.MapiFolder.Items.Count); + Info = FCount + folders + MCount + elements; + } + else + { + if (_currentUser.PstList.Count.Equals(1)) + { + Info = _currentUser.PstList.Count + GUILocalizeStrings.Get(191); + } + else + { + Info = _currentUser.PstList.Count + GUILocalizeStrings.Get(192); + } + } + return Info; + } - if (((CurrentPosition >= (_allrShownMail - _mailsCountSpan)) && (!_olContent.AllItemsShown))) - { - ThreadStarter(LoadNextFolderItemsThreaded); - } - } - - /// <summary> - /// Deletes a folder from Outlook - /// </summary> - /// <param name="Name"></param> - public void DeleteOutlookFolder(string Name) - { - _olContent.CurrentFolderHandler.MapiFolder.Folders[Name].Delete(); - _olContent.CurrentFolderHandler.FolderCount--; - } - - /// <summary> - /// Shows all following items which have not been loaded yet - /// </summary> - public void ShowAllFolderItems() - { - ThreadStarter(LoadAllFolderItemsThreaded); - } - - /// <summary> - /// Returns the info text dependend on the current folder/pst - /// </summary> - /// <returns></returns> - public string GetInfoText() - { - string Info; - if (!_pstsShowing) - { - string folders; - string elements; - - if (_olContent.CurrentFolderHandler.FolderCount.Equals(1)) + /// <summary> + /// Returns a Outlook Item by the ID on the + /// </summary> + /// <param name="SelectedItemID"></param> + /// <returns></returns> + public ItemWrapper GetOutlookItem(int SelectedItemID) { - folders = GUILocalizeStrings.Get(171); + return _olContent.OlItemList[SelectedItemID]; } - else - { - folders = GUILocalizeStrings.Get(172); - } - if (_olContent.CurrentFolderHandler.MapiFolder.Items.Count.Equals(1)) + /// <summary> + /// Removes an Outlook item from the outlook item list + /// </summary> + /// <param name="ItemID"></param> + public void RemoveFromOlItemList(int ItemID) { - elements = GUILocalizeStrings.Get(181); + _olContent.OlItemList.RemoveAt(ItemID); } - else - { - elements = GUILocalizeStrings.Get(182); - } - string FCount = Convert.ToString(_olContent.CurrentFolderHandler.FolderCount); - string MCount = Convert.ToString(_olContent.CurrentFolderHandler.MapiFolder.Items.Count); - Info = FCount + folders + MCount + elements; - } - else - { - if (_currentUser.PstList.Count.Equals(1)) + /// <summary> + /// Returns true if there is a previous folder it will be shown through event + /// </summary> + /// <returns></returns> + public bool ShowPreviousFolder() { - Info = _currentUser.PstList.Count + GUILocalizeStrings.Get(191); - } - else - { - Info = _currentUser.PstList.Count + GUILocalizeStrings.Get(192); - } - } - return Info; - } - /// <summary> - /// Returns a Outlook Item by the ID on the - /// </summary> - /// <param name="SelectedItemID"></param> - /// <returns></returns> - public ItemWrapper GetOutlookItem(int SelectedItemID) - { - return _olContent.OlItemList[SelectedItemID]; - } + if (!_threadLocked) + { + if (_history.Count > 1) + { + int PreviousIndex = _history.Count - 2; + if (_history[PreviousIndex].Equals(ConstStr.Pst)) + { + ShowPstList(); + } + else + { + ShowFolderByPathOrID(_history[PreviousIndex], null); + } + _history.RemoveAt(PreviousIndex + 1); + return true; + } + else + { + return false; + } + } + else { return true; } - /// <summary> - /// Removes an Outlook item from the outlook item list - /// </summary> - /// <param name="ItemID"></param> - public void RemoveFromOlItemList(int ItemID) - { - _olContent.OlItemList.RemoveAt(ItemID); - } - /// <summary> - /// Returns true if there is a previous folder it will be shown through event - /// </summary> - /// <returns></returns> - public bool ShowPreviousFolder() - { + } - if (!_threadLocked) - { - if (_history.Count > 1) + /// <summary> + /// Aborts the current thread + /// </summary> + public void AbortThread() { - int PreviousIndex = _history.Count - 2; - if (_history[PreviousIndex].Equals(ConstStr.Pst)) - { - ShowPstList(); - } - else - { - ShowFolderByPathOrID(_history[PreviousIndex], null); - } - _history.RemoveAt(PreviousIndex + 1); - return true; + if (_threadAddContent.IsAlive) + { + _threadAddContent.Abort(); + _olContent.CloseOutlook(); + } } - else - { - return false; - } - } - else { return true; } - - + #endregion } - - /// <summary> - /// Aborts the current thread - /// </summary> - public void AbortThread() - { - if (_threadAddContent.IsAlive) - { - _threadAddContent.Abort(); - _olContent.CloseOutlook(); - } - } - #endregion - } } Deleted: trunk/plugins/Outlook Mail/Outlook Mail.csproj =================================================================== --- trunk/plugins/Outlook Mail/Outlook Mail.csproj 2011-09-11 10:45:26 UTC (rev 4286) +++ trunk/plugins/Outlook Mail/Outlook Mail.csproj 2011-09-11 10:50:51 UTC (rev 4287) @@ -1,173 +0,0 @@ -<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>{48A6F556-8BC0-4DBE-BF16-49B57338DE7B}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>OutlookMail</RootNamespace> - <AssemblyName>OutlookMail</AssemblyName> - <FileUpgradeFlags> - </FileUpgradeFlags> - <OldToolsVersion>2.0</OldToolsVersion> - <UpgradeBackupLocation> - </UpgradeBackupLocation> - <SccProjectName> - </SccProjectName> - <SccLocalPath> - </SccLocalPath> - <SccAuxPath> - </SccAuxPath> - <SccProvider> - </SccProvider> - <PublishUrl>publish\</PublishUrl> - <Install>true</Install> - <InstallFrom>Disk</InstallFrom> - <UpdateEnabled>false</UpdateEnabled> - <UpdateMode>Foreground</UpdateMode> - <UpdateInterval>7</UpdateInterval> - <UpdateIntervalUnits>Days</UpdateIntervalUnits> - <UpdatePeriodically>false</UpdatePeriodically> - <UpdateRequired>false</UpdateRequired> - <MapFileExtensions>true</MapFileExtensions> - <ApplicationRevision>0</ApplicationRevision> - <ApplicationVersion>1.0.0.%2a</ApplicationVersion> - <IsWebBootstrapper>false</IsWebBootstrapper> - <UseApplicationTrust>false</UseApplicationTrust> - <BootstrapperEnabled>true</BootstrapperEnabled> - </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> - <CodeAnalysisRules>-Microsoft.Design#CA1012;-Microsoft.Design#CA2210;-Microsoft.Design#CA1040;-Microsoft.Design#CA1005;-Microsoft.Design#CA1020;-Microsoft.Design#CA1021;-Microsoft.Design#CA1010;-Microsoft.Design#CA1011;-Microsoft.Design#CA1009;-Microsoft.Design#CA1050;-Microsoft.Design#CA1026;-Microsoft.Design#CA1019;-Microsoft.Design#CA1031;-Microsoft.Design#CA1047;-Microsoft.Design#CA1000;-Microsoft.Design#CA1048;-Microsoft.Design#CA1051;-Microsoft.Design#CA1002;-Microsoft.Design#CA1061;-Microsoft.Design#CA1006;-Microsoft.Design#CA1046;-Microsoft.Design#CA1045;-Microsoft.Design#CA1065;-Microsoft.Design#CA1038;-Microsoft.Design#CA1008;-Microsoft.Design#CA1028;-Microsoft.Design#CA1064;-Microsoft.Design#CA1004;-Microsoft.Design#CA1035;-Microsoft.Design#CA1063;-Microsoft.Design#CA1032;-Microsoft.Design#CA1023;-Microsoft.Design#CA1033;-Microsoft.Design#CA1039;-Microsoft.Design#CA1016;-Microsoft.Design#CA1014;-Microsoft.Design#CA1017;-Microsoft.Design#CA1018;-Microsoft.Design#CA1027;-Microsoft.Design#CA1059;-Microsoft.Design#CA1060;-Microsoft.Design#CA1034;-Microsoft.Design#CA1013;-Microsoft.Design#CA1036;-Microsoft.Design#CA1044;-Microsoft.Design#CA1041;-Microsoft.Design#CA1025;-Microsoft.Design#CA1052;-Microsoft.Design#CA1053;-Microsoft.Design#CA1057;-Microsoft.Design#CA1058;-Microsoft.Design#CA1001;-Microsoft.Design#CA1049;-Microsoft.Design#CA1054;-Microsoft.Design#CA1056;-Microsoft.Design#CA1055;-Microsoft.Design#CA1030;-Microsoft.Design#CA1003;-Microsoft.Design#CA1007;-Microsoft.Design#CA1043;-Microsoft.Design#CA1024;-Microsoft.Globalization#CA1301;-Microsoft.Globalization#CA1302;-Microsoft.Globalization#CA1308;-Microsoft.Globalization#CA1306;-Microsoft.Globalization#CA1304;-Microsoft.Globalization#CA1305;-Microsoft.Globalization#CA2101;-Microsoft.Globalization#CA1300;-Microsoft.Globalization#CA1307;-Microsoft.Globalization#CA1309;-Microsoft.Interoperability#CA1403;-Microsoft.Interoperability#CA1406;-Microsoft.Interoperability#CA1413;-Microsoft.Interoperability#CA1402;-Microsoft.Interoperability#CA1407;-Microsoft.Interoperability#CA1404;-Microsoft.Interoperability#CA1410;-Microsoft.Interoperability#CA1411;-Microsoft.Interoperability#CA1405;-Microsoft.Interoperability#CA1409;-Microsoft.Interoperability#CA1415;-Microsoft.Interoperability#CA1408;-Microsoft.Interoperability#CA1414;-Microsoft.Interoperability#CA1412;-Microsoft.Interoperability#CA1400;-Microsoft.Interoperability#CA1401;-Microsoft.Maintainability#CA1506;-Microsoft.Maintainability#CA1502;-Microsoft.Maintainability#CA1501;-Microsoft.Maintainability#CA1505;-Microsoft.Maintainability#CA1504;-Microsoft.Maintainability#CA1500;-Microsoft.Mobility#CA1600;-Microsoft.Mobility#CA1601;-Microsoft.Naming#CA1702;-Microsoft.Naming#CA1700;-Microsoft.Naming#CA1712;-Microsoft.Naming#CA1713;-Microsoft.Naming#CA1714;-Microsoft.Naming#CA1709;-Microsoft.Naming#CA1704;-Microsoft.Naming#CA1708;-Microsoft.Naming#CA1715;-Microsoft.Naming#CA1710;-Microsoft.Naming#CA1720;-Microsoft.Naming#CA1707;-Microsoft.Naming#CA1722;-Microsoft.Naming#CA1711;-Microsoft.Naming#CA1716;-Microsoft.Naming#CA1717;-Microsoft.Naming#CA1725;-Microsoft.Naming#CA1719;-Microsoft.Naming#CA1721;-Microsoft.Naming#CA1701;-Microsoft.Naming#CA1703;-Microsoft.Naming#CA1724;-Microsoft.Naming#CA1726;-Microsoft.Performance#CA1809;-Microsoft.Performance#CA1811;-Microsoft.Performance#CA1812;-Microsoft.Performance#CA1813;-Microsoft.Performance#CA1823;-Microsoft.Performance#CA1800;-Microsoft.Performance#CA1805;-Microsoft.Performance#CA1810;-Microsoft.Performance#CA1824;-Microsoft.Performance#CA1822;-Microsoft.Performance#CA1815;-Microsoft.Performance#CA1814;-Microsoft.Performance#CA1819;-Microsoft.Performance#CA1821;-Microsoft.Performance#CA1820;-Microsoft.Performance#CA1802;-Microsoft.Portability#CA1903;-Microsoft.Portability#CA1901;-Microsoft.Portability#CA1900;-Microsoft.Reliability#CA2001;-Microsoft.Reliability#CA2002;-Microsoft.Reliability#CA2003;-Microsoft.Reliability#CA2004;-Microsoft.Reliability#CA2006;-Microsoft.Security#CA2116;-Microsoft.Security#CA2117;-Microsoft.Security#CA2105;-Microsoft.Security#CA2115;-Microsoft.Security#CA2102;-Microsoft.Security#CA2104;-Microsoft.Security#CA2122;-Microsoft.Security#CA2114;-Microsoft.Security#CA2123;-Microsoft.Security#CA2111;-Microsoft.Security#CA2108;-Microsoft.Security#CA2107;-Microsoft.Security#CA2103;-Microsoft.Security#CA2118;-Microsoft.Security#CA2109;-Microsoft.Security#CA2119;-Microsoft.Security#CA2106;-Microsoft.Security#CA2112;-Microsoft.Security#CA2120;-Microsoft.Security#CA2121;-Microsoft.Security#CA2126;-Microsoft.Security#CA2124;-Microsoft.Security#CA2127;-Microsoft.Security#CA2128;-Microsoft.Security#CA2129</CodeAnalysisRules> - </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="Core, Version=0.9.1.31035, Culture=neutral, processorArchitecture=x86"> - <SpecificVersion>False</SpecificVersion> - <HintPath>C:\Programme\Team MediaPortal\MediaPortal\Core.dll</HintPath> - </Reference> - <Reference Include="Dialogs, Version=0.9.1.31039, Culture=neutral, processorArchitecture=x86"> - <SpecificVersion>False</SpecificVersion> - <HintPath>C:\Programme\Team MediaPortal\MediaPortal\plugins\Windows\Dialogs.dll</HintPath> - </Reference> - <Reference Include="Microsoft.DirectX, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference Include="Microsoft.DirectX.Direct3D, Version=1.0.2902.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" /> - <Reference Include="Microsoft.Office.Interop.Outlook, Version=10.0.4504.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"> - <SpecificVersion>False</SpecificVersion> - <HintPath>C:\Programme\Team MediaPortal\MediaPortal\Microsoft.Office.Interop.Outlook.dll</HintPath> - </Reference> - <Reference Include="System" /> - <Reference Include="System.Data" /> - <Reference Include="System.Drawing" /> - <Reference Include="System.Security" /> - <Reference Include="System.Windows.Forms" /> - <Reference Include="System.Xml" /> - <Reference Include="Utils, Version=2.2.6.34041, Culture=neutral, processorArchitecture=x86"> - <SpecificVersion>False</SpecificVersion> - <HintPath>C:\Programme\Team MediaPortal\MediaPortal\Utils.dll</HintPath> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="ConstStr.cs" /> - <Compile Include="ContentController.cs" /> - <Compile Include="FolderHandler.cs" /> - <Compile Include="OutlookMailPlugin.cs" /> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="Setup\AskPasswordForm.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Setup\AskPasswordForm.Designer.cs"> - <DependentUpon>AskPasswordForm.cs</DependentUpon> - </Compile> - <Compile Include="Setup\OutlookMailSetup.cs"> - <SubType>Form</SubType> - </Compile> - <Compile Include="Setup\OutlookMailSetup.Designer.cs"> - <DependentUpon>OutlookMailSetup.cs</DependentUpon> - </Compile> - <Compile Include="ItemWrapper.cs" /> - <Compile Include="OutlookLayer.cs" /> - <Compile Include="User.cs" /> - <Compile Include="UserMgmt.cs" /> - <Compile Include="Util\Security.cs" /> - <Compile Include="Util\LocalizeStrings.cs" /> - <Compile Include="Util\Utility.cs" /> - </ItemGroup> - <ItemGroup> - <Content Include="language\OutlookMail\strings_de.xml" /> - <Content Include="language\OutlookMail\strings_en.xml" /> - <EmbeddedResource Include="outlook_enabled.png" /> - <EmbeddedResource Include="outlook_disabled.png" /> - <EmbeddedResource Include="outlook_mirrored.png" /> - <Content Include="Skin\Aeon Wide\OutlookMail.xml" /> - <Content Include="Skin\Blue3wide\OutlookMail.xml" /> - <Content Include="Skin\Blue3\OutlookMail.xml" /> - <Content Include="Skin\BlueTwo wide\OutlookMail.xml" /> - <Content Include="Skin\Monochrome\OutlookMail.xml" /> - <Content Include="Skin\BlueTwo wide\OutlookMail2parted.xml" /> - <Content Include="Skin\BlueTwo\OutlookMail.xml" /> - </ItemGroup> - <ItemGroup> - <EmbeddedResource Include="Setup\AskPasswordForm.resx"> - <DependentUpon>AskPasswordForm.cs</DependentUpon> - <SubType>Designer</SubType> - </EmbeddedResource> - <EmbeddedResource Include="Setup\OutlookMailSetup.resx"> - <DependentUpon>OutlookMailSetup.cs</DependentUpon> - <SubType>Designer</SubType> - </EmbeddedResource> - </ItemGroup> - <ItemGroup> - <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> - <Visible>False</Visible> - <ProductName>.NET Framework Client Profile</ProductName> - <Install>false</Install> - </BootstrapperPackage> - <BootstrapperPackage Include="Microsoft.Net.Framework.2.0"> - <Visible>False</Visible> - <ProductName>.NET Framework 2.0 %28x86%29</ProductName> - <Install>true</Install> - </BootstrapperPackage> - <BootstrapperPackage Include="Microsoft.Net.Framework.3.0"> - <Visible>False</Visible> - <ProductName>.NET Framework 3.0 %28x86%29</ProductName> - <Install>false</Install> - </BootstrapperPackage> - <BootstrapperPackage Include="Microsoft.Net.Framework.3.5"> - <Visible>False</Visible> - <ProductName>.NET Framework 3.5</ProductName> - <Install>false</Install> - </BootstrapperPackage> - <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> - <Visible>False</Visible> - <ProductName>.NET Framework 3.5 SP1</ProductName> - <Install>false</Install> - </BootstrapperPackage> - </ItemGroup> - <Import Project="$(MSBuildBinPath)\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> - --> - <PropertyGroup> - <PostBuildEvent>copy "D:\1_Projekte\C#\02_Mediaportal\1_Outlook Mail Plugin\bin\Debug\OutlookMail.dll" "C:\Programme\Team MediaPortal\MediaPortal\plugins\Windows" /Y</PostBuildEvent> - </PropertyGroup> -</Project> \ No newline at end of file Deleted: trunk/plugins/Outlook Mail/Outlook Mail.csproj.user =================================================================== --- trunk/plugins/Outlook Mail/Outlook Mail.csproj.user 2011-09-11 10:45:26 UTC (rev 4286) +++ trunk/plugins/Outlook Mail/Outlook Mail.csproj.user 2011-09-11 10:50:51 UTC (rev 4287) @@ -1,22 +0,0 @@ -<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <StartAction>Program</StartAction> - <StartProgram>C:\Programme\Team MediaPortal\MediaPortal\MediaPortal.exe</StartProgram> - </PropertyGroup> - <PropertyGroup> - <PublishUrlHistory> - </PublishUrlHistory> - <InstallUrlHistory> - </InstallUrlHistory> - <SupportUrlHistory> - </SupportUrlHistory> - <UpdateUrlHistory> - </UpdateUrlHistory> - <BootstrapperUrlHistory> - </BootstrapperUrlHistory> - <ErrorReportUrlHistory> - </ErrorReportUrlHistory> - <FallbackCulture>en-US</FallbackCulture> - <VerifyUploadedFiles>false</VerifyUploadedFiles> - </PropertyGroup> -</Project> \ No newline at end of file Modified: trunk/plugins/Outlook Mail/OutlookLayer.cs =================================================================== --- trunk/plugins/Outlook Mail/OutlookLayer.cs 2011-09-11 10:45:26 UTC (rev 4286) +++ trunk/plugins/Outlook Mail/OutlookLayer.cs 2011-09-11 10:50:51 UTC (rev 4287) @@ -201,8 +201,8 @@ try { // Look if there is another outlook.exe the plugin can use - _outlookApp = (Outlook.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Outlook.Application"); - _outlookNamespace = _outlookApp.GetNamespace("MAPI"); + _outlookApp = (Outlook.Application)System.Runtime.InteropServices.Marshal.GetActiveObject("Outlook.Application"); + _outlookNamespace = _outlookApp.GetNamespace("MAPI"); } catch (Exception) { Added: trunk/plugins/Outlook Mail/OutlookMail.csproj =================================================================== --- trunk/plugins/Outlook Mail/OutlookMail.csproj (rev 0) +++ trunk/plugins/Outlook Mail/OutlookMail.csproj 2011-09-11 10:50:51 UTC (rev 4287) @@ -0,0 +1,180 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.30703</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{E5313D66-FF5F-48C6-8527-728BF7871ED4}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>OutlookMail</RootNamespace> + <AssemblyName>OutlookMail</AssemblyName> + <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <TargetFrameworkProfile /> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(... [truncated message content] |