コード例 #1
0
        public void RefreshAdminMessages()
        {
            AdminMessages.Clear();

            try
            {
                List <AdminMessage> msgs = AzureWebAPI.Get_AdminMessages();
                if (msgs == null || msgs.Count == 0)
                {
                    AdminMessagesAvailable = false;
                    return;
                }

                foreach (AdminMessage msg in msgs)
                {
                    AdminMessages.Add(msg);
                }

                AdminMessagesAvailable = true;
            }
            catch (Exception ex)
            {
                Utils.ShowErrorMessage(ex);
            }
        }
コード例 #2
0
        public void RefreshAdminMessages()
        {
            AdminMessages.Clear();

            try
            {
                AdminMessagesAvailable = false;
                if (!ServerSettings.Instance.WebCache.Enabled)
                {
                    return;
                }
                List <Azure_AdminMessage> msgs = AzureWebAPI.Get_AdminMessages();
                if (msgs == null || msgs.Count == 0)
                {
                    AdminMessagesAvailable = false;
                    return;
                }

                foreach (Azure_AdminMessage msg in msgs)
                {
                    AdminMessages.Add(msg);
                }

                AdminMessagesAvailable = true;
            }
            catch (Exception ex)
            {
                Utils.ShowErrorMessage(ex);
            }
        }