📄 dialogconfigdialog.cs
字号:
#region Namespaces
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using Epi.Windows.Dialogs;
using Epi;
#endregion //Namespaces
namespace Epi.Windows.MakeView.Dialogs.CheckCodeCommandDialogs
{
/// <summary>
/// ***** This is a wireframe and currently contains no functionality *****
/// </summary>
public partial class DialogConfigDialog : CheckCodeDesignDialog
{
#region Constructors
/// <summary>
/// Constructor for the class
/// </summary>
[Obsolete("Use of default constructor not allowed", true)]
public DialogConfigDialog()
{
InitializeComponent();
}
/// <summary>
/// Constructor of the Dialog Config dialog
/// </summary>
/// <param name="frm">The main form</param>
public DialogConfigDialog(MainForm frm) : base(frm)
{
InitializeComponent();
}
#endregion //Constructors
#region Private Event Handlers
/// <summary>
/// Handles the Click event of the Ok button
/// </summary>
/// <param name="sender">Object that fired the event</param>
/// <param name="e">.NET supplied event parameters</param>
private void btnOK_Click(object sender, System.EventArgs e)
{
if (!string.IsNullOrEmpty(txtTitle.Text) && !string.IsNullOrEmpty(txtPrompt.Text))
{
Output = CommandNames.DIALOG + StringLiterals.SPACE + StringLiterals.DOUBLEQUOTES + txtPrompt.Text + "\" TITLETEXT=\"" + txtTitle.Text + "\"";
// Output = "DIALOG \"" + txtPrompt.Text + "\" TITLETEXT=\"" + txtTitle.Text + "\"";
this.DialogResult = DialogResult.OK;
this.Hide();
}
}
/// <summary>
/// Cancel button closes this dialog
/// </summary>
/// <param name="sender">Object that fired the event</param>
/// <param name="e">.NET supplied event parameters</param>
private void btnCancel_Click(object sender, System.EventArgs e)
{
this.Close();
}
/// <summary>
/// Handles the Text Changed event of the title
/// </summary>
/// <param name="sender">Object that fired the event</param>
/// <param name="e">.NET supplied event parameters</param>
private void txtTitle_TextChanged(object sender, EventArgs e)
{
OnPromptOrTitleChanged();
}
/// <summary>
/// Handles the Text Changed event of the prompt
/// </summary>
/// <param name="sender">Object that fired the event</param>
/// <param name="e">.NET supplied event parameters</param>
private void txtPrompt_TextChanged(object sender, EventArgs e)
{
OnPromptOrTitleChanged();
}
#endregion //Private Event Handlers
#region Private Methods
private void OnPromptOrTitleChanged()
{
btnOK.Enabled = (!string.IsNullOrEmpty(txtPrompt.Text) && !string.IsNullOrEmpty(txtTitle.Text));
}
#endregion //Private Methods
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -