code
This commit is contained in:
parent
e5b7b564b5
commit
77ab29b3f3
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
</configuration>
|
|
@ -56,7 +56,7 @@
|
|||
this.evalBox.BackColor = System.Drawing.Color.White;
|
||||
this.evalBox.Location = new System.Drawing.Point(3, 5);
|
||||
this.evalBox.Name = "evalBox";
|
||||
this.evalBox.Size = new System.Drawing.Size(231, 134);
|
||||
this.evalBox.Size = new System.Drawing.Size(231, 147);
|
||||
this.evalBox.TabIndex = 0;
|
||||
//
|
||||
// calcBox1
|
||||
|
@ -178,7 +178,7 @@
|
|||
// evalButton
|
||||
//
|
||||
this.evalButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.evalButton.Location = new System.Drawing.Point(3, 145);
|
||||
this.evalButton.Location = new System.Drawing.Point(3, 151);
|
||||
this.evalButton.Name = "evalButton";
|
||||
this.evalButton.Size = new System.Drawing.Size(59, 23);
|
||||
this.evalButton.TabIndex = 9;
|
||||
|
@ -188,8 +188,8 @@
|
|||
//
|
||||
// logExpandButton
|
||||
//
|
||||
this.logExpandButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.logExpandButton.Location = new System.Drawing.Point(211, 145);
|
||||
this.logExpandButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.logExpandButton.Location = new System.Drawing.Point(211, 151);
|
||||
this.logExpandButton.Name = "logExpandButton";
|
||||
this.logExpandButton.Size = new System.Drawing.Size(23, 23);
|
||||
this.logExpandButton.TabIndex = 0;
|
||||
|
|
|
@ -1,24 +1,17 @@
|
|||
using NCalc2;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PowerCalc
|
||||
{
|
||||
public partial class MainForm : Form
|
||||
{
|
||||
Thread evalThread;
|
||||
public MainForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
private Thread evalThread;
|
||||
|
||||
public MainForm() => InitializeComponent();
|
||||
|
||||
private void logCollapseButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
@ -56,7 +49,7 @@ namespace PowerCalc
|
|||
try
|
||||
{
|
||||
s.Item3.Parameters.Clear();
|
||||
s.Item3.Parameters.Add("x", i/10);
|
||||
s.Item3.Parameters.Add("x", i / 10);
|
||||
double val = -1;
|
||||
object tmp = s.Item3.Evaluate();
|
||||
if (tmp.GetType() == typeof(bool))
|
||||
|
@ -121,7 +114,7 @@ namespace PowerCalc
|
|||
evalThread.Start();
|
||||
}
|
||||
|
||||
void log(string text)
|
||||
private void log(string text)
|
||||
{
|
||||
Invoke((MethodInvoker)delegate () { logBox.Text = text + "\r\n" + logBox.Text; });
|
||||
#if DEBUG
|
||||
|
@ -129,4 +122,4 @@ namespace PowerCalc
|
|||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,22 +1,19 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PowerCalc
|
||||
{
|
||||
static class Program
|
||||
internal static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
private static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new MainForm());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
|
@ -33,4 +32,4 @@ using System.Runtime.InteropServices;
|
|||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
Reference in New Issue