/// <summary> /// Initializes the Form's components. /// </summary> private void InitializeComponent() { components = new Container(); _byteViewer = new KryptonByteViewer(); KryptonPanel bottomPanel = new KryptonPanel(); KryptonPanel topPanel = new KryptonPanel(); KryptonGroupBox groupBox = new KryptonGroupBox(); KryptonCheckButton unicodeButton = new KryptonCheckButton(); KryptonCheckButton hexButton = new KryptonCheckButton(); KryptonCheckButton ansiButton = new KryptonCheckButton(); KryptonCheckButton export = new KryptonCheckButton(); KryptonCheckSet displayModeCheckset = new KryptonCheckSet(components); ((ISupportInitialize)(topPanel)).BeginInit(); topPanel.SuspendLayout(); ((ISupportInitialize)(groupBox)).BeginInit(); groupBox.Panel.BeginInit(); groupBox.Panel.SuspendLayout(); groupBox.SuspendLayout(); ((ISupportInitialize)(displayModeCheckset)).BeginInit(); ((ISupportInitialize)(bottomPanel)).BeginInit(); SuspendLayout(); // // topPanel // topPanel.AutoSize = true; topPanel.Controls.Add(groupBox); topPanel.Controls.Add(export); topPanel.Dock = DockStyle.Top; topPanel.Location = new System.Drawing.Point(0, 0); topPanel.Name = "topPanel"; topPanel.Padding = new Padding(5); topPanel.Size = new System.Drawing.Size(639, 65); topPanel.TabIndex = 0; // // groupBox // groupBox.AutoSize = true; groupBox.Location = new System.Drawing.Point(5, 0); groupBox.Name = "groupBox"; // // groupBox.Panel // groupBox.Panel.Controls.Add(unicodeButton); groupBox.Panel.Controls.Add(hexButton); groupBox.Panel.Controls.Add(ansiButton); groupBox.Size = new System.Drawing.Size(280, 57); groupBox.TabIndex = 0; groupBox.Values.Heading = @"Display Mode"; // // unicodeButton // unicodeButton.Location = new System.Drawing.Point(141, 3); unicodeButton.Name = "unicodeButton"; unicodeButton.Size = new System.Drawing.Size(63, 25); unicodeButton.TabIndex = 3; unicodeButton.Values.Text = @"Unicode"; // // hexButton // hexButton.Checked = true; hexButton.Location = new System.Drawing.Point(3, 3); hexButton.Name = "hexButton"; hexButton.Size = new System.Drawing.Size(63, 25); hexButton.TabIndex = 2; hexButton.Values.Text = @"Hex"; // // ansiButton // ansiButton.Location = new System.Drawing.Point(72, 3); ansiButton.Name = "ansiButton"; ansiButton.Size = new System.Drawing.Size(63, 25); ansiButton.TabIndex = 1; ansiButton.Values.Text = @"ANSI"; // // displayModeCheckset // displayModeCheckset.CheckButtons.Add(ansiButton); displayModeCheckset.CheckButtons.Add(hexButton); displayModeCheckset.CheckButtons.Add(unicodeButton); displayModeCheckset.CheckedButton = hexButton; displayModeCheckset.CheckedButtonChanged += OnCheckedButtonChanged; // // export // export.Location = new System.Drawing.Point(535, 22); export.Name = "export"; export.Size = new System.Drawing.Size(80, 25); export.TabIndex = 4; export.Values.Text = @"Export..."; export.Click += OnClickExport; // // bottomPanel // bottomPanel.Dock = DockStyle.Fill; bottomPanel.Location = new System.Drawing.Point(0, 65); bottomPanel.Name = "bottomPanel"; bottomPanel.Size = new System.Drawing.Size(639, 401); bottomPanel.TabIndex = 1; bottomPanel.Controls.Add(_byteViewer); // // byteViewer // _byteViewer.Dock = DockStyle.Fill; _byteViewer.CellBorderStyle = TableLayoutPanelCellBorderStyle.None; // // Form1 // AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new System.Drawing.Size(639, 466); Controls.Add(bottomPanel); Controls.Add(topPanel); FormBorderStyle = FormBorderStyle.FixedToolWindow; StartPosition = FormStartPosition.CenterParent; Name = @"Binary Viewer"; Text = @"Binary Viewer"; ((ISupportInitialize)(topPanel)).EndInit(); topPanel.ResumeLayout(false); topPanel.PerformLayout(); groupBox.Panel.EndInit(); groupBox.Panel.ResumeLayout(false); ((ISupportInitialize)(groupBox)).EndInit(); groupBox.ResumeLayout(false); ((ISupportInitialize)(displayModeCheckset)).EndInit(); ((ISupportInitialize)(bottomPanel)).EndInit(); ResumeLayout(false); PerformLayout(); }
private void InitializeComponent() { _panelMessage = new KryptonPanel(); _textBoxResponse = new KryptonTextBox(); _labelPrompt = new KryptonWrapLabel(); _buttonCancel = new KryptonButton(); _buttonOK = new KryptonButton(); ((ISupportInitialize)(_panelMessage)).BeginInit(); _panelMessage.SuspendLayout(); SuspendLayout(); // // _panelMessage // _panelMessage.Controls.Add(_textBoxResponse); _panelMessage.Controls.Add(_labelPrompt); _panelMessage.Controls.Add(_buttonCancel); _panelMessage.Controls.Add(_buttonOK); _panelMessage.Dock = DockStyle.Fill; _panelMessage.Location = new Point(0, 0); _panelMessage.Name = "_panelMessage"; _panelMessage.Size = new Size(357, 118); _panelMessage.TabIndex = 0; // // _textBoxResponse // _textBoxResponse.Location = new Point(12, 86); _textBoxResponse.Name = "_textBoxResponse"; _textBoxResponse.Size = new Size(333, 20); _textBoxResponse.TabIndex = 0; // // _labelPrompt // _labelPrompt.AutoSize = false; _labelPrompt.Font = new Font("Segoe UI", 9F); _labelPrompt.ForeColor = Color.FromArgb(30, 57, 91); _labelPrompt.LabelStyle = LabelStyle.NormalPanel; _labelPrompt.Location = new Point(12, 12); _labelPrompt.Margin = new Padding(0); _labelPrompt.Name = "_labelPrompt"; _labelPrompt.Size = new Size(78, 15); _labelPrompt.Text = "Prompt"; // // _buttonCancel // _buttonCancel.Anchor = AnchorStyles.Top | AnchorStyles.Right; _buttonCancel.AutoSize = true; _buttonCancel.DialogResult = DialogResult.Cancel; _buttonCancel.Location = new Point(295, 43); _buttonCancel.Margin = new Padding(0); _buttonCancel.MinimumSize = new Size(50, 26); _buttonCancel.Name = "_buttonCancel"; _buttonCancel.Size = new Size(50, 26); _buttonCancel.TabIndex = 2; _buttonCancel.Values.Text = "Cancel"; _buttonCancel.KeyDown += button_keyDown; // // _buttonOK // _buttonOK.Anchor = AnchorStyles.Top | AnchorStyles.Right; _buttonOK.AutoSize = true; _buttonOK.DialogResult = DialogResult.OK; _buttonOK.Location = new Point(295, 12); _buttonOK.Margin = new Padding(0); _buttonOK.MinimumSize = new Size(50, 26); _buttonOK.Name = "_buttonOK"; _buttonOK.Size = new Size(50, 26); _buttonOK.TabIndex = 1; _buttonOK.Values.Text = "OK"; _buttonOK.KeyDown += button_keyDown; // // KryptonInputBox // AutoScaleDimensions = new SizeF(6F, 13F); AutoScaleMode = AutoScaleMode.Font; ClientSize = new Size(357, 118); Controls.Add(_panelMessage); FormBorderStyle = FormBorderStyle.FixedDialog; MaximizeBox = false; MinimizeBox = false; Name = "KryptonInputBox"; ShowIcon = false; ShowInTaskbar = false; SizeGripStyle = SizeGripStyle.Hide; StartPosition = FormStartPosition.CenterParent; ((ISupportInitialize)(_panelMessage)).EndInit(); _panelMessage.ResumeLayout(false); _panelMessage.PerformLayout(); ResumeLayout(false); }