Beispiel #1
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Start searching");
            var configs    = Greeter.Search();
            var sel_addr   = "";
            var sel_config = new Config();

            foreach (KeyValuePair <string, Config> config in configs)
            {
                Console.WriteLine("IP: " + config.Key);
                Console.WriteLine("IP: " + config.Value.VersionStr);
                sel_addr   = config.Key;
                sel_config = config.Value;
            }
            Console.WriteLine("Done searching");

            var cacher = new Cacher();

            cacher.Changed += HandleCacher;
            cacher.Connect(sel_config, sel_addr);
            while (true)
            {
                cacher.Check();
            }
        }
Beispiel #2
0
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     addr = comboBox1.Text.Split(':')[0];
     cacher.Connect(configs[addr], addr);
 }