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

namespace QCRPG.Framework;

public class SnoopLiveLoggingConfig : Form
{
	private string liveImportDllFile;

	private string liveImportIniFile;

	private IContainer components;

	private Label lbLiveImportIniFile;

	private TextBox txtLiveImportIni;

	private Button btLiveImportIniFileSearch;

	private OpenFileDialog openLiveImportIniDialog;

	private Label lbLiveImportDLL;

	private TextBox txtLiveImportDll;

	private Button btLiveImportDLLSearch;

	private OpenFileDialog openLiveImportDllDialog;

	private Button btOk;

	private Button btCancel;

	private Label lbSamplePathIniFile;

	private Label lbSamplePathDllFile;

	public string LiveImportDllFile
	{
		get
		{
			return liveImportDllFile;
		}
		set
		{
			liveImportDllFile = value;
		}
	}

	public string LiveImportIniFile
	{
		get
		{
			return liveImportIniFile;
		}
		set
		{
			liveImportIniFile = value;
		}
	}

	public SnoopLiveLoggingConfig()
	{
		InitializeComponent();
	}

	private void btFileSearch_Click(object sender, EventArgs e)
	{
		if (txtLiveImportIni.Text != "" && File.Exists(txtLiveImportIni.Text))
		{
			openLiveImportIniDialog.InitialDirectory = Path.GetDirectoryName(txtLiveImportIni.Text);
		}
		else
		{
			openLiveImportIniDialog.InitialDirectory = "C:\\";
		}
		openLiveImportIniDialog.Filter = "liveimport.ini|*.ini";
		openLiveImportIniDialog.RestoreDirectory = true;
		openLiveImportIniDialog.Multiselect = false;
		openLiveImportIniDialog.CheckFileExists = true;
		if (openLiveImportIniDialog.ShowDialog() == DialogResult.OK)
		{
			txtLiveImportIni.Text = openLiveImportIniDialog.FileName;
		}
	}

	private void btLiveImportDLLSearch_Click(object sender, EventArgs e)
	{
		if (txtLiveImportDll.Text != "" && File.Exists(txtLiveImportDll.Text))
		{
			openLiveImportDllDialog.InitialDirectory = Path.GetDirectoryName(txtLiveImportDll.Text);
		}
		else
		{
			openLiveImportDllDialog.InitialDirectory = "C:\\";
		}
		openLiveImportDllDialog.InitialDirectory = "C:\\";
		openLiveImportDllDialog.Filter = "liveImportAPI.dll|*.dll";
		openLiveImportDllDialog.RestoreDirectory = true;
		openLiveImportDllDialog.Multiselect = false;
		openLiveImportDllDialog.CheckFileExists = true;
		if (openLiveImportDllDialog.ShowDialog() == DialogResult.OK)
		{
			txtLiveImportDll.Text = openLiveImportDllDialog.FileName;
		}
	}

	private void btOk_Click(object sender, EventArgs e)
	{
		liveImportDllFile = txtLiveImportDll.Text;
		liveImportIniFile = txtLiveImportIni.Text;
	}

	private void BTSnoopLiveLoggingConfig_Load(object sender, EventArgs e)
	{
		txtLiveImportDll.Text = liveImportDllFile;
		txtLiveImportIni.Text = liveImportIniFile;
	}

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

	private void InitializeComponent()
	{
		this.lbLiveImportIniFile = new System.Windows.Forms.Label();
		this.txtLiveImportIni = new System.Windows.Forms.TextBox();
		this.btLiveImportIniFileSearch = new System.Windows.Forms.Button();
		this.openLiveImportIniDialog = new System.Windows.Forms.OpenFileDialog();
		this.lbLiveImportDLL = new System.Windows.Forms.Label();
		this.txtLiveImportDll = new System.Windows.Forms.TextBox();
		this.btLiveImportDLLSearch = new System.Windows.Forms.Button();
		this.openLiveImportDllDialog = new System.Windows.Forms.OpenFileDialog();
		this.btOk = new System.Windows.Forms.Button();
		this.btCancel = new System.Windows.Forms.Button();
		this.lbSamplePathIniFile = new System.Windows.Forms.Label();
		this.lbSamplePathDllFile = new System.Windows.Forms.Label();
		base.SuspendLayout();
		this.lbLiveImportIniFile.AutoSize = true;
		this.lbLiveImportIniFile.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
		this.lbLiveImportIniFile.Location = new System.Drawing.Point(22, 9);
		this.lbLiveImportIniFile.Name = "lbLiveImportIniFile";
		this.lbLiveImportIniFile.Size = new System.Drawing.Size(156, 16);
		this.lbLiveImportIniFile.TabIndex = 0;
		this.lbLiveImportIniFile.Text = "Frontline liveimport.ini file";
		this.txtLiveImportIni.Location = new System.Drawing.Point(25, 51);
		this.txtLiveImportIni.Name = "txtLiveImportIni";
		this.txtLiveImportIni.Size = new System.Drawing.Size(379, 20);
		this.txtLiveImportIni.TabIndex = 1;
		this.btLiveImportIniFileSearch.Location = new System.Drawing.Point(414, 51);
		this.btLiveImportIniFileSearch.Name = "btLiveImportIniFileSearch";
		this.btLiveImportIniFileSearch.Size = new System.Drawing.Size(82, 20);
		this.btLiveImportIniFileSearch.TabIndex = 2;
		this.btLiveImportIniFileSearch.Text = "Browse...";
		this.btLiveImportIniFileSearch.UseVisualStyleBackColor = true;
		this.btLiveImportIniFileSearch.Click += new System.EventHandler(btFileSearch_Click);
		this.openLiveImportIniDialog.FileName = "LiveImport.ini";
		this.lbLiveImportDLL.AutoSize = true;
		this.lbLiveImportDLL.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75f, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, 0);
		this.lbLiveImportDLL.Location = new System.Drawing.Point(22, 89);
		this.lbLiveImportDLL.Name = "lbLiveImportDLL";
		this.lbLiveImportDLL.Size = new System.Drawing.Size(182, 16);
		this.lbLiveImportDLL.TabIndex = 3;
		this.lbLiveImportDLL.Text = "Frontline LiveImportAPI.dll file";
		this.txtLiveImportDll.Location = new System.Drawing.Point(25, 128);
		this.txtLiveImportDll.Name = "txtLiveImportDll";
		this.txtLiveImportDll.Size = new System.Drawing.Size(379, 20);
		this.txtLiveImportDll.TabIndex = 4;
		this.btLiveImportDLLSearch.Location = new System.Drawing.Point(414, 127);
		this.btLiveImportDLLSearch.Name = "btLiveImportDLLSearch";
		this.btLiveImportDLLSearch.Size = new System.Drawing.Size(82, 20);
		this.btLiveImportDLLSearch.TabIndex = 5;
		this.btLiveImportDLLSearch.Text = "Browse...";
		this.btLiveImportDLLSearch.UseVisualStyleBackColor = true;
		this.btLiveImportDLLSearch.Click += new System.EventHandler(btLiveImportDLLSearch_Click);
		this.openLiveImportDllDialog.FileName = "LiveImportAPI.dll";
		this.btOk.DialogResult = System.Windows.Forms.DialogResult.OK;
		this.btOk.Location = new System.Drawing.Point(160, 167);
		this.btOk.Name = "btOk";
		this.btOk.Size = new System.Drawing.Size(89, 32);
		this.btOk.TabIndex = 6;
		this.btOk.Text = "OK";
		this.btOk.UseVisualStyleBackColor = true;
		this.btOk.Click += new System.EventHandler(btOk_Click);
		this.btCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
		this.btCancel.Location = new System.Drawing.Point(300, 169);
		this.btCancel.Name = "btCancel";
		this.btCancel.Size = new System.Drawing.Size(92, 29);
		this.btCancel.TabIndex = 7;
		this.btCancel.Text = "Cancel";
		this.btCancel.UseVisualStyleBackColor = true;
		this.lbSamplePathIniFile.AutoSize = true;
		this.lbSamplePathIniFile.Location = new System.Drawing.Point(22, 35);
		this.lbSamplePathIniFile.Name = "lbSamplePathIniFile";
		this.lbSamplePathIniFile.Size = new System.Drawing.Size(382, 13);
		this.lbSamplePathIniFile.TabIndex = 8;
		this.lbSamplePathIniFile.Text = "(Eg: C:\\Program Files (x86)\\Frontline Test System II\\Frontline 11.1\\liveimport.ini)";
		this.lbSamplePathDllFile.AutoSize = true;
		this.lbSamplePathDllFile.Location = new System.Drawing.Point(22, 111);
		this.lbSamplePathDllFile.Name = "lbSamplePathDllFile";
		this.lbSamplePathDllFile.Size = new System.Drawing.Size(494, 13);
		this.lbSamplePathDllFile.TabIndex = 9;
		this.lbSamplePathDllFile.Text = "(Eg: C:\\Program Files (x86)\\Frontline Test System II\\Frontline 11.1\\Executables\\Core\\LiveImportAPI.dll)";
		base.AutoScaleDimensions = new System.Drawing.SizeF(6f, 13f);
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
		base.ClientSize = new System.Drawing.Size(537, 222);
		base.Controls.Add(this.lbSamplePathDllFile);
		base.Controls.Add(this.lbSamplePathIniFile);
		base.Controls.Add(this.btCancel);
		base.Controls.Add(this.btOk);
		base.Controls.Add(this.btLiveImportDLLSearch);
		base.Controls.Add(this.txtLiveImportDll);
		base.Controls.Add(this.lbLiveImportDLL);
		base.Controls.Add(this.btLiveImportIniFileSearch);
		base.Controls.Add(this.txtLiveImportIni);
		base.Controls.Add(this.lbLiveImportIniFile);
		base.Name = "BTSnoopLiveLoggingConfig";
		base.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
		this.Text = "BTSnoopLiveLoggingConfig";
		base.Load += new System.EventHandler(BTSnoopLiveLoggingConfig_Load);
		base.ResumeLayout(false);
		base.PerformLayout();
	}
}
