Exemplo n.º 1
0
 /// <summary>
 /// проверка на полноту обьекта, если полный,
 /// то переносим в главнуюю колекцию, которая будет идти в БД,
 /// а с темповой удаляем
 /// </summary>
 private static void RemovefromTempList(Log log)
 {
     if (log.MessageId != "" && log.Request != "" &&
         log.Response != "")
     {
         LogsList.Add(log);
         TempLogsList.Remove(log);
     }
 }
Exemplo n.º 2
0
        private void btnLogs_ItemClick(object sender, ItemClickEventArgs e)
        {
            ClearPanel();
            LogsList l = new LogsList();

            l.Dock = DockStyle.Fill;
            scMain.SplitterPosition = l.Size.Width;
            scMain.Panel1.Enabled   = true;
            scMain.Panel1.Controls.Add(l);
            ClearCheckDoCheck(btnLogs);
        }
Exemplo n.º 3
0
        public static void WriteToLog(LogMessage logMsg)
        {
            System.Windows.Application.Current.Dispatcher.BeginInvoke(
                DispatcherPriority.Background,
                new Action(() =>
            {
                LogsList.Insert(0, logMsg);
            }));

            Console.WriteLine("{0}:{1}", logMsg.TimeStamp, logMsg.Message);
        }
Exemplo n.º 4
0
 /// <summary>
 /// this is called when information from the service server needs to be updated in web
 /// </summary>
 /// <param name="sender">who sends this</param>
 /// <param name="e">server info</param>
 private void UpdateInfoFromServer(object sender, ServiceInfoEventArgs e)
 {
     if (e.ConfigMap != null)
     {
         SetConfigInfo(e.ConfigMap);
     }
     if (e.LogsList != null)
     {
         foreach (Log log in e.LogsList)
         {
             LogsList.Add(log);
         }
     }
 }