예제 #1
0
        public static void TestLibrary()
        {
            // Linux version
            Console.WriteLine("Testing Linux version");
            Console.WriteLine();

            Button button = new LinuxButton(new Rectangle(20, 40, 50, 30));

            button.Print();
            button.Press();
            Console.WriteLine();

            Window window = new LinuxWindow(new Rectangle(30, 10, 250, 300));

            window.Print();
            window.Minimize();
            window.Print();
            window.Maximize();
            window.Print();
            Console.WriteLine();

            DropdownList dropdownList = new LinuxDropdownList(new Rectangle(60, 70, 200, 600));

            dropdownList.Print();
            dropdownList.Unroll();
            dropdownList.Print();
            dropdownList.Roll();
            dropdownList.Print();
            Console.WriteLine();

            // Windows version
            Console.WriteLine("Testing Windows version");
            Console.WriteLine();

            button = new WindowsButton(new Rectangle(50, 240, 150, 330));
            button.Print();
            button.Press();
            Console.WriteLine();

            window = new WindowsWindow(new Rectangle(170, 130, 550, 350));
            window.Print();
            window.Minimize();
            window.Print();
            window.Maximize();
            window.Print();
            Console.WriteLine();

            dropdownList = new WindowsDropdownList(new Rectangle(160, 270, 240, 500));
            dropdownList.Print();
            dropdownList.Unroll();
            dropdownList.Print();
            dropdownList.Roll();
            dropdownList.Print();
            Console.WriteLine();
        }
예제 #2
0
 public void SetPosition(int X, int Y)
 {
     if (runningWindows)
     {
         WindowsWindow.SetPosition(this, X, Y);
     }
     else
     {
         LinuxWindow.SetPosition(this, X, Y);
     }
 }
예제 #3
0
 public void Show()
 {
     if (runningWindows)
     {
         WindowsWindow.Show(this);
     }
     else
     {
         LinuxWindow.Show(this);
     }
 }
예제 #4
0
 public void Hide()
 {
     if (runningWindows)
     {
         WindowsWindow.Hide(this);
     }
     else
     {
         LinuxWindow.Hide(this);
     }
 }