private static void CreateWindowWithTwoButtonsAndProgressBar(IGUIFactory factory)
        {
            var button1     = factory.CreateButton();
            var button2     = factory.CreateButton();
            var progressBar = factory.CreateProgressBar();

            button1.Paint();
            button2.Paint();
            progressBar.Paint();
            progressBar.SetProgress(45);
        }
Example #2
0
 public Settings(IGUIFactory factory)
 {
     button = factory.CreateButton();
     button.Command();
     appearance = factory.ApplyBackground();
     appearance.SetBackground();
 }
Example #3
0
 public void Start(IGUIFactory factory)
 {
     //The objects and their operations are rely on the factory passed to application
     //Provide an interface for creating families of related or dependent objects without specifying their concrete classes
     var button = factory.CreateButton();
     var border = factory.CreateBorder();
 }
Example #4
0
        private void CreateActionButton(int displayOrder, IGUIFactory factory)
        {
            ActionButton btn = factory.CreateButton();

            btn.Location = new Point(60, 10 + 100 * displayOrder);
            btn.Text     = "Theme Button";
            panelDisplay.Controls.Add(btn);
        }
Example #5
0
        public void Start()
        {
            _button   = _factory.CreateButton();
            _checkbox = _factory.CreateCheckbox();

            _button.Click();
            Console.ReadKey();
        }
        public void ClientMethod(IGUIFactory factory)
        {
            var button   = factory.CreateButton();
            var checkBox = factory.CreateCheckBox();

            Console.WriteLine(button.CreateButton());
            Console.WriteLine(checkBox.CreateCheckBox());
        }
Example #7
0
        // this method can be called with DefaultGUIFactory or SkinnedGUIFactory для получениия окна заданного вида.
        public string GetUserInput(IGUIFactory guiFactory)
        {
            // Create UI elements
            IWindow wndInput = guiFactory.CreateWindow();
            IButton btnOk = guiFactory.CreateButton();
            IButton btnCancel = guiFactory.CreateButton();
            ITextBox tbInput = guiFactory.CreateTextBox();

            //TODO: Setup the window and elements
            //wndInput.AddChild(btnOk);
            //wndInput.AddChild(btnCancel);
            //wndInput.AddChild(tbInput);

            // TODO: Show dialog
            // TODO: Get the result

            return string.Empty; //tbInput.GetText();

        }
Example #8
0
        public void ClientMethod(IGUIFactory factory)
        {
            var productA = factory.CreateButton();
            var productB = factory.CreateCheckBox();
            var productC = factory.CreateRadioButton();

            Console.WriteLine(productA.UsefulFunctioButton());
            Console.WriteLine(productB.UsefulFunctionCheckBox());
            Console.WriteLine(productC.UsefulFunctionRadioButton());
        }
Example #9
0
        public void ClientMethod(IGUIFactory factory)
        {
            var productA = factory.CreateButton();
            var productB = factory.CreateCheckbox();

            Console.WriteLine(productA.UsarButton());
            Console.WriteLine(productB.UsarCheckBox());

            Console.WriteLine();
            Console.ReadLine();
        }
Example #10
0
        public Client(IGUIFactory factory)
        {
            IComponent button = factory.CreateButton();

            button.Paint();

            IComponent list = factory.CreateList();

            list.Paint();

            IComponent table = factory.CreateTable();

            table.Paint();
        }
Example #11
0
 public static void App(IGUIFactory factory)
 {
     IButton btn = factory.CreateButton();
 }
 public AbstractPlatform(IGUIFactory gUIFactory)
 {
     _button   = gUIFactory.CreateButton();
     _checkBox = gUIFactory.CreateCheckBox();
 }
Example #13
0
 public Application(IGUIFactory guiFactory)
 {
     button   = guiFactory.CreateButton();
     checkbox = guiFactory.CreateCheckbox();
 }
        public Application(IGUIFactory factory)
        {
            var button = factory.CreateButton();

            button.Paint();
        }
 public void CreateUI()
 {
     button   = factory.CreateButton();
     checkbox = factory.CreateCheckbox();
 }
Example #16
0
 public void CreateUI()
 {
     _button   = _factory.CreateButton();
     _checkBox = _factory.CreateCheckBox();
 }
Example #17
0
 public void Draw()
 {
     _factory.CreateButton().Draw();
     _factory.CreateCheckBox().Draw();
 }
Example #18
0
 public Application(IGUIFactory factory)
 {
     var button = factory.CreateButton();
     button.Paint();
 }
Example #19
0
 // This is how the abstract factory would be used, but isn't related to the pattern
 public Application(IGUIFactory factory)
 {
     _button = factory.CreateButton();
 }