public void sleep()
 {
     try
     {
         if (form.InvokeRequired)
         {
             form.Invoke((MethodInvoker) delegate
             {
                 form.sleep();
             });
         }
         else
         {
             form.sleep();
         }
     }
     catch (Exception)
     { }
 }
示例#2
0
        public String readFromServer()
        {
            try
            {
                String returnvalue = "";
                if (form.InvokeRequired)
                {
                    form.Invoke((MethodInvoker) delegate
                    {
                        returnvalue = form.readFromServer();
                    });
                }
                else
                {
                    returnvalue = form.readFromServer();
                }

                return(returnvalue);
            }
            catch (Exception)
            { }

            return(null);
        }