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); }
public Settings(IGUIFactory factory) { button = factory.CreateButton(); button.Command(); appearance = factory.ApplyBackground(); appearance.SetBackground(); }
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(); }
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); }
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()); }
// 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(); }
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()); }
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(); }
public Client(IGUIFactory factory) { IComponent button = factory.CreateButton(); button.Paint(); IComponent list = factory.CreateList(); list.Paint(); IComponent table = factory.CreateTable(); table.Paint(); }
public static void App(IGUIFactory factory) { IButton btn = factory.CreateButton(); }
public AbstractPlatform(IGUIFactory gUIFactory) { _button = gUIFactory.CreateButton(); _checkBox = gUIFactory.CreateCheckBox(); }
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(); }
public void CreateUI() { _button = _factory.CreateButton(); _checkBox = _factory.CreateCheckBox(); }
public void Draw() { _factory.CreateButton().Draw(); _factory.CreateCheckBox().Draw(); }
// This is how the abstract factory would be used, but isn't related to the pattern public Application(IGUIFactory factory) { _button = factory.CreateButton(); }