예제 #1
0
        /// <summary>
        /// 测试终结点连接
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void IDC_BUTTON_TEST_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                string SelectedEndpointName = this.IDC_ENDPOINT_COMBO.SelectedItem.ToString();

                InstanceContext _callbackContext = new InstanceContext(new EAWSCallBackSolid(this));
                m_EAWSClient = new EAWSClient(_callbackContext, SelectedEndpointName);

                string ServiceString = m_EAWSClient.SyncIsAWSchedulerStarted(); //调度模块是否已启动

                if (ServiceString.Length > 0)                                   //调度会话是否正在运行,返回的字符大于0表示停止了  scheduler stopped == msg, 0 len == running
                {
                    IDC_RESULT_TEXT.Text += "开始启动调度模块……" + "\n";
                    ServiceString         = m_EAWSClient.SyncStartAWScheduler();
                    IDC_RESULT_TEXT.Text += ServiceString + "\n";
                }
                else
                {
                    IDC_RESULT_TEXT.Text += "调度模块正在运行中……" + "\n";
                }
            }
            catch (Exception ex)
            {
                JLog.Instance.Error(ex.Message, MethodBase.GetCurrentMethod().Name,
                                    MethodBase.GetCurrentMethod().Module.Name);
            }
        }
예제 #2
0
 public BLLEAWS()
 {
     _CallBackHandle = new EAWSCallBackSolid();
     RegistEventHandle();
     _callbackContext = new InstanceContext(_CallBackHandle);
     m_EAWSClient     = new EAWSClient(_callbackContext, "EAWSTCPService");
     GlobalInfo.Instance.JobsRunning = new Hashtable();
 }
예제 #3
0
        public MainWindow()
        {
            InitializeComponent();

            //This code constructs a EAWSCallBackSolid object
            //and creates a EAWS service object and passes EAWSCallBackSolid object
            // m_EAWSClient = (EAWSService.IEAWSService)DuplexChannelManager<IEAWSService>.GetAutoChannelWithServerOverride("EAWSService", "", _callbackContext);
            InstanceContext _callbackContext = new InstanceContext(new EAWSCallBackSolid(this));

            m_EAWSClient  = new EAWSClient(_callbackContext, sEndpointName);
            m_JobsRunning = new Hashtable();
            this.IDC_ENDPOINT_COMBO.Items.Add("EAWSTCPService");
            this.IDC_ENDPOINT_COMBO.Items.Add("EAWSHTTPService");
            this.IDC_ENDPOINT_COMBO.SelectedValue = "EAWSHTTPService";
        }