Exemplo n.º 1
0
 private static void AppOnNotifyed(string text, TypeMessage icon)
 {
     if (Console.CursorLeft != 0)
         Console.Write("\r\n");
     string type = icon.ToString();
     Console.WriteLine("[{2}]{0} : {1}", DateTime.Now, text, type);
     
 }
Exemplo n.º 2
0
        private static void AppOnNotifyed(string text, TypeMessage icon)
        {
            if (Console.CursorLeft != 0)
            {
                Console.Write("\r\n");
            }
            string type = icon.ToString();

            Console.WriteLine("[{2}]{0} : {1}", DateTime.Now, text, type);
        }
Exemplo n.º 3
0
 public override string ToString()
 {
     return($"{Time:dd.MM.yyyy HH:mm:ss.ffff} <{NameUser}> [{Type.ToString().ToUpperInvariant()}][{MemberName}] {Message}");
 }
Exemplo n.º 4
0
        public static void Write(string methodName, TypeMessage typeMessage)//(string userName, string message, string methodName, TypeMessage typeMessage)
        {
            DateTime dateNow   = DateTime.Now;
            string   nameMonth = System.Globalization.CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(dateNow.Month);
            string   pathDir   = Path.Combine(Environment.CurrentDirectory, nameMonth);

            if (!Directory.Exists(pathDir))
            {
                Directory.CreateDirectory(pathDir);
            }

            string fileName = String.Format("{0}.log", dateNow.ToString("dd-MM-yyyy"));
            string filePath = Path.Combine(pathDir, fileName);

            using (FileStream file = new FileStream(filePath, FileMode.OpenOrCreate | FileMode.Append))
            {
                using (StreamWriter sw = new StreamWriter(file, Encoding.Default))
                {
                    sw.WriteLine(DateTime.Now.ToString() + " Method " + methodName + " " + typeMessage.ToString());
                }
            }
        }
Exemplo n.º 5
0
 public void AfficherMessage(TypeMessage type, string valeur)
 {
     proxy.Invoke("message", type.ToString(), valeur);
 }
Exemplo n.º 6
0
        private static void ParseMessage(out string parsedDoc, string toString)
        {
            TypeMessage am = new TypeMessage(toString);

            parsedDoc = am.ToString();
        }