private void ClientTCP_OnReceivePneumoniaResponse(object sender, OnReceivePneumoniaResponseArgs e)
        {
            Cursor.Current = Cursors.Arrow;

            ResponseUserControl response = new ResponseUserControl(ResponseUserControl.PNEUMONIA);

            response.SetCancer(e.pneumoniaChanse);
            response.SetNonCancer(e.nonPneumoniaChanse);

            Console.WriteLine(e.pneumoniaChanse);
            Console.WriteLine(e.nonPneumoniaChanse);



            Panel p = (Panel)this.Parent;

            p.Controls.Clear();
            p.Controls.Add(response);
        }
Example #2
0
        private void SetResponseInterface(string chanse, string chanse_to_have_nothing)
        {
            if (this.InvokeRequired)
            {
                SetInterfaceCallBack callback = new SetInterfaceCallBack(SetResponseInterface);
                this.Invoke(callback, new object[] { chanse, chanse_to_have_nothing });
            }
            else
            {
                Application.UseWaitCursor = false;
                ResponseUserControl usercontrol = new ResponseUserControl();
                usercontrol.SetCancer(chanse);
                usercontrol.SetNonCancer(chanse_to_have_nothing);
                usercontrol.SetAnimateCancer((int)double.Parse(chanse_to_have_nothing));


                Panel panel1 = (Panel)this.Parent;
                panel1.Controls.Clear();
                panel1.Controls.Add(usercontrol);
            }
        }