You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

178 lines
6.0 KiB

3 years ago
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace Stone.Common
{
/// <summary>
/// �ļ�����frmBarcodePrintSet.cs
/// �� �ã�Label Matrix ��װ·������
/// �� �ߣ�������
/// �� �ڣ�2007-3-6
/// �汾�޶���2007-12-24
/// �汾�޶���2008-06-14
/// �汾�޶���2010-12-04��Ϊ�人WMS������ϵͳ�޸ģ�
/// </summary>
public class frmBarcodePrintSet : System.Windows.Forms.Form
{
#region ϵͳ��������
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox t_Lmw32Path;
private System.Windows.Forms.Button b_Save;
private System.Windows.Forms.Button b_Close;
private System.Windows.Forms.Button b_Browse;
private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1;
private System.ComponentModel.Container components = null;
public frmBarcodePrintSet()
{
InitializeComponent();
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows �������������ɵĴ���
/// <summary>
/// ������֧�������ķ��� - ��Ҫʹ�ô����༭���޸�
/// �˷��������ݡ�
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.t_Lmw32Path = new System.Windows.Forms.TextBox();
this.b_Browse = new System.Windows.Forms.Button();
this.b_Save = new System.Windows.Forms.Button();
this.b_Close = new System.Windows.Forms.Button();
this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(24, 37);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(168, 16);
this.label1.TabIndex = 0;
this.label1.Text = "Label Matrix ��װ·����";
//
// t_Lmw32Path
//
this.t_Lmw32Path.Location = new System.Drawing.Point(24, 56);
this.t_Lmw32Path.Name = "t_Lmw32Path";
this.t_Lmw32Path.Size = new System.Drawing.Size(293, 21);
this.t_Lmw32Path.TabIndex = 1;
this.t_Lmw32Path.Text = "C:\\Program Files\\lmw32";
//
// b_Browse
//
this.b_Browse.Location = new System.Drawing.Point(323, 54);
this.b_Browse.Name = "b_Browse";
this.b_Browse.Size = new System.Drawing.Size(40, 23);
this.b_Browse.TabIndex = 2;
this.b_Browse.Text = ">>>";
this.b_Browse.Click += new System.EventHandler(this.b_Browse_Click);
//
// b_Save
//
this.b_Save.Location = new System.Drawing.Point(144, 134);
this.b_Save.Name = "b_Save";
this.b_Save.Size = new System.Drawing.Size(91, 34);
this.b_Save.TabIndex = 3;
this.b_Save.Text = "��������(&S)";
this.b_Save.Click += new System.EventHandler(this.b_Save_Click);
//
// b_Close
//
this.b_Close.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.b_Close.Location = new System.Drawing.Point(26, 121);
this.b_Close.Name = "b_Close";
this.b_Close.Size = new System.Drawing.Size(91, 34);
this.b_Close.TabIndex = 4;
this.b_Close.Text = "�ر�(&C)";
this.b_Close.Visible = false;
this.b_Close.Click += new System.EventHandler(this.b_Close_Click);
//
// folderBrowserDialog1
//
this.folderBrowserDialog1.ShowNewFolderButton = false;
//
// frmBarcodePrintSet
//
this.AcceptButton = this.b_Save;
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.CancelButton = this.b_Close;
this.ClientSize = new System.Drawing.Size(388, 190);
this.Controls.Add(this.b_Close);
this.Controls.Add(this.b_Save);
this.Controls.Add(this.b_Browse);
this.Controls.Add(this.t_Lmw32Path);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "frmBarcodePrintSet";
this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Label Matrix ��װ·������";
this.Load += new System.EventHandler(this.FLabelPrintSet_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
#endregion
#region �����¼�
private void FLabelPrintSet_Load(object sender, System.EventArgs e)
{
this.t_Lmw32Path.Text = MyAppconfig.ReadValue("Lmw32Path");
}
#endregion
#region ��ť�¼�
private void b_Browse_Click(object sender, System.EventArgs e)
{
this.folderBrowserDialog1.SelectedPath = this.t_Lmw32Path.Text;
if(this.folderBrowserDialog1.ShowDialog().Equals(System.Windows.Forms.DialogResult.OK))
{
this.t_Lmw32Path.Text = this.folderBrowserDialog1.SelectedPath;
}
}
private void b_Save_Click(object sender, System.EventArgs e)
{
if(System.IO.File.Exists(this.t_Lmw32Path.Text.Trim() + @"\Lmwprint.exe"))
{
MyAppconfig.WriteValue("Lmw32Path", this.t_Lmw32Path.Text);
MyMessageBox.ShowInfoMessage("���������Ѿ��ɹ����棡");
//this.Close();
}
else
{
MyMessageBox.ShowErrorMessage("��ѡ����Ŀ¼��δ���� Label Matrix ������������ѡ��·����");
this.t_Lmw32Path.Focus();
this.t_Lmw32Path.SelectAll();
}
}
private void b_Close_Click(object sender, System.EventArgs e)
{
this.Close();
}
#endregion
}
}