Пример #1
0
 public static void HandleError(Exception e, string text = "")
 {
     ErrorMessage err = new ErrorMessage(text + " " + e.Message);
     err.ShowDialog();
     err.Dispose();
     WritoToLogFile(text + ": " + e.Message);
 }
Пример #2
0
        public static void HandleError(Exception e, string text = "")
        {
            ErrorMessage err = new ErrorMessage(text + " " + e.Message);

            err.ShowDialog();
            err.Dispose();
            WritoToLogFile(text + ": " + e.Message);
        }
 private bool CheckVersion()
 {
     string result;
     if (_useHash)
     {
         result = PrtgApiManager.CheckVersion(_server, _port, _useSsl, _username, _password, _useHash);
     }
     else
     {
         result = PrtgApiManager.CheckVersion(_server, _port, _useSsl, _username, _password);
     }
     if (result == "ok")
     {
         return true;
     }
     ErrorMessage err = new ErrorMessage(result);
     err.ShowDialog();
     err.Dispose();
     return false;
 }
Пример #4
0
        private bool CheckVersion()
        {
            string result;

            if (_useHash)
            {
                result = PrtgApiManager.CheckVersion(_server, _port, _useSsl, _username, _password, _useHash);
            }
            else
            {
                result = PrtgApiManager.CheckVersion(_server, _port, _useSsl, _username, _password);
            }
            if (result == "ok")
            {
                return(true);
            }
            ErrorMessage err = new ErrorMessage(result);

            err.ShowDialog();
            err.Dispose();
            return(false);
        }