public oBallStatic() { EditorPath = "Collisions"; ColliderCircle cr = new ColliderCircle(this); cr.Position = Position; cr.Radius = 64; cr.Name = "Main"; cr.GameObject = this; Colliders.Add(cr); box1 = new DarkCheckBox() { Text = "On", AutoSize = true }; box1.CheckStateChanged += box1event; box2 = new DarkCheckBox() { Text = "Off", AutoSize = true }; box2.CheckStateChanged += box2event; EditorProperties = new Control[3]; EditorProperties[0] = new DarkLabel() { Text = "Toggle particles", AutoSize = true }; EditorProperties[1] = box1; EditorProperties[2] = box2; }
public static string ShowDialog(string text, string caption) { Form prompt = new DarkForm { Width = 400, Height = 150, FormBorderStyle = FormBorderStyle.FixedToolWindow, Text = caption, StartPosition = FormStartPosition.CenterScreen }; DarkLabel textLabel = new DarkLabel() { Left = 50, Top = 15, Height = 50, Width = 300, Text = text }; DarkTextBox textBox = new DarkTextBox() { Left = 50, Top = 50, Width = 300 }; DarkButton confirmation = new DarkButton() { Text = "Ok", Left = 250, Width = 100, Top = 80, DialogResult = DialogResult.OK }; confirmation.Click += (sender, e) => { prompt.Close(); }; prompt.Controls.Add(textBox); prompt.Controls.Add(confirmation); prompt.Controls.Add(textLabel); prompt.AcceptButton = confirmation; return(prompt.ShowDialog() == DialogResult.OK ? textBox.Text : ""); }
private void InitializeComponent() { this.tree = new DarkUI.Controls.DarkTreeView(); this.suggestedGameVersionComboBox = new DarkUI.Controls.DarkComboBox(); this.darkLabel1 = new DarkUI.Controls.DarkLabel(); this.SuspendLayout(); // // tree // this.tree.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.tree.Enabled = false; this.tree.Location = new System.Drawing.Point(0, 30); this.tree.MaxDragChange = 20; this.tree.MultiSelect = true; this.tree.Name = "tree"; this.tree.Size = new System.Drawing.Size(150, 120); this.tree.TabIndex = 1; this.tree.Click += new System.EventHandler(this.tree_Click); this.tree.DoubleClick += new System.EventHandler(this.tree_DoubleClick); this.tree.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Tree_KeyDown); this.tree.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.Tree_KeyPress); this.tree.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Tree_KeyUp); this.tree.MouseDown += new System.Windows.Forms.MouseEventHandler(this.tree_MouseDown); // // suggestedGameVersionComboBox // this.suggestedGameVersionComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.suggestedGameVersionComboBox.Enabled = false; this.suggestedGameVersionComboBox.FormattingEnabled = true; this.suggestedGameVersionComboBox.Location = new System.Drawing.Point(103, 3); this.suggestedGameVersionComboBox.Name = "suggestedGameVersionComboBox"; this.suggestedGameVersionComboBox.Size = new System.Drawing.Size(47, 21); this.suggestedGameVersionComboBox.TabIndex = 0; this.suggestedGameVersionComboBox.SelectedIndexChanged += new System.EventHandler(this.suggestedGameVersionComboBox_SelectedIndexChanged); // // darkLabel1 // this.darkLabel1.AutoSize = true; this.darkLabel1.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(220)))), ((int)(((byte)(220))))); this.darkLabel1.Location = new System.Drawing.Point(3, 6); this.darkLabel1.Name = "darkLabel1"; this.darkLabel1.Size = new System.Drawing.Size(91, 13); this.darkLabel1.TabIndex = 3; this.darkLabel1.Text = "Game slot names:"; // // WadTreeView // this.Controls.Add(this.darkLabel1); this.Controls.Add(this.suggestedGameVersionComboBox); this.Controls.Add(this.tree); this.Name = "WadTreeView"; this.Click += new System.EventHandler(this.WadTreeView_Click); this.ResumeLayout(false); this.PerformLayout(); }