public static void DisAppearControl(StackPanel c) { if (c.Visibility == System.Windows.Visibility.Hidden) return; var eog = new EaseObjectGroup(); //eog.Complete += g => Debug.WriteLine("COMPLETE"); var eo = ArtefactAnimator.AddEase(c, new[] { AnimationTypes.Alpha }, new object[] { 0 }, 1.5, AnimationTransitions.CubicEaseOut, 0); eog.AddEaseObject(eo); eog.Complete += delegate(EaseObjectGroup easeObjectGroup) { c.Visibility = System.Windows.Visibility.Hidden; }; }
public static void AppearGrid(Grid c) { if (c.Visibility == System.Windows.Visibility.Visible) return; c.Opacity = 0; c.Visibility = System.Windows.Visibility.Visible; var eog = new EaseObjectGroup(); //eog.Complete += g => Debug.WriteLine("COMPLETE"); var eo = ArtefactAnimator.AddEase(c, new[] { AnimationTypes.Alpha }, new object[] { 1 }, 1.5, AnimationTransitions.CubicEaseOut, 0); eog.AddEaseObject(eo); }
private void buttonLogin_Click(object sender, RoutedEventArgs e) { if (LoginControler.Login(textBoxLogin.Text, passwordBox1.Password)) { SurfaceWindow1.StaticHideLoginPage(); textBlockErrorLogin.Visibility = System.Windows.Visibility.Hidden; globalDatasingleton.getInstance().SetLogged(); if (LoginControler.wantToAccessToSelection == true) { SurfaceWindow1.StaticGotoSelection(); } } else { textBlockErrorLogin.Visibility= System.Windows.Visibility.Visible; textBlockErrorLogin.Opacity = 0; var eog = new EaseObjectGroup(); //eog.Complete += g => Debug.WriteLine("COMPLETE"); var eo = ArtefactAnimator.AddEase(textBlockErrorLogin, new[] { AnimationTypes.Alpha}, new object[] { 1}, 1.5, AnimationTransitions.CubicEaseOut, 0); eog.AddEaseObject(eo); } }
private void UnGrowBorderText() { var eog = new EaseObjectGroup(); var eo = ArtefactAnimator.AddEase(rectangle1, new[] { AnimationTypes.Alpha }, new object[] { 0 }, 0.5, AnimationTransitions.CubicEaseOut, 0); eog.AddEaseObject(eo); }
private void BtnClick(object sender, RoutedEventArgs e) { var eog = new EaseObjectGroup(); eog.Complete += g => Debug.WriteLine("COMPLETE"); for (var i = 0; i < 4; i++) { var width = .3 + (_rnd.NextDouble() * 2.7); var eo = ArtefactAnimator.AddEase(col, new[] { AnimationTypes.ColumWidthStar }, new object[] { width }, 1, AnimationTransitions.ElasticEaseOut, i * .5); eog.AddEaseObject(eo); } }
private void GotoMenu() { _backStack.Clear(); SurfaceWindow1.HideLoginButton(); // TransformationUtil.HideDialog(gridCreationLogin); var eog = new EaseObjectGroup(); var eo = ArtefactAnimator.AddEase(grid1, new[] { AnimationTypes.MarginLeft, AnimationTypes.MarginTop }, new object[] { this.Width, this.Height }, 1.5, AnimationTransitions.CubicEaseOut, 0); eog.AddEaseObject(eo); IsphotoSelection = false; IsphotoMenu = false; conteneur.Children.Clear(); ShowButton(); }
// // C'est l'action du bouton retour. // private void button1_Click(object sender, RoutedEventArgs e) { buttonDisconnect.Content = LocalizationManager.ResourceManager.GetString("Disconnect"); if (IsCategoryInfoPageShow()) { SurfaceWindow1.HideLoginButton(); setMessagePage(""); // TransformationUtil.HideDialog(gridCreationLogin); var eog = new EaseObjectGroup(); var eo = ArtefactAnimator.AddEase(grid1, new[] { AnimationTypes.MarginLeft, AnimationTypes.MarginTop }, new object[] { this.Width, this.Height }, 1.5, AnimationTransitions.CubicEaseOut, 0); eog.AddEaseObject(eo); IsphotoMenu = false; IsphotoSelection = false; SurfaceWindow1._instance.ShowButton(); conteneur.Children.Remove(conteneur.Children[0]); return; } if (IsCategoryPageShow()) { ListCategoryPhotoPage catPage = (ListCategoryPhotoPage)getPageCategory(); if (catPage.GoBackInParentCategory() ==false) { if (LoginControler.IsLogged()) { catPage.ShowQuestionLogOut(); return; } SurfaceWindow1.HideLoginButton(); // TransformationUtil.HideDialog(gridCreationLogin); var eog = new EaseObjectGroup(); var eo = ArtefactAnimator.AddEase(grid1, new[] { AnimationTypes.MarginLeft, AnimationTypes.MarginTop }, new object[] { this.Width, this.Height }, 1.5, AnimationTransitions.CubicEaseOut, 0); eog.AddEaseObject(eo); IsphotoSelection = false; IsphotoMenu = false; conteneur.Children.Remove(conteneur.Children[0]); } } else { if (conteneur.Children.Count == 0) { if (GlobalConfig.debug) MessageBox.Show("Error can't go back"); return; } UIElement last = conteneur.Children[conteneur.Children.Count - 1]; conteneur.Children.RemoveAt(conteneur.Children.Count - 1); last = null; if (_backStack.Count > 0) { conteneur.Children.Add(_backStack.Pop()); if (IsCategoryPageShow()) { ListCategoryPhotoPage catPage = (ListCategoryPhotoPage)getPageCategory(); setMessagePage( LocalizationManager.ResourceManager.GetString("ChoiceACategory")); catPage.UpdateList(); } } else { setMessagePage(" "); } } SurfaceWindow1._instance.ShowButton(); //if (GlobalConfig.debug) MessageBox.Show("backStack Page " +_backStack.Count.ToString()); }
private void BtnClick(object sender, System.Windows.RoutedEventArgs e) { EaseObjectGroup eog = new EaseObjectGroup(); for (int i = 0; i < 4; i++) { double star = .3 + (_rnd.NextDouble() * 2.7); EaseObject eo = ArtefactAnimator.AddEase(col, new[] { AnimationTypes.ColumWidthStar }, new object[] { star }, 1, AnimationTransitions.ElasticEaseOut, i * .5); eog.AddEaseObject(eo); } }
private void viewbox4_TouchLeave(object sender, TouchEventArgs e) { Viewbox vb = (Viewbox)sender; var eog = new EaseObjectGroup(); var eo = ArtefactAnimator.AddEase(vb, new[] { AnimationTypes.Width, AnimationTypes.Height }, new object[] { 100, 100 }, 0.5, AnimationTransitions.CubicEaseOut, 0); eog.AddEaseObject(eo); }
private void LoadImg(MyImage img) { scatterView.Width = System.Windows.SystemParameters.PrimaryScreenWidth * 0.6; scatterView.Height = System.Windows.SystemParameters.PrimaryScreenWidth * 0.6; //scatterView.CanRotate = CommunConfig.getInstance().ImageRotate; if (img.Source == null) return; if (img.Source.Width > img.Source.Height) { scatterView.Height *= img.Source.Height/img.Source.Width; } else { scatterView.Width*= img.Source.Width/ img.Source.Height; } imgScatter.OriginalPath = img.OriginalPath; imgScatter.Source = img.Source; //Point originPoint = this.PointToScreen(new Point(0, 0)); scatterView.Center = new Point(System.Windows.SystemParameters.PrimaryScreenWidth / 2, System.Windows.SystemParameters.PrimaryScreenHeight / 2 -50); // System.Windows.SystemParameters.PrimaryScreenWidth/2; // System.Windows.SystemParameters.PrimaryScreenHeight/2; scatterView.MaxWidth = System.Windows.SystemParameters.PrimaryScreenWidth * 2; scatterView.MaxHeight = System.Windows.SystemParameters.PrimaryScreenHeight * 2; imgScatter.MaxWidth= System.Windows.SystemParameters.PrimaryScreenWidth*2; imgScatter.MaxHeight = System.Windows.SystemParameters.PrimaryScreenHeight*2; scatterView.Opacity = 0; var eog = new EaseObjectGroup(); var eo = ArtefactAnimator.AddEase(scatterView, new[] { AnimationTypes.Alpha}, new object[] { 1 }, 1, AnimationTransitions.CubicEaseOut, 0); eog.AddEaseObject(eo); }
// Delete. private void image1_TouchUp(object sender, TouchEventArgs e) { var eog = new EaseObjectGroup(); stackPanelQuestionDelete.Opacity = 0; var eo = ArtefactAnimator.AddEase(stackPanelQuestionDelete, new[] { AnimationTypes.Height,AnimationTypes.Alpha }, new object[] { 120,1 }, 1.5, AnimationTransitions.CubicEaseOut, 0); var eo2 = ArtefactAnimator.AddEase(rectanglePoubelle, new[] { AnimationTypes.Height}, new object[] { 1 }, 1.5, AnimationTransitions.CubicEaseOut, 0); eog.AddEaseObject(eo); eog.AddEaseObject(eo2); }
private void CloseQuestionPanel(ref StackPanel p) { var eog = new EaseObjectGroup(); var eo = ArtefactAnimator.AddEase(stackPanelQuestionDelete, new[] { AnimationTypes.Height,AnimationTypes.Alpha }, new object[] { 0,0 }, 1.5, AnimationTransitions.CubicEaseOut, 0); var eo2 = ArtefactAnimator.AddEase(rectanglePoubelle, new[] { AnimationTypes.Height }, new object[] { 25 }, 1.5, AnimationTransitions.CubicEaseOut, 0); eog.AddEaseObject(eo); eog.AddEaseObject(eo2); }
public static void ShowDialog(Grid grid,int delta) { var eog = new EaseObjectGroup(); var eo = ArtefactAnimator.AddEase(grid, new[] { AnimationTypes.MarginTop }, new object[] { System.Windows.SystemParameters.PrimaryScreenHeight/2- delta}, 1.5, AnimationTransitions.CubicEaseOut, 0); eog.AddEaseObject(eo); }
private void surfaceButtonBackTopGallery_Click(object sender, RoutedEventArgs e) { var eog = new EaseObjectGroup(); gridPhoto.Opacity = 0; var eo = ArtefactAnimator.AddEase(gridPhoto, new[] { AnimationTypes.Width, AnimationTypes.Alpha }, new object[] { 1, 0 }, 0.3, AnimationTransitions.CubicEaseOut, 0); eog.AddEaseObject(eo); eog.Complete += delegate(EaseObjectGroup easeObjectGroup) { gridListThumb.Width = System.Windows.SystemParameters.PrimaryScreenWidth - 50; surfaceListBox1.Width = System.Windows.SystemParameters.PrimaryScreenWidth - 50; surfaceButtonAddToSelection.Visibility = System.Windows.Visibility.Hidden; surfaceButtonBackTopGallery.Visibility = System.Windows.Visibility.Hidden; }; globalDatasingleton.getInstance().InitCursor(LastViewBoxTouch); if (globalDatasingleton.getInstance().getCursorFilename() != "") { String filename = globalDatasingleton.getInstance().getCursorFilename(); Image img = LastViewBoxTouch.Child as Image; MyImage img2 = new MyImage(); if (filename != "") { img2.Source = BitmapUtil.GetImageSource(filename); img2.OriginalPath = filename; } LoadImg(img2); } }
private void LoadImg(MyImage img) { //scatterView.CanRotate = CommunConfig.getInstance().ImageRotate; scatterView.Width = System.Windows.SystemParameters.PrimaryScreenWidth * 0.4; scatterView.Height = System.Windows.SystemParameters.PrimaryScreenWidth * 0.4; if (img.Source == null) return; if (img.Source.Width > img.Source.Height) { scatterView.Height *= img.Source.Height / img.Source.Width; imgScatter.Height *= scatterView.Height; } else { scatterView.Width *= img.Source.Width / img.Source.Height; imgScatter.Width *= scatterView.Width; } imgScatter.OriginalPath = img.OriginalPath; imgScatter.Source = img.Source; //Point originPoint = this.PointToScreen(new Point(0, 0)); scatterView.Center = new Point(gridPhoto.Width / 2 -200 , gridPhoto.Height / 2 ); // System.Windows.SystemParameters.PrimaryScreenWidth/2; // System.Windows.SystemParameters.PrimaryScreenHeight / 2; scatterView.MaxWidth = System.Windows.SystemParameters.PrimaryScreenWidth ; scatterView.MaxHeight = System.Windows.SystemParameters.PrimaryScreenHeight ; imgScatter.MaxWidth = System.Windows.SystemParameters.PrimaryScreenWidth ; imgScatter.MaxHeight = System.Windows.SystemParameters.PrimaryScreenHeight ; scatterView.Opacity = 0; var eog = new EaseObjectGroup(); var eo = ArtefactAnimator.AddEase(scatterView, new[] { AnimationTypes.Alpha }, new object[] { 1 }, 1, AnimationTransitions.CubicEaseOut, 0); eog.AddEaseObject(eo); eog.Complete += delegate(EaseObjectGroup easeObjectGroup) { surfaceButtonAddToSelection.Visibility = System.Windows.Visibility.Visible; surfaceButtonBackTopGallery.Visibility = System.Windows.Visibility.Visible; }; }
private void HideKeyboard() { if (_timer!=null) _timer.Stop(); //numkeyboard.Opacity = 0; this.Visibility = System.Windows.Visibility.Visible; var eog = new EaseObjectGroup(); var eo = ArtefactAnimator.AddEase(this, new[] { AnimationTypes.Alpha }, new object[] { 0 }, 0.5, AnimationTransitions.CubicEaseIn, 0); eog.AddEaseObject(eo); eog.Complete += delegate(EaseObjectGroup easeObjectGroup) { this.Visibility = System.Windows.Visibility.Hidden; }; }
private void ShowKeyboard() { Margin = new Thickness(textentry.Margin.Left + textentry.Width, textentry.Margin.Top, -300, -400); Opacity = 0; Visibility = System.Windows.Visibility.Visible; var eog = new EaseObjectGroup(); var eo = ArtefactAnimator.AddEase(this, new[] { AnimationTypes.Alpha }, new object[] { 1 }, 0.5, AnimationTransitions.CubicEaseIn, 0); eog.AddEaseObject(eo); _timer = new DispatcherTimer(); // Set the Interval to 2 seconds _timer.Interval = TimeSpan.FromSeconds(10); activity=false; _timer.Tick += new EventHandler(delegate(object s, EventArgs a) { if (activity== false) { HideKeyboard(); } activity=false; }); _timer.Start(); }
private void openSelectionImages() { var eog = new EaseObjectGroup(); var eo = ArtefactAnimator.AddEase(surfaceListBox1, new[] { AnimationTypes.Width }, new object[] { 1000 }, 1.5, AnimationTransitions.CubicEaseOut, 0); eog.AddEaseObject(eo); eog.Complete += delegate(EaseObjectGroup easeObjectGroup) { TransformationUtil.DisAppearControl(imageFormatPanel); TransformationUtil.DisAppearControl(stackPanel1); /*surfaceListBox1.Visibility = System.Windows.Visibility.Hidden; */ }; }
private void ShowMessage(string msg) { textBlockMessage.Text = msg; textBlockMessage.Opacity = 0; textBlockMessage.Visibility = Visibility.Visible; var eog = new EaseObjectGroup(); //eog.Complete += g => Debug.WriteLine("COMPLETE"); var eo = ArtefactAnimator.AddEase( textBlockMessage, new[] { AnimationTypes.Alpha }, new object[] { 1 }, 1.5, AnimationTransitions.CubicEaseOut, 0); eog.AddEaseObject(eo); eog.Complete += delegate(EaseObjectGroup easeObjectGroup) { var eog2 = new EaseObjectGroup(); //eog.Complete += g => Debug.WriteLine("COMPLETE"); var eo2 = ArtefactAnimator.AddEase(textBlockMessage, new[] { AnimationTypes.Alpha }, new object[] { 0 }, 1.5, AnimationTransitions.CubicEaseOut, 1); eog2.AddEaseObject(eo2); eog2.Complete += delegate(EaseObjectGroup easeObjectGroup2) { textBlockMessage.Visibility = System.Windows.Visibility.Hidden; }; }; }
public static void closePage() { var eog = new EaseObjectGroup(); //eog.Complete += g => Debug.WriteLine("COMPLETE"); var eo = ArtefactAnimator.AddEase(SurfaceWindow1.getGridPage(), new[] { AnimationTypes.MarginLeft, AnimationTypes.MarginTop }, new object[] { SurfaceWindow1._instance.Width, SurfaceWindow1._instance.Height }, 1.5, AnimationTransitions.CubicEaseOut, 0); eog.AddEaseObject(eo); }
private void animationPageIn() { var eog = new EaseObjectGroup(); var eo = ArtefactAnimator.AddEase(grid1, new[] { AnimationTypes.Width, AnimationTypes.Height, AnimationTypes.MarginLeft, AnimationTypes.MarginTop }, new object[] { this.Width, this.Height, 10, 10 }, 0.3, AnimationTransitions.CubicEaseIn, 0); eog.AddEaseObject(eo); }
private void NoTouchAnimation() { var eog = new EaseObjectGroup(); var eo = ArtefactAnimator.AddEase(myImage, new[] { AnimationTypes.Height, AnimationTypes.Width }, new object[] { myImage.Height - GrowingStep, myImage.Width - GrowingStep }, 1.5, AnimationTransitions.CubicEaseOut, 0); eog.AddEaseObject(eo); }