diff --git a/.gitignore b/.gitignore
index 4a63b91..0807db4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
obj/
bin/
.vs/PhysFormuler/v16/Server/sqlite3/storage.ide
+/.vs/PhysFormuler/v16
diff --git a/MainWindow.xaml b/MainWindow.xaml
index 31602d3..7022a96 100644
--- a/MainWindow.xaml
+++ b/MainWindow.xaml
@@ -32,7 +32,7 @@
-
+
0
@@ -44,7 +44,7 @@
-
+
0
diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs
index 101ef19..b404ad4 100644
--- a/MainWindow.xaml.cs
+++ b/MainWindow.xaml.cs
@@ -18,7 +18,7 @@ namespace PhysFormuler
{
public static class Numbers
{
- public static float I, U, R, q, A, S, p, l, t;
+ public static float I, U, R, q, A, S, p, l, temp;
}
///
@@ -32,33 +32,23 @@ namespace PhysFormuler
}
- private bool IsReady(TextBox box,string type)
+ private bool IsReady(TextBox box, string type)
{
- if(type != "T")
+ if (box.Text != "")
{
- if(box.Text != "")
- {
- if(Convert.ToDouble(box.Text) != 0)
- {
- return true;
- } else
- {
- return false;
- }
- } else
- {
- return false;
- }
- } else
- {
- if(box.Text != "")
+ if (Convert.ToDouble(box.Text) != 0)
{
return true;
- } else
+ }
+ else
{
return false;
}
}
+ else
+ {
+ return false;
+ }
}
private void Update(string type)
@@ -146,7 +136,7 @@ namespace PhysFormuler
if (!Math.Round(Numbers.R, 4).Equals(R.Text) && IsReady(R, type)) Numbers.R = (float)Convert.ToDouble(R.Text);
if (!Math.Round(Numbers.U, 4).Equals(U.Text) && IsReady(U, type)) Numbers.U = (float)Convert.ToDouble(U.Text);
if (!Math.Round(Numbers.q, 4).Equals(q.Text) && IsReady(q, type)) Numbers.q = (float)Convert.ToDouble(q.Text);
- if (!Math.Round(Numbers.t, 4).Equals(t.Text) && IsReady(t, type)) Numbers.t = (float)Convert.ToDouble(t.Text);
+ if (!Math.Round(Numbers.temp, 4).Equals(temp.Text) && IsReady(temp, type)) Numbers.temp = (float)Convert.ToDouble(temp.Text);
if (IsReady(I, type))
{
if (IsReady(R, type))
@@ -161,12 +151,12 @@ namespace PhysFormuler
}
if(IsReady(q, type))
{
- Numbers.t = Numbers.q / Numbers.I;
- t.Text = Math.Round(Numbers.t, 4).ToString();
+ Numbers.temp = Numbers.q / Numbers.I;
+ temp.Text = Math.Round(Numbers.temp, 4).ToString();
}
- if(IsReady(t, type))
+ if(IsReady(temp, type))
{
- Numbers.q = Numbers.I * Numbers.t;
+ Numbers.q = Numbers.I * Numbers.temp;
q.Text = Math.Round(Numbers.q, 4).ToString();
}
}
@@ -175,7 +165,7 @@ namespace PhysFormuler
if (!Math.Round(Numbers.U, 4).Equals(U.Text) && IsReady(U, type)) Numbers.U = (float)Convert.ToDouble(U.Text);
if (!Math.Round(Numbers.q, 4).Equals(q.Text) && IsReady(q, type)) Numbers.q = (float)Convert.ToDouble(q.Text);
if (!Math.Round(Numbers.I, 4).Equals(I.Text) && IsReady(I, type)) Numbers.I = (float)Convert.ToDouble(I.Text);
- if (!Math.Round(Numbers.t, 4).Equals(t.Text) && IsReady(t, type)) Numbers.t = (float)Convert.ToDouble(t.Text);
+ if (!Math.Round(Numbers.temp, 4).Equals(temp.Text) && IsReady(temp, type)) Numbers.temp = (float)Convert.ToDouble(temp.Text);
if (!Math.Round(Numbers.A, 4).Equals(A.Text) && IsReady(A, type)) Numbers.A = (float)Convert.ToDouble(A.Text);
if (IsReady(q, type))
{
@@ -186,12 +176,12 @@ namespace PhysFormuler
}
if(IsReady(I, type))
{
- Numbers.t = Numbers.q / Numbers.I;
- t.Text = Math.Round(Numbers.t, 4).ToString();
+ Numbers.temp = Numbers.q / Numbers.I;
+ temp.Text = Math.Round(Numbers.temp, 4).ToString();
}
- if(IsReady(t, type))
+ if(IsReady(temp, type))
{
- Numbers.I = Numbers.q / Numbers.t;
+ Numbers.I = Numbers.q / Numbers.temp;
I.Text = Math.Round(Numbers.I, 4).ToString();
}
if(IsReady(A, type))
@@ -219,20 +209,20 @@ namespace PhysFormuler
}
}
break;
- case "t":
+ case "temp":
if (!Math.Round(Numbers.I, 4).Equals(I.Text) && IsReady(I, type)) Numbers.I = (float)Convert.ToDouble(I.Text);
- if (!Math.Round(Numbers.t, 4).Equals(t.Text) && IsReady(t, type)) Numbers.t = (float)Convert.ToDouble(t.Text);
+ if (!Math.Round(Numbers.temp, 4).Equals(temp.Text) && IsReady(temp, type)) Numbers.temp = (float)Convert.ToDouble(temp.Text);
if (!Math.Round(Numbers.q, 4).Equals(q.Text) && IsReady(q, type)) Numbers.q = (float)Convert.ToDouble(q.Text);
- if (IsReady(t, type))
+ if (IsReady(temp, type))
{
if(IsReady(I, type))
{
- Numbers.q = Numbers.I * Numbers.t;
+ Numbers.q = Numbers.I * Numbers.temp;
q.Text = Math.Round(Numbers.q, 4).ToString();
}
if(IsReady(q, type))
{
- Numbers.I = Numbers.q / Numbers.t;
+ Numbers.I = Numbers.q / Numbers.temp;
I.Text = Math.Round(Numbers.I, 4).ToString();
}
}
diff --git a/PhysFormuler.csproj b/PhysFormuler.csproj
index 0c5e085..d110294 100644
--- a/PhysFormuler.csproj
+++ b/PhysFormuler.csproj
@@ -106,7 +106,7 @@
true
- true
+ false
true
diff --git a/PhysFormuler.csproj.user b/PhysFormuler.csproj.user
new file mode 100644
index 0000000..729e852
--- /dev/null
+++ b/PhysFormuler.csproj.user
@@ -0,0 +1,13 @@
+
+
+
+ publish\
+
+
+
+
+
+ ru-RU
+ false
+
+
\ No newline at end of file
diff --git a/obj/Debug/MainWindow.g.i.cs b/obj/Debug/MainWindow.g.i.cs
index d90f45d..0b58d9a 100644
--- a/obj/Debug/MainWindow.g.i.cs
+++ b/obj/Debug/MainWindow.g.i.cs
@@ -1,4 +1,4 @@
-#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "905AB3A0E2CB9BB19DCE83B0EEF5E529632538E93829694E29FFE79AF854195F"
+#pragma checksum "..\..\MainWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "E2B7F3ED7BDFD5270AF26D4431978FF6D274ED6379895ED40BA2A3745C88BE94"
//------------------------------------------------------------------------------
//
// Этот код создан программой.
@@ -75,7 +75,7 @@ namespace PhysFormuler {
#line 35 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.TextBox t;
+ internal System.Windows.Controls.TextBox time;
#line default
#line hidden
@@ -91,7 +91,7 @@ namespace PhysFormuler {
#line 47 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
- internal System.Windows.Controls.TextBox T;
+ internal System.Windows.Controls.TextBox temp;
#line default
#line hidden
@@ -195,10 +195,10 @@ namespace PhysFormuler {
#line hidden
return;
case 5:
- this.t = ((System.Windows.Controls.TextBox)(target));
+ this.time = ((System.Windows.Controls.TextBox)(target));
#line 35 "..\..\MainWindow.xaml"
- this.t.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TC);
+ this.time.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TC);
#line default
#line hidden
@@ -213,10 +213,10 @@ namespace PhysFormuler {
#line hidden
return;
case 7:
- this.T = ((System.Windows.Controls.TextBox)(target));
+ this.temp = ((System.Windows.Controls.TextBox)(target));
#line 47 "..\..\MainWindow.xaml"
- this.T.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TC);
+ this.temp.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TC);
#line default
#line hidden