Inheritance: System.Windows.Window, IComponentConnector
Example #1
0
        private static void ShowSettings(object o)
        {
            wndSettings settings = new wndSettings();

            if (settings.ShowDialog() == true)
            {
                MainWindow mainWindow  = (MainWindow)System.Windows.Application.Current.MainWindow;
                string     defaultSort = Settings.Default.defaultSort;
                if (defaultSort != null)
                {
                    if (!(defaultSort == "Alphabetical"))
                    {
                        if (!(defaultSort == "Serial"))
                        {
                            if (!(defaultSort == "Default"))
                            {
                                return;
                            }
                            return;
                        }
                    }
                    else
                    {
                        mainWindow.ApplySort("Title", ListSortDirection.Ascending);
                        return;
                    }
                    mainWindow.ApplySort("Serial", ListSortDirection.Ascending);
                }
            }
        }
Example #2
0
 private static void ShowSettings(object o)
 {
     wndSettings settings = new wndSettings();
     if (settings.ShowDialog() == true)
     {
         MainWindow mainWindow = (MainWindow) System.Windows.Application.Current.MainWindow;
         string defaultSort = Settings.Default.defaultSort;
         if (defaultSort != null)
         {
             if (!(defaultSort == "Alphabetical"))
             {
                 if (!(defaultSort == "Serial"))
                 {
                     if (!(defaultSort == "Default"))
                     {
                         return;
                     }
                     return;
                 }
             }
             else
             {
                 mainWindow.ApplySort("Title", ListSortDirection.Ascending);
                 return;
             }
             mainWindow.ApplySort("Serial", ListSortDirection.Ascending);
         }
     }
 }