public Html() { topText = "<!DOCTYPE HTML>\r\n<html>\r\n<head></head>\r\n<body>\r\n"; bottomText = "\r\n</body>\r\n</html>"; languageElements = new ElementTemplate[] { new ElementTemplate("textbox", "<div style=\"position: absolute; left: %l%px; top: %t%px; width: %w%px; height: %h%px;\" >" + "%content%" + "</div>\r\n" ), }; }
public Html() { topText = "<!DOCTYPE HTML>\r\n<html>\r\n<head></head>\r\n<body>\r\n"; bottomText = "\r\n</body>\r\n</html>"; fileExtension = "html"; languageElements = new ElementTemplate[] { new ElementTemplate("label", "<div style=\"position: absolute; left: %l%px; top: %t%px; width: %w%px; height: %h%px;\">" + "%content%" + "</div>\r\n" ), new ElementTemplate("textbox", "<input type=\"text\" value=\"%content%\" style=\"position: absolute; left: %l%px; top: %t%px; width: %w%px; height: %h%px;\">" + "</input>\r\n" ), new ElementTemplate("button", "<button type=\"button\" style=\"position: absolute; left: %l%px; top: %t%px; width: %w%px; height: %h%px;\">" + "%content%" + "</button>\r\n" ) }; }
public Wpf() { fileExtension = "cs"; executeableExtension = "exe"; topText = "using System;\r\n" + "using System.Windows;\r\n" + "using System.Windows.Controls;\r\n" + "namespace FactoryApp {\r\n" + "public class MainWindow : Window\r\n" + " {\r\n" + " [STAThread]\r\n" + " public static void Main() {\r\n" + " Application app = new Application();\r\n" + " app.Run(new MainWindow());\r\n" + " }\r\n" + " public MainWindow()\r\n" + " {\r\n" + " Width = 300;\r\n" + " Height = 300;\r\n" + " Canvas canvas = new Canvas();\r\n" + " Content = canvas;\r\n"; bottomText = "}\r\n}\r\n}"; languageElements = new ElementTemplate[] { new ElementTemplate("textbox", "var textBox%id% = new TextBox();\r\n" + "textBox%id%.Text = \"%content%\";" + "Canvas.SetLeft(textBox%id%, %l%);" + "Canvas.SetTop(textBox%id%, %t%);" + "textBox%id%.Width = %w%;" + "textBox%id%.Height = %h%;" + "canvas.Children.Add(textBox%id%);" ), new ElementTemplate("button", "var button%id% = new Button();\r\n" + "button%id%.Content = \"%content%\";" + "Canvas.SetLeft(button%id%, %l%);" + "Canvas.SetTop(button%id%, %t%);" + "button%id%.Width = %w%;" + "button%id%.Height = %h%;" + "canvas.Children.Add(button%id%);" ), new ElementTemplate("label", "var label%id% = new Label();\r\n" + "label%id%.Content = \"%content%\";" + "Canvas.SetLeft(label%id%, %l%);" + "Canvas.SetTop(label%id%, %t%);" + "label%id%.Width = %w%;" + "label%id%.Height = %h%;" + "canvas.Children.Add(label%id%);" ), new ElementTemplate("checkbox", "var checkbox%id% = new CheckBox();\r\n" + "checkbox%id%.Content = \"%content%\";" + "Canvas.SetLeft(checkbox%id%, %l%);" + "Canvas.SetTop(checkbox%id%, %t%);" + "checkbox%id%.Width = %w%;" + "checkbox%id%.Height = %h%;" + "canvas.Children.Add(checkbox%id%);" ) }; }