Beispiel #1
0
 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;
     }
 }
Beispiel #2
0
 public override void UpdateStatus(MConstant.EventType eventType)
 {
 }
Beispiel #3
0
 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();
 }
Beispiel #4
0
 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;
     }
 }
Beispiel #5
0
 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;
     }
 }
Beispiel #6
0
 /// <summary>
 /// 更新文档状态
 /// </summary>
 /// <param name="eventType">事件类型</param>
 public virtual void UpdateStatus(MConstant.EventType eventType)
 {
 }
Beispiel #7
0
 /// <summary>
 /// 更新文档内容
 /// </summary>
 /// <param name="eventType">事件类型</param>
 public virtual void UpdateDocument(MConstant.EventType eventType)
 {
 }