Example #1
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;
                }
        }
Example #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;
            }
        }
Example #3
0
        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;
            }
        }
Example #4
0
        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;
            }
        }