Beispiel #1
0
        static void Main(string[] args)
        {
            var fax = new MultifunctionalDevice();

            Console.WriteLine(fax.Counter);
            Console.WriteLine(fax.GetState());
            fax.PowerOn();
            Console.WriteLine(fax.Counter);
            Console.WriteLine(fax.GetState());

            IDocument doc1 = new PDFDocument("aaa.pdf");

            fax.Print(in doc1);

            IDocument doc2;

            fax.Scan(out doc2, IDocument.FormatType.PDF);

            fax.ScanAndPrint();

            fax.Fax("testReciever");


            Console.WriteLine($"Fax on/off counter: {fax.Counter}");
            Console.WriteLine($"Print counter: {fax.PrintCounter}");
            Console.WriteLine($"Scan counter: {fax.ScanCounter}");
            Console.WriteLine($"Fax counter: {fax.FaxCounter}");
            Console.WriteLine("Fax recievers list:");
            fax.GetRecieversList();
            Console.WriteLine(fax.RecieversList.Count);
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            var device = new MultifunctionalDevice("12 231 22 00");
            device.PowerOn();

            IDocument document1;
            IDocument document2 = new ImageDocument("okay.jpg");
            
            device.Send(out document1, "12 232 21 01");
            device.Send(out document1, "12 232 21 02");
            device.Send(out document1, "12 232 21 03");
            device.Receive(in document2, "12 240 11 10");
            
            Console.WriteLine("How many times device was turned on: {0}, document was sent: {1}, document was received: {2}", device.Counter, device.SendCounter, device.ReceiveCounter);
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            var multiFuncDevice = new MultifunctionalDevice();

            multiFuncDevice.PowerOn();
            IDocument doc3;

            multiFuncDevice.SendFax(out doc3, 0700800800);

            IDocument doc4 = new ImageDocument("ImgDoc.jpg");

            multiFuncDevice.ReceiveFax(in doc4, 0800700700);

            Console.WriteLine(multiFuncDevice.ReceivedFaxCounter);
            Console.WriteLine(multiFuncDevice.SentFaxCounter);
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            var multiFunDev = new MultifunctionalDevice();

            multiFunDev.PowerOn();
            IDocument doc1 = new PDFDocument("aaa.pdf");

            multiFunDev.ScanAndSend(123456789);
            multiFunDev.ScanAndSend(123456789);

            Console.WriteLine();
            Console.WriteLine($"Fax counter: {multiFunDev.FaxCounter}");
            Console.WriteLine($"Scan counter: {multiFunDev.ScanCounter}");

            Console.WriteLine();
            multiFunDev.PowerOff();
            multiFunDev.ScanAndSend(987654321);

            Console.WriteLine("Nothing happens when off!");
        }
Beispiel #5
0
        static void Main(string[] args)
        {
            MultifunctionalDevice device = new MultifunctionalDevice();

            device.PowerOn();
            Console.WriteLine(device.GetState());

            IDocument doc1 = new PDFDocument("aaa.pdf");

            device.Print(in doc1);

            IDocument doc2, doc3, doc4, doc5;

            device.Scan(out doc2, IDocument.FormatType.JPG);
            device.Scan(out doc3, IDocument.FormatType.TXT);
            device.Scan(out doc4, IDocument.FormatType.PDF);
            device.Scan(out doc5);

            device.Send(doc1, "*****@*****.**");
        }
Beispiel #6
0
        static void Main()
        {
            var xerox = new MultifunctionalDevice();

            xerox.PowerOn();

            IDocument doc1 = new PDFDocument("test.pdf");

            xerox.Print(in doc1);
            IDocument doc2;

            xerox.Scan(out doc2);
            xerox.ScanAndPrint();
            Console.WriteLine();
            xerox.SendFax(doc1, "test");
            xerox.ScanAndSendFax("test");

            Console.WriteLine();
            Console.WriteLine("PowerON Counter: " + xerox.Counter);
            Console.WriteLine("Print Counter: " + xerox.PrintCounter);
            Console.WriteLine("Scan Counter: " + xerox.ScanCounter);
        }
Beispiel #7
0
        static void Main(string[] args)
        {
            var device = new MultifunctionalDevice();

            device.PowerOn();
            IDocument doc = new PDFDocument("aaaa.pdf");

            device.Print(in doc);

            IDocument doc2;

            device.Scan(out doc2);
            device.ScanAndPrint();

            device.SendFax(doc, "123456789");
            device.ScanAndSendFax("123456789");

            Console.WriteLine(device.Counter);
            Console.WriteLine(device.SendFaxCounter);
            Console.WriteLine(device.PrintCounter);
            Console.WriteLine(device.ScanCounter);
        }