Example #1
0
        void GetProcess()
        {
            RESULT_PROCESS Process = new GetHardware().exec("-c");

            if (Process.code != 0)
            {
                throw new Exception(string.Format("error code:{0} - message {1} ", Process.code, Process.error));
            }
            windowProcess = Process.output.Split(' ');
        }
Example #2
0
        //! no need catch anything here
        void ReadyWrite(string data)
        {
            //! assumed an input is text cause from pastebin
            string[]       command = { "-n", data };
            RESULT_PROCESS result  = new GetHardware().exec(command);

            if (result.code != 0)
            {
                throw new Exception(string.Format("STDResponse.ReadyWrite(). {0}", "write etc host failed"));
            }
            response.message = data;
            response.status  = true;
        }
Example #3
0
 void GetHardwareId()
 {
     try
     {
         RESULT_PROCESS Process = new GetHardware().exec("-u");
         if (Process.code != 0)
         {
             throw new Exception(Process.error);
         }
         password = Process.output;
     }
     catch (Exception ex)
     {
         DialogLogging.Append(Level.Error, string.Format("what:{0}{1}", ex.StackTrace, ex.Message));
     }
 }