Esempio n. 1
0
        public static CConsoleContent CreateConsoleContent(String Text)
        {
            var Content = new CConsoleContent();

            Content.AccountName = Text.Substring(0, Text.IndexOf(":"));
            Content.LogContent  = Text.Substring(Text.IndexOf(":") + 1);

            return(Content);
        }
Esempio n. 2
0
        public static Tuple <bool, CConsoleContent> GetConsoleContent(int nType, String Text)
        {
            if (Text.IndexOf(":") != -1 && (nType > 0 && nType <= 10))
            {
                var Content = CConsoleContent.CreateConsoleContent(Text);
                Content.nType = nType;

                return(Tuple.Create(true, Content));
            }

            return(Tuple.Create(false, new CConsoleContent()));
        }
Esempio n. 3
0
 public void AddToQueue(Message m)
 {
     try
     {
         COPYDATASTRUCT CopyStruct = new COPYDATASTRUCT();
         CopyStruct = (COPYDATASTRUCT)m.GetLParam(CopyStruct.GetType());
         var tup = CConsoleContent.GetConsoleContent(CopyStruct.dwData.ToInt32(), CopyStruct.lpData);
         if (tup.Item1)
         {
             lock (_Queue) { _Queue.Enqueue(tup.Item2); }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("AddToQueue:" + ex.Message);
     }
 }