@@ -58,10 +58,9 @@ public Main()
5858 DTrend . Selection . SelectionChangedEvent += new EventHandler ( Selection_SelectionChangedEvent ) ;
5959 DTrend . GraphPane . AxisChange ( ) ;
6060 DTrend . Refresh ( ) ;
61- string [ ] commandLineArgs = Environment . GetCommandLineArgs ( ) ;
62-
63- // Парсинг аргументов командной строки
64- for ( int i = 0 ; i < commandLineArgs . Length ; i ++ )
61+ string [ ] commandLineArgs = Environment . GetCommandLineArgs ( ) ;
62+
63+ for ( int i = 0 ; i < commandLineArgs . Length ; i ++ ) // Парсинг аргументов командной строки
6564 {
6665 string path = "" ;
6766 string a = commandLineArgs [ i ] ;
@@ -83,14 +82,13 @@ public Main()
8382 FormBorderStyle = FormBorderStyle . None ;
8483 WindowState = FormWindowState . Maximized ;
8584 }
86- else if ( a == "-hidefilebutton " )
85+ else if ( a == "-nofilebutton " )
8786 {
8887 fileToolStripMenuItem . Visible = false ;
8988 }
90- else if ( a == "-hideprintbutton " )
89+ else if ( a == "-noprintbutton " )
9190 {
92- printMenuItem . Visible = false ;
93- button_print . Visible = false ;
91+ printMenuItem . Visible = button_print . Visible = false ;
9492 }
9593 }
9694 }
@@ -281,7 +279,7 @@ private void parse_data(object sender, DoWorkEventArgs e)
281279 flag = 0 ;
282280 foreach ( string text5 in list ) //
283281 {
284- if ( flag == 0 ) flag ++ ; //
282+ if ( flag == 0 ) flag ++ ;
285283 else
286284 {
287285 string [ ] array2 = text5 . Split ( new char [ ] { c } ) ; // Получаем массив элементов из строки списка лога
@@ -357,13 +355,14 @@ private void dataparsing_complete(object sender, RunWorkerCompletedEventArgs e)
357355 }
358356 num2 ++ ;
359357 }
358+ Color color = ColorTranslator . FromHtml ( colors [ numColor ] ) ;
360359 YAxis yaxis = new YAxis ( text ) ;
361360 DTrend . GraphPane . YAxisList . Add ( yaxis ) ;
362361 yaxis . Title . IsVisible = true ;
363362 yaxis . Type = AxisType . Linear ;
364- yaxis . Color = ColorTranslator . FromHtml ( colors [ numColor ] ) ;
363+ yaxis . Color = color ;
365364 yaxis . Scale . FontSpec . Size = 10f ;
366- yaxis . Scale . FontSpec . FontColor = ColorTranslator . FromHtml ( colors [ numColor ] ) ;
365+ yaxis . Scale . FontSpec . FontColor = color ;
367366 yaxis . IsVisible = true ;
368367 yaxis . Scale . MaxAuto = true ;
369368 yaxis . Scale . MinAuto = true ;
@@ -375,13 +374,13 @@ private void dataparsing_complete(object sender, RunWorkerCompletedEventArgs e)
375374 yaxis . MinorTic . IsOpposite = false ;
376375 yaxis . Scale . Align = AlignP . Inside ;
377376 yaxis . Title . FontSpec . Size = 10f ;
378- yaxis . Title . FontSpec . FontColor = ColorTranslator . FromHtml ( colors [ numColor ] ) ;
379- Color color = ColorTranslator . FromHtml ( colors [ numColor ] ) ;
377+ yaxis . Title . FontSpec . FontColor = color ;
378+
380379 LineItem lineItem = DTrend . GraphPane . AddCurve ( text , pointPairList , color , SymbolType . None ) ;
381380 lineItem . Line . IsOptimizedDraw = true ;
382381 lineItem . Line . Width = 2f ;
383382 lineItem . YAxisIndex = DTrend . GraphPane . YAxisList . IndexOf ( text ) ;
384- dataGridView_data . Columns [ text ] . DefaultCellStyle . ForeColor = ColorTranslator . FromHtml ( colors [ numColor ] ) ;
383+ dataGridView_data . Columns [ text ] . DefaultCellStyle . ForeColor = color ;
385384 ToolStripMenuItem toolStripMenuItem = new ToolStripMenuItem ( text ) ;
386385 toolStripMenuItem . ForeColor = ColorTranslator . FromHtml ( colors [ numColor ] ) ;
387386 ToolStripMenuItem toolStripMenuItem2 = new ToolStripMenuItem ( "hide/show" ) ;
@@ -443,7 +442,7 @@ private void setYminMax(object sender, EventArgs e)
443442 DTrend . Refresh ( ) ;
444443 }
445444
446- //
445+ //Устанавливает чек итема в соответствии с видимостью курвы
447446 private void toolMnuItemChSta ( object sender , EventArgs e )
448447 {
449448 ( ( ToolStripMenuItem ) sender ) . Checked = DTrend . GraphPane . CurveList [ ( ( ToolStripMenuItem ) sender ) . OwnerItem . Text ] . IsVisible ;
@@ -546,8 +545,7 @@ private void fullscreenToolStripMenuItem_Click(object sender, EventArgs e)
546545 {
547546 FormBorderStyle = FormBorderStyle . Sizable ;
548547 WindowState = FormWindowState . Normal ;
549- }
550-
548+ }
551549 }
552550
553551 //
@@ -838,7 +836,6 @@ private void Selection_SelectionChangedEvent(object sender, EventArgs e)
838836 curve . IsSelected = false ;
839837 }
840838 }
841-
842839 }
843840 }
844841}
0 commit comments