コード例 #1
0
ファイル: Form1.cs プロジェクト: coreyshuman/MightyEncryptor
        public Form1()
        {
            InitializeComponent();
            dirProc    = new DirectoryProcessor();
            encryption = new EncryptionEngine();

            debug = Debugging.Instance;
            debug.SetForm(this);
            Version v     = Assembly.GetExecutingAssembly().GetName().Version;
            string  name  = Assembly.GetExecutingAssembly().GetName().Name;
            string  about = string.Format(CultureInfo.InvariantCulture, @"{0} Version {1}.{2}.{3} (r{4})", name, v.Major, v.Minor, v.Build, v.Revision);

            debug.WriteLine(about);

            // load settings
            bool needSave = false;

            if (Properties.Settings.Default.LastEncryptFilesPath == "")
            {
                Properties.Settings.Default.LastEncryptFilesPath = Environment.SpecialFolder.MyDocuments.ToString();
                needSave = true;
            }
            if (Properties.Settings.Default.LastEncryptSavePath == "")
            {
                Properties.Settings.Default.LastEncryptSavePath = Environment.SpecialFolder.MyDocuments.ToString();
                needSave = true;
            }
            if (Properties.Settings.Default.LastDecryptFilePath == "")
            {
                Properties.Settings.Default.LastDecryptFilePath = Environment.SpecialFolder.MyDocuments.ToString();
                needSave = true;
            }
            if (Properties.Settings.Default.LastDecryptSavePath == "")
            {
                Properties.Settings.Default.LastDecryptSavePath = Environment.SpecialFolder.MyDocuments.ToString();
                needSave = true;
            }
            if (needSave)
            {
                Properties.Settings.Default.Save();
            }
        }
コード例 #2
0
 public BlockFileProcessor(DirectoryProcessor dp)
 {
     directoryProcessor = dp;
 }
コード例 #3
0
 public EncryptionEngine()
 {
     debug              = Debugging.Instance;
     dirProc            = new DirectoryProcessor();
     blockFileProcessor = new BlockFileProcessor(dirProc);
 }