public switchSoft(FILEUTILS fileutils) { this.fileutils = fileutils; softName = "ShutdownAndMouse.exe"; string[] files = fileutils.searchFile(fileutils.ShutdownSoftFolderName, softName); version = files.OrderByDescending(path => File.GetLastWriteTime(path)).FirstOrDefault(); }
public KLITE(FILEUTILS fileutils) { this.fileutils = fileutils; //search "Softs" floder for soft path, if exist multiple version, select the newer one SoftName = "*K-Lite*.exe"; string[] files = fileutils.searchFile(fileutils.path, SoftName); version = files.OrderByDescending(path => File.GetLastWriteTime(path)).FirstOrDefault(); SoftName = version.Split('\\').Last(); }
public FLASH(FILEUTILS fileutils) { this.fileutils = fileutils; //search "Softs" floder for soft path, if exist multiple version, select the newer one string softName = "*flash*.exe"; files = fileutils.searchFile(fileutils.path, softName); //version = files.OrderByDescending(path => File.GetLastWriteTime(path)).FirstOrDefault(); }
private List <string> Softs = new List <string>(); //列表源数据 public Prompt(FILEUTILS fileutils) { InitializeComponent(); this.fileutils = fileutils; lb_summary.Content = "本软件目前运行与U盘,请勾选需复制到" + fileutils.target.Split('\\')[0] + "的项目."; Softs = fileutils.Traverse(fileutils.path + @"\softs").Select(x => x.Split('\\').Last()).ToList(); Softs.Remove("softs"); //Console.WriteLine(Softs[1]); lv_Softs.ItemsSource = Softs; }
public ProgramManager(FILEUTILS fileutils) { this.fileutils = fileutils; string fileName = @"\execludePublisher.txt"; excludePublishers = File.ReadAllLines(fileutils.path + fileName, System.Text.Encoding.Default); string softName = "Unlocker.exe"; string[] files = fileutils.searchFile(fileutils.path, softName); version = files.OrderByDescending(path => File.GetLastWriteTime(path)).FirstOrDefault(); }
public Prompt(FILEUTILS fileutils) { InitializeComponent(); btn_pause.IsEnabled = false; this.fileutils = fileutils; //lb_summary.Content = "本软件目前运行与U盘,请勾选需复制到" + fileutils.target.Split('\\')[0] + "的项目;复制完成后本软件将会关闭,并打开" + fileutils.target.Split('\\')[0]; lb_summary.Content = "本软件目前运行与U盘,请勾选需复制到" + fileutils.target + "的项目."; bool symbol = Install_Status.Check(fileutils, "VNC", true); if (symbol) { Console.WriteLine("系统中已安装Office."); /*var toolTip = new ToolTip(); * toolTip.StaysOpen = true; * toolTip.Content = "系统中已安装Office."; * lv_Softs.ToolTip = toolTip;*/ } var ItemsPath = fileutils.Traverse(fileutils.path + @"\softs").Skip(1); foreach (string path in ItemsPath) { Prompt_lv_item item = new Prompt_lv_item(); item.Name = path.Split('\\').Last(); item.Path = path; ItemsSource.Add(item); } var StoreItems = LoadList(ListFile); if (StoreItems != null) { foreach (Prompt_lv_item NewItem in ItemsSource) { foreach (Prompt_lv_item OldItem in StoreItems) { if (NewItem.Name == OldItem.Name) { NewItem.Checked = OldItem.Checked; } } } } lv_Softs.ItemsSource = ItemsSource; //background process initialize m_BackgroundWorker = new BackgroundWorker(); // 实例化后台对象 m_BackgroundWorker.WorkerReportsProgress = true; // 设置可以通告进度 m_BackgroundWorker.WorkerSupportsCancellation = true; // 设置可以取消 m_BackgroundWorker.DoWork += new DoWorkEventHandler(DoWork); m_BackgroundWorker.ProgressChanged += new ProgressChangedEventHandler(UpdateProgress); m_BackgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(CompletedWork); }
public OFFICE(FILEUTILS fileutils) { this.fileutils = fileutils; //search "Softs" floder for soft path, if exist multiple version, select the newer one string softName = "Setup.exe"; string second_keyword = "office"; string[] files = fileutils.searchFile(fileutils.path, softName, second_keyword); version = files.OrderByDescending(path => File.GetLastWriteTime(path)).FirstOrDefault(); officeDir = System.IO.Path.GetDirectoryName(version); //office crack tool softName = "Office 2010 Toolkit.exe"; files = fileutils.searchFile(fileutils.path, softName); toolkit = files.OrderByDescending(path => File.GetLastWriteTime(path)).FirstOrDefault(); toolkitDir = System.IO.Path.GetDirectoryName(toolkit); }
public PlusbeZK(FILEUTILS fileutils) { this.fileutils = fileutils; if (Directory.Exists(fileutils.PlusbeZKFolderName)) { KeyPath = fileutils.searchFile(fileutils.PlusbeZKFolderName, "key.txt")[0]; //SN= HardJM.GetSN(); //Key= HardJM.GetKey(); SetConfigPath = fileutils.searchFile(fileutils.PlusbeZKFolderName, "SetConfig.xml")[0]; SetConfig = File.ReadAllText(SetConfigPath, System.Text.Encoding.Default); SoftPath = fileutils.searchFile(fileutils.PlusbeZKFolderName, Soft)[0]; XmlNodeList nodeList; xml.Load(SetConfigPath); nodeList = xml.GetElementsByTagName("SetConfig"); ParentNode = nodeList[0]; } }
public StartupManager(FILEUTILS fileutils) { this.fileutils = fileutils; }
public ProgramManager(FILEUTILS fileutils) { this.fileutils = fileutils; excludePublishers = File.ReadAllLines(fileutils.path + @"\excludePublisher.txt", System.Text.Encoding.Default); }