Esempio n. 1
0
        public MainWindow()
        {
            InitializeComponent();

            //Initialization Code
            try
            {
                // Configure the Endpoint details
                DuplexChannelFactory<IPig> channel = new DuplexChannelFactory<IPig>(this, "Pig");

                // Activate a remote Shoe object
                pig = channel.CreateChannel();

                // Regsister this client for the callbacks service
                callbackId = pig.RegisterForCallbacks();

                // If they join after the game is started, this player will not be included in the game
                if( callbackId == 0 )
                {
                    MessageBox.Show("Game has already started");
                    this.Close();
                }

                this.Title = "Hello Player " + callbackId;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 2
0
 public Salami(IPig pig, ICow cow, IButcher butcher)
 {
 }
 public Ham(IPig pig, IButcher butcher)
 {
 }
 public Bacon(IPig pig, IFarmer farmer)
 {
 }
Esempio n. 5
0
 public Bacon(IPig pig, IFarmer farmer)
 {
 }
Esempio n. 6
0
 public Ham(IPig pig, IButcher butcher)
 {
 }
Esempio n. 7
0
 public Salami(IPig pig, ICow cow, IButcher butcher)
 {
 }