本文整理汇总了C#中CardDesign.Gesture_Event_Args类的典型用法代码示例。如果您正苦于以下问题:C# Gesture_Event_Args类的具体用法?C# Gesture_Event_Args怎么用?C# Gesture_Event_Args使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Gesture_Event_Args类属于CardDesign命名空间,在下文中一共展示了Gesture_Event_Args类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Continue
public override void Continue(object[] senders, My_Point[] myPoints)
{
if (myPoints != null && senders != null && checkValid(null, null))
{
Gesture_Event_Args gestureEventArgs = new Gesture_Event_Args();
gestureEventArgs.GesturePoints = myPoints;
gestureEventArgs.Senders = senders;
this.Status = GESTURESTATUS.CONTINUE;
double xAvg = 0;
double yAvg = 0;
for (int i = 0; i < 4; i++) {
xAvg += myPoints[i].CurrentPoint.Position.X - previousPoint[i].X;
yAvg += myPoints[i].CurrentPoint.Position.Y - previousPoint[i].Y;
previousPoint[i] = new Point(myPoints[i].CurrentPoint.Position.X, myPoints[i].CurrentPoint.Position.Y);
}
xAvg = xAvg / 4;
yAvg = yAvg / 4;
vector = new Vector(xAvg, yAvg);
vectorDistance.X += xAvg;
vectorDistance.Y += yAvg;
OnContinued(this, gestureEventArgs);
}
if (!checkValid(null,null))
{
Fail();
return;
}
if (checkTerminate(null, null))
{
Terminate(senders, myPoints);
}
}
示例2: TerminateGesture
public override void TerminateGesture(object sender, Gesture_Event_Args gEventArgs)
{
News_Card card = gEventArgs.GestureObjects[0] as News_Card;
Shared_Card_List.UpdateSharedCards();
gestureControler.Control.CloudControler.UpdateMatrix();
base.TerminateGesture(sender, gEventArgs);
}
示例3: FailGesture
public override void FailGesture(object sender, Gesture_Event_Args gEventArgs)
{
News_Card card = sender as News_Card;
Shared_Card_List.UpdateSharedCards();
gestureControler.Control.CloudControler.UpdateMatrix();
base.FailGesture(sender, gEventArgs);
}
示例4: TerminateGesture
public override void TerminateGesture(object sender, Gesture_Event_Args gEventArgs)
{
Gesture_Event_Linking link = gEventArgs.Senders[0] as Gesture_Event_Linking;
Link_List.RemoveLink(link);
gestureControler.MainWindow.LinkingGestureLayer.Remove(link);
base.TerminateGesture(sender, gEventArgs);
}
示例5: FailGesture
public virtual void FailGesture(object sender, Gesture_Event_Args gEventArgs)
{
gestureEvent.Registered -= registerHandler;
gestureEvent.Continued -= continueHandler;
gestureEvent.Terminated -= terminateHandler;
gestureEvent.Failed -= failHandler;
Record_Helper.PrintRecord(gestureControler.MainWindow, gestureEvent, gEventArgs, GESTURESTATUS.FAIL);
}
示例6: TerminateGesture
public override void TerminateGesture(object sender, Gesture_Event_Args gEventArgs)
{
Card c = gEventArgs.GestureObjects[1] as Card;
Menu_Sort_Box b = gEventArgs.GestureObjects[0] as Menu_Sort_Box;
Group_List.RemoveCard(b, c);
gestureControler.Control.MainWindow.SortingGestureLayer.Repaint();
base.TerminateGesture(sender, gEventArgs);
}
示例7: Fail
public override void Fail()
{
Gesture_Event_Args gestureEventArgs = new Gesture_Event_Args();
gestureEventArgs.GesturePoints = Points;
gestureEventArgs.GestureObjects = Senders;
this.Status = GESTURESTATUS.FAIL;
OnFailed(this, gestureEventArgs);
}
示例8: RegisterGesture
public override void RegisterGesture(object sender, Gesture_Event_Args gEventArgs)
{
foreach (Card c in gEventArgs.GestureObjects)
{
c.Hightlight();
}
gestureControler.Control.MainWindow.GroupingGestureLayer.Add(sender as Gesture_Event_Grouping);
base.RegisterGesture(sender, gEventArgs);
}
示例9: FailGesture
public override void FailGesture(object sender, Gesture_Event_Args gEventArgs)
{
foreach (Card c in gEventArgs.Senders)
{
c.Dehightlight();
}
gestureControler.MainWindow.GroupingGestureLayer.Remove(sender as Gesture_Event_Grouping);
base.FailGesture(sender, gEventArgs);
}
示例10: TerminateGesture
public override void TerminateGesture(object sender, Gesture_Event_Args gEventArgs)
{
Card c = gEventArgs.GestureObjects[0] as Card;
double newsize = (sender as Gesture_Event_Emphasizing).GetSize();
double oldsize = (sender as Gesture_Event_Emphasizing).StartSize;
if (newsize < oldsize) {
c.ResetBrightness();
}
base.TerminateGesture(sender,gEventArgs);
}
示例11: RegisterGesture
public override void RegisterGesture(object sender, Gesture_Event_Args gEventArgs)
{
Card card=gEventArgs.GestureObjects[0] as Card;
Card card2 = gestureControler.Control.MainWindow.Controlers.CardControler.CopyCard(card);
if (card2 != null) {
gEventArgs.GestureObjects[1] = card2;
}
lastPosi = gEventArgs.GesturePoints[0].CurrentPoint.Position;
base.RegisterGesture(sender, gEventArgs);
}
示例12: TerminateGesture
public override void TerminateGesture(object sender, Gesture_Event_Args gEventArgs)
{
foreach (Card c in gEventArgs.GestureObjects)
{
gestureControler.Control.MainWindow.LinkingGestureLayer.Move(c);
c.Dehightlight();
}
gestureControler.Control.MainWindow.GroupingGestureLayer.Remove(sender as Gesture_Event_Grouping);
base.TerminateGesture(sender, gEventArgs);
}
示例13: RegisterGesture
public override void RegisterGesture(object sender, Gesture_Event_Args gEventArgs)
{
Menu_Sort_Box b = gEventArgs.GestureObjects[1] as Menu_Sort_Box;
if (Group_List.CardGroups.ContainsKey(b) && !gestureControler.Control.MainWindow.MenuLayer.IsButtonInOriginPos(b))
{
Card[] cards = Group_List.CardGroups[b].ToArray();
foreach (Card c in cards) { c.Hightlight(Colors.Gold); }
}
base.RegisterGesture(sender, gEventArgs);
}
示例14: Terminate
public override void Terminate(object[] senders, My_Point[] myPoints)
{
if (myPoints != null && senders != null)
{
Gesture_Event_Args gestureEventArgs = new Gesture_Event_Args();
gestureEventArgs.GesturePoints = myPoints;
gestureEventArgs.Senders = senders;
this.Status = GESTURESTATUS.TERMINATE;
OnTerminated(this, gestureEventArgs);
}
}
示例15: FailGesture
public override void FailGesture(object sender, Gesture_Event_Args gEventArgs)
{
Menu_Sort_Box b = gEventArgs.GestureObjects[1] as Menu_Sort_Box;
if (Group_List.CardGroups.ContainsKey(b))
{
Card[] cards = Group_List.CardGroups[b].ToArray();
foreach (Card c in cards) { c.Dehightlight(); }
}
base.FailGesture(sender, gEventArgs);
}