|
1 | | -using EZCode.GControls; |
2 | | -using EZCode.Debug; |
| 1 | +using EZCode.Debug; |
| 2 | +using EZCode.GControls; |
3 | 3 | using EZCode.Methods; |
4 | 4 | using EZCode.Variables; |
5 | 5 | using EZCode.Windows; |
@@ -2905,6 +2905,8 @@ async Task<Group> DoGroup(string[] parts, int _index, string keyword, bool globa |
2905 | 2905 | group1.SetRelativeChenges(control); |
2906 | 2906 | else |
2907 | 2907 | group1.SetAbsoluteChenges(tempc, control); |
| 2908 | + control.Refresh(); |
| 2909 | + if (control is GShape a) a.Refresh(); |
2908 | 2910 | } |
2909 | 2911 | } |
2910 | 2912 | catch |
@@ -4855,6 +4857,11 @@ string[] getString_value(string[] parts, int next, bool all = false, bool useVar |
4855 | 4857 | if (ended == 1) |
4856 | 4858 | { |
4857 | 4859 | count++; |
| 4860 | + var varstring = texts[l].Replace("\\(", texts[l].StartsWith("\\(") ? "" : "\\(").Replace(")\\", texts[l].EndsWith(")\\") ? "" : ")\\"); |
| 4861 | + if (getVar(varstring).isSet) |
| 4862 | + { |
| 4863 | + texts[l] = $"{(texts[l].StartsWith("\\(") ? "\\(" : "")}{getVar(varstring).Value}{(texts[l].EndsWith(")\\") ? ")\\" : "")}"; |
| 4864 | + } |
4858 | 4865 | brackets += texts[l]; |
4859 | 4866 | if (l < texts.Count - 1) brackets += " "; |
4860 | 4867 | } |
@@ -4988,6 +4995,11 @@ float[] getEquationWithNext(string value, int a, string[] parts) |
4988 | 4995 | if (ended == 1) |
4989 | 4996 | { |
4990 | 4997 | next++; |
| 4998 | + var varstring = parts[l].Replace("(", parts[l].StartsWith("(") ? "" : "(").Replace(")", parts[l].EndsWith(")") ? "" : ")"); |
| 4999 | + if (getVar(varstring).isSet) |
| 5000 | + { |
| 5001 | + parts[l] = $"{(parts[l].StartsWith("(") ? "(" : "")}{getVar(varstring).Value}{(parts[l].EndsWith(")") ? ")" : "")}"; |
| 5002 | + } |
4991 | 5003 | brackets.Append(parts[l]); |
4992 | 5004 | if (l < parts.Length - 1) brackets.Append(" "); |
4993 | 5005 | } |
@@ -5048,12 +5060,6 @@ float[] find_value(string[] parts, int next, int def, bool? var = true, bool col |
5048 | 5060 | { |
5049 | 5061 | try |
5050 | 5062 | { |
5051 | | - // Replace variables with their values |
5052 | | - foreach (Var variable in vars) |
5053 | | - { |
5054 | | - equation = equation.Replace(variable.Name, variable.Value); |
5055 | | - } |
5056 | | - |
5057 | 5063 | DataTable dt = new DataTable(); |
5058 | 5064 | dt.Columns.Add("expression", typeof(string), equation); |
5059 | 5065 | DataRow row = dt.NewRow(); |
|
0 commit comments