From 13ca4f0203bc3d540f207a2e727446e508f91a66 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Oliveira de Medeiros Date: Mon, 18 Nov 2024 08:34:50 -0300 Subject: [PATCH] fixed zedgraph file saving --- .../ZedGraph/ZedGraphControl.ContextMenu.cs | 7 +- .../FormSensAnalysis.en.resx | 58 +- .../FlowsheetAnalysis/FormSensAnalysis.resx | 576 +++++++++--------- 3 files changed, 321 insertions(+), 320 deletions(-) diff --git a/DWSIM.Controls.ZedGraph/ZedGraph/ZedGraphControl.ContextMenu.cs b/DWSIM.Controls.ZedGraph/ZedGraph/ZedGraphControl.ContextMenu.cs index 0530b693d..1dc9bafc0 100644 --- a/DWSIM.Controls.ZedGraph/ZedGraph/ZedGraphControl.ContextMenu.cs +++ b/DWSIM.Controls.ZedGraph/ZedGraph/ZedGraphControl.ContextMenu.cs @@ -455,12 +455,13 @@ public void SaveAs(int scale, String DefaultFileName) { if (myStream != null) { - switch (handler.GetExtension()) + var extension = handler.GetExtension().ToLower(); + switch (extension) { - case ".PNG": + case ".png": ImageRender(scale).Save(myStream, ImageFormat.Png); break; - case ".JPG": + case ".jpg": ImageRender(scale).Save(myStream, ImageFormat.Jpeg); break; } diff --git a/DWSIM/Forms/FlowsheetAnalysis/FormSensAnalysis.en.resx b/DWSIM/Forms/FlowsheetAnalysis/FormSensAnalysis.en.resx index b27464c5c..a53ea7314 100644 --- a/DWSIM/Forms/FlowsheetAnalysis/FormSensAnalysis.en.resx +++ b/DWSIM/Forms/FlowsheetAnalysis/FormSensAnalysis.en.resx @@ -131,13 +131,13 @@ 226, 21 - 852, 63 + 1171, 63 3, 248 - 858, 82 + 1177, 82 Information @@ -149,10 +149,10 @@ IV 2 - 855, 226 + 1174, 226 - 867, 340 + 1186, 340 Results @@ -176,7 +176,7 @@ 89, 49 - 241, 76 + 709, 76 60, 13 @@ -188,10 +188,10 @@ 89, 20 - 241, 20 + 709, 20 - 340, 134 + 808, 134 Name and Description (Selected Case) @@ -412,7 +412,7 @@ Top, Right - 356, 6 + 824, 6 76, 17 @@ -445,7 +445,7 @@ Unit - 514, 166 + 364, 166 Add @@ -454,13 +454,13 @@ Remove - 514, 25 + 364, 25 - 353, 29 + 821, 29 - 520, 210 + 370, 210 Expression Parameters @@ -469,19 +469,19 @@ Bottom, Right - 434, 54 + 284, 54 Clear - 434, 22 + 284, 22 Verify - 358, 20 + 208, 20 59, 13 @@ -490,7 +490,7 @@ Curr. Value - 358, 77 + 208, 77 58, 13 @@ -499,10 +499,10 @@ Expression - 353, 245 + 821, 245 - 520, 135 + 370, 135 Expression @@ -520,7 +520,7 @@ Unit - 336, 307 + 804, 307 Add @@ -529,16 +529,16 @@ Remove - 336, 25 + 804, 25 - 342, 351 + 810, 351 Add/Remove Variables - 204, 23 + 523, 23 Send Data to Regression Plugin @@ -547,13 +547,13 @@ Break Calculation - 729, 388 + 1197, 388 Independent Variables - 879, 388 + 1197, 388 Dependent Variables @@ -562,7 +562,7 @@ Send Data to New Worksheet - 879, 388 + 1197, 388 Results @@ -577,19 +577,19 @@ 48, 22, 48, 22 - 610, 374 + 928, 374 - 879, 388 + 1197, 388 Chart - 737, 414 + 1205, 414 - 751, 560 + 1219, 560 Sensitivity Study diff --git a/DWSIM/Forms/FlowsheetAnalysis/FormSensAnalysis.resx b/DWSIM/Forms/FlowsheetAnalysis/FormSensAnalysis.resx index 1561aaa62..1d5e7bb6d 100644 --- a/DWSIM/Forms/FlowsheetAnalysis/FormSensAnalysis.resx +++ b/DWSIM/Forms/FlowsheetAnalysis/FormSensAnalysis.resx @@ -117,6 +117,10 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 59, 20 + LblParam @@ -124,12 +128,11 @@ 2 - 332, 22 - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + TabPage3 453, 219 @@ -140,9 +143,6 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ID - GroupBox8 @@ -155,11 +155,9 @@ 1 - - 80, 26 - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Fill System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -173,8 +171,8 @@ 10 - - lbCases + + 76, 13 False @@ -182,8 +180,11 @@ Magenta - - Panel1 + + NoControl + + + 121, 21 297, 108 @@ -197,9 +198,6 @@ Expressão - - 0 - Caso Selecionado @@ -224,7 +222,6 @@ Propriedade - Top, Right @@ -243,14 +240,14 @@ tsbDelVar - - 12 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 6, 74 + + 70, 49 - - $this + + ZedGraph.ZedGraphControl, ZedGraph, Version=5.1.5.0, Culture=neutral, PublicKeyToken=null 55, 13 @@ -264,8 +261,8 @@ 75, 23 - - 1 + + System.Windows.Forms.DataGridViewComboBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 856, 82 @@ -282,9 +279,6 @@ 4 - - WeifenLuo.WinFormsUI.Docking.DockContent, WeifenLuo.WinFormsUI.Docking, Version=2.9.0.0, Culture=neutral, PublicKeyToken=null - TabControl1 @@ -303,25 +297,16 @@ 424, 25 - - 202, 23 - 3, 16 - - TabPage2 - Float - - NoControl - 10 - + 0 @@ -336,24 +321,18 @@ Objeto - - True - - - GroupBox7 - - - 6, 103 + + 38, 13 1 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - GroupBox7 + + True + 6, 16 @@ -372,14 +351,17 @@ 47, 13 + + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 6, 45 18 - - 70, 22 + + 0 Fill @@ -393,17 +375,17 @@ 451, 108 - - 2 - 11 7 - - Limite Superior + + TabControl1 + + + False ToolStripButton1 @@ -411,14 +393,11 @@ Microsoft Sans Serif, 8.25pt - - GroupBox8 - GroupBox8 - - 7 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 System.Windows.Forms.DataGridViewComboBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -426,6 +405,9 @@ False + + btnSaveCase + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -441,11 +423,8 @@ 3 - - btnCopyCase - - - 16 + + True 69, 13 @@ -468,9 +447,6 @@ TabPage3 - - 70, 105 - Nome @@ -552,12 +528,21 @@ 35, 13 + + tbCaseDesc + + + 9 + 190, 21 System.Windows.Forms.ContextMenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 12 + 2 @@ -660,8 +645,11 @@ tbUnitIndVar1 - - False + + 1 + + + 6, 53 Top, Right @@ -681,12 +669,18 @@ Remover - - MiddleRight + + $this gbIndVar2 + + False + + + MiddleRight + 190, 21 @@ -696,11 +690,8 @@ 196, 22 - - 88, 50 - - - Fill + + Propriedade Top, Left, Right @@ -735,6 +726,9 @@ NoControl + + 6 + DockLeftAutoHideToolStripMenuItem @@ -762,6 +756,9 @@ 5 + + Limite Superior + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -810,8 +807,8 @@ System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0 + + 6, 81 False @@ -822,6 +819,9 @@ Gráfico + + GroupBox1 + 5, 29 @@ -834,8 +834,8 @@ 1 - - tbCaseDesc + + 0 TabPage3 @@ -843,8 +843,8 @@ GroupBox2 - - btnSaveCase + + VI 1 BtnDrawChart @@ -852,11 +852,11 @@ 58, 13 - - 450, 13 + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - True + + 146, 53 63, 17 @@ -867,9 +867,6 @@ 488, 134 - - System.Windows.Forms.DataGridViewComboBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 0 @@ -879,8 +876,8 @@ NoControl - - gbIndVar2 + + Expressão btnVerify @@ -894,12 +891,12 @@ 6, 146 - - 23, 22 - 4 + + 80, 26 + 96, 96 @@ -930,17 +927,23 @@ Bottom, Left, Right + + False + 5 + + tbUpperLimIndVar2 + gbIndVar1 95, 13 - - TabPage3 + + 146, 53 Label8 @@ -954,14 +957,14 @@ Right - - ZedGraph.ZedGraphControl, ZedGraph, Version=5.1.5.0, Culture=neutral, PublicKeyToken=null + + WeifenLuo.WinFormsUI.Docking.DockContent, WeifenLuo.WinFormsUI.Docking, Version=2.9.0.0, Culture=neutral, PublicKeyToken=null 38, 13 - - DockLeftToolStripMenuItem + + GroupBox3 311, 53 @@ -984,15 +987,18 @@ 311, 53 - - 14 + + True - - 146, 53 + + Label2 4 + + Top, Bottom, Left, Right + False @@ -1026,11 +1032,8 @@ Label13 - - 1 - - - btnNewCase + + 202, 23 NoControl @@ -1038,6 +1041,9 @@ 415, 25 + + 70, 22 + True @@ -1059,8 +1065,8 @@ GroupBox9 - - 3, 222 + + btnNewCase 1 @@ -1077,24 +1083,27 @@ btnRun - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Valor Atual tbCurrentValue - - True - False gbIndVar2 + + gbIndVar2 + 6 + + GroupBox3 + True @@ -1119,9 +1128,6 @@ 88, 78 - - 6, 81 - NoControl @@ -1131,9 +1137,6 @@ 8, 138 - - 64, 13 - 4 @@ -1149,8 +1152,8 @@ System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - GroupBox1 + + 1 364, 50 @@ -1164,8 +1167,11 @@ Top, Bottom, Left, Right - - False + + Parâmetros da Expressão + + + TabPage2 Descrição @@ -1179,6 +1185,9 @@ Dock Bottom + + gbIndVar2 + Label6 @@ -1200,8 +1209,8 @@ btnExportToNewSheet - - 1 + + 6, 103 True @@ -1212,18 +1221,12 @@ 0 - - 1 - 3 1 - - Label2 - gbIndVar1 @@ -1263,8 +1266,8 @@ True - - 3 + + 196, 22 DockTopToolStripMenuItem @@ -1284,6 +1287,9 @@ 2 + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + Gerenciador de Casos @@ -1293,8 +1299,8 @@ 1 - - 76, 13 + + GroupBox8 212, 23 @@ -1308,20 +1314,14 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - VI 1 - 196, 22 Nome - - 196, 22 - - - System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True DockRightAutoHideToolStripMenuItem @@ -1341,15 +1341,18 @@ 4 - - Document + + $this - - Propriedade + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 9, 23 + + 3, 222 + 3, 16 @@ -1362,15 +1365,9 @@ Dock Top Auto-Hide - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - TabControl1 - - - GroupBox3 - + + System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 364, 50 @@ -1392,8 +1389,8 @@ False - - 8 + + 190, 21 gbIndVar1 @@ -1419,14 +1416,14 @@ 247, 78 - - False + + ID GroupBox8 - - 9 + + 668, 13 17 @@ -1455,8 +1452,8 @@ TabControl1 - - GroupBox3 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 CbCrtY @@ -1467,9 +1464,6 @@ 50, 66 - - 6, 25 - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1491,14 +1485,11 @@ 421, 184 - - Param - - - Variável Independente + + 263, 6 - - 19 + + 23, 22 GroupBox2 @@ -1506,12 +1497,6 @@ 10 - - NoControl - - - 38, 13 - NoControl @@ -1524,11 +1509,8 @@ Label16 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + NoControl gbIndVar2 @@ -1545,8 +1527,8 @@ TabControl1 - - 190, 21 + + 6, 74 System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -1554,8 +1536,8 @@ gbIndVar1 - - GroupBox1 + + 7 9, 52 @@ -1575,8 +1557,11 @@ 0 - - 146, 53 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Top, Left, Right ImageBeforeText @@ -1599,8 +1584,8 @@ 1 - - 121, 21 + + 6, 25 Magenta @@ -1623,20 +1608,23 @@ 14 + + Column2 + 0 3, 16 - - 2 + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tbUpperLimIndVar2 + + Valor Atual - - False + + Document Magenta @@ -1656,15 +1644,12 @@ ID - - 70, 49 + + 2 GroupBox10 - - 6 - DataGridViewComboBoxColumn2 @@ -1686,8 +1671,8 @@ System.Windows.Forms.DataGridView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 16 dgvResults @@ -1698,9 +1683,6 @@ Column10 - - $this - Objeto @@ -1740,6 +1722,9 @@ System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 88, 50 + gbIndVar2 @@ -1761,20 +1746,17 @@ 209, 23 - - gbIndVar1 - 2 256, 77 - - gbIndVar2 + + GroupBox7 - - gbIndVar2 + + GroupBox1 197, 224 @@ -1788,12 +1770,15 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 7, 13 + + btnCopyCase tbExpression + + 2 + 885, 388 @@ -1806,8 +1791,8 @@ System.Windows.Forms.DataGridViewComboBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 6, 53 + + 64, 13 8, 6 @@ -1830,9 +1815,6 @@ MiddleRight - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 449, 108 @@ -1848,15 +1830,12 @@ System.Windows.Forms.ListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Top, Left, Right + + 6, 53 4 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - NoControl @@ -1872,15 +1851,15 @@ 6 + + False + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 4 - - 263, 6 - 877, 362 @@ -1899,6 +1878,9 @@ Unidade + + 0 + Limite Inferior @@ -1917,6 +1899,9 @@ 70, 20 + + Param + True @@ -1935,8 +1920,8 @@ True - - 1 + + 450, 13 GroupBox2 @@ -2004,9 +1989,6 @@ Label7 - - 668, 13 - 4, 22 @@ -2049,8 +2031,8 @@ 19 - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 70, 105 NoControl @@ -2064,6 +2046,9 @@ 0 + + False + 17 @@ -2079,11 +2064,14 @@ Bottom, Left, Right + + 19 + 853, 200 - - 6, 53 + + lbCases 69, 13 @@ -2097,15 +2085,12 @@ MiddleRight - - 0 + + 7, 13 cbPropIndVar2 - - TabPage4 - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -2139,8 +2124,8 @@ 4, 22 - - Column2 + + 3 Enviar Dados para Regressão @@ -2154,6 +2139,9 @@ 5 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 3, 3, 3, 3 @@ -2166,6 +2154,12 @@ 1 + + 8 + + + 14 + GroupBox8 @@ -2187,17 +2181,14 @@ 629, 356 - - Valor Atual + + TabPage4 TabPage5 - - 59, 20 - - - Valor Atual + + 1 0 @@ -2220,8 +2211,8 @@ System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - False + + 1 System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -2259,11 +2250,11 @@ System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Parâmetros da Expressão + + 5, 42 - - Top, Bottom, Left, Right + + Variável Independente gbIndVar1 @@ -2301,6 +2292,9 @@ X-Axis + + 5 + 0 @@ -2343,8 +2337,8 @@ System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + gbIndVar1 False @@ -2403,14 +2397,14 @@ 142, 17 - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Panel1 TabPage2 - - 5 + + DockLeftToolStripMenuItem 196, 22 @@ -2439,6 +2433,9 @@ Y-Axis + + System.Windows.Forms.DataGridViewTextBoxColumn, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + TabControl1 @@ -2448,9 +2445,6 @@ DataGridViewComboBoxColumn3 - - CbCrtX - 3 @@ -2466,8 +2460,11 @@ 222, 23 - - Expressão + + CbCrtX + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 11 @@ -2478,6 +2475,9 @@ 75, 23 + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + tbCaseName @@ -2487,9 +2487,6 @@ 88, 50 - - True - Panel1 @@ -2502,6 +2499,9 @@ 2 + + 1 + DockBottomToolStripMenuItem @@ -2514,8 +2514,8 @@ GroupBox2 - - 5, 42 + + gbIndVar2 58, 13 @@ -2550,6 +2550,9 @@ DataGridViewTextBoxColumn5 + + 215, 15 + True @@ -2565,9 +2568,6 @@ True - - True - True @@ -2580,8 +2580,8 @@ True - - 215, 15 + + True True