|
using System;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace SourceGrid.Controls
{
public class TextBoxButtonSelectFile : TextBoxButton
{
private System.ComponentModel.IContainer components = null;
public TextBoxButtonSelectFile()
{
// This call is required by the Windows Form Designer.
InitializeComponent();
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
private OpenFileDialog m_OpenFileDialog = new OpenFileDialog();
public OpenFileDialog OpenFileDialog
{
get{return m_OpenFileDialog;}
}
protected override void OnButtonClick(EventArgs e)
{
base.OnButtonClick(e);
if (m_OpenFileDialog.ShowDialog(this) == DialogResult.OK)
{
EditObject = m_OpenFileDialog.FileName;
}
}
#region Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
components = new System.ComponentModel.Container();
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.