| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Windows.Forms;
- using UAS_MES.DataOperate;
- using UAS_MES.Entity;
- using UAS_MES.PublicMethod;
- namespace UAS_MES.Query
- {
- public partial class Query_OperationInstruction : Form
- {
- DataHelper dh;
- AutoSizeFormClass asc = new AutoSizeFormClass();
- public Query_OperationInstruction()
- {
- InitializeComponent();
- }
- private void Query_OperationInstruction_Load(object sender, EventArgs e)
- {
- //asc.controllInitializeSize(this);
- dh = SystemInf.dh;
- }
- private void Query_OperationInstruction_SizeChanged(object sender, EventArgs e)
- {
- //asc.controlAutoSize(this);
- sn_label.Location = new Point(20, 0);
- SnCode.Location = new Point(sn_label.Location.X + sn_label.Width + 20, 0);
- FileList_label.Location = new Point(SnCode.Location.X + SnCode.Width + 20, 0);
- FileList.Location = new Point(FileList_label.Location.X + FileList_label.Width + 20, 0);
- }
- private void SnCode_KeyDown(object sender, KeyEventArgs e)
- {
- if (e.KeyCode == Keys.Enter)
- {
- string MachineType = dh.getFieldDataByCondition("makeserial left join product on pr_code=ms_prodcode", "pr_machinetype", "ms_id=(select max(ms_id) from makeserial where ms_sncode='" + SnCode.Text + "')").ToString();
- //string FilePath = dh.getFieldDataByCondition("", "", "").ToString();
- }
- }
- private void FileList_SelectedIndexChanged(object sender, EventArgs e)
- {
- string FileType = BaseUtil.GetFileSuffix(FileList.Text);
- switch (FileType)
- {
- case "MP4":
- MediaPlayer.Visible = true;
- PageView.Visible = false;
- PicBox.Visible = false;
- break;
- case "PDF":
- MediaPlayer.Visible = false;
- PageView.Visible = true;
- PicBox.Visible = false;
- break;
- case "JPEG":
- MediaPlayer.Visible = false;
- PageView.Visible = false;
- PicBox.Visible = true;
- break;
- case "JPG":
- MediaPlayer.Visible = false;
- PageView.Visible = false;
- PicBox.Visible = true;
- break;
- default:
- break;
- }
- }
-
- }
- }
|