// Updates the time type and reloads dynamic sections. void OnSegmentedControlDidChange(object sender, EventArgs e) { var segmentedControl = (UISegmentedControl)sender; timeType = (TimeConditionType)(int)segmentedControl.SelectedSegment; ReloadDynamicSections(); }
/// <summary> /// 报单参数构造函数 /// </summary> public OrderParameter() { TimeCondition = TimeConditionType.GFD; VolumeCondition = VolumeConditionType.AV; ContingentCondition = ContingentConditionType.Immediately; ForceCloseReason = ForceCloseReasonType.NotForceClose; }
public override void RowSelected(UITableView tableView, NSIndexPath indexPath) { base.RowSelected(tableView, indexPath); var cell = tableView.CellAt(indexPath); if (cell.SelectionStyle == UITableViewCellSelectionStyle.None) { return; } tableView.DeselectRow(indexPath, true); switch ((TimeConditionTableViewSection)indexPath.Section) { case TimeConditionTableViewSection.TimeOrSun: timeType = (TimeConditionType)indexPath.Row; ReloadDynamicSections(); return; case TimeConditionTableViewSection.BeforeOrAfter: order = (TimeConditionOrder)indexPath.Row; tableView.ReloadSections(NSIndexSet.FromIndex(indexPath.Section), UITableViewRowAnimation.Automatic); break; case TimeConditionTableViewSection.Value: if (timeType == TimeConditionType.Sun) { sunState = (TimeConditionSunState)indexPath.Row; } tableView.ReloadSections(NSIndexSet.FromIndex(indexPath.Section), UITableViewRowAnimation.Automatic); break; default: throw new InvalidOperationException("Unexpected `TimeConditionTableViewSection` value."); } }
// Updates the time type and reloads dynamic sections. void OnSegmentedControlDidChange (object sender, EventArgs e) { var segmentedControl = (UISegmentedControl)sender; timeType = (TimeConditionType)(int)segmentedControl.SelectedSegment; ReloadDynamicSections (); }
public override void RowSelected (UITableView tableView, NSIndexPath indexPath) { base.RowSelected (tableView, indexPath); var cell = tableView.CellAt (indexPath); if (cell.SelectionStyle == UITableViewCellSelectionStyle.None) return; tableView.DeselectRow (indexPath, true); switch ((TimeConditionTableViewSection)indexPath.Section) { case TimeConditionTableViewSection.TimeOrSun: timeType = (TimeConditionType)indexPath.Row; ReloadDynamicSections (); return; case TimeConditionTableViewSection.BeforeOrAfter: order = (TimeConditionOrder)indexPath.Row; tableView.ReloadSections (NSIndexSet.FromIndex (indexPath.Section), UITableViewRowAnimation.Automatic); break; case TimeConditionTableViewSection.Value: if (timeType == TimeConditionType.Sun) sunState = (TimeConditionSunState)indexPath.Row; tableView.ReloadSections (NSIndexSet.FromIndex (indexPath.Section), UITableViewRowAnimation.Automatic); break; default: throw new InvalidOperationException ("Unexpected `TimeConditionTableViewSection` value."); } }