Ejemplo n.º 1
0
        public Form1()
        {
            InitializeComponent();
            cmd = new DBConnect.ODBC_DB2Connect();
            execution = Execution.Execution.getBuilder();
            host=Execution.EasyClient.getHost();

             //eventid = execution..setMoveConstruction("test", DateTime.Now, "N6", "E", 17770, 18000, "1", "1100000000");
        }
Ejemplo n.º 2
0
        /// <summary>
        /// ���wHost
        /// </summary>
        public static RemoteInterface.HC.I_HC_FWIS getHost()
        {
            if (hobj == null)
            {
                lock (typeof(RemoteInterface.HC.I_HC_FWIS))
                {
                    if (hobj == null)
                    {
                        ODBC_DB2Connect com = new ODBC_DB2Connect();
                        com.GetReaderData += new GetReaderDataHandler(com_GetReader);
                        string hostip = ((List<object>)com.select(DataType.Host, Command.GetSelectCmd.getHostIP()))[0].ToString();
                        //string hostip = "10.21.50.217";
                        System.Diagnostics.Trace.WriteLine("Host IP = " + hostip);

                        hobj = (RemoteInterface.HC.I_HC_FWIS)RemoteInterface.RemoteBuilder.GetRemoteObj(typeof(RemoteInterface.HC.I_HC_FWIS),
                                RemoteInterface.RemoteBuilder.getRemoteUri(hostip, 9010, "FWIS"));

                    }
                }
            }
            else
            {
                try
                {
                    ((RemoteInterface.RemoteClassBase)hobj).HelloWorld();
                }
                catch
                {
                    lock (typeof(RemoteInterface.HC.I_HC_FWIS))
                    {
                        ODBC_DB2Connect com = new ODBC_DB2Connect();
                        com.GetReaderData += new GetReaderDataHandler(com_GetReader);
                        string hostip = ((List<object>)com.select(DataType.Host, Command.GetSelectCmd.getHostIP()))[0].ToString();
                        System.Diagnostics.Trace.WriteLine("Host IP = " + hostip);

                        hobj = (RemoteInterface.HC.I_HC_FWIS)RemoteInterface.RemoteBuilder.GetRemoteObj(typeof(RemoteInterface.HC.I_HC_FWIS),
                                RemoteInterface.RemoteBuilder.getRemoteUri(hostip, 9010, "FWIS"));
                    }

                }
            }
            if (hobj == null)
                System.Diagnostics.Trace.WriteLine("Host �s�u����");
            return hobj;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// ���wHost
        /// </summary>
        public static RemoteInterface.HC.I_HC_FWIS getHost()
        {
            if (hobj == null)
            {
                lock (typeof(RemoteInterface.HC.I_HC_FWIS))
                {
                    if (hobj == null)
                    {
                        ODBC_DB2Connect com = new ODBC_DB2Connect();
                        com.GetReaderData+=new GetReaderDataHandler(com_GetReader);
                        string hostip=((List<object>)com.select(DataType.Host, Command.GetSelectCmd.getHostIP()))[0].ToString();

                        hobj = (RemoteInterface.HC.I_HC_FWIS)RemoteInterface.RemoteBuilder.GetRemoteObj(typeof(RemoteInterface.HC.I_HC_FWIS),
                                RemoteInterface.RemoteBuilder.getRemoteUri(hostip, 9010, "FWIS"));
                    }
                }
            }
            return hobj;
        }