[983] | 1 | using System;
|
---|
[869] | 2 | using System.Drawing;
|
---|
[1326] | 3 | using System.Threading;
|
---|
[861] | 4 | using NUnit.Framework;
|
---|
| 5 |
|
---|
| 6 | namespace HeuristicLab.Visualization.Test {
|
---|
| 7 | [TestFixture]
|
---|
| 8 | public class LineChartTests {
|
---|
[1038] | 9 | private ChartDataRowsModel model;
|
---|
| 10 |
|
---|
| 11 | [SetUp]
|
---|
| 12 | public void SetUp() {
|
---|
| 13 | model = new ChartDataRowsModel();
|
---|
| 14 | }
|
---|
| 15 |
|
---|
[861] | 16 | [Test]
|
---|
| 17 | public void TestLineChart() {
|
---|
[1038] | 18 | LineChartTestForm f = new LineChartTestForm(model);
|
---|
[861] | 19 |
|
---|
[869] | 20 | IDataRow row1 = new DataRow();
|
---|
| 21 | IDataRow row2 = new DataRow();
|
---|
| 22 | IDataRow row3 = new DataRow();
|
---|
[861] | 23 |
|
---|
[869] | 24 | row1.Color = Color.Red;
|
---|
| 25 | row2.Color = Color.Green;
|
---|
| 26 | row3.Color = Color.Blue;
|
---|
[861] | 27 |
|
---|
[869] | 28 | row1.Thickness = 3;
|
---|
| 29 | row2.Thickness = 4;
|
---|
| 30 | row3.Thickness = 5;
|
---|
| 31 |
|
---|
[1049] | 32 | row1.Label = "Simon";
|
---|
| 33 | row2.Label = "Gertschi";
|
---|
| 34 | row3.Label = "Maxi";
|
---|
| 35 |
|
---|
[980] | 36 | row1.Style = DrawingStyle.Solid;
|
---|
| 37 | row2.Style = DrawingStyle.Solid;
|
---|
| 38 | row3.Style = DrawingStyle.Dashed;
|
---|
| 39 |
|
---|
| 40 |
|
---|
[1038] | 41 | model.AddDataRow(row1);
|
---|
| 42 | model.AddDataRow(row2);
|
---|
| 43 | model.AddDataRow(row3);
|
---|
[869] | 44 |
|
---|
| 45 | row1.AddValue(10);
|
---|
| 46 | row1.AddValue(5);
|
---|
| 47 | row1.AddValue(7);
|
---|
| 48 | row1.AddValue(3);
|
---|
| 49 | row1.AddValue(10);
|
---|
| 50 | row1.AddValue(2);
|
---|
| 51 |
|
---|
| 52 | row2.AddValue(5);
|
---|
| 53 | row2.AddValue(6);
|
---|
| 54 | row2.AddValue(5);
|
---|
| 55 |
|
---|
| 56 | row3.AddValue(2);
|
---|
| 57 | row3.AddValue(2);
|
---|
| 58 | row3.AddValue(2);
|
---|
| 59 | row3.AddValue(2);
|
---|
| 60 | row3.AddValue(2);
|
---|
| 61 |
|
---|
[983] | 62 | Random rand = new Random();
|
---|
| 63 |
|
---|
[1038] | 64 | for (int i = 0; i < 10000; i++) {
|
---|
[983] | 65 | row1.AddValue(rand.NextDouble()*10);
|
---|
| 66 | row2.AddValue(rand.NextDouble()*10);
|
---|
| 67 | row3.AddValue(rand.NextDouble()*10);
|
---|
| 68 | }
|
---|
| 69 |
|
---|
[861] | 70 | f.ShowDialog();
|
---|
| 71 | }
|
---|
[983] | 72 |
|
---|
| 73 | [Test]
|
---|
| 74 | public void TestAxes() {
|
---|
[1038] | 75 | LineChartTestForm f = new LineChartTestForm(model);
|
---|
[983] | 76 |
|
---|
| 77 | IDataRow row1 = new DataRow();
|
---|
[1285] | 78 | IDataRow row2 = new DataRow();
|
---|
[1350] | 79 | IDataRow row3 = new DataRow();
|
---|
[983] | 80 |
|
---|
[1387] | 81 | YAxisDescriptor yaxis1 = model.DefaultYAxis;
|
---|
| 82 | YAxisDescriptor yaxis2 = new YAxisDescriptor();
|
---|
| 83 |
|
---|
| 84 | yaxis1.Label = "Y-Axis 1";
|
---|
| 85 | yaxis2.Label = "Y-Axis 2";
|
---|
| 86 |
|
---|
[983] | 87 | row1.Color = Color.Red;
|
---|
| 88 | row1.Thickness = 3;
|
---|
| 89 | row1.Style = DrawingStyle.Solid;
|
---|
[1343] | 90 | row1.Label = "Die Rote";
|
---|
[983] | 91 |
|
---|
[1285] | 92 | row2.Color = Color.Green;
|
---|
| 93 | row2.Thickness = 3;
|
---|
| 94 | row2.Style = DrawingStyle.Solid;
|
---|
[1343] | 95 | row2.Label = "Die Grüne";
|
---|
[1285] | 96 |
|
---|
[1350] | 97 | row3.Color = Color.Blue;
|
---|
| 98 | row3.Thickness = 3;
|
---|
| 99 | row3.Style = DrawingStyle.Solid;
|
---|
| 100 | row3.Label = "Die Blaue";
|
---|
[1387] | 101 | row3.YAxis = yaxis2;
|
---|
[1350] | 102 |
|
---|
[1038] | 103 | model.AddDataRow(row1);
|
---|
[1285] | 104 | model.AddDataRow(row2);
|
---|
[1350] | 105 | model.AddDataRow(row3);
|
---|
[983] | 106 |
|
---|
[1285] | 107 | Random rand = new Random(42);
|
---|
[1350] | 108 |
|
---|
[1285] | 109 | for (int i = 0; i < 10; i++) {
|
---|
| 110 | row1.AddValue(rand.NextDouble()*10);
|
---|
| 111 | row2.AddValue(rand.NextDouble()*10);
|
---|
[1350] | 112 | row3.AddValue(rand.NextDouble()*1);
|
---|
[1285] | 113 | }
|
---|
[983] | 114 |
|
---|
[1350] | 115 | f.AddValue += delegate {
|
---|
| 116 | row1.AddValue(rand.NextDouble()*10);
|
---|
| 117 | row2.AddValue(rand.NextDouble()*10);
|
---|
| 118 | row3.AddValue(rand.NextDouble()*1);
|
---|
| 119 | };
|
---|
| 120 |
|
---|
[983] | 121 | f.ShowDialog();
|
---|
| 122 | }
|
---|
[1040] | 123 |
|
---|
| 124 | [Test]
|
---|
[1326] | 125 | public void TestAggregator() {
|
---|
| 126 | LineChartTestForm f = new LineChartTestForm(model);
|
---|
| 127 |
|
---|
| 128 | IDataRow row1 = new DataRow();
|
---|
| 129 | row1.Label = "row";
|
---|
| 130 | row1.Color = Color.Red;
|
---|
| 131 | row1.Thickness = 3;
|
---|
| 132 | row1.Style = DrawingStyle.Solid;
|
---|
| 133 |
|
---|
| 134 | model.AddDataRow(row1);
|
---|
| 135 |
|
---|
| 136 |
|
---|
[1350] | 137 | MinAggregator aggregator = new MinAggregator();
|
---|
[1326] | 138 | aggregator.Label = "MinAggregator";
|
---|
| 139 | aggregator.Color = Color.Pink;
|
---|
| 140 | aggregator.Thickness = 5;
|
---|
| 141 | aggregator.Style = DrawingStyle.Solid;
|
---|
| 142 | aggregator.AddValue(2);
|
---|
| 143 | aggregator.LineType = DataRowType.SingleValue;
|
---|
| 144 |
|
---|
| 145 | IDataRow lineTest = new DataRow("testline");
|
---|
| 146 | lineTest.Color = Color.DarkSalmon;
|
---|
| 147 | lineTest.Thickness = 2;
|
---|
| 148 | lineTest.Style = DrawingStyle.Dashed;
|
---|
| 149 | lineTest.LineType = DataRowType.SingleValue;
|
---|
| 150 | model.AddDataRow(lineTest);
|
---|
| 151 | lineTest.AddValue(9);
|
---|
| 152 | lineTest.AddValue(2);
|
---|
| 153 | lineTest.AddValue(3);
|
---|
| 154 | lineTest.AddValue(4);
|
---|
| 155 |
|
---|
| 156 | aggregator.AddWatch(row1);
|
---|
| 157 |
|
---|
| 158 | model.AddDataRow(aggregator);
|
---|
| 159 |
|
---|
| 160 |
|
---|
| 161 | row1.AddValue(10);
|
---|
| 162 | row1.AddValue(5);
|
---|
| 163 | row1.AddValue(7);
|
---|
| 164 | row1.AddValue(3);
|
---|
| 165 | row1.AddValue(10);
|
---|
| 166 | row1.AddValue(2);
|
---|
| 167 |
|
---|
| 168 | f.ShowDialog();
|
---|
| 169 | }
|
---|
| 170 |
|
---|
| 171 |
|
---|
| 172 | public class Worker {
|
---|
| 173 | // This method will be called when the thread is started.
|
---|
| 174 | private ChartDataRowsModel model;
|
---|
| 175 | public Worker(ChartDataRowsModel model) {
|
---|
| 176 | this.model = model;
|
---|
| 177 | }
|
---|
| 178 |
|
---|
[1386] | 179 | public void DoWorkMultiLine() {
|
---|
[1326] | 180 |
|
---|
| 181 | IDataRow row1 = new DataRow();
|
---|
| 182 | row1.Color = Color.Red;
|
---|
| 183 | row1.Thickness = 2;
|
---|
[1386] | 184 | row1.Label = "Sinus";
|
---|
[1326] | 185 | row1.Style = DrawingStyle.Solid;
|
---|
| 186 | model.AddDataRow(row1);
|
---|
| 187 |
|
---|
| 188 | IDataRow row2 = new DataRow();
|
---|
| 189 | row2.Color = Color.Red;
|
---|
| 190 | row2.Thickness = 3;
|
---|
[1386] | 191 | row2.Label = "Growing";
|
---|
[1326] | 192 | row2.Style = DrawingStyle.Solid;
|
---|
| 193 | model.AddDataRow(row2);
|
---|
| 194 |
|
---|
[1350] | 195 | AvgAggregator multiAvgAggregator = new AvgAggregator();
|
---|
[1326] | 196 | multiAvgAggregator.Label = "MultiAvgAggregator";
|
---|
| 197 | multiAvgAggregator.Color = Color.DarkOliveGreen;
|
---|
| 198 | multiAvgAggregator.Thickness = 3;
|
---|
| 199 | multiAvgAggregator.Style = DrawingStyle.Solid;
|
---|
| 200 | multiAvgAggregator.LineType = DataRowType.SingleValue;
|
---|
| 201 | multiAvgAggregator.AddWatch(row1);
|
---|
| 202 | multiAvgAggregator.AddWatch(row2);
|
---|
| 203 | model.AddDataRow(multiAvgAggregator);
|
---|
| 204 |
|
---|
[1350] | 205 | MaxAggregator multiMaxAggregator = new MaxAggregator();
|
---|
[1326] | 206 | multiMaxAggregator.Label = "MultiMaxAggregator";
|
---|
| 207 | multiMaxAggregator.Color = Color.DarkKhaki;
|
---|
| 208 | multiMaxAggregator.Thickness = 3;
|
---|
| 209 | multiMaxAggregator.Style = DrawingStyle.Solid;
|
---|
| 210 | multiMaxAggregator.LineType = DataRowType.SingleValue;
|
---|
| 211 | multiMaxAggregator.AddWatch(row1);
|
---|
| 212 | multiMaxAggregator.AddWatch(row2);
|
---|
| 213 | model.AddDataRow(multiMaxAggregator);
|
---|
| 214 |
|
---|
[1350] | 215 | MinAggregator multiMinAggregator = new MinAggregator();
|
---|
[1326] | 216 | multiMinAggregator.Label = "MultiMinAggregator";
|
---|
| 217 | multiMinAggregator.Color = Color.DarkRed;
|
---|
| 218 | multiMinAggregator.Thickness = 3;
|
---|
| 219 | multiMinAggregator.Style = DrawingStyle.Solid;
|
---|
| 220 | multiMinAggregator.LineType = DataRowType.SingleValue;
|
---|
| 221 | multiMinAggregator.AddWatch(row1);
|
---|
| 222 | multiMinAggregator.AddWatch(row2);
|
---|
| 223 | model.AddDataRow(multiMinAggregator);
|
---|
| 224 |
|
---|
[1350] | 225 | AvgLineAggregator multiLineAvgAggregator = new AvgLineAggregator();
|
---|
[1326] | 226 | multiLineAvgAggregator.Label = "MultiLineAvgAggregator";
|
---|
| 227 | multiLineAvgAggregator.Color = Color.Red;
|
---|
| 228 | multiLineAvgAggregator.Thickness = 4;
|
---|
| 229 | multiLineAvgAggregator.Style = DrawingStyle.Solid;
|
---|
| 230 | multiLineAvgAggregator.LineType = DataRowType.Normal;
|
---|
| 231 | multiLineAvgAggregator.AddWatch(row1);
|
---|
| 232 | multiLineAvgAggregator.AddWatch(row2);
|
---|
| 233 | multiLineAvgAggregator.AddValue(0);
|
---|
| 234 | model.AddDataRow(multiLineAvgAggregator);
|
---|
| 235 |
|
---|
| 236 | double i = 0;
|
---|
| 237 | double newY;
|
---|
| 238 |
|
---|
| 239 | Random rand = new Random();
|
---|
| 240 | while (!_shouldStop && i <= 24) {
|
---|
| 241 | i += 0.2;
|
---|
| 242 | newY = Math.Sin(i);
|
---|
| 243 | System.Console.WriteLine("working");
|
---|
| 244 | //row1.AddValue(rand.NextDouble() * 10);
|
---|
| 245 | row1.AddValue(newY * 10);
|
---|
| 246 | row2.AddValue(i*2-15);
|
---|
| 247 | System.Threading.Thread.Sleep(100);
|
---|
| 248 | }
|
---|
| 249 | Console.WriteLine("worker thread: terminating gracefully.");
|
---|
| 250 | }
|
---|
[1386] | 251 | public void DoWorkSingleLine() {
|
---|
| 252 |
|
---|
| 253 | IDataRow row1 = new DataRow();
|
---|
| 254 | row1.Color = Color.Red;
|
---|
| 255 | row1.Thickness = 2;
|
---|
| 256 | row1.Label = "Sinus";
|
---|
| 257 | row1.Style = DrawingStyle.Solid;
|
---|
| 258 | model.AddDataRow(row1);
|
---|
| 259 |
|
---|
| 260 | IDataRow row2 = new DataRow();
|
---|
| 261 | row2.Color = Color.Red;
|
---|
| 262 | row2.Thickness = 3;
|
---|
| 263 | row2.Label = "Growing";
|
---|
| 264 | row2.Style = DrawingStyle.Solid;
|
---|
| 265 | model.AddDataRow(row2);
|
---|
| 266 |
|
---|
| 267 | MinAggregator aggregator = new MinAggregator();
|
---|
| 268 | aggregator.Label = "MinAggregator";
|
---|
| 269 | aggregator.Color = Color.Pink;
|
---|
| 270 | aggregator.Thickness = 3;
|
---|
| 271 | aggregator.Style = DrawingStyle.Solid;
|
---|
| 272 | aggregator.LineType = DataRowType.SingleValue;
|
---|
| 273 | aggregator.AddWatch(row1);
|
---|
| 274 | model.AddDataRow(aggregator);
|
---|
| 275 |
|
---|
| 276 | MaxAggregator maxAggregator = new MaxAggregator();
|
---|
| 277 | maxAggregator.Label = "MaxAggregator";
|
---|
| 278 | maxAggregator.Color = Color.DeepSkyBlue;
|
---|
| 279 | maxAggregator.Thickness = 3;
|
---|
| 280 | maxAggregator.Style = DrawingStyle.Solid;
|
---|
| 281 | maxAggregator.LineType = DataRowType.SingleValue;
|
---|
| 282 | maxAggregator.AddWatch(row1);
|
---|
| 283 | model.AddDataRow(maxAggregator);
|
---|
| 284 |
|
---|
| 285 | AvgAggregator avgAggregator = new AvgAggregator();
|
---|
| 286 | avgAggregator.Label = "AvgAggregator";
|
---|
| 287 | avgAggregator.Color = Color.Violet;
|
---|
| 288 | avgAggregator.Thickness = 3;
|
---|
| 289 | avgAggregator.Style = DrawingStyle.Solid;
|
---|
| 290 | avgAggregator.LineType = DataRowType.SingleValue;
|
---|
| 291 | avgAggregator.AddWatch(row1);
|
---|
| 292 | model.AddDataRow(avgAggregator);
|
---|
| 293 |
|
---|
| 294 | double i = 0;
|
---|
| 295 | double newY;
|
---|
| 296 |
|
---|
| 297 | Random rand = new Random();
|
---|
| 298 | while (!_shouldStop && i <= 24) {
|
---|
| 299 | i += 0.2;
|
---|
| 300 | newY = Math.Sin(i);
|
---|
| 301 | System.Console.WriteLine("working");
|
---|
| 302 | //row1.AddValue(rand.NextDouble() * 10);
|
---|
| 303 | row1.AddValue(newY * 10);
|
---|
| 304 | row2.AddValue(i * 2 - 15);
|
---|
| 305 | System.Threading.Thread.Sleep(100);
|
---|
| 306 | }
|
---|
| 307 | Console.WriteLine("worker thread: terminating gracefully.");
|
---|
| 308 | }
|
---|
| 309 | public void DoWorkAvgLine() {
|
---|
| 310 |
|
---|
| 311 | IDataRow row1 = new DataRow();
|
---|
| 312 | row1.Color = Color.Red;
|
---|
| 313 | row1.Thickness = 2;
|
---|
| 314 | row1.Label = "Sinus";
|
---|
| 315 | row1.Style = DrawingStyle.Solid;
|
---|
| 316 | model.AddDataRow(row1);
|
---|
| 317 |
|
---|
| 318 | IDataRow row2 = new DataRow();
|
---|
| 319 | row2.Color = Color.Red;
|
---|
| 320 | row2.Thickness = 3;
|
---|
| 321 | row2.Label = "Growing";
|
---|
| 322 | row2.Style = DrawingStyle.Solid;
|
---|
| 323 | model.AddDataRow(row2);
|
---|
| 324 |
|
---|
| 325 | AvgLineAggregator avgLineAggregator = new AvgLineAggregator();
|
---|
| 326 | avgLineAggregator.Label = "AvgLineAggregator";
|
---|
| 327 | avgLineAggregator.Color = Color.Violet;
|
---|
| 328 | avgLineAggregator.Thickness = 3;
|
---|
| 329 | avgLineAggregator.Style = DrawingStyle.Solid;
|
---|
| 330 | avgLineAggregator.LineType = DataRowType.Normal;
|
---|
| 331 | avgLineAggregator.AddWatch(row1);
|
---|
| 332 | avgLineAggregator.AddWatch(row2);
|
---|
| 333 | model.AddDataRow(avgLineAggregator);
|
---|
| 334 |
|
---|
| 335 | double i = 0;
|
---|
| 336 | double newY;
|
---|
| 337 |
|
---|
| 338 | Random rand = new Random();
|
---|
| 339 | while (!_shouldStop && i <= 24) {
|
---|
| 340 | i += 0.2;
|
---|
| 341 | newY = Math.Sin(i);
|
---|
| 342 | System.Console.WriteLine("working");
|
---|
| 343 | //row1.AddValue(rand.NextDouble() * 10);
|
---|
| 344 | row1.AddValue(newY * 10);
|
---|
| 345 | row2.AddValue(i * 2 - 15);
|
---|
| 346 | System.Threading.Thread.Sleep(100);
|
---|
| 347 | }
|
---|
| 348 | Console.WriteLine("worker thread: terminating gracefully.");
|
---|
| 349 | }
|
---|
[1326] | 350 | public void RequestStop() {
|
---|
| 351 | _shouldStop = true;
|
---|
| 352 | }
|
---|
| 353 | // Volatile is used as hint to the compiler that this data
|
---|
| 354 | // member will be accessed by multiple threads.
|
---|
| 355 | private volatile bool _shouldStop;
|
---|
| 356 | }
|
---|
| 357 |
|
---|
| 358 |
|
---|
| 359 | [Test]
|
---|
[1386] | 360 | public void TestAggregatorMultiLine() {
|
---|
[1326] | 361 | LineChartTestForm f = new LineChartTestForm(model);
|
---|
[1386] | 362 |
|
---|
| 363 | // Create the thread object. This does not start the thread.
|
---|
| 364 | Worker workerObject = new Worker(model);
|
---|
| 365 | Thread workerThread = new Thread(workerObject.DoWorkMultiLine);
|
---|
| 366 |
|
---|
| 367 | // Start the worker thread.
|
---|
| 368 | workerThread.Start();
|
---|
| 369 |
|
---|
| 370 | f.ShowDialog();
|
---|
| 371 | workerObject.RequestStop();
|
---|
| 372 | }
|
---|
| 373 |
|
---|
| 374 | [Test]
|
---|
| 375 | public void TestAggregatorSingleLine() {
|
---|
| 376 | LineChartTestForm f = new LineChartTestForm(model);
|
---|
[1326] | 377 |
|
---|
| 378 | // Create the thread object. This does not start the thread.
|
---|
| 379 | Worker workerObject = new Worker(model);
|
---|
[1386] | 380 | Thread workerThread = new Thread(workerObject.DoWorkSingleLine);
|
---|
[1326] | 381 |
|
---|
| 382 | // Start the worker thread.
|
---|
| 383 | workerThread.Start();
|
---|
| 384 |
|
---|
| 385 | f.ShowDialog();
|
---|
| 386 | workerObject.RequestStop();
|
---|
| 387 | }
|
---|
[1386] | 388 | [Test]
|
---|
| 389 | public void TestAggregatorAvgLine() {
|
---|
| 390 | LineChartTestForm f = new LineChartTestForm(model);
|
---|
[1326] | 391 |
|
---|
[1386] | 392 | // Create the thread object. This does not start the thread.
|
---|
| 393 | Worker workerObject = new Worker(model);
|
---|
| 394 | Thread workerThread = new Thread(workerObject.DoWorkAvgLine);
|
---|
| 395 |
|
---|
| 396 | // Start the worker thread.
|
---|
| 397 | workerThread.Start();
|
---|
| 398 |
|
---|
| 399 | f.ShowDialog();
|
---|
| 400 | workerObject.RequestStop();
|
---|
| 401 | }
|
---|
| 402 |
|
---|
[1326] | 403 |
|
---|
| 404 |
|
---|
| 405 | [Test]
|
---|
[1040] | 406 | public void TestAutoZoomInConstructor() {
|
---|
| 407 | IDataRow row1 = new DataRow();
|
---|
| 408 |
|
---|
| 409 | row1.Color = Color.Red;
|
---|
| 410 | row1.Thickness = 3;
|
---|
| 411 | row1.Style = DrawingStyle.Solid;
|
---|
| 412 |
|
---|
| 413 | model.AddDataRow(row1);
|
---|
| 414 |
|
---|
| 415 | row1.AddValue(10);
|
---|
| 416 | row1.AddValue(5);
|
---|
| 417 | row1.AddValue(7);
|
---|
| 418 | row1.AddValue(3);
|
---|
| 419 | row1.AddValue(10);
|
---|
| 420 | row1.AddValue(2);
|
---|
| 421 |
|
---|
| 422 | LineChartTestForm f = new LineChartTestForm(model);
|
---|
| 423 | f.ShowDialog();
|
---|
| 424 | }
|
---|
[1240] | 425 |
|
---|
[1243] | 426 |
|
---|
[1240] | 427 | [Test]
|
---|
[1243] | 428 | public void TestSingleValueDataRows() {
|
---|
| 429 | LineChartTestForm f = new LineChartTestForm(model);
|
---|
| 430 |
|
---|
| 431 | IDataRow row1 = new DataRow();
|
---|
| 432 | IDataRow row2 = new DataRow();
|
---|
| 433 | IDataRow row3 = new DataRow();
|
---|
| 434 |
|
---|
[1342] | 435 | IDataRow row4 = new DataRow();
|
---|
| 436 | IDataRow row5 = new DataRow();
|
---|
| 437 | IDataRow row6 = new DataRow();
|
---|
| 438 |
|
---|
[1243] | 439 | row1.Color = Color.Red;
|
---|
| 440 | row2.Color = Color.Green;
|
---|
| 441 | row3.Color = Color.Blue;
|
---|
| 442 |
|
---|
[1342] | 443 | row4.Color = Color.DeepPink;
|
---|
| 444 | row5.Color = Color.Firebrick;
|
---|
| 445 | row6.Color = Color.DarkSlateGray;
|
---|
| 446 |
|
---|
[1243] | 447 | row1.Thickness = 3;
|
---|
| 448 | row2.Thickness = 4;
|
---|
| 449 | row3.Thickness = 5;
|
---|
| 450 |
|
---|
[1342] | 451 | row4.Thickness = 3;
|
---|
| 452 | row5.Thickness = 4;
|
---|
| 453 | row6.Thickness = 5;
|
---|
| 454 |
|
---|
[1243] | 455 | row1.Label = "SingleValue";
|
---|
| 456 | row2.Label = "Gertschi";
|
---|
| 457 | row3.Label = "Maxi";
|
---|
| 458 |
|
---|
[1342] | 459 | row4.Label = "Simon";
|
---|
| 460 | row5.Label = "klausmuellerwesternhagenunddierasperies";
|
---|
| 461 | row6.Label = "anyways";
|
---|
| 462 |
|
---|
[1243] | 463 | row1.Style = DrawingStyle.Solid;
|
---|
| 464 | row2.Style = DrawingStyle.Solid;
|
---|
| 465 | row3.Style = DrawingStyle.Dashed;
|
---|
| 466 |
|
---|
[1342] | 467 | row4.Style = DrawingStyle.Solid;
|
---|
| 468 | row5.Style = DrawingStyle.Solid;
|
---|
| 469 | row6.Style = DrawingStyle.Dashed;
|
---|
| 470 |
|
---|
[1243] | 471 | row1.LineType = DataRowType.SingleValue;
|
---|
| 472 | row2.LineType = DataRowType.SingleValue;
|
---|
| 473 | row1.AddValue(12);
|
---|
| 474 |
|
---|
| 475 | row2.AddValue(5);
|
---|
| 476 |
|
---|
| 477 |
|
---|
| 478 | row3.AddValue(2);
|
---|
| 479 | row3.AddValue(5);
|
---|
| 480 | row3.AddValue(9);
|
---|
| 481 | row3.AddValue(1);
|
---|
| 482 | row3.AddValue(3);
|
---|
| 483 |
|
---|
| 484 |
|
---|
[1342] | 485 | row4.AddValue(10);
|
---|
| 486 | row5.AddValue(11);
|
---|
| 487 | row6.AddValue(11);
|
---|
[1243] | 488 |
|
---|
[1342] | 489 | model.AddDataRow(row1);
|
---|
| 490 | model.AddDataRow(row2);
|
---|
| 491 | model.AddDataRow(row3);
|
---|
| 492 | model.AddDataRow(row4);
|
---|
| 493 | model.AddDataRow(row5);
|
---|
| 494 | model.AddDataRow(row6);
|
---|
| 495 |
|
---|
[1243] | 496 | f.ShowDialog();
|
---|
| 497 | }
|
---|
| 498 |
|
---|
| 499 |
|
---|
| 500 |
|
---|
| 501 | [Test]
|
---|
[1240] | 502 | public void TestMainForm() {
|
---|
| 503 | MainForm f = new MainForm();
|
---|
| 504 | f.ShowDialog();
|
---|
| 505 | }
|
---|
[861] | 506 | }
|
---|
[1243] | 507 | }
|
---|