// XXX - YYY // Copyright (C) 200X Ian Cowburn // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // // $Id$ // using System; using System.Drawing; using System.Windows.Forms; namespace BitmapFontEd { /// /// Description of SetSizeForm. /// public class SetSizeForm : System.Windows.Forms.Form { private System.Windows.Forms.TrackBar m_width; private System.Windows.Forms.TrackBar m_height; private System.Windows.Forms.Button m_cancel; private System.Windows.Forms.Label m_widthtxt; private System.Windows.Forms.Label m_heighttxt; private System.Windows.Forms.Button m_ok; public SetSizeForm() { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); } public int CharWidth {get {return m_width.Value;}} public int CharHeight {get {return m_height.Value;}} #region Windows Forms Designer generated code /// /// This method is required for Windows Forms designer support. /// Do not change the method contents inside the source code editor. The Forms designer might /// not be able to load this method if it was changed manually. /// private void InitializeComponent() { this.m_ok = new System.Windows.Forms.Button(); this.m_heighttxt = new System.Windows.Forms.Label(); this.m_widthtxt = new System.Windows.Forms.Label(); this.m_cancel = new System.Windows.Forms.Button(); this.m_height = new System.Windows.Forms.TrackBar(); this.m_width = new System.Windows.Forms.TrackBar(); ((System.ComponentModel.ISupportInitialize)(this.m_height)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.m_width)).BeginInit(); this.SuspendLayout(); // // m_ok // this.m_ok.Location = new System.Drawing.Point(88, 144); this.m_ok.Name = "m_ok"; this.m_ok.Size = new System.Drawing.Size(88, 24); this.m_ok.TabIndex = 5; this.m_ok.Text = "OK"; this.m_ok.Click += new System.EventHandler(this.OnOK); // // m_heighttxt // this.m_heighttxt.Location = new System.Drawing.Point(8, 72); this.m_heighttxt.Name = "m_heighttxt"; this.m_heighttxt.Size = new System.Drawing.Size(266, 16); this.m_heighttxt.TabIndex = 3; this.m_heighttxt.Text = "Height: 16"; // // m_widthtxt // this.m_widthtxt.Location = new System.Drawing.Point(8, 8); this.m_widthtxt.Name = "m_widthtxt"; this.m_widthtxt.Size = new System.Drawing.Size(264, 16); this.m_widthtxt.TabIndex = 1; this.m_widthtxt.Text = "Width: 16"; // // m_cancel // this.m_cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.m_cancel.Location = new System.Drawing.Point(184, 144); this.m_cancel.Name = "m_cancel"; this.m_cancel.Size = new System.Drawing.Size(88, 24); this.m_cancel.TabIndex = 4; this.m_cancel.Text = "Cancel"; // // m_height // this.m_height.LargeChange = 4; this.m_height.Location = new System.Drawing.Point(0, 88); this.m_height.Maximum = 32; this.m_height.Minimum = 1; this.m_height.Name = "m_height"; this.m_height.Size = new System.Drawing.Size(280, 42); this.m_height.TabIndex = 2; this.m_height.Value = 16; this.m_height.Scroll += new System.EventHandler(this.OnHeight); // // m_width // this.m_width.LargeChange = 4; this.m_width.Location = new System.Drawing.Point(0, 24); this.m_width.Maximum = 32; this.m_width.Minimum = 1; this.m_width.Name = "m_width"; this.m_width.Size = new System.Drawing.Size(280, 42); this.m_width.TabIndex = 0; this.m_width.Value = 16; this.m_width.Scroll += new System.EventHandler(this.OnWidth); // // SetSizeForm // this.AcceptButton = this.m_ok; this.AutoScaleBaseSize = new System.Drawing.Size(5, 13); this.CancelButton = this.m_cancel; this.ClientSize = new System.Drawing.Size(282, 175); this.Controls.Add(this.m_ok); this.Controls.Add(this.m_cancel); this.Controls.Add(this.m_heighttxt); this.Controls.Add(this.m_height); this.Controls.Add(this.m_widthtxt); this.Controls.Add(this.m_width); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "SetSizeForm"; this.ShowInTaskbar = false; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.Text = "Set Size of All Characters"; ((System.ComponentModel.ISupportInitialize)(this.m_height)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.m_width)).EndInit(); this.ResumeLayout(false); } #endregion void OnWidth(object sender, System.EventArgs e) { m_widthtxt.Text="Width: " + m_width.Value; } void OnHeight(object sender, System.EventArgs e) { m_heighttxt.Text="Height: " + m_height.Value; } void OnOK(object sender, System.EventArgs e) { DialogResult=DialogResult.OK; Close(); } void OnCancel(object sender, System.EventArgs e) { DialogResult=DialogResult.Cancel; Close(); } } }