public void ClearEffectMembers(MConstant.Effect effect) { switch (effect) { case MConstant.Effect.MouseEnter: foreach (var touchMember in TouchMembers) { touchMember.MouseRelease(); } TouchMembers.Clear(); break; case MConstant.Effect.MouseClick: foreach (var clickMember in ClickMembers) { clickMember.MouseUnClick(); } ClickMembers.Clear(); break; case MConstant.Effect.MouseDoubleClick: foreach (var doubleClickMember in DoubleClickMembers) { doubleClickMember.MouseUnDbClick(); } DoubleClickMembers.Clear(); break; case MConstant.Effect.MouseDrag: foreach (var dragRow in DragRows) { dragRow.DragEnd(); } foreach (var dragMember in DragMembers) { dragMember.MouseDragEnd(); } DragMembers.Clear(); break; } }
public override void UpdateStatus(MConstant.EventType eventType) { }
public override void UpdateDocument(MConstant.EventType eventType) { switch (eventType) { case MConstant.EventType.Write: Write(); break; case MConstant.EventType.Enter: WordWrap(); break; case MConstant.EventType.Delete: Delete(); break; case MConstant.EventType.DelSelect: //SelectedDelete(); break; case MConstant.EventType.DoubleClick: //DoubleClick(); break; case MConstant.EventType.Copy: //Copy(); break; case MConstant.EventType.Paste: //Paste(); break; } SynchronizeData(); }
public override void UpdateStatus(MConstant.EventType eventType) { switch (eventType) { case MConstant.EventType.Left: if (CurrentRow.CurrentMember == null) { if (CurrentRow.PreDocRow == null) return; CurrentRow = CurrentRow.PreDocRow; CurrentRow.CurrentMember = CurrentRow.LastMember; return; } CurrentRow.CurrentMember = CurrentRow.CurrentMember.PreMember; break; case MConstant.EventType.Right: if (CurrentRow.CurrentMember == null) { if (CurrentRow.FirstMember == null) { if (CurrentRow.NextDocRow == null) { return; } CurrentRow = CurrentRow.NextDocRow; } else { CurrentRow.CurrentMember = CurrentRow.FirstMember; } return; } else if (CurrentRow.CurrentMember.Equals(CurrentRow.LastMember)) { if (CurrentRow.NextDocRow == null) { return; } CurrentRow = CurrentRow.NextDocRow; CurrentRow.CurrentMember = null; return; } CurrentRow.CurrentMember = CurrentRow.CurrentMember.NextMember; break; case MConstant.EventType.Up: if (CurrentRow.PreDocRow == null) return; var tempX1 = CurrentRow.CurrentMember == null ? CurrentRow.X : CurrentRow.CurrentMember.X + CurrentRow.CurrentMember.Width; if (CurrentRow.CurrentMember == null) { CurrentRow = CurrentRow.PreDocRow; CurrentRow.CurrentMember = null; } else { CurrentRow = CurrentRow.PreDocRow; CurrentRow.Locate(tempX1); } break; case MConstant.EventType.Down: if (CurrentRow.NextDocRow == null) return; var tempX2 = CurrentRow.CurrentMember == null ? CurrentRow.X : CurrentRow.CurrentMember.X + CurrentRow.CurrentMember.Width; if (CurrentRow.CurrentMember == null) { CurrentRow = CurrentRow.NextDocRow; CurrentRow.CurrentMember = null; } else { CurrentRow = CurrentRow.NextDocRow; CurrentRow.Locate(tempX2); } break; case MConstant.EventType.Select: Select(); break; case MConstant.EventType.ClearSelect: ClearSelect(); break; case MConstant.EventType.SelectAll: SelectAll(); break; } }
public override void UpdateDocument(MConstant.EventType eventType) { switch (eventType) { case MConstant.EventType.Write: Write(); break; case MConstant.EventType.Enter: WordWrap(); break; case MConstant.EventType.Delete: Delete(); break; case MConstant.EventType.DelSelect: SelectedDelete(); break; case MConstant.EventType.DoubleClick: DoubleClick(); break; case MConstant.EventType.Copy: Copy(); break; case MConstant.EventType.Paste: Paste(); break; } }
/// <summary> /// 更新文档状态 /// </summary> /// <param name="eventType">事件类型</param> public virtual void UpdateStatus(MConstant.EventType eventType) { }
/// <summary> /// 更新文档内容 /// </summary> /// <param name="eventType">事件类型</param> public virtual void UpdateDocument(MConstant.EventType eventType) { }