public override void Drag(float x, float y) { //Console.WriteLine("Drag"); FileBox3 s = Source as FileBox3; if (s == null) { return; } int state = 0; PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; if (ptIn.setPtinRect(s.window, s.bt_trans, pt, ang)) { state = 1; } else if (ptIn.setPtinRect(s.window, s.bt_main, pt, ang)) { state = 2; } else { state = 0; } s.Item_TouchMove(pt, state); base.Drag(x, y); }
public override void Tap(PointF p) { //Console.WriteLine("Tab"); PptViewer s = Source as PptViewer; if (s == null) return; PointIn ptIn = new PointIn(); if (ptIn.setPtinRect(s, s.bt1, p, s.thisAngle)) { s.bt1_Click(p); } else if (ptIn.setPtinRect(s, s.bt2, p, s.thisAngle)) { s.bt2_Click(p); } else if (ptIn.setPtinRect(s, s.bt3, p, s.thisAngle)) { s.bt3_Click(p); } else if (ptIn.setPtinRect(s, s.bt4, p, s.thisAngle)) { s.bt4_Click(p); } else if (ptIn.setPtinRect(s, s.bt5, p, s.thisAngle)) { s.bt5_Click(p); } else { //s.pptViewerCon_Tap(p); } base.Tap(p); }
public override void Tap(PointF p) { //Console.WriteLine("Tab"); FileBox3 s = Source as FileBox3; if (s == null) { return; } RoutedEventArgs e = new RoutedEventArgs(); e.RoutedEvent = Button.ClickEvent; PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; if (ptIn.setPtinRect(s.window, s.mode_bt_center, pt, ang)) { s.mode_bt_center.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.mode_bt_up, pt, ang)) { s.mode_bt_up.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.mode_bt_left, pt, ang)) { s.mode_bt_left.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.mode_bt_right, pt, ang)) { s.mode_bt_right.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.mode_bt1_img, pt, ang)) { s.mode_bt1_img.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.mode_bt2_video, pt, ang)) { s.mode_bt2_video.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.mode_bt3_ppt, pt, ang)) { s.mode_bt3_ppt.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.mode_bt4_doc, pt, ang)) { s.mode_bt4_doc.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.mode_bt_close, pt, ang)) { s.mode_bt_close.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.bt_trans, pt, ang)) { s.bt_trans.RaiseEvent(e); } base.Tap(p); }
public override void TouchDown(PointF p) { //Console.WriteLine("touchDown"); FileBox3 s = Source as FileBox3; if (s == null) { return; } PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; if (ptIn.setPtinRect(s.window, s.bt_listBox, pt, ang)) { isListBox = true; index = findSelectedItem(s, new PointF(p.X, p.Y)); if (index != -1) { if (ptIn.setPtinRect(s.window, s.itemList.ElementAt(index).img_pic, pt, ang)) { IsSelecting = true; s.Item_TouchDown(p, s.itemList.ElementAt(index).objectInfo); } else { IsSelecting = false; } } } else if (ptIn.setPtinRect(s.window, s.bt_rotate, pt, ang)) { isListBox = false; IsSelecting = false; if (ptIn.setPtinRect(s.window, s.bt_inMain, pt, ang)) { } else { if (ptIn.setPtinRect(s.window, s.bt_move, pt, ang)) { s.Move_TouchDown(p); } else { s.Rotate_TouchDown(p); } } } else { isListBox = false; IsSelecting = false; } base.TouchDown(p); }
public override void Tap(PointF p) { //Console.WriteLine("Tab"); ImageView s = Source as ImageView; if (s == null) { return; } PointIn ptIn = new PointIn(); if (ptIn.setPtinRect(s, s.img_bt1, p, s.thisAngle)) { s.img_bt1_Click(p); } else if (ptIn.setPtinRect(s, s.img_bt2, p, s.thisAngle)) { s.img_bt2_Click(p); } else { s.imageViewCon_Tap(p); } base.Tap(p); }
public override void TouchUp(PointF p) { //Console.WriteLine("touchUp"); FileBox3 s = Source as FileBox3; if (s == null) { return; } PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; if (ptIn.setPtinRect(s.window, s.bt_trans, pt, ang)) { s.trans_TouchUp(p); } else if (ptIn.setPtinRect(s.window, s.bt_main, pt, ang)) { s.main_TouchUp(p); } else { s.Item_TouchUp(p); } base.TouchUp(p); }
public override void TouchDown(PointF p) { //Console.WriteLine("touchDown"); FileBox3 s = Source as FileBox3; if (s == null) return; PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; if (ptIn.setPtinRect(s.window, s.bt_listBox, pt, ang)) { isListBox = true; index = findSelectedItem(s, new PointF(p.X, p.Y)); if (index != -1) { if (ptIn.setPtinRect(s.window, s.itemList.ElementAt(index).img_pic, pt, ang)) { IsSelecting = true; s.Item_TouchDown(p, s.itemList.ElementAt(index).objectInfo); } else { IsSelecting = false; } } } else if (ptIn.setPtinRect(s.window, s.bt_rotate, pt, ang)) { isListBox = false; IsSelecting = false; if (ptIn.setPtinRect(s.window, s.bt_inMain, pt, ang)) { } else { if (ptIn.setPtinRect(s.window, s.bt_move, pt, ang)) { s.Move_TouchDown(p); } else { s.Rotate_TouchDown(p); } } } else { isListBox = false; IsSelecting = false; } base.TouchDown(p); }
public override void Tap(PointF p) { //Console.WriteLine("Tab"); phoneMenu s = Source as phoneMenu; if (s == null) { return; } RoutedEventArgs e = new RoutedEventArgs(); e.RoutedEvent = Button.ClickEvent; System.Windows.Point coordinates1 = s.bt1.TransformToAncestor(s).Transform(new System.Windows.Point(0, 0)); System.Windows.Point coordinates2 = s.bt2.TransformToAncestor(s).Transform(new System.Windows.Point(0, 0)); System.Windows.Point coordinates3 = s.bt3.TransformToAncestor(s).Transform(new System.Windows.Point(0, 0)); Rectangle r1 = new Rectangle((int)coordinates1.X, (int)coordinates1.Y, (int)s.bt1.Width, (int)s.bt1.Height); Rectangle r2 = new Rectangle((int)coordinates2.X, (int)coordinates2.Y, (int)s.bt2.Width, (int)s.bt2.Height); Rectangle r3 = new Rectangle((int)coordinates3.X, (int)coordinates3.Y, (int)s.bt3.Width, (int)s.bt3.Height); PointIn ptIn = new PointIn(); // if (ptIn.pointInRect(r1, p, s.thisAngle + s.thisCont.RotateFilter.Target)) // { // s.bt1.RaiseEvent(e); // } // else if (ptIn.pointInRect(r2, p, s.thisAngle + s.thisCont.RotateFilter.Target)) // { // s.bt2.RaiseEvent(e); // } // else if (ptIn.pointInRect(r3, p, s.thisAngle + s.thisCont.RotateFilter.Target)) // { // s.bt3.RaiseEvent(e); // } if (ptIn.setPtinRect(s.window, s.bt1, s.thisCont.ObjectTouches.MoveCenter, s.thisAngle + s.thisCont.RotateFilter.Target)) { Console.WriteLine("bt1:"); s.bt1.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.bt2, s.thisCont.ObjectTouches.MoveCenter, s.thisAngle + s.thisCont.RotateFilter.Target)) { Console.WriteLine("bt2:"); s.bt2.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.bt3, s.thisCont.ObjectTouches.MoveCenter, s.thisAngle + s.thisCont.RotateFilter.Target)) { Console.WriteLine("bt3:"); s.bt3.RaiseEvent(e); } base.Tap(p); }
public override void Drag(float x, float y) { //Console.WriteLine("Drag"); ImageView s = Source as ImageView; if (s == null) { return; } PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; //FileBox 영역 탐색 foreach (var f in SingleToneTrans.getInstance().fileBoxList) { if (ptIn.setPtinRect(s.window, f, pt, ang)) { fe = f; posState = 1; s.img_cloud.Visibility = Visibility.Visible; break; } else { s.img_cloud.Visibility = Visibility.Hidden; posState = 0; } } //SmartArea 영역 탐색 foreach (var f in SingleToneTrans.getInstance().smartAreaList) { if (ptIn.setPtinRect(s.window, f, pt, ang)) { fe = f; posState = 2; s.img_cloud.Visibility = Visibility.Visible; break; } else if (posState != 1) { s.img_cloud.Visibility = Visibility.Hidden; posState = 0; } } base.Drag(x, y); }
public override void Drag(float x, float y) { //Console.WriteLine("Drag"); ContactsObject s = Source as ContactsObject; if (s == null) { return; } PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; ipAddress = ""; posState = 0; //SmartArea 영역 탐색 foreach (SmartArea f in SingleToneTrans.getInstance().smartAreaList) { if (ptIn.setPtinRect(s.window, f, pt, f.objRotateTrans.Angle)) { ipAddress = f.userIP; posState = 1; s.img_send.Visibility = Visibility.Visible; break; } else if (posState != 1) { s.img_send.Visibility = Visibility.Hidden; posState = 0; } } base.Drag(x, y); }
public override void Drag(float x, float y) { //Console.WriteLine("Drag"); ContactsObject s = Source as ContactsObject; if (s == null) return; PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; ipAddress = ""; posState = 0; //SmartArea 영역 탐색 foreach (SmartArea f in SingleToneTrans.getInstance().smartAreaList) { if (ptIn.setPtinRect(s.window, f, pt, f.objRotateTrans.Angle)) { ipAddress = f.userIP; posState = 1; s.img_send.Visibility = Visibility.Visible; break; } else if (posState != 1) { s.img_send.Visibility = Visibility.Hidden; posState = 0; } } base.Drag(x, y); }
public override void Drag(float x, float y) { //Console.WriteLine("Drag"); ContactsBox s = Source as ContactsBox; if (s == null) { return; } state = 0; sendIP = ""; PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; foreach (SmartArea a in SingleToneTrans.getInstance().smartAreaList) { if (ptIn.setPtinRect(s.window, a, pt, ang)) { state = 1; sendIP = a.userIP; break; } else { sendIP = ""; state = 0; } } s.Item_TouchMove(pt, state); base.Drag(x, y); }
public override void Drag(float x, float y) { //Console.WriteLine("Drag"); ImageView s = Source as ImageView; if (s == null) return; PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; //FileBox 영역 탐색 foreach (var f in SingleToneTrans.getInstance().fileBoxList) { if (ptIn.setPtinRect(s.window, f, pt, ang)) { fe = f; posState = 1; s.img_cloud.Visibility = Visibility.Visible; break; } else { s.img_cloud.Visibility = Visibility.Hidden; posState = 0; } } //SmartArea 영역 탐색 foreach (var f in SingleToneTrans.getInstance().smartAreaList) { if (ptIn.setPtinRect(s.window, f, pt, ang)) { fe = f; posState = 2; s.img_cloud.Visibility = Visibility.Visible; break; } else if (posState != 1) { s.img_cloud.Visibility = Visibility.Hidden; posState = 0; } } base.Drag(x, y); }
public override void TouchDown(PointF p) { //Console.WriteLine("touchDown"); ContactsBox s = Source as ContactsBox; if (s == null) { return; } PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; if (ptIn.setPtinRect(s.window, s.ContactslistBox, pt, ang)) { isListBox = true; s.thisCont.IsScrollView = true; index = findSelectedItem(s, new PointF(p.X, p.Y)); if (index != -1) { if (ptIn.setPtinRect(s.window, s.contactsObjList.ElementAt(index).bt_img, pt, ang)) { IsSelecting = true; s.Item_TouchDown(p, s.contactsObjList.ElementAt(index)); } else { IsSelecting = false; } } } else { s.thisCont.IsScrollView = false; isListBox = false; IsSelecting = false; } base.TouchDown(p); }
public override void Tap(PointF p) { //Console.WriteLine("Tab"); PptViewer s = Source as PptViewer; if (s == null) { return; } PointIn ptIn = new PointIn(); if (ptIn.setPtinRect(s, s.bt1, p, s.thisAngle)) { s.bt1_Click(p); } else if (ptIn.setPtinRect(s, s.bt2, p, s.thisAngle)) { s.bt2_Click(p); } else if (ptIn.setPtinRect(s, s.bt3, p, s.thisAngle)) { s.bt3_Click(p); } else if (ptIn.setPtinRect(s, s.bt4, p, s.thisAngle)) { s.bt4_Click(p); } else if (ptIn.setPtinRect(s, s.bt5, p, s.thisAngle)) { s.bt5_Click(p); } else { //s.pptViewerCon_Tap(p); } base.Tap(p); }
public override void TouchDown(PointF p) { //Console.WriteLine("touchDown"); ContactsBox s = Source as ContactsBox; if (s == null) return; PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; if (ptIn.setPtinRect(s.window, s.ContactslistBox, pt, ang)) { isListBox = true; s.thisCont.IsScrollView = true; index = findSelectedItem(s, new PointF(p.X, p.Y)); if (index != -1) { if (ptIn.setPtinRect(s.window, s.contactsObjList.ElementAt(index).bt_img, pt, ang)) { IsSelecting = true; s.Item_TouchDown(p, s.contactsObjList.ElementAt(index)); } else { IsSelecting = false; } } } else { s.thisCont.IsScrollView = false; isListBox = false; IsSelecting = false; } base.TouchDown(p); }
public override void Tap(PointF p) { //Console.WriteLine("Tab"); ContactsObject s = Source as ContactsObject; if (s == null) return; PointIn ptIn = new PointIn(); if (ptIn.setPtinRect(s, s.bt_close, p, s.thisCont.RotateFilter.Target)) { s.bt_close_Click(); } base.Tap(p); }
public override void Tap(PointF p) { //Console.WriteLine("Tab"); DocViewer s = Source as DocViewer; if (s == null) { return; } PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; if (ptIn.setPtinRect(s.window, s.bt1, pt, ang)) { Console.WriteLine("bt1"); s.bt1_Click(p); } if (ptIn.setPtinRect(s.window, s.bt2, pt, ang)) { Console.WriteLine("bt2"); s.bt2_Click(p); } if (ptIn.setPtinRect(s.window, s.bt_close, pt, ang)) { Console.WriteLine("bt3"); s.bt_close_Click(p); } else { //s.pptViewerCon_Tap(p); } base.Tap(p); }
int findSelectedItem(FileBox3 s, PointF p) { PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; ScrollViewer scroll = s.itemListBox.FindChild <ScrollViewer>() as ScrollViewer; for (int i = 0; i < s.itemList.Count; i++) { if (ptIn.setPtinRect(s.window, s.itemList.ElementAt(i), pt, ang)) { return(i); } } return(-1); }
public override void Tap(PointF p) { //Console.WriteLine("Tab"); ContactsObject s = Source as ContactsObject; if (s == null) { return; } PointIn ptIn = new PointIn(); if (ptIn.setPtinRect(s, s.bt_close, p, s.thisCont.RotateFilter.Target)) { s.bt_close_Click(); } base.Tap(p); }
public override void TouchDown(PointF p) { //Console.WriteLine("touchDown"); DocViewer s = Source as DocViewer; if (s == null) return; PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; if (ptIn.setPtinRect(s.window, s.documentviewWord, pt, ang)) { isDocViewer = true; s.thisCont.IsScrollView = true; } else { s.thisCont.IsScrollView = false; } }
public override void Tap(PointF p) { //Console.WriteLine("Tab"); ContactsBox s = Source as ContactsBox; if (s == null) { return; } RoutedEventArgs e = new RoutedEventArgs(); e.RoutedEvent = Button.ClickEvent; PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; if (ptIn.setPtinRect(s.window, s.bt_close, pt, ang)) { s.bt_close_Click(); } base.Tap(p); }
public override void TouchDown(PointF p) { //Console.WriteLine("touchDown"); DocViewer s = Source as DocViewer; if (s == null) { return; } PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; if (ptIn.setPtinRect(s.window, s.documentviewWord, pt, ang)) { isDocViewer = true; s.thisCont.IsScrollView = true; } else { s.thisCont.IsScrollView = false; } }
public override void Tap(PointF p) { //Console.WriteLine("Tab"); ImageView s = Source as ImageView; if (s == null) return; PointIn ptIn = new PointIn(); if (ptIn.setPtinRect(s, s.img_bt1, p, s.thisAngle)) { s.img_bt1_Click(p); } else if (ptIn.setPtinRect(s, s.img_bt2, p, s.thisAngle)) { s.img_bt2_Click(p); } else { s.imageViewCon_Tap(p); } base.Tap(p); }
public override void Tap(PointF p) { //Console.WriteLine("Tab"); phoneMenu s = Source as phoneMenu; if (s == null) return; RoutedEventArgs e = new RoutedEventArgs(); e.RoutedEvent = Button.ClickEvent; System.Windows.Point coordinates1 = s.bt1.TransformToAncestor(s).Transform(new System.Windows.Point(0, 0)); System.Windows.Point coordinates2 = s.bt2.TransformToAncestor(s).Transform(new System.Windows.Point(0, 0)); System.Windows.Point coordinates3 = s.bt3.TransformToAncestor(s).Transform(new System.Windows.Point(0, 0)); Rectangle r1 = new Rectangle((int)coordinates1.X, (int)coordinates1.Y, (int)s.bt1.Width, (int)s.bt1.Height); Rectangle r2 = new Rectangle((int)coordinates2.X, (int)coordinates2.Y, (int)s.bt2.Width, (int)s.bt2.Height); Rectangle r3 = new Rectangle((int)coordinates3.X, (int)coordinates3.Y, (int)s.bt3.Width, (int)s.bt3.Height); PointIn ptIn = new PointIn(); // if (ptIn.pointInRect(r1, p, s.thisAngle + s.thisCont.RotateFilter.Target)) // { // s.bt1.RaiseEvent(e); // } // else if (ptIn.pointInRect(r2, p, s.thisAngle + s.thisCont.RotateFilter.Target)) // { // s.bt2.RaiseEvent(e); // } // else if (ptIn.pointInRect(r3, p, s.thisAngle + s.thisCont.RotateFilter.Target)) // { // s.bt3.RaiseEvent(e); // } if (ptIn.setPtinRect(s.window, s.bt1, s.thisCont.ObjectTouches.MoveCenter, s.thisAngle + s.thisCont.RotateFilter.Target)) { Console.WriteLine("bt1:"); s.bt1.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.bt2, s.thisCont.ObjectTouches.MoveCenter, s.thisAngle + s.thisCont.RotateFilter.Target)) { Console.WriteLine("bt2:"); s.bt2.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.bt3, s.thisCont.ObjectTouches.MoveCenter, s.thisAngle + s.thisCont.RotateFilter.Target)) { Console.WriteLine("bt3:"); s.bt3.RaiseEvent(e); } base.Tap(p); }
public override void Drag(float x, float y) { //Console.WriteLine("Drag"); ContactsBox s = Source as ContactsBox; if (s == null) return; state = 0; sendIP = ""; PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; foreach (SmartArea a in SingleToneTrans.getInstance().smartAreaList) { if (ptIn.setPtinRect(s.window, a, pt, ang)) { state = 1; sendIP = a.userIP; break; } else { sendIP = ""; state = 0; } } s.Item_TouchMove(pt, state); base.Drag(x, y); }
public override void Tap(PointF p) { //Console.WriteLine("Tab"); ContactsBox s = Source as ContactsBox; if (s == null) return; RoutedEventArgs e = new RoutedEventArgs(); e.RoutedEvent = Button.ClickEvent; PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; if (ptIn.setPtinRect(s.window, s.bt_close, pt, ang)) { s.bt_close_Click(); } base.Tap(p); }
public override void Tap(PointF p) { //Console.WriteLine("Tab"); DocViewer s = Source as DocViewer; if (s == null) return; PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; if (ptIn.setPtinRect(s.window, s.bt1, pt, ang)) { Console.WriteLine("bt1"); s.bt1_Click(p); } if (ptIn.setPtinRect(s.window, s.bt2, pt, ang)) { Console.WriteLine("bt2"); s.bt2_Click(p); } if (ptIn.setPtinRect(s.window, s.bt_close, pt, ang)) { Console.WriteLine("bt3"); s.bt_close_Click(p); } else { //s.pptViewerCon_Tap(p); } base.Tap(p); }
public override void TouchUp(PointF p) { //Console.WriteLine("touchUp"); FileBox3 s = Source as FileBox3; if (s == null) return; PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; if (ptIn.setPtinRect(s.window, s.bt_trans, pt, ang)) { s.trans_TouchUp(p); } else if (ptIn.setPtinRect(s.window, s.bt_main, pt, ang)) { s.main_TouchUp(p); } else { s.Item_TouchUp(p); } base.TouchUp(p); }
public override void Drag(float x, float y) { //Console.WriteLine("Drag"); FileBox3 s = Source as FileBox3; if (s == null) return; int state = 0; PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; if (ptIn.setPtinRect(s.window, s.bt_trans, pt, ang)) { state = 1; } else if (ptIn.setPtinRect(s.window, s.bt_main, pt, ang)) { state = 2; } else { state = 0; } s.Item_TouchMove(pt, state); base.Drag(x, y); }
public override void Tap(PointF p) { //Console.WriteLine("Tab"); FileBox3 s = Source as FileBox3; if (s == null) return; RoutedEventArgs e = new RoutedEventArgs(); e.RoutedEvent = Button.ClickEvent; PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; if (ptIn.setPtinRect(s.window, s.mode_bt_center, pt, ang)) { s.mode_bt_center.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.mode_bt_up, pt, ang)) { s.mode_bt_up.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.mode_bt_left, pt, ang)) { s.mode_bt_left.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.mode_bt_right, pt, ang)) { s.mode_bt_right.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.mode_bt1_img, pt, ang)) { s.mode_bt1_img.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.mode_bt2_video, pt, ang)) { s.mode_bt2_video.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.mode_bt3_ppt, pt, ang)) { s.mode_bt3_ppt.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.mode_bt4_doc, pt, ang)) { s.mode_bt4_doc.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.mode_bt_close, pt, ang)) { s.mode_bt_close.RaiseEvent(e); } else if (ptIn.setPtinRect(s.window, s.bt_trans, pt, ang)) { s.bt_trans.RaiseEvent(e); } base.Tap(p); }
int findSelectedItem(FileBox3 s, PointF p) { PointIn ptIn = new PointIn(); PointF pt = s.thisCont.ObjectTouches.MoveCenter; double ang = s.thisAngle + s.thisCont.RotateFilter.Target; ScrollViewer scroll = s.itemListBox.FindChild<ScrollViewer>() as ScrollViewer; for (int i = 0; i < s.itemList.Count; i++) { if (ptIn.setPtinRect(s.window, s.itemList.ElementAt(i), pt, ang)) { return i; } } return -1; }