예제 #1
0
파일: MainForm.cs 프로젝트: AramisIT/FMCG
        public MainForm(Type startProcessType, bool test)
        {
            this.startProcessType = startProcessType;
            IsTest = test;
            InitializeComponent();
            Height = 320;
            Width = 240;

            if (!IsTest)
                {
                try
                    {
                    IntermecBarcodeReader = new BarcodeReader();
                    IntermecBarcodeReader.BarcodeRead += OnBarcodeRead;
                    IntermecBarcodeReader.ThreadedRead(true);
                    }
                catch (Exception exc)
                    {
                    Console.Write(exc.Message);
                    }
                }

            HotKeyAgent = new HotKeyProcessing(this);

            Client = new WMSClient(this, startProcessType);
            Client.Start();
            if (
                File.Exists(
                    Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) +
                    "\\update"))
                {
                Client.NeedToUpdate = true;
                }
        }
예제 #2
0
        public MainForm(Type startProcessType, bool test)
        {
            this.startProcessType = startProcessType;
            IsTest = test;
            InitializeComponent();
            Height = 320;
            Width  = 240;

            if (!IsTest)
            {
                try
                {
                    IntermecBarcodeReader              = new BarcodeReader();
                    IntermecBarcodeReader.BarcodeRead += OnBarcodeRead;
                    IntermecBarcodeReader.ThreadedRead(true);
                }
                catch (Exception exc)
                {
                    Console.Write(exc.Message);
                }
            }

            HotKeyAgent = new HotKeyProcessing(this);

            Client = new WMSClient(this, startProcessType);
            Client.Start();
            if (
                File.Exists(
                    Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) +
                    "\\update"))
            {
                Client.NeedToUpdate = true;
            }
        }
예제 #3
0
파일: MainForm.cs 프로젝트: AramisIT/Lamps
        public MainForm(bool test)
        {
            IsTest = test;
            InitializeComponent();
            Height = 320;
            Width  = 240;

            //SqlCeEngine engine = new SqlCeEngine("Data Source='SD-MMCard\\DCIM\\Test333.sdf';");

            //if (!(File.Exists(@"SD-MMCard\DCIM\Test333.sdf")))
            //    engine.CreateDatabase();

            //SqlCeConnection connection = new SqlCeConnection(engine.LocalConnectionString);
            //connection.Open();

            //SqlCeCommand command = connection.CreateCommand();
            //command.CommandText = "SELECT * FROM dar";
            //SqlCeDataReader result = command.ExecuteReader();
            //while (result.Read())
            //{
            //    MessageBox.Show(result[0].ToString());
            //}

            if (!IsTest)
            {
                try
                {
                    IntermecBarcodeReader              = new BarcodeReader();
                    IntermecBarcodeReader.BarcodeRead += OnBarcodeRead;
                    IntermecBarcodeReader.ThreadedRead(true);
                }
                catch (Exception exc)
                {
                    Console.Write(exc.Message);
                }
            }

            HotKeyAgent = new HotKeyProcessing(this);

            Client = new WMSClient(this);
            Client.Start();
            if (
                File.Exists(
                    Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) +
                    "\\update"))
            {
                Client.NeedToUpdate = true;
            }
        }
예제 #4
0
파일: MainForm.cs 프로젝트: AramisIT/Lamps
        public MainForm(bool test)
        {
            IsTest = test;
            InitializeComponent();
            Height = 320;
            Width = 240;

            //SqlCeEngine engine = new SqlCeEngine("Data Source='SD-MMCard\\DCIM\\Test333.sdf';");

            //if (!(File.Exists(@"SD-MMCard\DCIM\Test333.sdf")))
            //    engine.CreateDatabase();

            //SqlCeConnection connection = new SqlCeConnection(engine.LocalConnectionString);
            //connection.Open();

            //SqlCeCommand command = connection.CreateCommand();
            //command.CommandText = "SELECT * FROM dar";
            //SqlCeDataReader result = command.ExecuteReader();
            //while (result.Read())
            //{
            //    MessageBox.Show(result[0].ToString());
            //}

            if (!IsTest)
            {
                try
                {
                    IntermecBarcodeReader = new BarcodeReader();
                    IntermecBarcodeReader.BarcodeRead += OnBarcodeRead;
                    IntermecBarcodeReader.ThreadedRead(true);
                }
                catch (Exception exc)
                {
                    Console.Write(exc.Message);
                }
            }

            HotKeyAgent = new HotKeyProcessing(this);

            Client = new WMSClient(this);
            Client.Start();
            if (
                File.Exists(
                    Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase) +
                    "\\update"))
            {
                Client.NeedToUpdate = true;
            }
        }