Example #1
0
        // Metoda kopiująca
        private void CopyMet()
        {
            string fileName, destinationFile;

            if (LeftSidePanel.File == null)
            {
                if (Directory.Exists(LeftSidePanel.PathName))
                {
                    var allFiles = Directory.GetFiles(LeftSidePanel.PathName);
                    foreach (var f in allFiles)
                    {
                        fileName        = Path.GetFileName(f);
                        destinationFile = Path.Combine(RightSidePanel.PathName, fileName);

                        try
                        {
                            File.Copy(f, destinationFile, true);
                        }
                        catch (Exception e)
                        {
                            MessageBox.Show($"Błąd: {e}");
                        }
                    }
                }
            }
            else
            {
                fileName = LeftSidePanel.File.File;
                var f = Path.GetFileName(fileName);
                destinationFile    = Path.Combine(RightSidePanel.PathName, f);
                LeftSidePanel.File = null;

                try
                {
                    File.Copy(fileName, destinationFile, true);
                }
                catch (Exception e)
                {
                    MessageBox.Show($"Błąd: {e}");
                }
            }

            LeftSidePanel.RefreshList(LeftSidePanel.PathName);
            RightSidePanel.RefreshList(RightSidePanel.PathName);
        }
Example #2
0
 private void SideHider_MouseDown(object sender, MouseButtonEventArgs e)
 {
     LeftSidePanel.BeginAnimation(MarginProperty, LeftSideOutAnimation);
     SideHider.BeginAnimation(OpacityProperty, OpacityAnimationOut);
 }
Example #3
0
 private void MenuArea_MouseDown(object sender, MouseButtonEventArgs e)
 {
     SideHider.Visibility = Visibility.Visible;
     LeftSidePanel.BeginAnimation(MarginProperty, LeftSideInAnimation);
     SideHider.BeginAnimation(OpacityProperty, OpacityAnimationIn);
 }