using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;

namespace QC.SmartMatchApp;

public class LogPathInfo : Form
{
	private string logPath = "";

	private IContainer components;

	private TextBox tbLogPath;

	private Label label1;

	private Button btnOK;

	private Button btnCancel;

	private Button btnLogPathBrowse;

	public string LogPath
	{
		get
		{
			return logPath;
		}
		set
		{
			logPath = value;
		}
	}

	public LogPathInfo(string logPath)
	{
		InitializeComponent();
		tbLogPath.Text = logPath;
	}

	private void btnLogPathBrowse_Click(object sender, EventArgs e)
	{
		FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog();
		folderBrowserDialog.SelectedPath = "C:\\Qualcomm\\QDART\\SmartMatch\\";
		if (folderBrowserDialog.ShowDialog() == DialogResult.OK)
		{
			tbLogPath.Text = folderBrowserDialog.SelectedPath;
		}
	}

	private void btnOK_Click(object sender, EventArgs e)
	{
		logPath = tbLogPath.Text;
		base.DialogResult = DialogResult.OK;
		Close();
	}

	private void btnCancel_Click(object sender, EventArgs e)
	{
		base.DialogResult = DialogResult.Cancel;
	}

	protected override void Dispose(bool disposing)
	{
		if (disposing && components != null)
		{
			components.Dispose();
		}
		base.Dispose(disposing);
	}

	private void InitializeComponent()
	{
		this.tbLogPath = new System.Windows.Forms.TextBox();
		this.label1 = new System.Windows.Forms.Label();
		this.btnOK = new System.Windows.Forms.Button();
		this.btnCancel = new System.Windows.Forms.Button();
		this.btnLogPathBrowse = new System.Windows.Forms.Button();
		base.SuspendLayout();
		this.tbLogPath.Location = new System.Drawing.Point(127, 58);
		this.tbLogPath.Name = "tbLogPath";
		this.tbLogPath.Size = new System.Drawing.Size(237, 20);
		this.tbLogPath.TabIndex = 0;
		this.label1.AutoSize = true;
		this.label1.Location = new System.Drawing.Point(131, 41);
		this.label1.Name = "label1";
		this.label1.Size = new System.Drawing.Size(69, 13);
		this.label1.TabIndex = 1;
		this.label1.Text = "Log File Path";
		this.btnOK.Location = new System.Drawing.Point(222, 123);
		this.btnOK.Name = "btnOK";
		this.btnOK.Size = new System.Drawing.Size(75, 23);
		this.btnOK.TabIndex = 2;
		this.btnOK.Text = "OK";
		this.btnOK.UseVisualStyleBackColor = true;
		this.btnOK.Click += new System.EventHandler(btnOK_Click);
		this.btnCancel.Location = new System.Drawing.Point(330, 123);
		this.btnCancel.Name = "btnCancel";
		this.btnCancel.Size = new System.Drawing.Size(75, 23);
		this.btnCancel.TabIndex = 3;
		this.btnCancel.Text = "Cancel";
		this.btnCancel.UseVisualStyleBackColor = true;
		this.btnCancel.Click += new System.EventHandler(btnCancel_Click);
		this.btnLogPathBrowse.Location = new System.Drawing.Point(51, 58);
		this.btnLogPathBrowse.Name = "btnLogPathBrowse";
		this.btnLogPathBrowse.Size = new System.Drawing.Size(41, 23);
		this.btnLogPathBrowse.TabIndex = 8;
		this.btnLogPathBrowse.Text = "...";
		this.btnLogPathBrowse.UseVisualStyleBackColor = true;
		this.btnLogPathBrowse.Click += new System.EventHandler(btnLogPathBrowse_Click);
		base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.ClientSize = new System.Drawing.Size(434, 167);
		base.Controls.Add(this.btnLogPathBrowse);
		base.Controls.Add(this.btnCancel);
		base.Controls.Add(this.btnOK);
		base.Controls.Add(this.label1);
		base.Controls.Add(this.tbLogPath);
		base.Name = "LogPathInfo";
		this.Text = "LogPathInfo";
		base.ResumeLayout(false);
		base.PerformLayout();
	}
}
