Ejemplo n.º 1
0
        public SNBindingDialog(string boardname, IBiModel model, ConfigInfo param)
        {
            InitializeComponent();
            lbBoardName.Text = boardname;
            _model           = model;
            int seatCount = _model.GetBoardSeatsCount(boardname);

            _configParam = param;
            snlist       = new string[seatCount];
            for (int i = 0; i < seatCount; i++)
            {
                snlist[i] = "";
            }
            InitTable(seatCount);
            _board       = _model.GetController(boardname);
            _MesOperator = BiModelFactory.GetMesOperator();
        }
Ejemplo n.º 2
0
        private void PasteData()
        {
            string clipboardText = Clipboard.GetText();

            if (string.IsNullOrEmpty(clipboardText))
            {
                return;
            }
            int seatCount = _model.GetBoardSeatsCount(lbBoardName.Text);

            string[] snArray = clipboardText.Split(new string[] { "\r\n" }, StringSplitOptions.None);
            int      count   = snArray.Length > seatCount ? seatCount : snArray.Length;

            for (int i = 0; i < count; i++)
            {
                table.Rows[i]["SN"] = snArray[i];
            }
        }