static void Main(string[] args) { SpyInfo info = new SpyInfo(); try { info.DeserializeFromString(args[0]); } catch { } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form_stats(info)); }
static void Main(string[] args) { try { SpyInfo info = new SpyInfo(); info.DeserializeFromString(args[0]); //тестовый набор //info.WhereToWriteProcs = "ProcsStasReport.txt"; //info.WhereToReadBadApps = "BadApps.txt"; //info.IsCloseBadApp = true; //info.WhereToWriteKeys = "KeysReport.txt"; //info.WhereToReadBadWords = "BadWords.txt"; //info.WhereToWriteWords = "BadWordsReport.txt"; // var props = typeof(SpyInfo).GetProperties(); foreach (var p in props) { Console.WriteLine(p.Name + ":" + typeof(SpyInfo).GetProperty(p.Name).GetValue(info)); } Console.WriteLine("Spy is working!"); ///тут работа spy SpyApp spyApp = new SpyApp(info); spyApp.On(); } catch (Exception ex) { Console.WriteLine("Error!"); Console.WriteLine(ex.Message); } //Console.WriteLine("Press any key to close..."); //Console.ReadLine(); }