⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mainform.cs

📁 Symbol_MC3000_C#.条码扫码范例程序之2
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Fyfjm
{
    //enum CPU { 0163B0016742E7010800-0050BF7A60E2,"","","",""};

    public partial class MainForm : Form
    {
        private SymbolScanWood.DeviceInfo _cpu = new SymbolScanWood.DeviceInfo();
        string[] _cpuID = new string[8] {"0163B0016742E7010800-0050BF7A60E2","15517802CF440501C800-0050BF7A60E2","12183E02C0444C21B800-0050BF7A60E2","24566D6FC1441C91B800-0050BF7A60E2",
                                        "","","",""};

        public MainForm()
        {
            InitializeComponent();
        }

        private void MainForm_KeyDown(object sender, KeyEventArgs e)
        {
            switch (e.KeyCode)
            {
                case Keys.D1:
                    Zone zone = new Zone();
                    if (zone.ShowDialog() == DialogResult.OK)
                    {
                        StockTake stocktake = new StockTake();
                        stocktake._Zone = zone.tbZone.Text.Trim();
                        stocktake.ShowDialog();
                    }
                    break;
                case Keys.D2:
                    Cursor.Current = Cursors.WaitCursor;
                    Enquiry enquiry = new Enquiry();
                    enquiry.ShowDialog();
                    Cursor.Current = Cursors.Default;
                    break;
                case Keys.D3:
                    Cursor.Current = Cursors.WaitCursor;
                    Delete delete = new Delete();
                    delete.ShowDialog();
                    Cursor.Current = Cursors.Default;
                    break;
                case Keys.D4:
                    Cursor.Current = Cursors.WaitCursor;
                    Configuration configuration = new Configuration();
                    configuration.ShowDialog();
                    Cursor.Current = Cursors.Default;
                    break;
                case Keys.D5:
                    Cursor.Current = Cursors.WaitCursor;
                    Backlight backlight = new Backlight();
                    backlight.ShowDialog();
                    Cursor.Current = Cursors.Default;
                    break;
                case Keys.D6:
                    Close();
                    Application.Exit();
                    break;
                case Keys.F5:
                    Close();
                    Application.Exit();
                    break;
                default:
                    break;
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Zone zone = new Zone();
            if (zone.ShowDialog() == DialogResult.OK)
            {
                StockTake stocktake = new StockTake();
                stocktake._Zone = zone.tbZone.Text.Trim();
                stocktake.ShowDialog();
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            Enquiry enquiry = new Enquiry();
            enquiry.ShowDialog();
            Cursor.Current = Cursors.Default;
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            Delete delete = new Delete();
            delete.ShowDialog();
            Cursor.Current = Cursors.Default;
        }

        private void button5_Click(object sender, EventArgs e)
        {
            Backlight backlight = new Backlight();
            backlight.ShowDialog();
        }

        private void button6_Click(object sender, EventArgs e)
        {
            Close();
            Application.Exit();
        }

        private void MainForm_Load(object sender, EventArgs e)
        {
            int i=0;
            for (i = 0; i < 8; i++)
            {
                if (_cpu.CPUID.ToString().Trim() == _cpuID[i].Trim())
                {
                    break;
                }
            }
            /*if(i>=8)
            {
                MessageBox.Show("This device has not accredit,Phone:0755-83731960", "System Message", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1);
                Application.Exit();
            }*/
        }

        private void button4_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            Configuration configuration = new Configuration();
            configuration.ShowDialog();
            Cursor.Current = Cursors.Default;
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -