Esempio n. 1
0
 public void Release(string PcName, string UserID)
 {
     Messages.ImportCmdData cmdData = new Messages.ImportCmdData() { Cmd = "Release", eq_operator =UserID,start_time=DateTime.Now };
     System.Xml.Serialization.XmlSerializer sr = new System.Xml.Serialization.XmlSerializer(typeof(Messages.ImportCmdData));
     System.IO.MemoryStream ms = new System.IO.MemoryStream();
     sr.Serialize(ms, cmdData);
     string xmlcmd = System.Text.Encoding.Unicode.GetString(ms.ToArray());
     RemoteInterface.Inport.InportCommand inportCmd = new RemoteInterface.Inport.InportCommand(xmlcmd, "Release" + System.Guid.NewGuid().ToString());
     Service.NotifyServer.NotifyAll(new RemoteInterface.NotifyEventObject(RemoteInterface.EventEnumType.InportCommand, PcName, inportCmd));
 }
Esempio n. 2
0
        public void Down(string PcName,string UserID,string SubStatus)
        {
            try
            {
                ImportCmdData cmdData = new ImportCmdData() { Cmd = "Down", param1 = SubStatus, param2 = "", param3 = "", eq_operator = UserID, start_time = DateTime.Now };
                System.Xml.Serialization.XmlSerializer sr = new System.Xml.Serialization.XmlSerializer(typeof(ImportCmdData));
                System.IO.MemoryStream ms = new System.IO.MemoryStream();
                sr.Serialize(ms, cmdData);
                string xmlcmd = System.Text.Encoding.UTF8.GetString(ms.ToArray());
                RemoteInterface.Inport.InportCommand inportCmd = new RemoteInterface.Inport.InportCommand(xmlcmd, "Down");
                Console.WriteLine("Down Pass to " + PcName);
                Service.NotifyServer.NotifyAll(new RemoteInterface.NotifyEventObject(RemoteInterface.EventEnumType.InportCommand, PcName, inportCmd));
            }
            catch(Exception ex) {

                Console.WriteLine(ex.Message + "," + ex.StackTrace);

                ;}
        }