Skip to content

Commit

Permalink
change app icon and README
Browse files Browse the repository at this point in the history
  • Loading branch information
shapoco committed May 23, 2022
1 parent b083dcd commit 40d9a09
Show file tree
Hide file tree
Showing 8 changed files with 4,707 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -350,3 +350,4 @@ MigrationBackup/
.ionide/

releases/
materials/
7 changes: 6 additions & 1 deletion Calctus.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down Expand Up @@ -112,6 +115,8 @@
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<Content Include="icon.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
2 changes: 2 additions & 0 deletions Calctus/UI/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 17 additions & 2 deletions Calctus/UI/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ public MainForm() {

InitializeComponent();

try {
exprBox.Font = new Font("Consolas", exprBox.Font.Size);
logBox.Font = new Font("Consolas", logBox.Font.Size);
}
catch { }

this.Text = Application.ProductName + " (v" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version + ")";
exprBox.AutoSize = false;
exprBox.Dock = DockStyle.Fill;
Expand All @@ -43,8 +49,17 @@ private void ExprBox_TextChanged(object sender, EventArgs e) {
var val = expr.Eval(_ctx);
var text = "= " + val.ToString();
if (val is RealVal rval) {
if (rval.IsDimless)
text += " (無次元)";
if (rval.IsDimless) {
var dval = rval.AsDouble;
if (rval.IsInteger && 0xA <= dval && dval < UInt32.MaxValue) {
var rvalInt = rval.FormatInt();
var rvalHex = rval.FormatHex();
text = "= " + rvalInt.ToString() + " (" + rvalHex.ToString() + ")";
}
else {
text += " (無次元)";
}
}
else
text += " (raw=" + rval.Raw + ")";
}
Expand Down
4,673 changes: 4,673 additions & 0 deletions Calctus/UI/MainForm.resx

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@

a Calculator for Windows.

![image](https://user-images.githubusercontent.com/40152459/166926981-453717a8-5c8c-4115-b679-03020c3b2e66.png)
![Screen Shot](img/ss.png)

## Download

[releases](https://github.com/shapoco/calctus/releases).

## Features

### Overview

- Displays the evaluation value of a formula in text format.
- Decimal, hexadecimal, and binary numbers can be mixed.
- The formula history can be referenced with the up key.
- Some built-in constants and built-in functions.

### Numeric Representations

|Description|Example|
Expand Down
Binary file added icon.ico
Binary file not shown.
Binary file added img/ss.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 40d9a09

Please sign in to comment.