Example #1
0
 private void Initialize()
 {
     downRadioButton.Checked = true;
     showNoMoreMatchesMessageCheckBox.Checked = true;
     wrapAroundCheckBox.Checked = true;
     SearchHistoryHandler.LoadItems(searchTermComboBox, "RecentTextSearchHistory");
 }
    public ConnectionDialogForm(DatabaseOperation databaseOperation)
    {
        InitializeComponent();
        SetApplicationName();

        _databaseOperation = databaseOperation;

        authenticationComboBox.SelectedIndex = 0;

        SetDefaultValues();
        SearchHistoryHandler.LoadItems(serverNameComboBox, "RecentListServerName");

        if (ConfigHandler.SaveConnectionString == "True")
        {
            saveValuesCheckBox.Checked = true;
        }
        else
        {
            saveValuesCheckBox.Checked = false;
        }

        if (ConfigHandler.OfflineModeToSave == "True")
        {
            offlineCheckBox.Checked = true;
        }
        else
        {
            offlineCheckBox.Checked = false;
        }

        InitializeWorker();
    }
Example #3
0
    private void OkButton_Click(object sender, EventArgs e)
    {
        if (traceFilePathComboBox.Text.Trim() == "")
        {
            MessageBox.Show("Trace File Directory can't be empty.", GenericHelper.ApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Information);
            traceFilePathComboBox.Focus();
            return;
        }

        ConfigHandler.TraceFileDirectory = traceFilePathComboBox.Text.Trim();

        if (stylesheetComboBox.SelectedItem != null)
        {
            ConfigHandler.DefaultStylesheet = stylesheetComboBox.SelectedItem.ToString();
        }

        if (tracingFunctionalityComboBox.SelectedIndex == 0)
        {
            ConfigHandler.UseExtendedEvents = "False";
        }
        else if (tracingFunctionalityComboBox.SelectedIndex == 1)
        {
            ConfigHandler.UseExtendedEvents = "True";
        }

        ConfigHandler.SaveConfig();
        SearchHistoryHandler.AddItem(traceFilePathComboBox, traceFilePathComboBox.Text, "RecentListTraceFileDir_Settings");

        _textChanged = false;
        Close();
    }
    public void Initialize(DatabaseOperation databaseOperation, bool unattended, string connectionStringFromCmdLine)
    {
        InitializeDictionary();
        SetApplicationName();

        _unattended        = unattended;
        _databaseOperation = databaseOperation;

        authenticationComboBox.SelectedIndex = 0;

        SetDefaultValues(connectionStringFromCmdLine);
        SearchHistoryHandler.LoadItems(serverNameComboBox, "RecentListServerName");

        if (ConfigHandler.SaveConnectionString == "True")
        {
            saveValuesCheckBox.Checked = true;
        }
        else
        {
            saveValuesCheckBox.Checked = false;
        }

        if (GenericHelper.IsUserInteractive())
        {
            InitializeWorker();
        }
    }
Example #5
0
 private void Initialize()
 {
     Text = string.Format("{0} - Search", GenericHelper.ApplicationName);
     downRadioButton.Checked = true;
     showNoMoreMatchesMessageCheckBox.Checked = true;
     wrapAroundCheckBox.Checked = true;
     SearchHistoryHandler.LoadItems(searchTermComboBox, "RecentTextSearchHistory");
 }
 private void Initialize()
 {
     Text = string.Format("{0} - Search", ConfigHandler.ApplicationName);
     downRadioButton.Checked = true;
     showNoMoreMatchesMessageCheckBox.Checked = true;
     wrapAroundCheckBox.Checked = true;
     nameCheckBox.Checked       = true;
     SearchHistoryHandler.LoadItems(searchTermComboBox, "RecentListSearchHistory");
     _objectsSelectorForm = new ObjectsSelectorForm();
 }
Example #7
0
    private void Initialize(DatabaseOperation databaseOperation)
    {
        Text = string.Format("{0} - Preferences", GenericHelper.ApplicationName);

        traceFilePathComboBox.Text = ConfigHandler.TraceFileDirectory;
        SearchHistoryHandler.LoadItems(traceFilePathComboBox, "RecentListTraceFileDir_Settings");
        FillDefaultStylesheet();
        FillTracingFunctionality(databaseOperation);

        _textChanged = false;
    }
Example #8
0
    public void Initialize(DatabaseOperation databaseOperation)
    {
        InitializeDictionary();

        _databaseOperation    = databaseOperation;
        _listViewColumnSorter = new ListViewColumnSorter();
        _lastImportedFiles    = new List <string>();
        traceFileListView.ListViewItemSorter = _listViewColumnSorter;
        traceFileDirComboBox.GotFocus       += TraceFileDirComboBox_GotFocus;

        SearchHistoryHandler.LoadItems(traceFileDirComboBox, "RecentListTraceFileDir_Selector");
    }
    private void OkButton_Click(object sender, EventArgs e)
    {
        if (ValidateItemsPerPage() && ValidTraceFileDir())
        {
            int newItemsPerPage = Convert.ToInt32(itemsPerPageTextBox.Text);

            if (ConfigHandler.ItemsPerPage != newItemsPerPage)
            {
                ConfigHandler.ItemsPerPage = newItemsPerPage;
                ItemsPerPageChanged        = true;
            }

            if (languageComboBox.SelectedItem.ToString().ToLower() != ConfigHandler.Language.ToLower())
            {
                ConfigHandler.Language = languageComboBox.SelectedItem.ToString().ToLower();
                RestartRequired        = true;
            }

            ConfigHandler.RecordTraceFileDir = traceFileDirComboBox.Text.Trim();

            if (tracingFunctionalityComboBox.SelectedIndex == 0)
            {
                ConfigHandler.UseExtendedEvents = "False";
            }
            else if (tracingFunctionalityComboBox.SelectedIndex == 1)
            {
                ConfigHandler.UseExtendedEvents = "True";
            }

            ConfigHandler.KeepSessionOnExit = keepSessionCheckBox.Checked;

            if (ConfigHandler.EnableFileNameAndType != enableFileNameAndTypeCheckBox.Checked)
            {
                ConfigHandler.EnableFileNameAndType = enableFileNameAndTypeCheckBox.Checked;
                RestartRequired = true;
            }

            ConfigHandler.AutoPopulateFilter2 = autoPopulateFilter2CheckBox.Checked;

            if (ConfigHandler.EnableQuickSearch != enableQuickSearchCheckBox.Checked)
            {
                ConfigHandler.EnableQuickSearch = enableQuickSearchCheckBox.Checked;
                EnableQuickSearchChanged        = true;
            }

            ConfigHandler.SaveConfig();
            SearchHistoryHandler.AddItem(traceFileDirComboBox, traceFileDirComboBox.Text, "RecentListTraceFileDir_Settings");
            Close();
        }
    }
    private void Worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
    {
        _runWorkerActive = false;
        EndConnect();

        if (ConnectionChanged)
        {
            if (saveValuesCheckBox.Checked)
            {
                SearchHistoryHandler.AddItem(serverNameComboBox, serverNameComboBox.Text, "RecentListServerName");
            }

            Close();
        }
    }
    public void Initialize(DatabaseOperation databaseOperation)
    {
        InitializeDictionary();

        itemsPerPageTextBox.Text  = ConfigHandler.ItemsPerPage.ToString();
        traceFileDirComboBox.Text = ConfigHandler.RecordTraceFileDir;
        SearchHistoryHandler.LoadItems(traceFileDirComboBox, "RecentListTraceFileDir_Settings");

        SetLanguageDropDown();
        SetTracingFunctionality(databaseOperation);

        keepSessionCheckBox.Checked           = ConfigHandler.KeepSessionOnExit;
        enableFileNameAndTypeCheckBox.Checked = ConfigHandler.EnableFileNameAndType;
        autoPopulateFilter2CheckBox.Checked   = ConfigHandler.AutoPopulateFilter2;
        enableQuickSearchCheckBox.Checked     = ConfigHandler.EnableQuickSearch;
    }
    private void OkButton_Click(object sender, EventArgs e)
    {
        if (_requestUpdateListEventPending)
        {
            _requestUpdateListEventPending = false;
            FireRequestUpdateListEvent(nameCheckBox.Checked, inputCheckBox.Checked, outputCheckBox.Checked);
        }

        if (searchTermComboBox.Text != _previousSearchTerm)
        {
            _previousSearchTerm = searchTermComboBox.Text;
            Reset(_currentSearchIndex);
            SearchHistoryHandler.AddItem(searchTermComboBox, searchTermComboBox.Text, "RecentListSearchHistory");
        }

        SearchInList();
    }
Example #13
0
    private void Initialize(List <ImportTraceDataValue> traceDataList, List <CalculatedPerformanceCounter> performanceCounters, List <RanTaskInfo> ranTaskInfo, ResultTaskCollection resultTaskCollection, ResultInfo resultInfo)
    {
        FireMessageToMainFormEvent("Status: Parsing Results...");

        Text = string.Format("{0} - Results", GenericHelper.ApplicationName);
        GenericHelper.SetSize(this, ConfigHandler.ResultsWindowSize);
        MinimumSize = new Size(700, 500);          // error in .NET
        FillRecentFilesMenu();

        SearchHistoryHandler.LoadItems(objectNameComboBox, "RecentListObjectName");
        SearchHistoryHandler.LoadItems(counterNameComboBox, "RecentListCounterName");
        SearchHistoryHandler.LoadItems(instanceNameComboBox, "RecentListInstanceName");

        descriptionTextBox.GotFocus += DescriptionTextBox_GotFocus;
        shownTextBox.GotFocus       += ShownTextBox_GotFocus;

        ImageList imageList = new ImageList();

        imageList.Images.Add(PerformanceTestTool.Properties.Resources.cogtab);
        tabControlEX1.ImageList = imageList;

        tabControlEX1.TabPages.Clear();
        performanceCounterListView.Items.Clear();
        stylesheetComboBox.Items.Clear();

        _listViewColumnSorter = new ListViewColumnSorter();
        performanceCounterListView.ListViewItemSorter = _listViewColumnSorter;

        _performanceCounters = performanceCounters;

        ShowPerformanceCounterResults(performanceCounters, resultTaskCollection.PerformanceCountersSamples, resultTaskCollection.PerformanceCountersSamplingInterval);
        UpdateShownTextBox();

        List <TabPage> tabPages = GetTabPages(traceDataList, resultTaskCollection, ranTaskInfo);

        AddTabPages(tabPages);

        _splitterDistance = GetSplitterDistance();

        _xml = GetXml(resultTaskCollection, resultInfo);
        SetXmlFile();
        XmlHelper.WriteXmlToFile(_xml, _xmlFileName);
    }
    private void OkButton_Click(object sender, EventArgs e)
    {
        if (_requestUpdateListEventPending)
        {
            _requestUpdateListEventPending = false;
            searchingLabel.Visible         = true;
            Application.DoEvents();
            FireRequestUpdateListEvent(nameCheckBox.Checked, contentCheckBox.Checked, descriptionCheckBox.Checked);
            searchingLabel.Visible = false;
        }

        if (searchTermComboBox.Text != _previousSearchTerm)
        {
            _previousSearchTerm = searchTermComboBox.Text;
            Reset(_currentSearchIndex);
            SearchHistoryHandler.AddItem(searchTermComboBox, searchTermComboBox.Text, "RecentListSearchHistory");
        }

        SearchInList();
    }
Example #15
0
    private void OkButton_Click(object sender, EventArgs e)
    {
        if (searchTermComboBox.Text != _originalSearchTerm)
        {
            _originalSearchTerm = searchTermComboBox.Text;
            Reset(_currentSearchIndex);
            SearchHistoryHandler.AddItem(searchTermComboBox, searchTermComboBox.Text, "RecentTextSearchHistory");
        }

        if (GetSearchDirection() == SearchDirection.Up && _originalSearchIndex != -1)
        {
            _currentSearchIndex += (searchTermComboBox.Text.Length - CountLineShifts(searchTermComboBox.Text)) - 1;
        }

        if (GetSearchDirection() == SearchDirection.Down && _originalSearchIndex != -1)
        {
            _currentSearchIndex++;
        }

        SearchInText();
    }
    public void Initialize()
    {
        InitializeDictionary();

        if (ConfigHandler.UseTranslation)
        {
            Text = string.Format("{0} - {1}", GenericHelper.ApplicationName, Translator.GetText("findToolStripButton"));
        }
        else
        {
            Text = string.Format("{0} - Search", GenericHelper.ApplicationName);
        }

        downRadioButton.Checked = true;
        showNoMoreMatchesMessageCheckBox.Checked = true;
        wrapAroundCheckBox.Checked = true;

        nameCheckBox.Checked   = true;
        inputCheckBox.Checked  = true;
        outputCheckBox.Checked = true;

        SearchHistoryHandler.LoadItems(searchTermComboBox, "RecentListSearchHistory");
    }
    private void OkButton_Click(object sender, EventArgs e)
    {
        _folderSelected        = false;
        searchingLabel.Text    = "Searching...";
        searchingLabel.Visible = true;
        Application.DoEvents();

        if (_requestUpdateListEventPending || searchTermComboBox.Text != _previousSearchTerm)
        {
            _requestUpdateListEventPending = false;
            FireRequestUpdateListEvent(searchTermComboBox.Text, nameCheckBox.Checked, descriptionCheckBox.Checked, _objectsSelectorForm, matchWholeWordCheckBox.Checked, matchCaseCheckBox.Checked);
        }

        if (searchTermComboBox.Text != _previousSearchTerm)
        {
            _previousSearchTerm = searchTermComboBox.Text;
            Reset(_currentSearchIndex);
            SearchHistoryHandler.AddItem(searchTermComboBox, searchTermComboBox.Text, "RecentListSearchHistory");
        }

        SearchInList();

        searchingLabel.Text = string.Format("Results found: {0}", _matchCount);
    }
Example #18
0
    private void ApplyFilter(bool reset)
    {
        Control activeControl = ActiveControl;

        applyFilterButton.Enabled            = false;
        clearButton.Enabled                  = false;
        removeAllZeroColumnsCheckBox.Enabled = false;
        removeZeroDeltaCheckBox.Enabled      = false;
        objectNameComboBox.BackColor         = Color.Gainsboro;
        counterNameComboBox.BackColor        = Color.Gainsboro;
        instanceNameComboBox.BackColor       = Color.Gainsboro;
        objectNameComboBox.Enabled           = false;
        counterNameComboBox.Enabled          = false;
        instanceNameComboBox.Enabled         = false;
        Application.DoEvents();

        string objectName   = objectNameComboBox.Text.Trim().ToLower();
        string counterName  = counterNameComboBox.Text.Trim().ToLower();
        string instanceName = instanceNameComboBox.Text.Trim().ToLower();

        SearchHistoryHandler.AddItem(objectNameComboBox, objectNameComboBox.Text, "RecentListObjectName");
        SearchHistoryHandler.AddItem(counterNameComboBox, counterNameComboBox.Text, "RecentListCounterName");
        SearchHistoryHandler.AddItem(instanceNameComboBox, instanceNameComboBox.Text, "RecentListInstanceName");

        if (reset)
        {
            objectName                           = "";
            counterName                          = "";
            instanceName                         = "";
            objectNameComboBox.Text              = "";
            counterNameComboBox.Text             = "";
            instanceNameComboBox.Text            = "";
            removeAllZeroColumnsCheckBox.Checked = false;
            removeZeroDeltaCheckBox.Checked      = false;
        }

        List <CalculatedPerformanceCounter> filteredPerformanceCounters = FilterHelper.FilterPerformanceCounters(_performanceCounters, objectName, counterName, instanceName);

        performanceCounterListView.Items.Clear();

        foreach (CalculatedPerformanceCounter performanceCounter in filteredPerformanceCounters)
        {
            ListViewItem listViewItem = new ListViewItem();
            listViewItem.Text = performanceCounter.ObjectName;
            listViewItem.SubItems.Add(performanceCounter.CounterName);
            listViewItem.SubItems.Add(performanceCounter.InstanceName);
            listViewItem.SubItems.Add(performanceCounter.Minimum.ToString());
            listViewItem.SubItems.Add(performanceCounter.Maximum.ToString());
            listViewItem.SubItems.Add(performanceCounter.Average.ToString());
            listViewItem.SubItems.Add((performanceCounter.Maximum - performanceCounter.Minimum).ToString());

            bool add = true;

            if (removeAllZeroColumnsCheckBox.Checked)
            {
                if (performanceCounter.Minimum == 0 && performanceCounter.Maximum == 0 && performanceCounter.Average == 0)
                {
                    add = false;
                }
            }

            if (removeZeroDeltaCheckBox.Checked)
            {
                if (performanceCounter.Maximum - performanceCounter.Minimum == 0)
                {
                    add = false;
                }
            }

            if (add)
            {
                performanceCounterListView.Items.Add(listViewItem);
            }
        }

        UpdateShownTextBox();

        applyFilterButton.Enabled            = true;
        clearButton.Enabled                  = true;
        removeAllZeroColumnsCheckBox.Enabled = true;
        removeZeroDeltaCheckBox.Enabled      = true;
        objectNameComboBox.BackColor         = Color.WhiteSmoke;
        counterNameComboBox.BackColor        = Color.WhiteSmoke;
        instanceNameComboBox.BackColor       = Color.WhiteSmoke;
        objectNameComboBox.Enabled           = true;
        counterNameComboBox.Enabled          = true;
        instanceNameComboBox.Enabled         = true;

        activeControl.Focus();
    }
 public void ReloadHistory()
 {
     SearchHistoryHandler.LoadItems(searchTermComboBox, "RecentTextSearchHistory");
 }
Example #20
0
 private void SaveTraceFileDir(string traceFileDir)
 {
     RegistryHandler.SaveToRegistry("ImportTraceFileDir", traceFileDir);
     SearchHistoryHandler.AddItem(traceFileDirComboBox, traceFileDirComboBox.Text, "RecentListTraceFileDir_Selector");
 }