示例#1
0
        private void button1_Click(object sender, EventArgs e)
        {
            robj = (RemoteInterface.HC.I_HC_Comm)RemoteInterface.RemoteBuilder.GetRemoteObj(typeof(RemoteInterface.HC.I_HC_Comm),
             RemoteInterface.RemoteBuilder.getRemoteUri(txtHostIp.Text.Trim(), (int)RemotingPortEnum.HOST, "Comm"));

            if (this.radioButton1.Checked)
            {
                try
                {
                    MessageBox.Show(robj.getTCCommStatusStr(this.cbDevName.Text.Trim()));
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }

            }
            else if (this.radioButton2.Checked)
            {
                try
                {
                    robj.ResetComm(this.cbDevName.Text.Trim());
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }
示例#2
0
        public FrmMain()
        {
            if(Environment.GetCommandLineArgs().Length==1)
                  rhost=(RemoteInterface.HC.I_HC_Comm)RemoteInterface.RemoteBuilder.GetRemoteObj(typeof(RemoteInterface.HC.I_HC_Comm),RemoteInterface.RemoteBuilder.getRemoteUri("10.21.50.4",(int)RemoteInterface.RemotingPortEnum.HOST,"Comm"));
            else
                  rhost = (RemoteInterface.HC.I_HC_Comm)RemoteInterface.RemoteBuilder.GetRemoteObj(typeof(RemoteInterface.HC.I_HC_Comm), RemoteInterface.RemoteBuilder.getRemoteUri(Environment.GetCommandLineArgs()[1], (int)RemoteInterface.RemotingPortEnum.HOST_FIWS, "Comm"));

            InitializeComponent();
        }
示例#3
0
        static void HostExecuteSQLCmd(string sql)
        {
            try
            {
                if (rhost == null)
                {
                    rhost = (RemoteInterface.HC.I_HC_Comm)RemoteInterface.RemoteBuilder.GetRemoteObj(
                        typeof(RemoteInterface.HC.I_HC_Comm), RemoteInterface.RemoteBuilder.getRemoteUri(RemoteInterface.RemoteBuilder.getHostIP(), (int)RemotingPortEnum.HOST, "Comm"));
                }
                rhost.dbExecute(sql);

            }
            catch (Exception ex)
            {
                ;
            }
        }
示例#4
0
        void sendHostEvent(string devName,object eventdata)
        {
            if (rhost == null)
            {
                rhost = (RemoteInterface.HC.I_HC_Comm)RemoteInterface.RemoteBuilder.GetRemoteObj(typeof(RemoteInterface.HC.I_HC_Comm), RemoteInterface.RemoteBuilder.getRemoteUri(RemoteInterface.RemoteBuilder.getHostIP(), (int)RemoteInterface.RemotingPortEnum.HOST, "Comm"));
            }

            rhost.setTemEvent(devName, eventdata);
        }
示例#5
0
 private void button3_Click(object sender, EventArgs e)
 {
     robj = (RemoteInterface.HC.I_HC_Comm)RemoteInterface.RemoteBuilder.GetRemoteObj(typeof(RemoteInterface.HC.I_HC_Comm),
      RemoteInterface.RemoteBuilder.getRemoteUri(txtHostIp.Text.Trim(), (int)RemotingPortEnum.HOST, "Comm"));
      this.cbDevName.DataSource= robj.getDeviceNames(txtDevType.Text);
 }