예제 #1
0
        // Called when the user presses the 'Save' button
        private void OnSave(object sender, RoutedEventArgs args)
        {
            LoadedImage.Save(Path.Combine(App.PhotoFolder, "KinectPaint_" + DateTime.Now.ToString("yyyyMMdd_HHmmss", CultureInfo.InvariantCulture) + ".png"), ImageFormat.Png);

            _imageUnsaved = false;

            // Animate the "Saved" message so the user knows it worked
            DoubleAnimation saveMessageAnimator = new DoubleAnimation(1.0, 0.0, Duration.Automatic, FillBehavior.Stop);

            PART_SaveMessage.BeginAnimation(OpacityProperty, saveMessageAnimator);
        }
예제 #2
0
        // Called when the user presses the 'Save' button
        private void OnSave(object sender, RoutedEventArgs args)
        {
            LoadedImage.Save(Path.Combine(App.PhotoFolder, "키넥트그림" + DateTime.Now.ToString("yyyyMMdd_HHmmss", CultureInfo.InvariantCulture) + ".png"), ImageFormat.Png);

            _imageUnsaved = false;

            // 3초 동안 opacity 1.0~ 0.0 으로 애니메이셔닝
            DoubleAnimation saveMessageAnimator = new DoubleAnimation(1.0, 1.0, new Duration(TimeSpan.FromSeconds(2)), FillBehavior.Stop);

            PART_SaveMessage.BeginAnimation(OpacityProperty, saveMessageAnimator);
        }
예제 #3
0
        // Called when the user presses the 'Save' button
        private void OnSave(object sender, RoutedEventArgs args)
        {
            string pathBackground = "";
            string uri            = Instance.PART_LoadedBackground.Source != null?Instance.PART_LoadedBackground.Source.ToString().ToLower() : "";

            if (uri.Contains("drawing"))
            {
                pathBackground = "dg" + Regex.Match(uri, @"\d+").Value + "_";
            }
            else if (uri.Contains("coloring"))
            {
                pathBackground = "cl" + Regex.Match(uri, @"\d+").Value + "_";
            }
            LoadedImage.Save(Path.Combine(App.PhotoFolder, pathBackground + DateTime.Now.ToString("yyyyMMdd_HHmmss", CultureInfo.InvariantCulture) + ".png"), ImageFormat.Png);
            _imageUnsaved = false;

            // Animate the "Saved" message so the user knows it worked
            DoubleAnimation saveMessageAnimator = new DoubleAnimation(1.0, 0.0, Duration.Automatic, FillBehavior.Stop);

            PART_SaveMessage.BeginAnimation(OpacityProperty, saveMessageAnimator);
        }