Skip to content

Commit

Permalink
fixed bug #479; v8.4.7 RC2
Browse files Browse the repository at this point in the history
  • Loading branch information
DanWBR committed Jun 4, 2023
1 parent a9bb486 commit fe93877
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 7 deletions.
6 changes: 5 additions & 1 deletion DWSIM.UI.Desktop.Editors/Reactions/HetCat.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,15 @@ void Initialize()
p1 = UI.Shared.Common.GetDefaultContainer();
p2 = UI.Shared.Common.GetDefaultContainer();

p1.Width = 420;
//p1.Width = 420;

t1 = new TableLayout();
t1.Rows.Add(new TableRow(p1, p2));

t1.Rows[0].Cells[0].ScaleWidth = true;
t1.Rows[0].Cells[1].ScaleWidth = true;


p1.CreateAndAddLabelRow("Compounds and Stoichiometry (Include / Name / Heat of Formation (kJ/kg) / Stoich. Coeff.)");

var compcontainer = new DynamicLayout();
Expand Down
11 changes: 7 additions & 4 deletions DWSIM.UI.Desktop.Editors/Reactions/Kinetic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,14 @@ void Initialize()
p1 = UI.Shared.Common.GetDefaultContainer();
p2 = UI.Shared.Common.GetDefaultContainer();

p1.Width = 420;
//p1.Width = 420;

t1 = new TableLayout();
t1.Rows.Add(new TableRow(p1, p2));

t1.Rows[0].Cells[0].ScaleWidth = true;
t1.Rows[0].Cells[1].ScaleWidth = true;

p1.CreateAndAddLabelRow("Compounds and Stoichiometry (Include / Name / Heat of Formation (kJ/kg) / Stoich. Coeff. / Direct Order Exponent / Reverse Order Exponent)");

var compcontainer = new DynamicLayout();
Expand All @@ -78,7 +81,7 @@ void Initialize()
UpdateEquation();
};

var sc = new TextBox() { Width = (int)(sf * 30), Text = (rx.Components.ContainsKey(comp.Name) ? rx.Components[comp.Name].StoichCoeff.ToString() : 0.0f.ToString()) };
var sc = new TextBox() { Width = (int)(sf * 45), Text = (rx.Components.ContainsKey(comp.Name) ? rx.Components[comp.Name].StoichCoeff.ToString() : 0.0f.ToString()) };

sc.TextChanged += (sender, e) =>
{
Expand All @@ -101,7 +104,7 @@ void Initialize()
}
};

var txtdo = new TextBox() { Width = (int)(sf * 30), Text = (rx.Components.ContainsKey(comp.Name) ? rx.Components[comp.Name].DirectOrder.ToString() : 0.0f.ToString()) };
var txtdo = new TextBox() { Width = (int)(sf * 45), Text = (rx.Components.ContainsKey(comp.Name) ? rx.Components[comp.Name].DirectOrder.ToString() : 0.0f.ToString()) };

txtdo.TextChanged += (sender, e) =>
{
Expand All @@ -124,7 +127,7 @@ void Initialize()
}
};

var txtro = new TextBox() { Width = (int)(sf * 30), Text = (rx.Components.ContainsKey(comp.Name) ? rx.Components[comp.Name].ReverseOrder.ToString() : 0.0f.ToString()) };
var txtro = new TextBox() { Width = (int)(sf * 45), Text = (rx.Components.ContainsKey(comp.Name) ? rx.Components[comp.Name].ReverseOrder.ToString() : 0.0f.ToString()) };

txtro.TextChanged += (sender, e) =>
{
Expand Down
14 changes: 13 additions & 1 deletion DWSIM.UI.Desktop.Editors/UnitOperations/DistillationColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ void Initialize()
units.AddRange(su.GetUnitSet(Interfaces.Enums.UnitOfMeasure.massflow));
units.AddRange(su.GetUnitSet(Interfaces.Enums.UnitOfMeasure.heatflow));
units.AddRange(su.GetUnitSet(Interfaces.Enums.UnitOfMeasure.temperature));
units.AddRange(new[] { "% M/M", "% W/W", "M", "We" });
units.AddRange(new[] { "% M/M", "% W/W", "M", "We", "%" });
units.Insert(0, "");
int cspec = 0, rspec = 0;

Expand Down Expand Up @@ -460,6 +460,9 @@ void Initialize()
case ColumnSpec.SpecType.Temperature:
cspec = 8;
break;
case ColumnSpec.SpecType.Feed_Recovery:
cspec = 9;
break;
}

switch (column.Specs["R"].SType)
Expand Down Expand Up @@ -491,6 +494,9 @@ void Initialize()
case ColumnSpec.SpecType.Temperature:
rspec = 8;
break;
case ColumnSpec.SpecType.Feed_Recovery:
rspec = 9;
break;
}

s.CreateAndAddLabelRow(container, "Condenser Specification");
Expand Down Expand Up @@ -525,6 +531,9 @@ void Initialize()
case 8:
column.Specs["C"].SType = ColumnSpec.SpecType.Temperature;
break;
case 9:
column.Specs["C"].SType = ColumnSpec.SpecType.Feed_Recovery;
break;
}
});
var cid = 0;
Expand Down Expand Up @@ -578,6 +587,9 @@ void Initialize()
case 8:
column.Specs["R"].SType = ColumnSpec.SpecType.Temperature;
break;
case 9:
column.Specs["R"].SType = ColumnSpec.SpecType.Feed_Recovery;
break;
}
});
var cid2 = 0;
Expand Down
2 changes: 1 addition & 1 deletion DWSIM.UI.Desktop.Shared/Strings/StringArrays.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public static String[] pipecalcmode()
}
public static String[] columnspec()
{
return new String[] { "Product Molar Flow Rate", "Product Mass Flow Rate", "Reflux/Boil-Up Ratio", "Heat Load", "Compound Mass Flow", "Compound Molar Flow", "Compound Recovery", "Compound Fraction", "Temperature" };
return new String[] { "Product Molar Flow Rate", "Product Mass Flow Rate", "Reflux/Boil-Up Ratio", "Heat Load", "Compound Mass Flow", "Compound Molar Flow", "Compound Recovery", "Compound Fraction", "Temperature", "Feed Recovery" };
}
public static String[] petroleumtype()
{
Expand Down
3 changes: 3 additions & 0 deletions DWSIM/Forms/MainWindow/FormMain.vb
Original file line number Diff line number Diff line change
Expand Up @@ -1103,8 +1103,11 @@ Public Class FormMain
Dim frmwn As New FormWhatsNew()
frmwn.Show()
End If
#Else
MessageBox.Show("The Classic UI version of DWSIM is not supported on Linux. Use it at your own risk.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
#End If


AnalyticsProvider?.SetMainForm(Me)

AnalyticsProvider?.Initialize()
Expand Down

0 comments on commit fe93877

Please sign in to comment.