private static void OnLearning(object sender, LearningEventArgs e) { Console.WriteLine("Learning: {0}% freq={1} quality={2}", e.Progress, e.CarrierFrequency, e.SignalQuality); }
void SynBot_Learning(object sender, LearningEventArgs e) { Console.WriteLine("--------------------------------"); try { Console.WriteLine("Writing to learn file..."); var filePath = Path.Combine(Directory.GetCurrentDirectory(), "package\\Learned.siml"); e.Document.Save(filePath); Console.WriteLine("Saved learn file!"); } catch (Exception ex) { Console.WriteLine("Write Failed: " + ex.Message); } Console.WriteLine("--------------------------------"); }
private void Instance_StartLearning(object sender, LearningEventArgs e) { statusLabel.Text = "Press and hold the '" + e.Button + "' button on your remote"; Application.DoEvents(); }
/// event handler attached to the Learning event of the Bot private void SimlBot_Learning(object sender, LearningEventArgs e) { e.Document.Save(botsavepath + nomsavelearned); }