| 0: | // OptionsDialog.cs | |
| 1: | // Copyright (C) 2000 Mike Krueger | |
| 2: | // | |
| 3: | // This program is free software; you can redistribute it and/or modify | |
| 4: | // it under the terms of the GNU General Public License as published by | |
| 5: | // the Free Software Foundation; either version 2 of the License, or | |
| 6: | // (at your option) any later version. | |
| 7: | // | |
| 8: | // This program is distributed in the hope that it will be useful, | |
| 9: | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 10: | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 11: | // GNU General Public License for more details. | |
| 12: | // | |
| 13: | // You should have received a copy of the GNU General Public License | |
| 14: | // along with this program; if not, write to the Free Software | |
| 15: | // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
| 16: | ||
| 17: | using System; | |
| 18: | using System.Drawing; | |
| 19: | using System.Collections; | |
| 20: | using System.ComponentModel; | |
| 21: | using System.Windows.Forms; | |
| 22: | ||
| 23: | using SharpDevelop.Gui; | |
| 24: | using SharpDevelop.Tool.Data; | |
| 25: | ||
| 26: | namespace SharpDevelop.Gui.Dialogs { | |
| 27: | ||
| 28: | public class OptionsDialog : Form | |
| 29: | { | |
| 30: | private Container components = new Container(); | |
| 31: | private Button okButton = new Button(); | |
| 32: | private PropertyGrid grid = new PropertyGrid(); | |
| 33: | ||
| 34: | public OptionsDialog(string tiletext, object customizer) | |
| 35: | { | |
| 36: | grid.SelectedObject = customizer; | |
| 37: | ||
| 38: | AutoScaleBaseSize = new Size(5, 13); | |
| 39: | Text = tiletext; | |
| 40: | ||
| 41: | StartPosition = FormStartPosition.CenterParent; | |
| 42: | Icon = null; | |
| 43: | AcceptButton = okButton; | |
| 44: | this.FormBorderStyle = FormBorderStyle.FixedDialog; | |
| 45: | ||
| 46: | MaximizeBox = MinimizeBox = false; | |
| 47: | ||
| 48: | ClientSize = new Size(330, 330); | |
| 49: | ||
| 50: | okButton.Location = new Point(230, 302); | |
| 51: | okButton.DialogResult = DialogResult.OK; | |
| 52: | okButton.Size = new Size(75, 22); | |
| 53: | okButton.Anchor = AnchorStyles.Bottom | AnchorStyles.Right; | |
| 54: | okButton.Text = Resource.GetString("Global.OKButtonText"); | |
| 55: | ||
| 56: | grid.Location = new Point(8, 8); | |
| 57: | grid.Size = new Size(300, 290); | |
| 58: | grid.CommandsVisibleIfAvailable = true; | |
| 59: | // grid.ActiveDocument = null; | |
| 60: | grid.AutoScrollMinSize = new Size(0, 0); | |
| 61: | // grid.Anchor = AnchorStyles.All; | |
| 62: | grid.ToolbarVisible = false; | |
| 63: | ||
| 64: | Controls.Add(okButton); | |
| 65: | Controls.Add(grid); | |
| 66: | MaximizeBox = MinimizeBox = false; | |
| 67: | ShowInTaskbar = false; | |
| 68: | Icon = null; | |
| 69: | } | |
| 70: | ||
| 71: | /// <summary> | |
| 72: | /// Clean up any resources being used. | |
| 73: | /// </summary> | |
| 74: | protected override void Dispose(bool disposing) | |
| 75: | { | |
| 76: | if (disposing) { | |
| 77: | if (components != null){ | |
| 78: | components.Dispose(); | |
| 79: | } | |
| 80: | } | |
| 81: | base.Dispose(disposing); | |
| 82: | } | |
| 83: | ||
| 84: | } | |
| 85: | } |
This page was automatically generated by SharpDevelop.