예제 #1
0
 private void GetServerMonitors()
 {
     try
     {
         Servers = serverMonitorCache.GetServerMonitors();
     }
     catch (Exception ex)
     {
         Logger.Log($"GetServerMonitors {ex.Message}", Prism.Logging.Category.Exception, Prism.Logging.Priority.High);
         ShowMessage(new Message {
             MessageType = MessageType.Error, Text = $"Server load error. {ex.Message}"
         });
     }
 }
예제 #2
0
        protected override void OnPublished(object data)
        {
            IsBusy = true;

            try
            {
                Servers = serverMonitorCache.GetServerMonitors();
            }
            catch (Exception ex)
            {
                ShowMessage(new Message {
                    MessageType = MessageType.Error, Text = ex.Message, TextVerbose = ex.StackTrace
                });
            }
            finally
            {
                IsLoadingServers = false;
                IsBusy           = false;
            }
        }