示例#1
0
        static void Main(string[] args)
        {
            ClimateMonitor monitor = new ClimateMonitor(
                new FileLogger("MyLog.txt")
                );

            monitor.start();
        }
示例#2
0
    static void Main(string[] args)
    {
        // 콘솔에 로그 출력
        ClimateMonitor consoleMonitor = new ClimateMonitor(new ConsoleLogger());

        consoleMonitor.start();

        // 파일에 로그 출력
        ClimateMonitor fileMonitor = new ClimateMonitor(new FileLogger("MyLog.txt"));

        fileMonitor.start();
    }
示例#3
0
        static void Main(string[] args)
        {
            #region
            //int sum = MathStd.Sum(1, 2, 3, 4, 5, 6, 7, 8, 9, 10); // Math.Sum(쉽표(,)로 구분된 수를 나열)
            //Console.WriteLine(sum);
            #endregion

            #region MathStdEx
            //int x = 20;
            //int y = 3;

            //Console.WriteLine($"x: {x}, y: {y}");

            //MathStd.Swap(ref x, ref y);
            //Console.WriteLine("x: {0}, y: {1}", x, y);

            //MathStd.Devide(num2:x, num1:y, quotient:out int quotient, reminder:out int reminder);
            //Console.WriteLine("quotient: {0}, reminder: {1}", quotient, reminder);

            //MathStd.Devide(x, y, out quotient, out reminder);
            //Console.WriteLine("quotient: {0}, reminder: {1}", quotient, reminder);
            #endregion

            #region MailManagerEx
            //string contents = "Hello there, <br />This is OH SOUNG.<br />This is a test email";

            #region Static Method
            //EmailManager.Send("*****@*****.**", "Hi...", contents);

            //EmailManager.Send("*****@*****.**", "*****@*****.**", "Hi...", contents);

            //EmailManager.Send("*****@*****.**", "*****@*****.**", "Hi...", contents, "*****@*****.**", "*****@*****.**");
            #endregion

            //EmailManager email = new EmailManager("smtp.gmail.com", 587, "*****@*****.**", "Ohsoung6450!");
            //email.To.Clear();
            //email.From = "*****@*****.**";
            //email.To.Add("*****@*****.**");
            //email.Subject = "Test Email";
            //email.Body = contents;
            //email.Send();

            //email.To.Add("*****@*****.**");
            //email.Subject = "Hi Kwon";
            //email.Send();
            #endregion

            #region StringExtensionsEx
            //string temp = "12/8/2015 10:10";

            //Console.WriteLine(temp.IsNumeric());
            //Console.WriteLine(temp.IsDateTime());
            #endregion

            #region LogManagerEx
            //LogManager log = new LogManager(null, "_WhiteNoiseTest");

            //log.WriteLine("[Begin Processing]-----");

            //for (int i = 0; i < 10; i++)
            //{
            //    log.WriteLine("Processing: " + i);
            //    log.WriteConsole("test" + Environment.NewLine);

            //    System.Threading.Thread.Sleep(500);

            //    log.WriteLine("Done: " + i);
            //}

            //log.WriteLine("[End Processing]-----");
            #endregion

            #region ProcessLoggerEx
            ClimateMonitor monitor = new ClimateMonitor(new FileLogger("MyLog.txt"));

            int i = 0;
            while (true)
            {
                Console.Write("온도를 올려주세요.");
                string temperature = Console.ReadLine();
                if (temperature == "")
                {
                    break;
                }

                monitor.LogStart("현재온도:", i, temperature);
                i++;
            }
            #endregion

            #region ReadProgramDirectory
            //Console.WriteLine(AppRoot.Root);
            //Console.ReadLine();
            #endregion
        }