|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace RunGadget
{
public partial class AddGadgetProject : Form
{
string FilePath = String.Empty;
public AddGadgetProject()
{
InitializeComponent();
}
private void btnDefineGadgetProjectPath_Click(object sender, EventArgs e)
{
FilePathDeterminer fpd = new FilePathDeterminer("Define Gadget Project Path", "", this.txtGadgetProjectPath.Text, FilePathDeterminer.FileOpenDialogType.FolderBrowserDialog);
FilePath = fpd.GetFilePath();
SetValueToTextBox(this.txtGadgetProjectPath, FilePath);
}
public string GetProjectPath()
{
return FilePath;
}
public string GetProjectName()
{
return this.txtProjectName.Text;
}
private void SetValueToTextBox(TextBox ctrl, string value)
{
if (!String.IsNullOrEmpty(value))
{
ctrl.Text = value;
}
}
private void btnCancel_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
private void btnOk_Click(object sender, EventArgs e)
{
if (!(String.IsNullOrEmpty(this.txtProjectName.Text)) && !(String.IsNullOrEmpty(this.txtGadgetProjectPath.Text)))
{
this.DialogResult = DialogResult.OK;
}
}
}
}
|
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.