Esempio n. 1
0
        public MainWindow()
        {
            // Get command line arguments
            commandLineArgs = CommandLineParser.GetCommandLineArgs();

            // Load localization
            LocalizationController.LoadLocalization();

            // Load appearance
            AppearanceController.LoadAppearance();
            InitializeComponent();
            DataContext = this;

            // Set a filter for ListView Apps and sort them
            CollectionView view = (CollectionView)CollectionViewSource.GetDefaultView(lvApps.ItemsSource);

            view.SortDescriptions.Add(new SortDescription("Name", ListSortDirection.Ascending));
            view.Filter = SearchFilter;

            // Init notify icon
            InitNotifyIcon();

            if (commandLineArgs.Autostart && Properties.Settings.Default.Application_StartApplicationMinimized)
            {
                HideWindowToTray();
            }
        }