public ConfigForm(ThisAddIn addin) { var olApplication = addin.GetApplication(); int lcid = olApplication.LanguageSettings.get_LanguageID(Microsoft.Office.Core.MsoAppLanguageID.msoLanguageIDUI); Thread.CurrentThread.CurrentUICulture = new CultureInfo(lcid); InitializeComponent(); UpdateLabelsWithLang(Thread.CurrentThread.CurrentUICulture); Outlook.Folder root = olApplication.Session.DefaultStore.GetRootFolder() as Outlook.Folder; EnumerateFolders(root, "└ "); ReloadOptions(); }
protected void Activate(ThisAddIn addin) { updateItemDelegate = new updateItem(UpdateEtat); endArchiveDelegate = new endArchive(Terminate); addLIneDelegate = new addLIne(AddLIneToList); this.olApplication = addin.GetApplication(); int lcid = this.olApplication.LanguageSettings.get_LanguageID(Microsoft.Office.Core.MsoAppLanguageID.msoLanguageIDUI); Thread.CurrentThread.CurrentUICulture = new CultureInfo(lcid); culture = Thread.CurrentThread.CurrentUICulture; }
public FormArchiveRename(ThisAddIn addin) { Activate(addin); if (addin.GetApplication().ActiveExplorer().Selection.Count > 0) { Microsoft.Office.Interop.Outlook.Selection mySelection = addin.GetApplication().ActiveExplorer().Selection; foreach (Object obj in mySelection) { if (obj is Microsoft.Office.Interop.Outlook.MailItem) { mailitem = (Microsoft.Office.Interop.Outlook.MailItem)obj; } } } InitializeComponent(); UpdateLabelsWithLang(culture); AddLastPathsToCombo(); }