Beispiel #1
0
        private void WriteToTable_DataItem_Editor_DropDownClosed(object sender, EventArgs e)
        {
            if (ConditionList.ActiveSheet.ActiveRow.Tag == null)
            {
                ConditionList.ActiveSheet.ActiveRow.Tag = new ExpressionInfo();
            }

            ExpressionInfo expressionInfo = ConditionList.ActiveSheet.ActiveRow.Tag as ExpressionInfo;

            expressionInfo.DataItem = WriteToTable_DataItem_Editor.SelectedItem as FieldInfo;
            ConditionList.ActiveSheet.Cells[ConditionList.ActiveSheet.ActiveRowIndex, 0].Value = WriteToTable_DataItem_Editor.SelectedItem;

            WriteToTable_DataItem_Editor.SendToBack();
        }
Beispiel #2
0
        private void ConditionList_CellClick(object sender, CellClickEventArgs e)
        {
            //点中的是一个有效的单元格
            if (e.Row > -1 && e.Column > -1)
            {
                Rectangle Rect = ConditionList.GetCellRectangle(
                    ConditionList.GetActiveRowViewportIndex(),
                    ConditionList.GetActiveColumnViewportIndex(),
                    e.Row,
                    e.Column);

                Point ScreenPoint = ConditionList.PointToScreen(Rect.Location);
                Point ClientPoint = wizardPage2.PointToClient(ScreenPoint);
                switch (e.Column)
                {
                case 0:
                    WriteToTable_DataItem_Editor.Location = ClientPoint;
                    WriteToTable_DataItem_Editor.Size     = Rect.Size;
                    WriteToTable_DataItem_Editor.BringToFront();
                    WriteToTable_DataItem_Editor.DroppedDown = true;
                    break;

                case 1:
                    WriteToTable_Condition_Editor.Location = ClientPoint;
                    WriteToTable_Condition_Editor.Size     = Rect.Size;
                    WriteToTable_Condition_Editor.BringToFront();
                    WriteToTable_Condition_Editor.DroppedDown = true;
                    break;

                case 2:
                    WriteToTable_Value_Editor.Location = ClientPoint;
                    WriteToTable_Value_Editor.Size     = Rect.Size;
                    WriteToTable_Value_Editor.BringToFront();
                    WriteToTable_Value_Editor.DroppedDown = true;
                    break;
                }

                ConditionList.ActiveSheet.SetActiveCell(e.Row, e.Column);
            }
        }