예제 #1
0
        static void Zadatak3_4()
        {
            string filepath = @"file.csv";
            VirtualProxyDataset virtualProxyDataset = new VirtualProxyDataset(filepath);
            DataConsolePrinter  dataPrinter         = new DataConsolePrinter();

            dataPrinter.DisplayItems(virtualProxyDataset);

            ProtectionProxyDataset protectedProxyDataset = new ProtectionProxyDataset(User.GenerateUser("Mihael"));

            dataPrinter.DisplayItems(protectedProxyDataset);

            LoggerProxyDataset loggerProxyDataset = new LoggerProxyDataset(filepath);

            dataPrinter.DisplayItems(loggerProxyDataset);
        }
예제 #2
0
파일: Program.cs 프로젝트: Condara/Doop
        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();
        }
예제 #3
0
        static void Main(string[] args)
        {
            Dataset            data1   = new Dataset("sensitiveData.csv");
            DataConsolePrinter printer = new DataConsolePrinter();
            User user1 = User.GenerateUser("Domagoj");
            User user2 = User.GenerateUser("Ivan");
            User user3 = User.GenerateUser("Luka");
            ProtectionProxyDataset proxy1 = new ProtectionProxyDataset(user1);
            ProtectionProxyDataset proxy2 = new ProtectionProxyDataset(user2);
            ProtectionProxyDataset proxy3 = new ProtectionProxyDataset(user3);
            VirtualProxyDataset    proxy4 = new VirtualProxyDataset("sensitiveData.csv");

            Console.WriteLine(user1.Name);
            printer.Print(proxy1);
            Console.WriteLine();
            Console.WriteLine(user2.Name);
            printer.Print(proxy2);
            Console.WriteLine();
            Console.WriteLine(user3.Name);
            printer.Print(proxy3);
            Console.WriteLine();
            Console.WriteLine("Virtual");
            printer.Print(proxy4);
        }