private void RunBtn_MouseDown(object sender, MouseButtonEventArgs e) { if (!RunBtn.Torision) { interpreter.Stop(); } else { RunBtn.Content = "Stop"; interpreter.Analize(); interpreter.Completed += () => { RunBtn.Content = "Run"; RunBtn.Torision = false; }; interpreter.Stopped += () => { RunBtn.Content = "Run"; }; interpreter.Run(); } }