Esempio n. 1
0
        private void InitializeToolStripFind()
        {
            if (DesignMode)
            {
                return;
            }

            if (Settings.Default.SearchMRUNameList == null)
            {
                Settings.Default.SearchMRUNameList = new StringCollection();
            }

            if (Settings.Default.SearchMRUFormIDList == null)
            {
                Settings.Default.SearchMRUFormIDList = new StringCollection();
            }

            if (Settings.Default.SearchMRUFullList == null)
            {
                Settings.Default.SearchMRUFullList = new StringCollection();
            }

            var items = new object[]
                {
                    new MRUComboHelper<SearchType, string>(SearchType.EditorID, "Editor ID", Settings.Default.SearchMRUNameList), 
                    new MRUComboHelper<SearchType, string>(SearchType.FormID, "Form ID", Settings.Default.SearchMRUFormIDList), 
                    new MRUComboHelper<SearchType, string>(SearchType.FullSearch, "Full Search", Settings.Default.SearchMRUFullList), 
                    new MRUComboHelper<SearchType, string>(SearchType.TypeEditorIdSearch, "Name w/Type", Settings.Default.SearchMRUNameList), 
                    new MRUComboHelper<SearchType, string>(SearchType.TypeFullSearch, "Full w/Type", Settings.Default.SearchMRUFullList), 
                    new MRUComboHelper<SearchType, string>(SearchType.FormIDRef, "Form ID Ref.", Settings.Default.SearchMRUFormIDList), 
                    new MRUComboHelper<SearchType, string>(SearchType.BasicCriteriaRef, "Basic Search", new StringCollection()), 
                };
            this.toolStripIncrFindType.Items.Clear();
            this.toolStripIncrFindType.Items.AddRange(items);

            int idx = 0;
            if (!string.IsNullOrEmpty(Settings.Default.LastSearchType))
            {
                idx = this.toolStripIncrFindType.FindStringExact(Settings.Default.LastSearchType);
            }

            idx = idx >= 0 ? idx : 0;
            this.toolStripIncrFindType.SelectedIndex = idx;

            this.ResetSearch();
            this.toolStripIncrFindStatus.Text = string.Empty;
            this.toolStripIncrFindTypeFilter.Sorted = true;
            this.toolStripIncrFindTypeFilter.Items.Clear();
            this.toolStripIncrFindTypeFilter.Items.AddRange(DomainDefinition.GetRecordNames());
            this.toolStripIncrFindTypeFilter.SelectedIndex = 0;

            this.backgroundWorker1.DoWork += this.backgroundWorker1_DoWork;
            this.backgroundWorker1.RunWorkerCompleted += this.backgroundWorker1_RunWorkerCompleted;
            this.backgroundWorker1.ProgressChanged += this.backgroundWorker1_ProgressChanged;
        }
Esempio n. 2
0
        public FormIDElement()
        {
            this.InitializeComponent();

            var recitems = DomainDefinition.GetRecordNames();

            this.cboRecType.Sorted = true;
            this.cboRecType.Items.Clear();
            this.cboRecType.Items.Add("<All>");
            this.cboRecType.Items.AddRange(recitems);
            this.cboRecType.SelectedIndex = 0;
        }
Esempio n. 3
0
        private void ReinitializeToolStripFind()
        {
            var recitems = DomainDefinition.GetRecordNames();

            this.toolStripIncrFindTypeFilter.Sorted = true;
            this.toolStripIncrFindTypeFilter.Items.Clear();
            this.toolStripIncrFindTypeFilter.Items.AddRange(recitems);
            if (this.toolStripIncrFindTypeFilter.SelectedIndex < 0 && recitems.Length > 0)
            {
                this.toolStripIncrFindTypeFilter.SelectedIndex = 0;
            }
        }