示例#1
0
 private void button1_Click_1(object sender, EventArgs e)
 {
     using (frmAssemblyExplorer f = new frmAssemblyExplorer())
     {
         if (f.ShowDialog() == DialogResult.OK)
         {
             txtSvc.Text = f.SelectedServiceConfiguration.Name;
             ControllerTest.Storage.StorageObject.SelectedServiceConfiguration = f.SelectedServiceConfiguration;
             ControllerTest.Storage.Save();
             Fwk.Bases.IServiceContract isvcReq = (Fwk.Bases.IServiceContract)Fwk.HelperFunctions.ReflectionFunctions.CreateInstance(ControllerTest.Storage.StorageObject.SelectedServiceConfiguration.Request);
             this.txtXmlRequest.Text = isvcReq.GetBusinessDataXml();
         }
     }
 }
示例#2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            ControllerTest.Storage.Load();
            txtObjectUri.Text        = ControllerTest.Storage.StorageObject.ObjectUri;
            txtServer.Text           = ControllerTest.Storage.StorageObject.Server;
            txtPort.Text             = ControllerTest.Storage.StorageObject.Port;
            txtSvc.Text              = ControllerTest.Storage.StorageObject.Svc;
            txtXmlRequest.Text       = ControllerTest.Storage.StorageObject.XmlRequest;
            txtSvc.Text              = ControllerTest.Storage.StorageObject.SelectedServiceConfiguration.Name;
            numericThread.Value      = Convert.ToDecimal(ControllerTest.Storage.StorageObject.Threads);
            numericCallsNumber.Value = Convert.ToDecimal(ControllerTest.Storage.StorageObject.Calls);

            txtURL.Text = string.Concat("tcp://", ControllerTest.Storage.StorageObject.Server, ":", ControllerTest.Storage.StorageObject.Port.Trim(), @"/", ControllerTest.Storage.StorageObject.ObjectUri);
            if (ControllerTest.Storage.StorageObject.SelectedServiceConfiguration.Request != null)
            {
                Fwk.Bases.IServiceContract isvcReq = (Fwk.Bases.IServiceContract)Fwk.HelperFunctions.ReflectionFunctions.CreateInstance(ControllerTest.Storage.StorageObject.SelectedServiceConfiguration.Request);
                this.txtXmlRequest.Text = isvcReq.GetBusinessDataXml();
            }
        }