Пример #1
0
        static void Zadatak5()
        {
            DarkTheme    darkTheme = new DarkTheme();
            ReminderNote note      = new ReminderNote("buy milk lol", darkTheme);

            note.Show();
        }
Пример #2
0
        static void Main(string[] args)
        {
            string filepath = "TestFile.txt";

            Dataset dataset = new Dataset(filepath);


            ReminderNote note1 = new ReminderNote("Def message, LighTheme", new LightTheme());
            ReminderNote note2 = new ReminderNote("Moja poruka tebi, PersonalTheme", new PersonalTheme());

            note1.Show();
            Console.WriteLine("\n");
            note2.Show();
        }
Пример #3
0
        static void Main(string[] args)
        {
            string filepath = "proxy.csv";

            Dataset dataset = new Dataset(filepath);

            ProtectionProxyDataset protProxy = new ProtectionProxyDataset(User.GenerateUser("User123"));
            VirtualProxyDataset    virtProxy = new VirtualProxyDataset(filepath);

            DataConsolePrinter printer = new DataConsolePrinter();

            printer.Print(dataset);
            printer.Print(protProxy);
            printer.Print(virtProxy);
            printer.Print(protProxy);
            printer.Print(protProxy);
            ReminderNote note1 = new ReminderNote("1. poruka, LighTheme", new LightTheme());
            ReminderNote note2 = new ReminderNote("2. poruka, PersonalTheme", new PersonalTheme());

            note1.Show();
            note2.Show();
        }
Пример #4
0
        static void Main(string[] args)
        {
            //1. i 2. zadatak

            Product book  = new Product("Uhoda", 9.99, 0.3);
            Product movie = new Product("WW2 documentary", 15.99, 0.1);
            Box     box   = new Box("Zabava za ljeto");

            box.Add(book);
            box.Add(movie);
            Console.WriteLine(box.Description());
            Console.WriteLine("Ukupna cijena: " + box.Price);
            Console.WriteLine("Ukupna masa: " + box.Weight);

            ShippingService Amazon = new ShippingService(3);

            Console.WriteLine("Cijena dostave: " + Amazon.priceOfDelivery(box));

            //3. zadatak

            Dataset             dataset  = new Dataset("D:\\Users\\Korisnik\\Desktop\\Lv5.txt");
            VirtualProxyDataset Vdataset = new VirtualProxyDataset("D:\\Users\\Korisnik\\Desktop\\Lv5.txt");
            User user  = User.GenerateUser("Vilim");
            User user1 = User.GenerateUser("Gabrijel");
            ProtectionProxyDataset Pdataset  = new ProtectionProxyDataset(user);
            ProtectionProxyDataset Pdataset1 = new ProtectionProxyDataset(user1);
            DataConsolePrinter     printer   = new DataConsolePrinter();

            printer.Print(dataset);
            Console.WriteLine();
            printer.Print(Vdataset);
            Console.WriteLine();
            printer.Print(Pdataset);
            Console.WriteLine();
            printer.Print(Pdataset1);
            Console.WriteLine();

            //4. zadatak

            ConsoleLogger       user1   = ConsoleLogger.GenerateUser("Vilim Svjetličić");
            ConsoleLogger       user2   = ConsoleLogger.GenerateUser("Luka Horvat");
            LoggingProxyDataset logger1 = new LoggingProxyDataset(user1, "D:\\Users\\Korisnik\\Desktop\\Lv5.txt");
            LoggingProxyDataset logger2 = new LoggingProxyDataset(user2, "D:\\Users\\Korisnik\\Desktop\\Lv5.txt");
            DataConsolePrinter  printer = new DataConsolePrinter();

            printer.Print(logger1);
            Console.WriteLine();
            printer.Print(logger2);

            //5. zadatak

            ITheme       theme1 = new LightTheme();
            ITheme       theme2 = new DarkTheme();
            ReminderNote note1  = new ReminderNote("Lijep pozdrav", theme1);
            ReminderNote note2  = new ReminderNote("Ljepši pozdrav", theme2);

            note1.Show();
            note2.Show();

            //6. zadatak

            ITheme theme1 = new LightTheme();
            ITheme theme2 = new DarkTheme();

            groupNote group1 = new groupNote("Predavanje je sutra u 11:30.", theme1);
            groupNote group2 = new groupNote("Predavanje je sutra u 13:15.", theme2);

            group1.AddMember("Ivana");
            group1.AddMember("Jelena");
            group1.AddMember("Bruno");
            group1.AddMember("Karlo");

            group2.AddMember("Darko");
            group2.AddMember("Barbara");
            group2.AddMember("Nikol");

            group1.Show();
            group2.Show();

            //7. zadatak

            ITheme       theme1 = new LightTheme();
            ITheme       theme2 = new DarkTheme();
            ReminderNote note1  = new ReminderNote("Lijep pozdrav", theme1);
            ReminderNote note2  = new ReminderNote("Ljepši pozdrav", theme1);

            note1.Show();
            note2.Show();

            Notebook notes = new Notebook(theme2);

            notes.AddNote(note1);
            notes.AddNote(note2);
            notes.Display();
        }