- Timestamp:
- 03/26/14 10:52:55 (11 years ago)
- Location:
- branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3
- Files:
-
- 4 added
- 1 deleted
- 2 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataPreprocessingView.cs
r10636 r10658 50 50 var manipulationLogic = new ManipulationLogic(data, searchLogic, statisticsLogic); 51 51 var transformationLogic = new TransformationLogic(data, searchLogic, statisticsLogic); 52 var lineChartLogic = new LineChartLogic(data);53 var histogramLogic = new HistogramLogic(data);52 var lineChartLogic = new ChartLogic(data); 53 var histogramLogic = new ChartLogic(data); 54 54 var filterLogic = new FilterLogic(data); 55 55 -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HeuristicLab.DataPreprocessing.Views-3.3.csproj
r10657 r10658 91 91 <DependentUpon>FindAndReplaceDialog.cs</DependentUpon> 92 92 </Compile> 93 <Compile Include="HistogramView.cs"> 94 <SubType>UserControl</SubType> 95 </Compile> 93 <Compile Include="HistogramView.cs" /> 96 94 <Compile Include="HistogramView.Designer.cs"> 97 95 <DependentUpon>HistogramView.cs</DependentUpon> 98 96 </Compile> 99 <Compile Include="LineChartView.cs"> 100 <SubType>UserControl</SubType> 101 </Compile> 97 <Compile Include="LineChartView.cs" /> 102 98 <Compile Include="LineChartView.Designer.cs"> 103 99 <DependentUpon>LineChartView.cs</DependentUpon> 104 100 </Compile> 105 101 <Compile Include="Plugin.cs" /> 102 <Compile Include="PreprocessingChartView.cs" /> 103 <Compile Include="PreprocessingChartView.Designer.cs"> 104 <DependentUpon>PreprocessingChartView.cs</DependentUpon> 105 </Compile> 106 106 <Compile Include="PreprocessingCheckedItemListView.cs"> 107 107 <SubType>UserControl</SubType> … … 220 220 <Name>HeuristicLab.Visualization.ChartControlsExtensions-3.3</Name> 221 221 </ProjectReference> 222 </ItemGroup>223 <ItemGroup>224 <EmbeddedResource Include="DataPreprocessingView.resx">225 <DependentUpon>DataPreprocessingView.cs</DependentUpon>226 </EmbeddedResource>227 222 </ItemGroup> 228 223 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingChartView.Designer.cs
r10657 r10658 22 22 using HeuristicLab.Data; 23 23 namespace HeuristicLab.DataPreprocessing.Views { 24 partial class LineChartView {24 partial class PreprocessingChartView { 25 25 /// <summary> 26 26 /// Required designer variable. … … 46 46 /// </summary> 47 47 private void InitializeComponent() { 48 this.viewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();49 this.groupBoxOptions = new System.Windows.Forms.GroupBox();50 48 this.checkedItemList = new HeuristicLab.DataPreprocessing.Views.PreprocessingCheckedItemListView(); 49 this.chartPanel = new System.Windows.Forms.Panel(); 50 this.dataTableView = new HeuristicLab.Analysis.Views.DataTableView(); 51 this.chartPanel.SuspendLayout(); 51 52 this.SuspendLayout(); 52 //53 // viewHost54 //55 this.viewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)56 | System.Windows.Forms.AnchorStyles.Left)57 | System.Windows.Forms.AnchorStyles.Right)));58 this.viewHost.Caption = "View";59 this.viewHost.Content = null;60 this.viewHost.Enabled = false;61 this.viewHost.Location = new System.Drawing.Point(162, 4);62 this.viewHost.Name = "viewHost";63 this.viewHost.ReadOnly = false;64 this.viewHost.Size = new System.Drawing.Size(489, 396);65 this.viewHost.TabIndex = 0;66 this.viewHost.ViewsLabelVisible = true;67 this.viewHost.ViewType = null;68 //69 // groupBoxOptions70 //71 this.groupBoxOptions.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));72 this.groupBoxOptions.Location = new System.Drawing.Point(4, 262);73 this.groupBoxOptions.Name = "groupBoxOptions";74 this.groupBoxOptions.Size = new System.Drawing.Size(152, 138);75 this.groupBoxOptions.TabIndex = 3;76 this.groupBoxOptions.TabStop = false;77 this.groupBoxOptions.Text = "Options";78 53 // 79 54 // checkedItemList … … 89 64 this.checkedItemList.TabIndex = 4; 90 65 // 66 // chartPanel 67 // 68 this.chartPanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 69 | System.Windows.Forms.AnchorStyles.Left) 70 | System.Windows.Forms.AnchorStyles.Right))); 71 this.chartPanel.Controls.Add(this.dataTableView); 72 this.chartPanel.Location = new System.Drawing.Point(163, 4); 73 this.chartPanel.Name = "chartPanel"; 74 this.chartPanel.Size = new System.Drawing.Size(488, 396); 75 this.chartPanel.TabIndex = 5; 76 // 77 // dataTableView 78 // 79 this.dataTableView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 80 | System.Windows.Forms.AnchorStyles.Left) 81 | System.Windows.Forms.AnchorStyles.Right))); 82 this.dataTableView.Caption = "DataTable View"; 83 this.dataTableView.Content = null; 84 this.dataTableView.Location = new System.Drawing.Point(3, 3); 85 this.dataTableView.Name = "dataTableView"; 86 this.dataTableView.ReadOnly = false; 87 this.dataTableView.Size = new System.Drawing.Size(482, 390); 88 this.dataTableView.TabIndex = 0; 89 // 91 90 // LineChartView 92 91 // 93 92 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 94 93 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 94 this.Controls.Add(this.chartPanel); 95 95 this.Controls.Add(this.checkedItemList); 96 this.Controls.Add(this.groupBoxOptions);97 this.Controls.Add(this.viewHost);98 96 this.Name = "LineChartView"; 99 97 this.Size = new System.Drawing.Size(654, 403); 98 this.chartPanel.ResumeLayout(false); 100 99 this.ResumeLayout(false); 101 100 … … 104 103 #endregion 105 104 106 private MainForm.WindowsForms.ViewHost viewHost;107 private System.Windows.Forms.GroupBox groupBoxOptions;108 105 private PreprocessingCheckedItemListView checkedItemList; 106 private System.Windows.Forms.Panel chartPanel; 107 private Analysis.Views.DataTableView dataTableView; 109 108 } 110 109 } -
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/PreprocessingChartView.cs
r10633 r10658 30 30 namespace HeuristicLab.DataPreprocessing.Views { 31 31 32 [View(" LineChart View")]33 [Content(typeof( LineChartContent), false)]34 public partial class LineChartView : ItemView {32 [View("Preprocessing Chart View")] 33 [Content(typeof(PreprocessingChartContent), false)] 34 public partial class PreprocessingChartView : ItemView { 35 35 36 private I LineChartLogic logic;36 private IChartLogic logic; 37 37 private DataTable dataTable; 38 private ICheckedItemList<StringValue> itemList; 39 private const string LINE_CHART_TITLE = "LineChart"; 38 private ICheckedItemList<StringValue> variableItemList; 39 protected DataRowVisualProperties.DataRowChartType chartType; 40 protected string chartTitle; 40 41 41 public LineChartView() { 42 private const string DEFAULT_CHART_TITLE = "Chart"; 43 44 45 public PreprocessingChartView() { 42 46 InitializeComponent(); 47 chartType = DataRowVisualProperties.DataRowChartType.Line; 48 chartTitle = DEFAULT_CHART_TITLE; 43 49 } 44 50 … … 50 56 dataTable.Rows.Remove(variableName); 51 57 } else { 52 dataTable.Rows.Add(logic.CreateDataRow(variableName ));58 dataTable.Rows.Add(logic.CreateDataRow(variableName, chartType)); 53 59 } 54 60 } … … 65 71 66 72 private void InitDataTable() { 67 dataTable = logic.CreateDataTable( LINE_CHART_TITLE);68 viewHost.Content = dataTable;73 dataTable = logic.CreateDataTable(chartTitle, chartType); 74 dataTableView.Content = dataTable; 69 75 } 70 76 71 77 private void InitVariablesListBox() { 72 itemList = logic.CreateVariableItemList();73 checkedItemList.Content = itemList;78 variableItemList = logic.CreateVariableItemList(); 79 checkedItemList.Content = variableItemList; 74 80 } 75 81 … … 85 91 86 92 void Content_Changed(object sender, DataPreprocessingChangedEventArgs e) { 87 viewHost.Refresh();93 dataTableView.Refresh(); 88 94 } 89 95 90 public new LineChartContent Content {91 get { return ( LineChartContent)base.Content; }96 public new PreprocessingChartContent Content { 97 get { return (PreprocessingChartContent)base.Content; } 92 98 set { base.Content = value; } 93 99 } … … 96 102 base.OnContentChanged(); 97 103 if (Content != null) { 98 logic = Content. LineChartLogic;104 logic = Content.ChartLogic; 99 105 InitDataTable(); 100 106 InitVariablesListBox(); 101 itemList.CheckedItemsChanged += CheckedItemsChanged;107 variableItemList.CheckedItemsChanged += CheckedItemsChanged; 102 108 logic.Changed += PreprocessingData_Changed; 103 109 } … … 116 122 case DataPreprocessingChangedEventType.ChangeItem: 117 123 dataTable.Rows.Remove(logic.GetVariableNameByIndex(e.Column)); 118 dataTable.Rows.Add(logic.CreateDataRow( (logic.GetVariableNameByIndex(e.Column))));124 dataTable.Rows.Add(logic.CreateDataRow(logic.GetVariableNameByIndex(e.Column),chartType)); 119 125 break; 120 126 case DataPreprocessingChangedEventType.DeleteRow: … … 127 133 // add variable to data table and item list 128 134 private void AddVariable(string name) { 129 dataTable.Rows.Add(logic.CreateDataRow(name ));130 itemList.Add(new StringValue(name));135 dataTable.Rows.Add(logic.CreateDataRow(name, chartType)); 136 variableItemList.Add(new StringValue(name)); 131 137 } 132 138 … … 137 143 StringValue stringValue = FindVariableItemList(name); 138 144 if (stringValue != null) 139 itemList.Remove(stringValue);145 variableItemList.Remove(stringValue); 140 146 141 147 } 142 148 143 149 private StringValue FindVariableItemList(string name) { 144 foreach (StringValue stringValue in itemList) {150 foreach (StringValue stringValue in variableItemList) { 145 151 if (stringValue.Value == name) 146 152 return stringValue;
Note: See TracChangeset
for help on using the changeset viewer.