private void WriteToTable_Value_Editor_FinishEditing(object sender, AT.STO.UI.Win.DropDownValueChangedEventArgs e) { if (ConditionList.ActiveSheet.ActiveRow.Tag == null) { ConditionList.ActiveSheet.ActiveRow.Tag = new ExpressionInfo(); } ExpressionInfo expressionInfo = ConditionList.ActiveSheet.ActiveRow.Tag as ExpressionInfo; DropDownNode dropDownNode = e.Value as DropDownNode; if (dropDownNode.Tag is FieldInfo && dropDownNode.Parent != null) { ReadFromTableName = dropDownNode.Parent.Name; } expressionInfo.DataValue = dropDownNode.Tag as FieldInfo; ConditionList.ActiveSheet.Cells[ConditionList.ActiveSheet.ActiveRowIndex, 2].Value = dropDownNode.Tag as FieldInfo; WriteToTable_Value_Editor.SendToBack(); }
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); } }
private void WriteToTable_Value_Editor_DropDownClosed(object sender, System.EventArgs e) { WriteToTable_Value_Editor.SendToBack(); }