├── version ├── OutlookOkan ├── Properties │ ├── Resources.ja-JP.Designer.cs │ ├── Settings.settings │ ├── Settings.cs │ ├── AssemblyInfo.cs │ └── Settings.Designer.cs ├── Images │ └── Noraneko_Logo.png ├── Types │ ├── CcOrBcc.cs │ ├── NameAndRecipient.cs │ ├── MailItemsRecipientAndMailAddress.cs │ ├── InternalDomain.cs │ ├── AutoDeleteRecipient.cs │ ├── AttachmentProhibitedRecipients.cs │ ├── NameAndDomains.cs │ ├── KeywordAndRecipients.cs │ ├── AutoCcBccAttachedFile.cs │ ├── AttachmentAlertRecipients.cs │ ├── DeferredDeliveryMinutes.cs │ ├── RecipientsAndAttachmentsName.cs │ ├── AlertKeywordOfSubjectWhenOpeningMail.cs │ ├── AutoCcBccKeyword.cs │ ├── Whitelist.cs │ ├── AutoCcBccRecipient.cs │ ├── DisplayNameAndRecipient.cs │ ├── AlertAddress.cs │ ├── AlertKeywordAndMessage.cs │ ├── AlertKeywordAndMessageForSubject.cs │ ├── AutoAddMessage.cs │ ├── ForceAutoChangeRecipientsToBcc.cs │ ├── ExternalDomainsWarningAndAutoChangeToBcc.cs │ ├── Languages.cs │ ├── CheckList.cs │ ├── AttachmentsSetting.cs │ ├── SecurityForReceivedMail.cs │ └── GeneralSetting.cs ├── Views │ ├── AboutWindow.xaml.cs │ ├── AboutWindow.xaml │ ├── ConfirmationWindow.xaml.cs │ └── SettingsWindow.xaml.cs ├── ViewModels │ ├── ViewModelBase.cs │ ├── RelayCommand.cs │ ├── AboutWindowViewModel.cs │ └── ConfirmationWindowViewModel.cs ├── Helpers │ └── NativeMethods.cs ├── Handlers │ ├── PdfFileHandler.cs │ ├── ZipFileHandler.cs │ ├── CsvFileHandler.cs │ ├── OfficeFileHandler.cs │ └── MailHeaderHandler.cs ├── Ribbon.xml ├── ThisAddIn.Designer.xml ├── packages.config ├── Services │ └── ResourceService.cs ├── Models │ └── CheckNewVersion.cs ├── app.config ├── Ribbon.cs └── ThisAddIn.Designer.cs ├── OutlookOkanTest ├── TestFiles │ ├── PlainText.txt │ ├── Excel.xlsx │ ├── 暗号化なし.zip │ ├── Excel_Password.xlsx │ ├── 暗号化あり_12345_Test.zip │ └── 暗号化あり_AES_12345_Test.zip ├── packages.config ├── Properties │ └── AssemblyInfo.cs ├── app.config ├── Types │ ├── TestRecipient.cs │ └── TestMailItem.cs └── OutlookOkanTest.csproj ├── Screenshots ├── Screenshot_v2.5.0_01.png ├── Screenshot_v2.5.0_03.png ├── Screenshot_v2.6.1_02.png ├── Screenshot_v2.7.0_04.png ├── Screenshot_v2.7.0_05.png └── en │ ├── Screenshot_v2.5.0_01_en.png │ ├── Screenshot_v2.5.0_03_en.png │ ├── Screenshot_v2.6.1_02_en.png │ ├── Screenshot_v2.7.0_04_en.png │ └── Screenshot_v2.7.0_05_en.png ├── .gitattributes ├── SetupCustomAction ├── Properties │ └── AssemblyInfo.cs ├── SetupCustomAction.csproj └── CustomAction.cs ├── OutlookOkan.sln ├── README.md ├── README_en.md ├── .gitignore └── LICENSE /version: -------------------------------------------------------------------------------- 1 | 2.8.2 2 | -------------------------------------------------------------------------------- /OutlookOkan/Properties/Resources.ja-JP.Designer.cs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /OutlookOkanTest/TestFiles/PlainText.txt: -------------------------------------------------------------------------------- 1 | あいうえお 2 | かきくけこ 3 | さしすせそ -------------------------------------------------------------------------------- /OutlookOkan/Images/Noraneko_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-miyake/OutlookOkan/HEAD/OutlookOkan/Images/Noraneko_Logo.png -------------------------------------------------------------------------------- /OutlookOkanTest/TestFiles/Excel.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-miyake/OutlookOkan/HEAD/OutlookOkanTest/TestFiles/Excel.xlsx -------------------------------------------------------------------------------- /OutlookOkanTest/TestFiles/暗号化なし.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-miyake/OutlookOkan/HEAD/OutlookOkanTest/TestFiles/暗号化なし.zip -------------------------------------------------------------------------------- /Screenshots/Screenshot_v2.5.0_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-miyake/OutlookOkan/HEAD/Screenshots/Screenshot_v2.5.0_01.png -------------------------------------------------------------------------------- /Screenshots/Screenshot_v2.5.0_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-miyake/OutlookOkan/HEAD/Screenshots/Screenshot_v2.5.0_03.png -------------------------------------------------------------------------------- /Screenshots/Screenshot_v2.6.1_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-miyake/OutlookOkan/HEAD/Screenshots/Screenshot_v2.6.1_02.png -------------------------------------------------------------------------------- /Screenshots/Screenshot_v2.7.0_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-miyake/OutlookOkan/HEAD/Screenshots/Screenshot_v2.7.0_04.png -------------------------------------------------------------------------------- /Screenshots/Screenshot_v2.7.0_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-miyake/OutlookOkan/HEAD/Screenshots/Screenshot_v2.7.0_05.png -------------------------------------------------------------------------------- /Screenshots/en/Screenshot_v2.5.0_01_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-miyake/OutlookOkan/HEAD/Screenshots/en/Screenshot_v2.5.0_01_en.png -------------------------------------------------------------------------------- /Screenshots/en/Screenshot_v2.5.0_03_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-miyake/OutlookOkan/HEAD/Screenshots/en/Screenshot_v2.5.0_03_en.png -------------------------------------------------------------------------------- /Screenshots/en/Screenshot_v2.6.1_02_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-miyake/OutlookOkan/HEAD/Screenshots/en/Screenshot_v2.6.1_02_en.png -------------------------------------------------------------------------------- /Screenshots/en/Screenshot_v2.7.0_04_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-miyake/OutlookOkan/HEAD/Screenshots/en/Screenshot_v2.7.0_04_en.png -------------------------------------------------------------------------------- /Screenshots/en/Screenshot_v2.7.0_05_en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-miyake/OutlookOkan/HEAD/Screenshots/en/Screenshot_v2.7.0_05_en.png -------------------------------------------------------------------------------- /OutlookOkan/Types/CcOrBcc.cs: -------------------------------------------------------------------------------- 1 | namespace OutlookOkan.Types 2 | { 3 | public enum CcOrBcc 4 | { 5 | Bcc, 6 | Cc 7 | } 8 | } -------------------------------------------------------------------------------- /OutlookOkanTest/TestFiles/Excel_Password.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-miyake/OutlookOkan/HEAD/OutlookOkanTest/TestFiles/Excel_Password.xlsx -------------------------------------------------------------------------------- /OutlookOkanTest/TestFiles/暗号化あり_12345_Test.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-miyake/OutlookOkan/HEAD/OutlookOkanTest/TestFiles/暗号化あり_12345_Test.zip -------------------------------------------------------------------------------- /OutlookOkanTest/TestFiles/暗号化あり_AES_12345_Test.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/t-miyake/OutlookOkan/HEAD/OutlookOkanTest/TestFiles/暗号化あり_AES_12345_Test.zip -------------------------------------------------------------------------------- /OutlookOkan/Types/NameAndRecipient.cs: -------------------------------------------------------------------------------- 1 | namespace OutlookOkan.Types 2 | { 3 | public sealed class NameAndRecipient 4 | { 5 | public string MailAddress { get; set; } 6 | public string NameAndMailAddress { get; set; } 7 | public string IncludedGroupAndList { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /OutlookOkan/Types/MailItemsRecipientAndMailAddress.cs: -------------------------------------------------------------------------------- 1 | namespace OutlookOkan.Types 2 | { 3 | public sealed class MailItemsRecipientAndMailAddress 4 | { 5 | public string MailItemsRecipient { get; set; } 6 | public string MailAddress { get; set; } 7 | public int Type { get; set; } 8 | } 9 | } -------------------------------------------------------------------------------- /OutlookOkanTest/packages.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /OutlookOkan/Views/AboutWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using OutlookOkan.ViewModels; 2 | using System.Windows; 3 | 4 | namespace OutlookOkan.Views 5 | { 6 | public partial class AboutWindow : Window 7 | { 8 | public AboutWindow() 9 | { 10 | DataContext = new AboutWindowViewModel(); 11 | InitializeComponent(); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /OutlookOkan/Types/InternalDomain.cs: -------------------------------------------------------------------------------- 1 | using CsvHelper.Configuration; 2 | 3 | namespace OutlookOkan.Types 4 | { 5 | public sealed class InternalDomain 6 | { 7 | public string Domain { get; set; } 8 | } 9 | 10 | public sealed class InternalDomainMap : ClassMap 11 | { 12 | public InternalDomainMap() 13 | { 14 | _ = Map(m => m.Domain).Index(0); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /OutlookOkan/ViewModels/ViewModelBase.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace OutlookOkan.ViewModels 4 | { 5 | public class ViewModelBase : INotifyPropertyChanged 6 | { 7 | public event PropertyChangedEventHandler PropertyChanged; 8 | protected virtual void OnPropertyChanged(string propertyName) 9 | { 10 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /OutlookOkan/Types/AutoDeleteRecipient.cs: -------------------------------------------------------------------------------- 1 | using CsvHelper.Configuration; 2 | 3 | namespace OutlookOkan.Types 4 | { 5 | public sealed class AutoDeleteRecipient 6 | { 7 | public string Recipient { get; set; } 8 | } 9 | 10 | public sealed class AutoDeleteRecipientMap : ClassMap 11 | { 12 | public AutoDeleteRecipientMap() 13 | { 14 | _ = Map(m => m.Recipient).Index(0); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /OutlookOkan/Types/AttachmentProhibitedRecipients.cs: -------------------------------------------------------------------------------- 1 | using CsvHelper.Configuration; 2 | 3 | namespace OutlookOkan.Types 4 | { 5 | public sealed class AttachmentProhibitedRecipients 6 | { 7 | public string Recipient { get; set; } 8 | } 9 | 10 | public sealed class AttachmentProhibitedRecipientsMap : ClassMap 11 | { 12 | public AttachmentProhibitedRecipientsMap() 13 | { 14 | _ = Map(m => m.Recipient).Index(0); 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /OutlookOkan/Types/NameAndDomains.cs: -------------------------------------------------------------------------------- 1 | using CsvHelper.Configuration; 2 | 3 | namespace OutlookOkan.Types 4 | { 5 | public sealed class NameAndDomains 6 | { 7 | public string Name { get; set; } 8 | public string Domain { get; set; } 9 | } 10 | 11 | public sealed class NameAndDomainsMap : ClassMap 12 | { 13 | public NameAndDomainsMap() 14 | { 15 | _ = Map(m => m.Name).Index(0); 16 | _ = Map(m => m.Domain).Index(1); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /OutlookOkan/Types/KeywordAndRecipients.cs: -------------------------------------------------------------------------------- 1 | using CsvHelper.Configuration; 2 | 3 | namespace OutlookOkan.Types 4 | { 5 | public sealed class KeywordAndRecipients 6 | { 7 | public string Keyword { get; set; } 8 | public string Recipient { get; set; } 9 | } 10 | 11 | public sealed class KeywordAndRecipientsMap : ClassMap 12 | { 13 | public KeywordAndRecipientsMap() 14 | { 15 | _ = Map(m => m.Keyword).Index(0); 16 | _ = Map(m => m.Recipient).Index(1); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /OutlookOkan/Types/AutoCcBccAttachedFile.cs: -------------------------------------------------------------------------------- 1 | using CsvHelper.Configuration; 2 | 3 | namespace OutlookOkan.Types 4 | { 5 | public sealed class AutoCcBccAttachedFile 6 | { 7 | public CcOrBcc CcOrBcc { get; set; } 8 | public string AutoAddAddress { get; set; } 9 | } 10 | 11 | public sealed class AutoCcBccAttachedFileMap : ClassMap 12 | { 13 | public AutoCcBccAttachedFileMap() 14 | { 15 | _ = Map(m => m.CcOrBcc).Index(0); 16 | _ = Map(m => m.AutoAddAddress).Index(1); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /OutlookOkan/Types/AttachmentAlertRecipients.cs: -------------------------------------------------------------------------------- 1 | using CsvHelper.Configuration; 2 | 3 | namespace OutlookOkan.Types 4 | { 5 | public sealed class AttachmentAlertRecipients 6 | { 7 | public string Recipient { get; set; } 8 | public string Message { get; set; } 9 | } 10 | 11 | public sealed class AttachmentAlertRecipientsMap : ClassMap 12 | { 13 | public AttachmentAlertRecipientsMap() 14 | { 15 | _ = Map(m => m.Recipient).Index(0); 16 | _ = Map(m => m.Message).Index(1); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /OutlookOkan/Types/DeferredDeliveryMinutes.cs: -------------------------------------------------------------------------------- 1 | using CsvHelper.Configuration; 2 | 3 | namespace OutlookOkan.Types 4 | { 5 | public sealed class DeferredDeliveryMinutes 6 | { 7 | public string TargetAddress { get; set; } 8 | public int DeferredMinutes { get; set; } 9 | } 10 | 11 | public sealed class DeferredDeliveryMinutesMap : ClassMap 12 | { 13 | public DeferredDeliveryMinutesMap() 14 | { 15 | _ = Map(m => m.TargetAddress).Index(0); 16 | _ = Map(m => m.DeferredMinutes).Index(1).Default(0); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /OutlookOkan/Types/RecipientsAndAttachmentsName.cs: -------------------------------------------------------------------------------- 1 | using CsvHelper.Configuration; 2 | 3 | namespace OutlookOkan.Types 4 | { 5 | public sealed class RecipientsAndAttachmentsName 6 | { 7 | public string AttachmentsName { get; set; } 8 | public string Recipient { get; set; } 9 | } 10 | 11 | public sealed class RecipientsAndAttachmentsNameMap : ClassMap 12 | { 13 | public RecipientsAndAttachmentsNameMap() 14 | { 15 | _ = Map(m => m.AttachmentsName).Index(0); 16 | _ = Map(m => m.Recipient).Index(1); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /OutlookOkan/Types/AlertKeywordOfSubjectWhenOpeningMail.cs: -------------------------------------------------------------------------------- 1 | using CsvHelper.Configuration; 2 | 3 | namespace OutlookOkan.Types 4 | { 5 | public class AlertKeywordOfSubjectWhenOpeningMail 6 | { 7 | public string AlertKeyword { get; set; } 8 | public string Message { get; set; } 9 | } 10 | 11 | public sealed class AlertKeywordOfSubjectWhenOpeningMailMap : ClassMap 12 | { 13 | public AlertKeywordOfSubjectWhenOpeningMailMap() 14 | { 15 | _ = Map(m => m.AlertKeyword).Index(0); 16 | _ = Map(m => m.Message).Index(1); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /OutlookOkan/Types/AutoCcBccKeyword.cs: -------------------------------------------------------------------------------- 1 | using CsvHelper.Configuration; 2 | 3 | namespace OutlookOkan.Types 4 | { 5 | public sealed class AutoCcBccKeyword 6 | { 7 | public string Keyword { get; set; } 8 | public CcOrBcc CcOrBcc { get; set; } 9 | public string AutoAddAddress { get; set; } 10 | } 11 | 12 | public sealed class AutoCcBccKeywordMap : ClassMap 13 | { 14 | public AutoCcBccKeywordMap() 15 | { 16 | _ = Map(m => m.Keyword).Index(0); 17 | _ = Map(m => m.CcOrBcc).Index(1); 18 | _ = Map(m => m.AutoAddAddress).Index(2); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /OutlookOkan/Types/Whitelist.cs: -------------------------------------------------------------------------------- 1 | using CsvHelper.Configuration; 2 | 3 | namespace OutlookOkan.Types 4 | { 5 | public sealed class Whitelist 6 | { 7 | public string WhiteName { get; set; } 8 | public bool IsSkipConfirmation { get; set; } 9 | } 10 | 11 | public sealed class WhitelistMap : ClassMap 12 | { 13 | public WhitelistMap() 14 | { 15 | _ = Map(m => m.WhiteName).Index(0); 16 | _ = Map(m => m.IsSkipConfirmation).Index(1).TypeConverterOption.BooleanValues(true, true, "Yes", "Y").TypeConverterOption.BooleanValues(false, true, "No", "N").Default(false); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /OutlookOkan/Types/AutoCcBccRecipient.cs: -------------------------------------------------------------------------------- 1 | using CsvHelper.Configuration; 2 | 3 | namespace OutlookOkan.Types 4 | { 5 | public sealed class AutoCcBccRecipient 6 | { 7 | public string TargetRecipient { get; set; } 8 | public CcOrBcc CcOrBcc { get; set; } 9 | public string AutoAddAddress { get; set; } 10 | } 11 | 12 | public sealed class AutoCcBccRecipientMap : ClassMap 13 | { 14 | public AutoCcBccRecipientMap() 15 | { 16 | _ = Map(m => m.TargetRecipient).Index(0); 17 | _ = Map(m => m.CcOrBcc).Index(1); 18 | _ = Map(m => m.AutoAddAddress).Index(2); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /OutlookOkanTest/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | [assembly: AssemblyTitle("OutlookOkanTest")] 5 | [assembly: AssemblyDescription("")] 6 | [assembly: AssemblyConfiguration("")] 7 | [assembly: AssemblyCompany("Noraneko Inc.")] 8 | [assembly: AssemblyProduct("OutlookOkanTest")] 9 | [assembly: AssemblyCopyright("Copyright © Noraneko Inc. 2022")] 10 | [assembly: AssemblyTrademark("")] 11 | [assembly: AssemblyCulture("")] 12 | 13 | [assembly: ComVisible(false)] 14 | 15 | [assembly: Guid("828251eb-7a92-4559-93f8-bb5f5d8b16a7")] 16 | 17 | [assembly: AssemblyVersion("1.0.0.0")] 18 | [assembly: AssemblyFileVersion("1.0.0.0")] 19 | -------------------------------------------------------------------------------- /OutlookOkan/Helpers/NativeMethods.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Runtime.InteropServices; 3 | using System.Windows.Forms; 4 | 5 | namespace OutlookOkan.Helpers 6 | { 7 | public sealed class NativeMethods : IWin32Window 8 | { 9 | [DllImport("user32", CharSet = CharSet.Unicode)] 10 | private static extern IntPtr FindWindow(string lpClassName, string lpWindowName); 11 | 12 | public IntPtr Handle { get; } 13 | 14 | public NativeMethods(object windowObject) 15 | { 16 | Handle = FindWindow("rctrl_renwnd32\0", windowObject.GetType().InvokeMember("Caption", System.Reflection.BindingFlags.GetProperty, null, windowObject, null).ToString()); 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /OutlookOkan/Types/DisplayNameAndRecipient.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | 3 | namespace OutlookOkan.Types 4 | { 5 | public sealed class DisplayNameAndRecipient 6 | { 7 | public Dictionary All { get; set; } = new Dictionary(); 8 | public Dictionary To { get; set; } = new Dictionary(); 9 | public Dictionary Cc { get; set; } = new Dictionary(); 10 | public Dictionary Bcc { get; set; } = new Dictionary(); 11 | public List MailRecipientsIndex { get; set; } = new List(); 12 | } 13 | } -------------------------------------------------------------------------------- /OutlookOkan/Types/AlertAddress.cs: -------------------------------------------------------------------------------- 1 | using CsvHelper.Configuration; 2 | 3 | namespace OutlookOkan.Types 4 | { 5 | public sealed class AlertAddress 6 | { 7 | public string TargetAddress { get; set; } 8 | public bool IsCanNotSend { get; set; } 9 | public string Message { get; set; } 10 | } 11 | 12 | public sealed class AlertAddressMap : ClassMap 13 | { 14 | public AlertAddressMap() 15 | { 16 | _ = Map(m => m.TargetAddress).Index(0); 17 | _ = Map(m => m.IsCanNotSend).Index(1).TypeConverterOption.BooleanValues(true, true, "Yes", "Y").TypeConverterOption.BooleanValues(false, true, "No", "N").Default(false); 18 | _ = Map(m => m.Message).Index(2); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /OutlookOkan/Handlers/PdfFileHandler.cs: -------------------------------------------------------------------------------- 1 | using PdfSharp.Pdf.IO; 2 | using System; 3 | using System.IO; 4 | 5 | namespace OutlookOkan.Handlers 6 | { 7 | internal static class PdfFileHandler 8 | { 9 | internal static bool CheckPdfIsEncrypted(string filePath) 10 | { 11 | //リンクとして添付の場合、実ファイルが存在しない場合がある。 12 | if (!File.Exists(filePath)) return false; 13 | 14 | try 15 | { 16 | PdfReader.Open(filePath, PdfDocumentOpenMode.ReadOnly).Dispose(); 17 | } 18 | catch (PdfReaderException) 19 | { 20 | return true; 21 | } 22 | catch (Exception) 23 | { 24 | return false; 25 | } 26 | 27 | return false; 28 | } 29 | } 30 | } -------------------------------------------------------------------------------- /OutlookOkan/Types/AlertKeywordAndMessage.cs: -------------------------------------------------------------------------------- 1 | using CsvHelper.Configuration; 2 | 3 | namespace OutlookOkan.Types 4 | { 5 | public sealed class AlertKeywordAndMessage 6 | { 7 | public string AlertKeyword { get; set; } 8 | public string Message { get; set; } 9 | public bool IsCanNotSend { get; set; } 10 | } 11 | 12 | public sealed class AlertKeywordAndMessageMap : ClassMap 13 | { 14 | public AlertKeywordAndMessageMap() 15 | { 16 | _ = Map(m => m.AlertKeyword).Index(0); 17 | _ = Map(m => m.Message).Index(1); 18 | _ = Map(m => m.IsCanNotSend).Index(2).TypeConverterOption.BooleanValues(true, true, "Yes", "Y").TypeConverterOption.BooleanValues(false, true, "No", "N").Default(false); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /OutlookOkan/Types/AlertKeywordAndMessageForSubject.cs: -------------------------------------------------------------------------------- 1 | using CsvHelper.Configuration; 2 | 3 | namespace OutlookOkan.Types 4 | { 5 | public sealed class AlertKeywordAndMessageForSubject 6 | { 7 | public string AlertKeyword { get; set; } 8 | public string Message { get; set; } 9 | public bool IsCanNotSend { get; set; } 10 | } 11 | 12 | public sealed class AlertKeywordAndMessageForSubjectMap : ClassMap 13 | { 14 | public AlertKeywordAndMessageForSubjectMap() 15 | { 16 | _ = Map(m => m.AlertKeyword).Index(0); 17 | _ = Map(m => m.Message).Index(1); 18 | _ = Map(m => m.IsCanNotSend).Index(2).TypeConverterOption.BooleanValues(true, true, "Yes", "Y").TypeConverterOption.BooleanValues(false, true, "No", "N").Default(false); 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /OutlookOkan/Ribbon.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |