コード例 #1
0
        private void grdCommands_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                var row = grdCommands.Rows[e.RowIndex];
                row.Selected = true;

                ClearCommandUI();

                var cmdCtrl = new CustomCommandPropertyCtrl();
                cmdCtrl.Dock = DockStyle.Fill;

                //HACK: Mono workaround. It has problems with DataBoundItem
                var dec = row.DataBoundItem as CommandDecorator;
                if (dec != null)
                {
                    ICommand cmd = dec.DecoratedInstance;
                    cmdCtrl.Bind(cmd, _edsvc);
                    grpCommand.Controls.Add(cmdCtrl);
                    EvaluateCommands();
                }
            }
        }
コード例 #2
0
ファイル: WebLayoutCommandsCtrl.cs プロジェクト: kanbang/Colt
        private void grdCommands_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                var row = grdCommands.Rows[e.RowIndex];
                row.Selected = true;

                ClearCommandUI();

                var cmdCtrl = new CustomCommandPropertyCtrl();
                cmdCtrl.Dock = DockStyle.Fill;

                //HACK: Mono workaround. It has problems with DataBoundItem
                var dec = row.DataBoundItem as CommandDecorator;
                if (dec != null)
                {
                    ICommand cmd = dec.DecoratedInstance;
                    cmdCtrl.Bind(cmd, _edsvc);
                    grpCommand.Controls.Add(cmdCtrl);
                    EvaluateCommands();
                }
            }
        }