static void Main(string[] args) { string programPath = @"T:\Archivos de Programa\Overwatch\Overwatch.exe"; RegionRuleCreator regionBlocker = new RegionRuleCreator(programPath); Console.WriteLine(regionBlocker.CreateAllOutboundRules()); RegionBlockerHandler handler = new RegionBlockerHandler(); foreach (IRule rule in handler.OverwatchSSBRules) { Console.WriteLine(rule.Name); foreach (IAddress address in rule.RemoteAddresses) { Console.WriteLine(address.ToString()); } Console.WriteLine("-------------------------------------------------------------------------------------------------------------------------"); } Console.ReadLine(); }
public MainWindow() { string overwatchPath = System.Configuration.ConfigurationManager.AppSettings["OverwatchRoute"].ToString(); Handler = new RegionBlockerHandler(); if (string.IsNullOrEmpty(overwatchPath)) { SearchFile win2 = new SearchFile(); win2.ShowDialog(); if (!string.IsNullOrEmpty((string)App.Current.Properties["FirstValue"])) { overwatchPath = (string)App.Current.Properties["FirstValue"]; } else { this.Close(); } } initializeOSS(overwatchPath); }