コード例 #1
0
        public static void ShowAsync(Board b, string title = null)
        {
            var gi   = GameInstance.CreateFakeFromBoard(b);
            var form = new GamingForm(gi);

            Application.Run(form);
            //new System.Threading.Thread(async).Start();

            //void async()
            //{
            //    try
            //    {
            //        Application.Run(form);
            //    }
            //    catch (Exception ex)
            //    {
            //        throw new Exception("RE!", ex);
            //    }
            //}
        }
コード例 #2
0
        public ControlCenter(GameInstance g, GamingForm f)
        {
            parent  = f;
            game    = g;
            g.Input = GetInput;

            InvokeRebuild = () => parent.Invoke((Action)ReBuild);
            Input         = (p) =>
            {
                parent.Invoke(InvokeRebuild);
                return(true);
            };

            endButt = new EndTurnButton(this);
            HeroA   = new HeroPortret(this, true);
            HeroB   = new HeroPortret(this, false);
            AHand   = new HandControl(this, true);
            BHand   = new HandControl(this, false);
            boardC  = new BoardControl(this);
        }