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.
185 lines
4.6 KiB
185 lines
4.6 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
namespace SSLMS.MobileUI
|
|
{
|
|
public partial class MAIN : Form
|
|
{
|
|
public static MAIN frmMain = new MAIN();
|
|
|
|
static public MAIN Instance()
|
|
{
|
|
return frmMain;
|
|
}
|
|
|
|
private MAIN()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void FrmMain_Load(object sender, EventArgs e)
|
|
{
|
|
this.Width = Screen.PrimaryScreen.WorkingArea.Width;
|
|
|
|
this.Height = Screen.PrimaryScreen.WorkingArea.Height;
|
|
|
|
this.WindowState = FormWindowState.Maximized;
|
|
|
|
//SSLMS.MobileUI.uc.UserControl.InitBarcode();
|
|
//this.Login();
|
|
}
|
|
|
|
/// <summary>
|
|
/// Óû§µÇ½
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public void Login()
|
|
{
|
|
SSLMS.MobileUI.LOGIN frm = new LOGIN();
|
|
|
|
if (frm.ShowDialog().Equals(DialogResult.Yes))
|
|
{
|
|
this.Show();
|
|
}
|
|
}
|
|
|
|
private void MAIN_Closed(object sender, EventArgs e)
|
|
{
|
|
|
|
foreach (Control c in this.panel1.Controls)
|
|
{
|
|
c.Dispose();
|
|
}
|
|
|
|
Application.Exit();
|
|
}
|
|
|
|
public void MAIN_AddControl(UserControl¡¡uc,string strTitle)
|
|
{
|
|
foreach (Control c in this.panel1.Controls)
|
|
{
|
|
c.Dispose();
|
|
}
|
|
|
|
this.panel1.Controls.Clear();
|
|
|
|
this.panel1.Controls.Add(uc);
|
|
|
|
uc.Show();
|
|
|
|
uc.Dock = DockStyle.Fill;
|
|
|
|
}
|
|
|
|
private void menuItem_Click(object sender, EventArgs e)
|
|
{
|
|
MenuItem mi = sender as MenuItem;
|
|
|
|
switch (mi.Text.ToLower())
|
|
{
|
|
case "exit":
|
|
|
|
if (DialogResult.Yes == MessageBox.Show("ÊÇ·ñÍ˳öϵͳ?", "ϵͳÌáʾ", MessageBoxButtons.YesNo,MessageBoxIcon.Question, MessageBoxDefaultButton.Button1))
|
|
{
|
|
this.Close();
|
|
}
|
|
|
|
break;
|
|
|
|
case "´ý°ì¹¤×÷":
|
|
|
|
this.MAIN_AddControl(new SSLMS.MobileUI.uc.ucPLAN_QUERY("'Executing'"), "´ý°ì¹¤×÷");
|
|
|
|
break;
|
|
|
|
|
|
case "¿ÕÍÐÅÌÉϼÜ":
|
|
|
|
this.MAIN_AddControl(new SSLMS.MobileUI.uc.ucStockIn("StockIn"), "¿ÕÍÐÅÌÈë¿â");
|
|
|
|
break;
|
|
|
|
case "task list":
|
|
|
|
//this.MAIN_AddControl(new SSLMS.MobileUI.uc.ucMANAGE_QUERY(), "task list");
|
|
|
|
break;
|
|
|
|
case "download task":
|
|
|
|
//this.MAIN_AddControl(new SSLMS.MobileUI.uc.ucCONTROL_SEND(), "download task");
|
|
|
|
break;
|
|
|
|
case "vacant pallet load":
|
|
|
|
//this.MAIN_AddControl(new SSLMS.MobileUI.uc.ucSTOCK_IN(), "pallet load");
|
|
|
|
break;
|
|
|
|
case "vacant pallet unload":
|
|
|
|
//this.MAIN_AddControl(new SSLMS.MobileUI.uc.ucSTOCK_OUT(), "pallet unload");
|
|
|
|
break;
|
|
}
|
|
}
|
|
|
|
private void MAIN_KeyDown(object sender, KeyEventArgs e)
|
|
{
|
|
switch (e.KeyCode)
|
|
{
|
|
case Keys.Escape:
|
|
|
|
if (DialogResult.Yes == MessageBox.Show("ÊÇ·ñÍ˳öϵͳ?", "System Info", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1))
|
|
{
|
|
this.Close();
|
|
}
|
|
break;
|
|
|
|
//case Keys.F1:
|
|
|
|
// //this.MAIN_AddControl(new SSLMS.MobileUI.uc.ucPLAN_QUERY("'zxz'"), "´ý°ì¼Æ»®");
|
|
|
|
// break;
|
|
|
|
|
|
//case Keys.F2:
|
|
|
|
// //this.MAIN_AddControl(new SSLMS.MobileUI.uc.ucMANAGE_CHANGE(), "×éÅÌ");
|
|
|
|
// break;
|
|
|
|
//case Keys.F3:
|
|
|
|
// //this.MAIN_AddControl(new SSLMS.MobileUI.uc.ucMANAGE_MOVE(), "ÒÆ¿â");
|
|
|
|
// break;
|
|
|
|
//case Keys.F4:
|
|
|
|
// //this.MAIN_AddControl(new SSLMS.MobileUI.uc.ucCONTROL_APPLY(), "ɨÂëÈë¿â");
|
|
|
|
// break;
|
|
|
|
//case Keys.F5:
|
|
|
|
// //this.MAIN_AddControl(new SSLMS.MobileUI.uc.ucSTOCK_IN(), "°áÔËÈÝÆ÷Èë¿â");
|
|
|
|
// break;
|
|
|
|
//case Keys.F6:
|
|
|
|
// //this.MAIN_AddControl(new SSLMS.MobileUI.uc.ucSTOCK_OUT(), "°áÔËÈÝÆ÷³ö¿â");
|
|
|
|
// break;
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|