Esempio n. 1
0
        private void RequestFarmButton_Click(object sender, EventArgs e)
        {
            // ### connect to farm
            if (thisClientID == "")
            {
                // the magic config settings are exchange/queue/port/uid/pwd
                // this should ask a running service for 4 engines of TestWorker.Worker
                // it should get an acknowledgement, and dialog up the results

                if (fs == null)
                {
                    fs = ConnectionDetail.ConnectionDetailFactory()["local"];
                }
                fs.clientID = thisClientID = Guid.NewGuid().ToString();
                myFarmProxy = ComputeFarmProxy.ComputeFarmProxy.ConnectToFarm(fs);
                if (myFarmProxy != null && myFarmProxy.IsOpen)
                {
                    MessageBox.Show("Farm Connected OK");
                }
                else
                {
                    MessageBox.Show("Could not connect to farm");
                    thisClientID = "";
                    myFarmProxy  = null;
                }
            }
            else
            {
                MessageBox.Show("there is already an open connection to the farm...");
            }
        }
Esempio n. 2
0
 private void DisconnectFabricButton_Click(object sender, EventArgs e)
 {
     // disconnect fabric
     myFarmProxy.Shutdown();
     myFarmProxy = null;
     MessageBox.Show("Farm proxy closed");
 }
Esempio n. 3
0
 public RequestForm()
 {
     InitializeComponent();
     myFarmProxy  = null;
     thisClientID = "";
     openRequests = new List <string>();
     openReplies  = new List <string>();
 }
Esempio n. 4
0
        static public ComputeFarmProxy ConnectToFarm(int thisPort, string thisHost, string refExch, string refuid, string refpwd, string clientID)
        {
            ComputeFarmProxy outFarm = new ComputeFarmProxy(thisPort, thisHost, refExch, refuid, refpwd, clientID);

            outFarm.SetupExchange();
            outFarm.SetupControlQueue();

            return(outFarm);
        }