Beispiel #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            LedModel _ledModel = new LedModel();

            _ledModel.ComPort         = 3;
            _ledModel.BlockWidth      = 40;
            _ledModel.TrayAreaCount_X = 8080 / 1000;
            if (_ledModel.SetParameter("測試") == true)
            {
                _ledModel.Connect();
                string _trayArea = AreaName.Text;
                string Goods_Id  = GoodsId.Text;
                _ledModel.Active(_trayArea, "|" + Goods_Id + "|");
                _ledModel.Disconnect();
            }
        }
Beispiel #2
0
        private bool _write()
        {
            LedModel _ledModel = new LedModel();

            _ledModel.ComPort         = 3;
            _ledModel.BlockWidth      = 40;
            _ledModel.TrayAreaCount_X = 8080 / 1000;
            if (_ledModel.SetParameter("測試") == true)
            {
                _ledModel.Connect();
                string _trayArea = AreaName.Text;
                string Goods_Id  = GoodsId.Text;
                _ledModel.Active(_trayArea, "|" + Goods_Id + "|");
                _ledModel.Disconnect();
                return(true);
            }
            else
            {
                return(false);
            }
        }