protected override void OnCreateForm(Form form) { form.Spacing = 5; form.Add(new Headline("Create Subfolders")); LinearLayout lyButton = LinearLayout.Horizontal(); Button button = new Button("Ok", ButtonClicked); button.Width = 100; lyButton.Add(new View()).Add(button); Label lblSubfolders = new Label("Subfolders:"); lblSubfolders.Width = 150; GridLayout lyCheckboxes = new GridLayout(3, GridLayout.EOrientation.Vertical); foreach (string folder in new string[] { "Scripts", "Scenes", "Prefabs", "Resources", "Textures", "Materials", "Meshes" }) { Toggle toggle = new Toggle(false, folder); subfolders.Add(toggle); lyCheckboxes.Add(toggle); } form.Add(lyCheckboxes); form.Add(new View()); form.Add(lyButton); }
protected override void OnCreateForm(Form form) { form.Spacing = 5; form.Add(new Headline("Create Folder")); Label lblNamespace = new Label("Namespace:"); lblNamespace.Width = 150; txtNamespace = new TextField(transitiveSourceInfo.@namespace); LinearLayout lyNamespace = LinearLayout.Horizontal().Add(lblNamespace).Add(txtNamespace); lyNamespace.Height = 30; Label lblFolder = new Label("Folder:"); lblFolder.Width = 150; txtFolderName = new TextField(); LinearLayout lyFolder = LinearLayout.Horizontal().Add(lblFolder).Add(txtFolderName); lyFolder.Height = 30; lblError = new Label(""); lblError.style.fontStyle = FontStyle.Bold; LinearLayout lyButton = LinearLayout.Horizontal(); Button button = new Button("Ok", ButtonClicked); button.Width = 100; lyButton.Add(new View()).Add(button); Label lblSubfolders = new Label("Create subfolders:"); lblSubfolders.Width = 150; GridLayout lyCheckboxes = new GridLayout(3, GridLayout.EOrientation.Vertical); foreach (string folder in new string[] { "Scripts", "Scenes", "Prefabs", "Resources", "Textures", "Materials", "Meshes" }) { Toggle toggle = new Toggle(false, folder); subfolders.Add(toggle); lyCheckboxes.Add(toggle); } LinearLayout lySubfolders = LinearLayout.Horizontal().Add(lblSubfolders).Add(lyCheckboxes); form.Add(lyNamespace); form.Add(lyFolder); form.Add(lblError); form.Add(lySubfolders); form.Add(lyButton); form.RequestFocusForView = txtFolderName; }
void Start() { form = new Form(); form.Spacing = 5; Label labelNamespace = new Label("Component Namespace:"); labelNamespace.Width = 150; TextField txtNamespace = new TextField(); LinearLayout componentNamespace = LinearLayout.Horizontal().Add(labelNamespace).Add(txtNamespace); componentNamespace.Height = 30; form.Add(componentNamespace); Label labelComponentName = new Label("Name of Component:"); labelComponentName.Width = 150; TextField txtComponentName = new TextField(); LinearLayout componentName = LinearLayout.Horizontal().Add(labelComponentName).Add(txtComponentName); componentName.Height = 30; form.Add(componentName); form.Add(new Label("Generate following folders in component:")); LinearLayout toggles = LinearLayout.Horizontal(); LinearLayout left = LinearLayout.Vertical(); left.Width = 100; left.Add(new Toggle(true, "Scripts")); left.Add(new Toggle(true, "Meshes")); left.Add(new Toggle(true, "Materials")); LinearLayout right = LinearLayout.Vertical(); right.Width = 100; right.Add(new Toggle(true, "Prefabs")); right.Add(new Toggle(true, "Ressoures")); toggles.Add(left).Add(right); form.Add(toggles); LinearLayout buttonContainer = LinearLayout.Horizontal(); form.Add(buttonContainer); Button button = new Button("Ok", _ => { }); button.Width = 100; buttonContainer.Add(new View()).Add(button); form.Add(buttonContainer); }
protected override void OnCreateForm(Form form) { form.Spacing = 5; form.Add(new Headline("Create C# Class")); Label lblNamespace = new Label("Namespace:"); lblNamespace.Width = 150; txtNamespace = new TextField(sourcesInfo.@namespace); LinearLayout lyNamespace = LinearLayout.Horizontal().Add(lblNamespace).Add(txtNamespace); lyNamespace.Height = 30; Label lblClassName = new Label("Class name:"); lblClassName.Width = 150; txtClassName = new TextField(); LinearLayout lyClassName = LinearLayout.Horizontal().Add(lblClassName).Add(txtClassName); lyClassName.Height = 30; form.Add(lyNamespace); form.Add(lyClassName); form.Add(lblError = new Label("")); lblError.style.fontStyle = FontStyle.Bold; form.Add(tglHeaderComment = new Toggle(true, "Generate source code header comment")); form.Add(tglLogger = new Toggle(true, "Generate logger")); LinearLayout lyButton = LinearLayout.Horizontal(); Button button = new Button("Ok", ButtonClicked); button.Width = 100; lyButton.Add(new View()).Add(button); form.Add(lyButton); form.RequestFocusForView = txtClassName; }