Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.Designer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.Designer.cs (revision 10761)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.Designer.cs (revision 10762)
@@ -54,4 +54,7 @@
this.mostCommonToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.interpolationToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
+ this.btnSearch = new System.Windows.Forms.Button();
+ this.btnReplace = new System.Windows.Forms.Button();
+ this.toolTip = new System.Windows.Forms.ToolTip(this.components);
((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
this.contextMenuCell.SuspendLayout();
@@ -80,9 +83,10 @@
// btnApplySort
//
- this.btnApplySort.Location = new System.Drawing.Point(241, 19);
+ this.btnApplySort.Location = new System.Drawing.Point(349, 19);
this.btnApplySort.Name = "btnApplySort";
this.btnApplySort.Size = new System.Drawing.Size(75, 23);
this.btnApplySort.TabIndex = 7;
this.btnApplySort.Text = "Apply Sort";
+ this.toolTip.SetToolTip(this.btnApplySort, "The current sorting is applied on the data itself.");
this.btnApplySort.UseVisualStyleBackColor = true;
this.btnApplySort.Click += new System.EventHandler(this.btnApplySort_Click);
@@ -93,5 +97,5 @@
this.replaceValueToolStripMenuItem});
this.contextMenuCell.Name = "contextMenuCell";
- this.contextMenuCell.Size = new System.Drawing.Size(153, 48);
+ this.contextMenuCell.Size = new System.Drawing.Size(148, 26);
//
// replaceValueToolStripMenuItem
@@ -104,5 +108,5 @@
this.interpolationToolStripMenuItem});
this.replaceValueToolStripMenuItem.Name = "replaceValueToolStripMenuItem";
- this.replaceValueToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
+ this.replaceValueToolStripMenuItem.Size = new System.Drawing.Size(147, 22);
this.replaceValueToolStripMenuItem.Text = "Replace Value";
//
@@ -142,8 +146,32 @@
this.interpolationToolStripMenuItem.Click += new System.EventHandler(this.ReplaceWithInterpolation_Click);
//
+ // btnSearch
+ //
+ this.btnSearch.Location = new System.Drawing.Point(201, 19);
+ this.btnSearch.Name = "btnSearch";
+ this.btnSearch.Size = new System.Drawing.Size(53, 23);
+ this.btnSearch.TabIndex = 8;
+ this.btnSearch.Text = "Search";
+ this.toolTip.SetToolTip(this.btnSearch, "Opens the Search dialog");
+ this.btnSearch.UseVisualStyleBackColor = true;
+ this.btnSearch.Click += new System.EventHandler(this.button1_Click);
+ //
+ // btnReplace
+ //
+ this.btnReplace.Location = new System.Drawing.Point(260, 19);
+ this.btnReplace.Name = "btnReplace";
+ this.btnReplace.Size = new System.Drawing.Size(55, 23);
+ this.btnReplace.TabIndex = 9;
+ this.btnReplace.Text = "Replace";
+ this.toolTip.SetToolTip(this.btnReplace, "Opens the Search & Replace dialog");
+ this.btnReplace.UseVisualStyleBackColor = true;
+ this.btnReplace.Click += new System.EventHandler(this.btnReplace_Click);
+ //
// DataGridContentView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.Controls.Add(this.btnReplace);
+ this.Controls.Add(this.btnSearch);
this.Controls.Add(this.btnApplySort);
this.Name = "DataGridContentView";
@@ -155,4 +183,6 @@
this.Controls.SetChildIndex(this.columnsTextBox, 0);
this.Controls.SetChildIndex(this.btnApplySort, 0);
+ this.Controls.SetChildIndex(this.btnSearch, 0);
+ this.Controls.SetChildIndex(this.btnReplace, 0);
((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
this.contextMenuCell.ResumeLayout(false);
@@ -172,4 +202,7 @@
private System.Windows.Forms.ToolStripMenuItem mostCommonToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem interpolationToolStripMenuItem;
+ private System.Windows.Forms.Button btnSearch;
+ private System.Windows.Forms.Button btnReplace;
+ private System.Windows.Forms.ToolTip toolTip;
}
}
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.cs (revision 10761)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.cs (revision 10762)
@@ -35,5 +35,5 @@
private bool notOwnEvent = true;
- private FindAndReplaceDialog findAndReplaceDialog;
+ private SearchAndReplaceDialog findAndReplaceDialog;
private IFindPreprocessingItemsIterator searchIterator;
private string currentSearchText;
@@ -159,5 +159,5 @@
private void CreateFindAndReplaceDialog() {
- findAndReplaceDialog = new FindAndReplaceDialog();
+ findAndReplaceDialog = new SearchAndReplaceDialog();
findAndReplaceDialog.Show(this);
HightlightedCellsBackground = GetSelectedCells();
@@ -399,4 +399,14 @@
Content.PreprocessingDataManipulation.ReplaceIndicesByLinearInterpolationOfNeighbours(GetSelectedCells());
}
+
+ private void button1_Click(object sender, EventArgs e) {
+ CreateFindAndReplaceDialog();
+ findAndReplaceDialog.ActivateSearch();
+ }
+
+ private void btnReplace_Click(object sender, EventArgs e) {
+ CreateFindAndReplaceDialog();
+ findAndReplaceDialog.ActivateReplace();
+ }
}
}
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.resx
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.resx (revision 10762)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.resx (revision 10762)
@@ -0,0 +1,129 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ 17, 17
+
+
+ 408, 17
+
+
+ 264, 17
+
+
Index: anches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/FindAndReplaceDialog.Designer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/FindAndReplaceDialog.Designer.cs (revision 10761)
+++ (revision )
@@ -1,209 +1,0 @@
-namespace HeuristicLab.DataPreprocessing.Views {
- partial class FindAndReplaceDialog {
- ///
- /// Required designer variable.
- ///
- private System.ComponentModel.IContainer components = null;
-
- ///
- /// Clean up any resources being used.
- ///
- /// true if managed resources should be disposed; otherwise, false.
- protected override void Dispose(bool disposing) {
- if (disposing && (components != null)) {
- components.Dispose();
- }
- base.Dispose(disposing);
- }
-
- #region Windows Form Designer generated code
-
- ///
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- ///
- private void InitializeComponent() {
- this.tabSearchReplace = new System.Windows.Forms.TabControl();
- this.tabSearch = new System.Windows.Forms.TabPage();
- this.tabReplace = new System.Windows.Forms.TabPage();
- this.txtSearchString = new System.Windows.Forms.TextBox();
- this.lblSearch = new System.Windows.Forms.Label();
- this.btnFindAll = new System.Windows.Forms.Button();
- this.btnFindNext = new System.Windows.Forms.Button();
- this.lblValue = new System.Windows.Forms.Label();
- this.btnReplaceAll = new System.Windows.Forms.Button();
- this.btnReplace = new System.Windows.Forms.Button();
- this.cmbReplaceWith = new System.Windows.Forms.ComboBox();
- this.txtValue = new System.Windows.Forms.TextBox();
- this.label1 = new System.Windows.Forms.Label();
- this.tabSearchReplace.SuspendLayout();
- this.tabReplace.SuspendLayout();
- this.SuspendLayout();
- //
- // tabSearchReplace
- //
- this.tabSearchReplace.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.tabSearchReplace.Controls.Add(this.tabSearch);
- this.tabSearchReplace.Controls.Add(this.tabReplace);
- this.tabSearchReplace.Location = new System.Drawing.Point(12, 12);
- this.tabSearchReplace.Name = "tabSearchReplace";
- this.tabSearchReplace.SelectedIndex = 0;
- this.tabSearchReplace.Size = new System.Drawing.Size(564, 132);
- this.tabSearchReplace.TabIndex = 0;
- this.tabSearchReplace.SelectedIndexChanged += new System.EventHandler(this.tabSearchReplace_SelectedIndexChanged);
- //
- // tabSearch
- //
- this.tabSearch.Location = new System.Drawing.Point(4, 22);
- this.tabSearch.Name = "tabSearch";
- this.tabSearch.Padding = new System.Windows.Forms.Padding(3);
- this.tabSearch.Size = new System.Drawing.Size(556, 106);
- this.tabSearch.TabIndex = 0;
- this.tabSearch.Text = "Search";
- this.tabSearch.UseVisualStyleBackColor = true;
- //
- // tabReplace
- //
- this.tabReplace.Controls.Add(this.txtSearchString);
- this.tabReplace.Controls.Add(this.lblSearch);
- this.tabReplace.Controls.Add(this.btnFindAll);
- this.tabReplace.Controls.Add(this.btnFindNext);
- this.tabReplace.Controls.Add(this.lblValue);
- this.tabReplace.Controls.Add(this.btnReplaceAll);
- this.tabReplace.Controls.Add(this.btnReplace);
- this.tabReplace.Controls.Add(this.cmbReplaceWith);
- this.tabReplace.Controls.Add(this.txtValue);
- this.tabReplace.Controls.Add(this.label1);
- this.tabReplace.Location = new System.Drawing.Point(4, 22);
- this.tabReplace.Name = "tabReplace";
- this.tabReplace.Padding = new System.Windows.Forms.Padding(3);
- this.tabReplace.Size = new System.Drawing.Size(556, 106);
- this.tabReplace.TabIndex = 1;
- this.tabReplace.Text = "Replace";
- this.tabReplace.UseVisualStyleBackColor = true;
- //
- // txtSearchString
- //
- this.txtSearchString.Location = new System.Drawing.Point(103, 20);
- this.txtSearchString.Name = "txtSearchString";
- this.txtSearchString.Size = new System.Drawing.Size(254, 20);
- this.txtSearchString.TabIndex = 23;
- //
- // lblSearch
- //
- this.lblSearch.AutoSize = true;
- this.lblSearch.Location = new System.Drawing.Point(41, 26);
- this.lblSearch.Name = "lblSearch";
- this.lblSearch.Size = new System.Drawing.Size(56, 13);
- this.lblSearch.TabIndex = 22;
- this.lblSearch.Text = "Search for";
- //
- // btnFindAll
- //
- this.btnFindAll.Location = new System.Drawing.Point(458, 20);
- this.btnFindAll.Name = "btnFindAll";
- this.btnFindAll.Size = new System.Drawing.Size(80, 23);
- this.btnFindAll.TabIndex = 21;
- this.btnFindAll.Text = "Find All";
- this.btnFindAll.UseVisualStyleBackColor = true;
- //
- // btnFindNext
- //
- this.btnFindNext.Location = new System.Drawing.Point(372, 20);
- this.btnFindNext.Name = "btnFindNext";
- this.btnFindNext.Size = new System.Drawing.Size(80, 23);
- this.btnFindNext.TabIndex = 20;
- this.btnFindNext.Text = "Find Next";
- this.btnFindNext.UseVisualStyleBackColor = true;
- //
- // lblValue
- //
- this.lblValue.AutoSize = true;
- this.lblValue.Location = new System.Drawing.Point(64, 76);
- this.lblValue.Name = "lblValue";
- this.lblValue.Size = new System.Drawing.Size(34, 13);
- this.lblValue.TabIndex = 19;
- this.lblValue.Text = "Value";
- //
- // btnReplaceAll
- //
- this.btnReplaceAll.Location = new System.Drawing.Point(458, 47);
- this.btnReplaceAll.Name = "btnReplaceAll";
- this.btnReplaceAll.Size = new System.Drawing.Size(80, 23);
- this.btnReplaceAll.TabIndex = 18;
- this.btnReplaceAll.Text = "Replace All";
- this.btnReplaceAll.UseVisualStyleBackColor = true;
- //
- // btnReplace
- //
- this.btnReplace.Location = new System.Drawing.Point(372, 47);
- this.btnReplace.Name = "btnReplace";
- this.btnReplace.Size = new System.Drawing.Size(80, 23);
- this.btnReplace.TabIndex = 17;
- this.btnReplace.Text = "Replace";
- this.btnReplace.UseVisualStyleBackColor = true;
- //
- // cmbReplaceWith
- //
- this.cmbReplaceWith.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.cmbReplaceWith.FormattingEnabled = true;
- this.cmbReplaceWith.Location = new System.Drawing.Point(103, 46);
- this.cmbReplaceWith.Name = "cmbReplaceWith";
- this.cmbReplaceWith.Size = new System.Drawing.Size(254, 21);
- this.cmbReplaceWith.TabIndex = 16;
- this.cmbReplaceWith.SelectedIndexChanged += new System.EventHandler(this.cmbReplaceWith_SelectedIndexChanged);
- //
- // txtValue
- //
- this.txtValue.Location = new System.Drawing.Point(103, 73);
- this.txtValue.Name = "txtValue";
- this.txtValue.Size = new System.Drawing.Size(254, 20);
- this.txtValue.TabIndex = 15;
- //
- // label1
- //
- this.label1.AutoSize = true;
- this.label1.Location = new System.Drawing.Point(28, 49);
- this.label1.Name = "label1";
- this.label1.Size = new System.Drawing.Size(69, 13);
- this.label1.TabIndex = 14;
- this.label1.Text = "Replace with";
- //
- // FindAndReplaceDialog
- //
- this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
- this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(588, 156);
- this.Controls.Add(this.tabSearchReplace);
- this.MaximizeBox = false;
- this.MinimizeBox = false;
- this.Name = "FindAndReplaceDialog";
- this.ShowIcon = false;
- this.ShowInTaskbar = false;
- this.Text = "Find and Replace";
- this.tabSearchReplace.ResumeLayout(false);
- this.tabReplace.ResumeLayout(false);
- this.tabReplace.PerformLayout();
- this.ResumeLayout(false);
-
- }
-
- #endregion
-
- private System.Windows.Forms.TabControl tabSearchReplace;
- private System.Windows.Forms.TabPage tabSearch;
- private System.Windows.Forms.TabPage tabReplace;
- private System.Windows.Forms.TextBox txtSearchString;
- private System.Windows.Forms.Label lblSearch;
- private System.Windows.Forms.Button btnFindAll;
- private System.Windows.Forms.Button btnFindNext;
- private System.Windows.Forms.Label lblValue;
- private System.Windows.Forms.Button btnReplaceAll;
- private System.Windows.Forms.Button btnReplace;
- private System.Windows.Forms.ComboBox cmbReplaceWith;
- private System.Windows.Forms.TextBox txtValue;
- private System.Windows.Forms.Label label1;
- }
-}
Index: anches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/FindAndReplaceDialog.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/FindAndReplaceDialog.cs (revision 10761)
+++ (revision )
@@ -1,84 +1,0 @@
-using System;
-using System.Collections.Generic;
-using System.Windows.Forms;
-
-namespace HeuristicLab.DataPreprocessing.Views {
- public enum ReplaceAction {
- Value,
- Average,
- Median,
- Random,
- MostCommon,
- Interpolation
- }
-
- public partial class FindAndReplaceDialog : Form {
- private string[] cmbItemsText = { "Value", "Average", "Median", "Random", "Most Common", "Interpolation" };
-
- public FindAndReplaceDialog() {
- InitializeComponent();
- cmbReplaceWith.Items.AddRange(cmbItemsText);
- cmbReplaceWith.SelectedIndex = (int)ReplaceAction.Value;
- }
-
- public void ActivateSearch() {
- tabSearchReplace.SelectTab(tabSearch);
- AddControlsToCurrentTab();
- }
-
- public void ActivateReplace() {
- tabSearchReplace.SelectTab(tabReplace);
- AddControlsToCurrentTab();
- }
-
- private void tabSearchReplace_SelectedIndexChanged(object sender, System.EventArgs e) {
- AddControlsToCurrentTab();
- }
-
- private void cmbReplaceWith_SelectedIndexChanged(object sender, System.EventArgs e) {
- lblValue.Visible = txtValue.Visible = cmbReplaceWith.SelectedIndex == (int)ReplaceAction.Value;
- }
-
- private void AddControlsToCurrentTab() {
- tabSearchReplace.SelectedTab.Controls.Add(btnFindAll);
- tabSearchReplace.SelectedTab.Controls.Add(btnFindNext);
- tabSearchReplace.SelectedTab.Controls.Add(lblSearch);
- tabSearchReplace.SelectedTab.Controls.Add(txtSearchString);
- ActiveControl = txtSearchString;
- AcceptButton = btnFindNext;
- }
-
- public String GetSearchText() {
- return txtSearchString.Text;
- }
-
- public string GetReplaceText() {
- return txtValue.Text;
- }
-
- public ReplaceAction GetReplaceAction() {
- return (ReplaceAction)cmbReplaceWith.SelectedIndex;
- }
-
- public event EventHandler FindAllEvent {
- add { btnFindAll.Click += value; }
- remove { btnFindAll.Click -= value; }
- }
-
- public event EventHandler FindNextEvent {
- add { btnFindNext.Click += value; }
- remove { btnFindNext.Click -= value; }
- }
-
- public event EventHandler ReplaceAllEvent {
- add { btnReplaceAll.Click += value; }
- remove { btnReplaceAll.Click -= value; }
- }
-
- public event EventHandler ReplaceNextEvent {
- add { btnReplace.Click += value; }
- remove { btnReplace.Click -= value; }
- }
-
- }
-}
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HeuristicLab.DataPreprocessing.Views-3.3.csproj
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HeuristicLab.DataPreprocessing.Views-3.3.csproj (revision 10761)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HeuristicLab.DataPreprocessing.Views-3.3.csproj (revision 10762)
@@ -89,9 +89,9 @@
FilterView.cs
-
+
Form
-
- FindAndReplaceDialog.cs
+
+ SearchAndReplaceDialog.cs
@@ -242,4 +242,9 @@
HeuristicLab.Visualization.ChartControlsExtensions-3.3
+
+
+
+ DataGridContentView.cs
+
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/SearchAndReplaceDialog.Designer.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/SearchAndReplaceDialog.Designer.cs (revision 10762)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/SearchAndReplaceDialog.Designer.cs (revision 10762)
@@ -0,0 +1,209 @@
+namespace HeuristicLab.DataPreprocessing.Views {
+ partial class SearchAndReplaceDialog {
+ ///
+ /// Required designer variable.
+ ///
+ private System.ComponentModel.IContainer components = null;
+
+ ///
+ /// Clean up any resources being used.
+ ///
+ /// true if managed resources should be disposed; otherwise, false.
+ protected override void Dispose(bool disposing) {
+ if (disposing && (components != null)) {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ ///
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ ///
+ private void InitializeComponent() {
+ this.tabSearchReplace = new System.Windows.Forms.TabControl();
+ this.tabSearch = new System.Windows.Forms.TabPage();
+ this.tabReplace = new System.Windows.Forms.TabPage();
+ this.txtSearchString = new System.Windows.Forms.TextBox();
+ this.lblSearch = new System.Windows.Forms.Label();
+ this.btnFindAll = new System.Windows.Forms.Button();
+ this.btnFindNext = new System.Windows.Forms.Button();
+ this.lblValue = new System.Windows.Forms.Label();
+ this.btnReplaceAll = new System.Windows.Forms.Button();
+ this.btnReplace = new System.Windows.Forms.Button();
+ this.cmbReplaceWith = new System.Windows.Forms.ComboBox();
+ this.txtValue = new System.Windows.Forms.TextBox();
+ this.label1 = new System.Windows.Forms.Label();
+ this.tabSearchReplace.SuspendLayout();
+ this.tabReplace.SuspendLayout();
+ this.SuspendLayout();
+ //
+ // tabSearchReplace
+ //
+ this.tabSearchReplace.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Left)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.tabSearchReplace.Controls.Add(this.tabSearch);
+ this.tabSearchReplace.Controls.Add(this.tabReplace);
+ this.tabSearchReplace.Location = new System.Drawing.Point(12, 12);
+ this.tabSearchReplace.Name = "tabSearchReplace";
+ this.tabSearchReplace.SelectedIndex = 0;
+ this.tabSearchReplace.Size = new System.Drawing.Size(564, 132);
+ this.tabSearchReplace.TabIndex = 0;
+ this.tabSearchReplace.SelectedIndexChanged += new System.EventHandler(this.tabSearchReplace_SelectedIndexChanged);
+ //
+ // tabSearch
+ //
+ this.tabSearch.Location = new System.Drawing.Point(4, 22);
+ this.tabSearch.Name = "tabSearch";
+ this.tabSearch.Padding = new System.Windows.Forms.Padding(3);
+ this.tabSearch.Size = new System.Drawing.Size(556, 106);
+ this.tabSearch.TabIndex = 0;
+ this.tabSearch.Text = "Search";
+ this.tabSearch.UseVisualStyleBackColor = true;
+ //
+ // tabReplace
+ //
+ this.tabReplace.Controls.Add(this.txtSearchString);
+ this.tabReplace.Controls.Add(this.lblSearch);
+ this.tabReplace.Controls.Add(this.btnFindAll);
+ this.tabReplace.Controls.Add(this.btnFindNext);
+ this.tabReplace.Controls.Add(this.lblValue);
+ this.tabReplace.Controls.Add(this.btnReplaceAll);
+ this.tabReplace.Controls.Add(this.btnReplace);
+ this.tabReplace.Controls.Add(this.cmbReplaceWith);
+ this.tabReplace.Controls.Add(this.txtValue);
+ this.tabReplace.Controls.Add(this.label1);
+ this.tabReplace.Location = new System.Drawing.Point(4, 22);
+ this.tabReplace.Name = "tabReplace";
+ this.tabReplace.Padding = new System.Windows.Forms.Padding(3);
+ this.tabReplace.Size = new System.Drawing.Size(556, 106);
+ this.tabReplace.TabIndex = 1;
+ this.tabReplace.Text = "Replace";
+ this.tabReplace.UseVisualStyleBackColor = true;
+ //
+ // txtSearchString
+ //
+ this.txtSearchString.Location = new System.Drawing.Point(103, 20);
+ this.txtSearchString.Name = "txtSearchString";
+ this.txtSearchString.Size = new System.Drawing.Size(254, 20);
+ this.txtSearchString.TabIndex = 23;
+ //
+ // lblSearch
+ //
+ this.lblSearch.AutoSize = true;
+ this.lblSearch.Location = new System.Drawing.Point(41, 26);
+ this.lblSearch.Name = "lblSearch";
+ this.lblSearch.Size = new System.Drawing.Size(56, 13);
+ this.lblSearch.TabIndex = 22;
+ this.lblSearch.Text = "Search for";
+ //
+ // btnFindAll
+ //
+ this.btnFindAll.Location = new System.Drawing.Point(458, 20);
+ this.btnFindAll.Name = "btnFindAll";
+ this.btnFindAll.Size = new System.Drawing.Size(80, 23);
+ this.btnFindAll.TabIndex = 21;
+ this.btnFindAll.Text = "Find All";
+ this.btnFindAll.UseVisualStyleBackColor = true;
+ //
+ // btnFindNext
+ //
+ this.btnFindNext.Location = new System.Drawing.Point(372, 20);
+ this.btnFindNext.Name = "btnFindNext";
+ this.btnFindNext.Size = new System.Drawing.Size(80, 23);
+ this.btnFindNext.TabIndex = 20;
+ this.btnFindNext.Text = "Find Next";
+ this.btnFindNext.UseVisualStyleBackColor = true;
+ //
+ // lblValue
+ //
+ this.lblValue.AutoSize = true;
+ this.lblValue.Location = new System.Drawing.Point(64, 76);
+ this.lblValue.Name = "lblValue";
+ this.lblValue.Size = new System.Drawing.Size(34, 13);
+ this.lblValue.TabIndex = 19;
+ this.lblValue.Text = "Value";
+ //
+ // btnReplaceAll
+ //
+ this.btnReplaceAll.Location = new System.Drawing.Point(458, 47);
+ this.btnReplaceAll.Name = "btnReplaceAll";
+ this.btnReplaceAll.Size = new System.Drawing.Size(80, 23);
+ this.btnReplaceAll.TabIndex = 18;
+ this.btnReplaceAll.Text = "Replace All";
+ this.btnReplaceAll.UseVisualStyleBackColor = true;
+ //
+ // btnReplace
+ //
+ this.btnReplace.Location = new System.Drawing.Point(372, 47);
+ this.btnReplace.Name = "btnReplace";
+ this.btnReplace.Size = new System.Drawing.Size(80, 23);
+ this.btnReplace.TabIndex = 17;
+ this.btnReplace.Text = "Replace";
+ this.btnReplace.UseVisualStyleBackColor = true;
+ //
+ // cmbReplaceWith
+ //
+ this.cmbReplaceWith.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.cmbReplaceWith.FormattingEnabled = true;
+ this.cmbReplaceWith.Location = new System.Drawing.Point(103, 46);
+ this.cmbReplaceWith.Name = "cmbReplaceWith";
+ this.cmbReplaceWith.Size = new System.Drawing.Size(254, 21);
+ this.cmbReplaceWith.TabIndex = 16;
+ this.cmbReplaceWith.SelectedIndexChanged += new System.EventHandler(this.cmbReplaceWith_SelectedIndexChanged);
+ //
+ // txtValue
+ //
+ this.txtValue.Location = new System.Drawing.Point(103, 73);
+ this.txtValue.Name = "txtValue";
+ this.txtValue.Size = new System.Drawing.Size(254, 20);
+ this.txtValue.TabIndex = 15;
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(28, 49);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(69, 13);
+ this.label1.TabIndex = 14;
+ this.label1.Text = "Replace with";
+ //
+ // SearchAndReplaceDialog
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.ClientSize = new System.Drawing.Size(588, 156);
+ this.Controls.Add(this.tabSearchReplace);
+ this.MaximizeBox = false;
+ this.MinimizeBox = false;
+ this.Name = "SearchAndReplaceDialog";
+ this.ShowIcon = false;
+ this.ShowInTaskbar = false;
+ this.Text = "Search and Replace";
+ this.tabSearchReplace.ResumeLayout(false);
+ this.tabReplace.ResumeLayout(false);
+ this.tabReplace.PerformLayout();
+ this.ResumeLayout(false);
+
+ }
+
+ #endregion
+
+ private System.Windows.Forms.TabControl tabSearchReplace;
+ private System.Windows.Forms.TabPage tabSearch;
+ private System.Windows.Forms.TabPage tabReplace;
+ private System.Windows.Forms.TextBox txtSearchString;
+ private System.Windows.Forms.Label lblSearch;
+ private System.Windows.Forms.Button btnFindAll;
+ private System.Windows.Forms.Button btnFindNext;
+ private System.Windows.Forms.Label lblValue;
+ private System.Windows.Forms.Button btnReplaceAll;
+ private System.Windows.Forms.Button btnReplace;
+ private System.Windows.Forms.ComboBox cmbReplaceWith;
+ private System.Windows.Forms.TextBox txtValue;
+ private System.Windows.Forms.Label label1;
+ }
+}
Index: /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/SearchAndReplaceDialog.cs
===================================================================
--- /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/SearchAndReplaceDialog.cs (revision 10762)
+++ /branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/SearchAndReplaceDialog.cs (revision 10762)
@@ -0,0 +1,84 @@
+using System;
+using System.Collections.Generic;
+using System.Windows.Forms;
+
+namespace HeuristicLab.DataPreprocessing.Views {
+ public enum ReplaceAction {
+ Value,
+ Average,
+ Median,
+ Random,
+ MostCommon,
+ Interpolation
+ }
+
+ public partial class SearchAndReplaceDialog : Form {
+ private string[] cmbItemsText = { "Value", "Average", "Median", "Random", "Most Common", "Interpolation" };
+
+ public SearchAndReplaceDialog() {
+ InitializeComponent();
+ cmbReplaceWith.Items.AddRange(cmbItemsText);
+ cmbReplaceWith.SelectedIndex = (int)ReplaceAction.Value;
+ }
+
+ public void ActivateSearch() {
+ tabSearchReplace.SelectTab(tabSearch);
+ AddControlsToCurrentTab();
+ }
+
+ public void ActivateReplace() {
+ tabSearchReplace.SelectTab(tabReplace);
+ AddControlsToCurrentTab();
+ }
+
+ private void tabSearchReplace_SelectedIndexChanged(object sender, System.EventArgs e) {
+ AddControlsToCurrentTab();
+ }
+
+ private void cmbReplaceWith_SelectedIndexChanged(object sender, System.EventArgs e) {
+ lblValue.Visible = txtValue.Visible = cmbReplaceWith.SelectedIndex == (int)ReplaceAction.Value;
+ }
+
+ private void AddControlsToCurrentTab() {
+ tabSearchReplace.SelectedTab.Controls.Add(btnFindAll);
+ tabSearchReplace.SelectedTab.Controls.Add(btnFindNext);
+ tabSearchReplace.SelectedTab.Controls.Add(lblSearch);
+ tabSearchReplace.SelectedTab.Controls.Add(txtSearchString);
+ ActiveControl = txtSearchString;
+ AcceptButton = btnFindNext;
+ }
+
+ public String GetSearchText() {
+ return txtSearchString.Text;
+ }
+
+ public string GetReplaceText() {
+ return txtValue.Text;
+ }
+
+ public ReplaceAction GetReplaceAction() {
+ return (ReplaceAction)cmbReplaceWith.SelectedIndex;
+ }
+
+ public event EventHandler FindAllEvent {
+ add { btnFindAll.Click += value; }
+ remove { btnFindAll.Click -= value; }
+ }
+
+ public event EventHandler FindNextEvent {
+ add { btnFindNext.Click += value; }
+ remove { btnFindNext.Click -= value; }
+ }
+
+ public event EventHandler ReplaceAllEvent {
+ add { btnReplaceAll.Click += value; }
+ remove { btnReplaceAll.Click -= value; }
+ }
+
+ public event EventHandler ReplaceNextEvent {
+ add { btnReplace.Click += value; }
+ remove { btnReplace.Click -= value; }
+ }
+
+ }
+}