private void onApply(object sender, RoutedEventArgs e)
        {
            //when we apply our changes, since we are using our cloned desktop, we need to apply any changes that were made.

            originalDesktop.Name       = clonedDesktop.Name;
            originalDesktop.Location   = clonedDesktop.Location;
            originalDesktop.Background = clonedDesktop.Background;
            originalDesktop.IsFavorite = clonedDesktop.IsFavorite;
            originalDesktop.IsDefault  = clonedDesktop.IsDefault;

            //We then want to save any changes to our xml file, so we use our previous window which contains the Desktopmanager to do so.

            selectionWindow.desktopManager.Save_Desktops();
            selectionWindow.refreshListView();



            //our correct ref gets updated and we then close the window
            Close();
        }
Esempio n. 2
0
        private void onCreate(object sender, RoutedEventArgs e)
        {
            //When the user is ready to create their desktop, we will first check that the essential fields are selected.

            if (textBox.Text == "" || Background == "")
            {
                //If either of the two essential fields are empty, we need to update our display to tell the user that they need to give us this info.
                Warning.Content = "You must set both a Name and a Path to the folder you wish to become a Desktop.";
                return;
            }


            selectionWindow.desktopManager.Save_Desktops();
            selectionWindow.refreshListView();



            //our correct ref gets updated and we then close the window
            Close();
        }