Ejemplo n.º 1
0
        public ConsoleNotification INFOnotification(string author)
        {
            NotificationBuilder builder = new NotificationBuilder();

            builder.SetAuthor(author);
            builder.SetTitle("doop");
            builder.SetLevel(Category.INFO);
            builder.SetColor(ConsoleColor.White);
            builder.SetText("lv3");
            return(builder.Build());
        }
Ejemplo n.º 2
0
        public ConsoleNotification ALERTnotification(string author)
        {
            NotificationBuilder builder = new NotificationBuilder();

            builder.SetAuthor(author);
            builder.SetTitle("doop");
            builder.SetLevel(Category.ALERT);
            builder.SetColor(ConsoleColor.DarkRed);
            builder.SetText("lv3");
            return(builder.Build());
        }
Ejemplo n.º 3
0
        public ConsoleNotification CreateALERTNotification(string author)
        {
            NotificationBuilder note = new NotificationBuilder();

            note.SetAuthor(author);
            note.SetTitle("Alert!");
            note.SetLevel(Category.ALERT);
            note.SetColor(ConsoleColor.Red);
            note.SetText("Content");

            return(note.Build());
        }
Ejemplo n.º 4
0
        public ConsoleNotification CreateERRORNotification(string author)
        {
            NotificationBuilder note = new NotificationBuilder();

            note.SetAuthor(author);
            note.SetTitle("Error!");
            note.SetLevel(Category.ERROR);
            note.SetColor(ConsoleColor.White);
            note.SetText("Content");

            return(note.Build());
        }
Ejemplo n.º 5
0
        public ConsoleNotification CreateINFONotification(string author)
        {
            NotificationBuilder note = new NotificationBuilder();

            note.SetAuthor(author);
            note.SetTitle("Informations!");
            note.SetLevel(Category.INFO);
            note.SetColor(ConsoleColor.Green);
            note.SetText("Content");

            return(note.Build());
        }
        static void Main(string[] args)
        {
            Dataset dataset = new Dataset("tekst.csv");

            Console.WriteLine("File data: \n" + dataset.ToString());

            Dataset cloneDataset = new Dataset();

            cloneDataset = (Dataset)dataset.Clone();
            Console.WriteLine("Cloned file data: \n" + cloneDataset.ToString());

            MatrixGenerator Matrix_Generator = MatrixGenerator.GetInstance();

            int[,] matrix = new int[6, 6];
            matrix        = Matrix_Generator.GetMatrix(6, 6);

            Logger logger = Logger.getInstance();

            logger.filePath = "Zapis.txt";
            logger.Log("Domagoj");
            logger.Log("Vocanec");

            for (int i = 0; i < matrix.GetLength(0); i++)
            {
                for (int j = 0; j < matrix.GetLength(1); j++)
                {
                    Console.Write(String.Format("{0}", matrix[i, j]) + "\t");
                }
                Console.Write("\n");
            }

            ConsoleNotification not1 =
                new ConsoleNotification("Domagoj", "Naslov 1", "Tekst 1", DateTime.Now, Category.ERROR, ConsoleColor.Cyan);
            ConsoleNotification not2 =
                new ConsoleNotification("Vocanec", "Naslov 2", "Tekst 2", DateTime.Now, Category.INFO, ConsoleColor.Green);

            NotificationManager NotManager = new NotificationManager();

            NotManager.Display(not1);
            NotManager.Display(not2);

            NotificationBuilder builder = new NotificationBuilder();

            builder.SetAuthor("Domagoj").SetLevel(Category.ERROR).SetText("Tekst 3").SetTitle("Naslov 3").SetColor(ConsoleColor.Blue);
            ConsoleNotification not3    = builder.Build();
            NotificationManager manager = new NotificationManager();

            manager.Display(not3);
        }