123456789101112131415161718192021222324252627282930313233343536373839 |
- using System;
- using System.Collections.Generic;
- using System.Configuration;
- using System.Data;
- using System.IO;
- using System.Linq;
- using System.Threading.Tasks;
- using System.Windows;
- using Vinno.IUS.Common.Configuration;
- namespace EncyptTool
- {
- /// <summary>
- /// App.xaml 的交互逻辑
- /// </summary>
- public partial class App : Application
- {
- protected override void OnStartup(StartupEventArgs e)
- {
- if (e.Args.Length == 3)
- {
- if (e.Args[0].ToLower() == "/cmd")
- {
- var configEncrypter = new ConfigCrypter();
- var source = e.Args[1];
- var destination = e.Args[2];
- var textToBeEncrypt = File.ReadAllText(source);
- var encryptedText = configEncrypter.EncryptDES(textToBeEncrypt);
- File.WriteAllText(destination, encryptedText);
- Current.Shutdown(0);
- return;
- }
-
- }
- base.OnStartup(e);
- }
- }
- }
|