예제 #1
0
파일: MainForm.cs 프로젝트: helgihaf/Alpha
        public MainForm()
        {
            InitializeComponent();
            // Create an instance of a ListView column sorter and assign it to the ListView control.
            lvwColumnSorter = new ListViewColumnSorter();
            lvwColumnSorter.CompareItems += new EventHandler<ListViewColumnSorterCompareEventArgs>(lvwColumnSorter_CompareItems);
            this.listViewResults.ListViewItemSorter = lvwColumnSorter;

            searchEngine = new SearchEngine();
            searchEngine.SearchingPath += new EventHandler<SearchEventArgs>(SearchEngineSearchingPath);
            searchEngine.SearchFound += new EventHandler<SearchFoundEventArgs>(SearchEngineSearchFound);

            if (Properties.Settings.Default.DirectoryItems == null)
                Properties.Settings.Default.DirectoryItems = new StringCollection();
            comboBoxDirectory.DataSource = Properties.Settings.Default.DirectoryItems;

            ShowHidePreviewPane();
        }
예제 #2
0
파일: MainForm.cs 프로젝트: helgihaf/Alpha
        public MainForm()
        {
            InitializeComponent();
            // Create an instance of a ListView column sorter and assign it to the ListView control.
            lvwColumnSorter = new ListViewColumnSorter();
            lvwColumnSorter.CompareItems += new EventHandler<ListViewColumnSorterCompareEventArgs>(lvwColumnSorter_CompareItems);
            this.listViewResults.ListViewItemSorter = lvwColumnSorter;

            searchEngine = new SearchEngine();
            searchEngine.SearchingPath += new EventHandler<SearchEventArgs>(SearchEngineSearchingPath);
            searchEngine.SearchFound += new EventHandler<SearchFoundEventArgs>(SearchEngineSearchFound);

            // Apply settings to combo boxes
            Properties.Settings.Default.DirectoryItems = ApplyComboBoxSetting(comboBoxDirectory, Properties.Settings.Default.DirectoryItems);
            Properties.Settings.Default.DirectorySubPaths = ApplyComboBoxSetting(comboBoxDirPath, Properties.Settings.Default.DirectorySubPaths);
            Properties.Settings.Default.FileNames = ApplyComboBoxSetting(comboBoxFileName, Properties.Settings.Default.FileNames);
            Properties.Settings.Default.Texts = ApplyComboBoxSetting(comboBoxText, Properties.Settings.Default.Texts);

            ShowHidePreviewPane();

            imageLoader = new FileImageLoader();
            imageLoader.LoadCompleted += new EventHandler<LoadCompletedEventArgs>(imageLoader_LoadCompleted);
        }