示例#1
0
        private void ToolStripButtonStartClick(object sender, EventArgs e)
        {
            toolStripButtonStop.Enabled = true;
            toolStripButtonStart.Enabled = false;
            toolStripTextBoxBarcode.Enabled = true;
            toolStripTextBoxBarcode.Focus();

            _backgroundWcf = new BackgroundClientWithWcf
                                 {
                                    DataGridViewBarcode = dataGridView,
                                    ToolStripTextBoxLastBarcode = toolStripLabelLastReadedCode,
                                    ToolStripStartButton = toolStripButtonStart,
                                    ToolStripStopButton = toolStripButtonStop,
                                    ToolStripTextBoxBarcode = toolStripTextBoxBarcode
                                 };
            _backgroundWcf.RunWorkerAsync();
        }
示例#2
0
        private void SetBackgroundCommand(BackgroundClientWithWcf.FormEventCommands command)
        {
            var dirtyBarcode = (string)dataGridView.SelectedRows[0].Cells[DirtyBarcodeRow].Value;

            _backgroundWcf.FormMessageStacks.Enqueue(new BackgroundClientWithWcf.FormEventStack
            {
                Data = dirtyBarcode,
                EventCommand = command
            });
        }