コード例 #1
0
        private void btnTrade_Click(object sender, EventArgs e)
        {
            TradingScreen tradingScreen = new TradingScreen(_player);

            tradingScreen.StartPosition = FormStartPosition.CenterParent;
            tradingScreen.ShowDialog(this);
        }
コード例 #2
0
        private void btnTrade_Click(object sender, EventArgs e)
        {
            TradingScreen tradingScreen = new TradingScreen(_player); // Reference passing so that trading effects the player

            tradingScreen.StartPosition = FormStartPosition.CenterParent;
            tradingScreen.ShowDialog(this);
        }
コード例 #3
0
        private void btnTrade_Click(object sender, EventArgs e)
        {
            TradingScreen tradingScreen = new TradingScreen(_player);   //dem CurrentPlayerObject im Trading Screen wird unser Player zugewiesen aber es wird kein 2. Player erzeugt

            tradingScreen.StartPosition = FormStartPosition.CenterParent;
            tradingScreen.ShowDialog(this); // Show Dialog lässt den Trading Screen sich selbst zeigen
        }
コード例 #4
0
        private void HandleUIEvent(object sender, UIEventArgs e)
        {
            switch (e.Type)
            {
            case UIEventType.ShowVendor:
            {
                TradingScreen screen = new TradingScreen(_state);
                screen.ShowDialog(this);
                break;
            }

            case UIEventType.ShowGathering:
            {
                GatheringScreen screen = new GatheringScreen(_state);
                screen.ShowDialog(this);
                break;
            }
            }
        }