コード例 #1
0
        private void toolStripButtonFilter_Click(object sender, EventArgs e)
        {
            try
            {
                if (toolStripComboBoxFilter.SelectedIndex == 0 || toolStripComboBoxFilter.SelectedText == CONST_FILTER_DEFAULT_STRING ||
                    toolStripComboBoxFilter.Text == CONST_FILTER_DEFAULT_STRING || toolStripComboBoxFilter.SelectedText.Contains(CONST_FILTER_DEFAULT_STRING))
                {
                    return;
                }

                filterString = toolStripComboBoxFilter.Text.Trim().ToLower();

                //Check which View is selected for listing of classes, call find method for relavent view
                if (toolStripButtonAssemblyView.Checked)
                {
                    dbAssemblyTreeView.FindTreeNodesAssemblyView(storedAssemblies, filterString);
                }
                else
                {
                    dbtreeviewObject.FindTreeNodesClasses(storedclasses, null, filterString);
                }

                SeachString searchString = new SeachString(DateTime.Now, toolStripComboBoxFilter.Text.Trim());
                OMEInteraction.SaveSearchString(searchString);
                toolStripButtonFolder.Enabled = false;
                SetObjectBrowserImages();
                toolStripButtonFilter.Checked = true;
                toolStripButtonClear.Checked  = false;
            }
            catch (Exception oEx)
            {
                LoggingHelper.ShowMessage(oEx);
            }
            finally
            {
                listSearchStrings = OMEInteraction.GetSearchString();
                FillFilterComboBox(listSearchStrings);
                if (toolStripComboBoxFilter.Text != "")
                {
                    EnableDisablePrevNextButtons();
                }
                else
                {
                    DisablePrevNextButtons();
                }
            }
        }