示例#1
0
 void ev_NameReceived(object sender, UCIMessageEventArgs e)
 {
     if (txtName.InvokeRequired)
     {
         txtName.BeginInvoke(new MethodInvoker(delegate() { ev_NameReceived(sender, e); }));
     }
     else
     {
         txtName.Text = e.Message;
     }
 }
示例#2
0
        void uciEngine_NameReceived(object sender, UCIMessageEventArgs e)
        {
            UCIEngine uciEngine = sender as UCIEngine;

            if (uciEngine != null)
            {
                InfinityChess.AnalysisUc analysisUc = new InfinityChess.AnalysisUc(true, this.Game, this.MainForm);
                analysisUc.Init();
                analysisUc.SetEngine(uciEngine);
                analysisUc.NewGame();
                analysisUc.KibitzerGuid = Guid.NewGuid().ToString();
                this.MainForm.KibitzerManager.KibitzersList.Add(analysisUc);
                this.MainForm.AddKibitzerPanel(analysisUc);
                this.MainForm.KibitzerManager.SendMoveToKibitzer(this.Game.CurrentMove);
            }
        }
 void uciEngine_OptionReceived(object sender, UCIMessageEventArgs e)
 {
     AddParameter(e.Message);
 }