public static bool Out(string message) { try { BufferItem item = new BufferItem(); item._datetime = DateTime.Now; item._text = message; lock (data_ou) { data_ou.Add(item); } return true; } catch (Exception) { return false; } }
public static bool Out(string message) { try { BufferItem item = new BufferItem(); item._datetime = DateTime.Now; item.Text = message; lock (OutgoingData) { OutgoingData.Add(item); } return true; } catch (Exception fail) { Console.WriteLine(fail.ToString()); return false; } }
public static bool In(string message, bool control = false) { try { BufferItem item = new BufferItem(); item._datetime = DateTime.Now; item.important = control; item.Text = message; lock (IncomingData) { IncomingData.Add(item); } return true; } catch (Exception) { return false; } }