├── .github
├── dependabot.yml
└── workflows
│ ├── build.yml
│ └── codeql-analysis.yml
├── .gitignore
├── FloatTool.sln
├── FloatTool
├── App.xaml
├── App.xaml.cs
├── AppHelpers.cs
├── AssemblyInfo.cs
├── Assets
│ ├── AboutIcon.xaml
│ ├── BenchmarkIcon.xaml
│ ├── ButtonIcons.xaml
│ ├── DiscordLogo.xaml
│ ├── Found.wav
│ ├── Icon.ico
│ ├── Icon.png
│ ├── Icon.svg
│ ├── SettingsIcon.xaml
│ ├── SkinList.json
│ └── WarningIcon.xaml
├── Common
│ ├── BaseViewModel.cs
│ ├── Calculations.cs
│ ├── Logger.cs
│ ├── RelayCommand.cs
│ ├── Settings.cs
│ ├── Skin.cs
│ └── Utils.cs
├── FloatTool.csproj
├── FloatTool.csproj.user
├── Languages
│ ├── Lang.cs.xaml
│ ├── Lang.da.xaml
│ ├── Lang.de.xaml
│ ├── Lang.es.xaml
│ ├── Lang.fi.xaml
│ ├── Lang.fr.xaml
│ ├── Lang.ga.xaml
│ ├── Lang.he.xaml
│ ├── Lang.hr.xaml
│ ├── Lang.it.xaml
│ ├── Lang.ja.xaml
│ ├── Lang.ka.xaml
│ ├── Lang.lt.xaml
│ ├── Lang.lv.xaml
│ ├── Lang.pl.xaml
│ ├── Lang.pt.xaml
│ ├── Lang.ru.xaml
│ ├── Lang.tr.xaml
│ ├── Lang.uk.xaml
│ ├── Lang.xaml
│ └── Lang.zh.xaml
├── Properties
│ └── PublishProfiles
│ │ └── FolderProfile.pubxml
├── Theme
│ ├── BigTextBoxStyle.xaml
│ ├── CheckboxStyle.xaml
│ ├── ComboBoxStyle.xaml
│ ├── MainButtonStyle.xaml
│ ├── MainTextBoxStyle.xaml
│ ├── NumericBox.xaml
│ ├── NumericBox.xaml.cs
│ ├── Schemes
│ │ ├── Dark.xaml
│ │ └── Light.xaml
│ ├── ScrollBarStyle.xaml
│ ├── SwitchButtonStyle.xaml
│ ├── TooltipStyle.xaml
│ └── TopButtonStyle.xaml
├── ViewModels
│ ├── BenchmarkViewModel.cs
│ ├── MainViewModel.cs
│ └── SettingsViewModel.cs
└── Views
│ ├── AboutWindow.xaml
│ ├── AboutWindow.xaml.cs
│ ├── BenchmarkWindow.xaml
│ ├── BenchmarkWindow.xaml.cs
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ ├── SettingsWindow.xaml
│ ├── SettingsWindow.xaml.cs
│ ├── UpdateWindow.xaml
│ └── UpdateWindow.xaml.cs
├── ItemsParser
├── ItemParser.cs
├── ItemsParser.csproj
├── Program.cs
├── Structs.cs
├── Utils.cs
└── VdfConvert.cs
├── LICENSE
├── README.md
└── doc
├── icon.png
└── program.png
/.github/dependabot.yml:
--------------------------------------------------------------------------------
1 | # To get started with Dependabot version updates, you'll need to specify which
2 | # package ecosystems to update and where the package manifests are located.
3 | # Please see the documentation for all configuration options:
4 | # https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5 |
6 | version: 2
7 | updates:
8 | - package-ecosystem: "nuget"
9 | directory: "/"
10 | schedule:
11 | interval: "daily"
12 |
--------------------------------------------------------------------------------
/.github/workflows/build.yml:
--------------------------------------------------------------------------------
1 | name: Build C# Projects
2 |
3 | on: [push, pull_request]
4 |
5 | jobs:
6 | build:
7 | runs-on: windows-latest
8 |
9 | steps:
10 | - name: Checkout code
11 | uses: actions/checkout@v4
12 |
13 | - name: Setup .NET
14 | uses: actions/setup-dotnet@v4
15 | with:
16 | dotnet-version: '8.0.x'
17 |
18 | - name: Restore dependencies
19 | run: dotnet restore
20 |
21 | - name: Build solution
22 | run: dotnet build --no-restore --configuration Release
23 |
24 | - name: Publish FloatTool project
25 | run: dotnet publish ./FloatTool/FloatTool.csproj --configuration Release /p:PublishProfile=FolderProfile --output ./publish
26 |
27 | - name: Upload published artifacts
28 | uses: actions/upload-artifact@v4
29 | with:
30 | name: FloatTool-publish
31 | path: ./publish
--------------------------------------------------------------------------------
/.github/workflows/codeql-analysis.yml:
--------------------------------------------------------------------------------
1 | # For most projects, this workflow file will not need changing; you simply need
2 | # to commit it to your repository.
3 | #
4 | # You may wish to alter this file to override the set of languages analyzed,
5 | # or to provide custom queries or build logic.
6 | #
7 | # ******** NOTE ********
8 | # We have attempted to detect the languages in your repository. Please check
9 | # the `language` matrix defined below to confirm you have the correct set of
10 | # supported CodeQL languages.
11 | #
12 | name: "CodeQL"
13 |
14 | on:
15 | push:
16 | branches: [ master ]
17 | pull_request:
18 | # The branches below must be a subset of the branches above
19 | branches: [ master ]
20 | schedule:
21 | - cron: '44 4 * * 4'
22 |
23 | jobs:
24 | analyze:
25 | name: Analyze
26 | runs-on: windows-latest
27 | permissions:
28 | actions: read
29 | contents: read
30 | security-events: write
31 |
32 | strategy:
33 | fail-fast: false
34 | matrix:
35 | language: [ 'csharp' ]
36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37 | # Learn more about CodeQL language support at https://git.io/codeql-language-support
38 |
39 | steps:
40 | - name: Checkout repository
41 | uses: actions/checkout@v3
42 |
43 | # Initializes the CodeQL tools for scanning.
44 | - name: Initialize CodeQL
45 | uses: github/codeql-action/init@v2
46 | with:
47 | languages: ${{ matrix.language }}
48 | # If you wish to specify custom queries, you can do so here or in a config file.
49 | # By default, queries listed here will override any specified in a config file.
50 | # Prefix the list here with "+" to use these queries and those in the config file.
51 | # queries: ./path/to/local/query, your-org/your-repo/queries@main
52 |
53 | - name: Setup .NET
54 | uses: actions/setup-dotnet@v1
55 | with:
56 | dotnet-version: '7.0'
57 |
58 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
59 | # If this step fails, then you should remove it and run the build manually (see below)
60 | - name: Autobuild
61 | uses: github/codeql-action/autobuild@v2
62 |
63 | # ℹ️ Command-line programs to run using the OS shell.
64 | # 📚 https://git.io/JvXDl
65 |
66 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
67 | # and modify them (or add more) to build your code if your project
68 | # uses a compiled language
69 |
70 | #- run: |
71 | # make bootstrap
72 | # make release
73 |
74 | - name: Perform CodeQL Analysis
75 | uses: github/codeql-action/analyze@v2
76 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | .vs/
2 | bin/
3 | obj/
4 | *.user
5 |
--------------------------------------------------------------------------------
/FloatTool.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.1.32203.90
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FloatTool", "FloatTool\FloatTool.csproj", "{B1434F55-DAE9-4CC5-9460-8D20D29D1802}"
7 | EndProject
8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ItemsParser", "ItemsParser\ItemsParser.csproj", "{C5DE4078-D17D-45F7-95DC-C60747F8AABA}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {B1434F55-DAE9-4CC5-9460-8D20D29D1802}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {B1434F55-DAE9-4CC5-9460-8D20D29D1802}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {B1434F55-DAE9-4CC5-9460-8D20D29D1802}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {B1434F55-DAE9-4CC5-9460-8D20D29D1802}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {C5DE4078-D17D-45F7-95DC-C60747F8AABA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {C5DE4078-D17D-45F7-95DC-C60747F8AABA}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {C5DE4078-D17D-45F7-95DC-C60747F8AABA}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {C5DE4078-D17D-45F7-95DC-C60747F8AABA}.Release|Any CPU.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {33BF2014-254B-4A9C-980E-FB79F5D24D39}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/FloatTool/App.xaml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
--------------------------------------------------------------------------------
/FloatTool/AppHelpers.cs:
--------------------------------------------------------------------------------
1 | /*
2 | - Copyright(C) 2022 Prevter
3 | -
4 | - This program is free software: you can redistribute it and/or modify
5 | - it under the terms of the GNU General Public License as published by
6 | - the Free Software Foundation, either version 3 of the License, or
7 | - (at your option) any later version.
8 | -
9 | - This program is distributed in the hope that it will be useful,
10 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | - GNU General Public License for more details.
13 | -
14 | - You should have received a copy of the GNU General Public License
15 | - along with this program. If not, see .
16 | */
17 |
18 | using DiscordRPC;
19 | using FloatTool.Common;
20 | using System.Collections.Generic;
21 | using System.IO;
22 |
23 | namespace FloatTool
24 | {
25 | internal static class AppHelpers
26 | {
27 | public static FileSystemWatcher Watcher;
28 | public static DiscordRpcClient DiscordClient;
29 | public static string VersionCode;
30 | public static string AppDirectory;
31 | public static Settings Settings;
32 | public static List ThemesFound { get; set; }
33 | }
34 | }
--------------------------------------------------------------------------------
/FloatTool/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | /*
2 | - Copyright(C) 2022 Prevter
3 | -
4 | - This program is free software: you can redistribute it and/or modify
5 | - it under the terms of the GNU General Public License as published by
6 | - the Free Software Foundation, either version 3 of the License, or
7 | - (at your option) any later version.
8 | -
9 | - This program is distributed in the hope that it will be useful,
10 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | - GNU General Public License for more details.
13 | -
14 | - You should have received a copy of the GNU General Public License
15 | - along with this program. If not, see .
16 | */
17 | using System.Windows;
18 |
19 | [assembly: ThemeInfo(
20 | ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
21 | //(used if a resource is not found in the page,
22 | // or application resource dictionaries)
23 | ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
24 | //(used if a resource is not found in the page,
25 | // app, or any theme specific resource dictionaries)
26 | )]
27 |
--------------------------------------------------------------------------------
/FloatTool/Assets/AboutIcon.xaml:
--------------------------------------------------------------------------------
1 |
17 |
20 |
21 | M482.906-269.333q17.427 0 29.594-12.25 12.166-12.25 12.166-30.084v-166.667q0-17.183-12.283-29.424Q500.099-520 482.673-520q-17.427 0-29.717 12.242-12.289 12.241-12.289 29.424v166.667q0 17.834 12.406 30.084 12.407 12.25 29.833 12.25Zm-3.035-337.333q17.796 0 29.962-11.833Q522-630.332 522-647.824q0-18.809-12.021-30.825-12.021-12.017-29.792-12.017-18.52 0-30.354 11.841Q438-666.984 438-648.508q0 17.908 12.038 29.875 12.038 11.967 29.833 11.967Zm.001 547.999q-87.157 0-163.841-33.353-76.684-33.354-133.671-90.34-56.986-56.987-90.34-133.808-33.353-76.821-33.353-164.165 0-87.359 33.412-164.193 33.413-76.834 90.624-134.057 57.211-57.224 133.757-89.987t163.578-32.763q87.394 0 164.429 32.763 77.034 32.763 134.117 90 57.082 57.237 89.916 134.292 32.833 77.056 32.833 164.49 0 87.433-32.763 163.67-32.763 76.236-89.987 133.308-57.223 57.073-134.261 90.608-77.037 33.535-164.45 33.535Z
22 |
23 |
--------------------------------------------------------------------------------
/FloatTool/Assets/BenchmarkIcon.xaml:
--------------------------------------------------------------------------------
1 |
17 |
20 |
21 | M 53.160328 73.32662 V 16.606488 c 0 -5.3683 13.728579 -5.696576 13.728579 0 V 73.350767 Z M 32.80832 73.36781 V 32.045845 c 0 -4.92034 13.72858 -5.261315 13.72858 0 V 73.387738 Z M 13.250169 73.312773 V 46.386718 c 0 -5.210027 13.72858 -5.168115 13.72858 0 v 26.937518 z
22 |
23 |
--------------------------------------------------------------------------------
/FloatTool/Assets/ButtonIcons.xaml:
--------------------------------------------------------------------------------
1 |
17 |
20 |
21 | M 21.598028 19.825707 20.707014 20.716709 34.465 34.474517 20.707014 48.232707 21.598028 49.123327 35.356014 35.36552 49.114003 49.123327 50.004634 48.232707 36.246648 34.474517 50.004634 20.716709 49.114003 19.825707 35.356014 33.583897 Z
22 |
23 |
24 | m 24.651955 20.770647 h 20.836309 c 1.662 0 3 1.338 3 3 v 20.836309 c 0 1.662 -1.338 3 -3 3 H 24.651955 c -1.662 0 -3 -1.338 -3 -3 V 23.770647 c 0 -1.662 1.338 -3 3 -3 z
25 |
26 |
27 | M 17.494216 34.566778 H 53.401953
28 |
29 |
--------------------------------------------------------------------------------
/FloatTool/Assets/DiscordLogo.xaml:
--------------------------------------------------------------------------------
1 |
17 |
20 |
21 | M60.1045 4.8978C55.5792 2.8214 50.7265 1.2916 45.6527 0.41542C45.5603 0.39851 45.468 0.440769 45.4204 0.525289C44.7963 1.6353 44.105 3.0834 43.6209 4.2216C38.1637 3.4046 32.7345 3.4046 27.3892 4.2216C26.905 3.0581 26.1886 1.6353 25.5617 0.525289C25.5141 0.443589 25.4218 0.40133 25.3294 0.41542C20.2584 1.2888 15.4057 2.8186 10.8776 4.8978C10.8384 4.9147 10.8048 4.9429 10.7825 4.9795C1.57795 18.7309 -0.943561 32.1443 0.293408 45.3914C0.299005 45.4562 0.335386 45.5182 0.385761 45.5576C6.45866 50.0174 12.3413 52.7249 18.1147 54.5195C18.2071 54.5477 18.305 54.5139 18.3638 54.4378C19.7295 52.5728 20.9469 50.6063 21.9907 48.5383C22.0523 48.4172 21.9935 48.2735 21.8676 48.2256C19.9366 47.4931 18.0979 46.6 16.3292 45.5858C16.1893 45.5041 16.1781 45.304 16.3068 45.2082C16.679 44.9293 17.0513 44.6391 17.4067 44.3461C17.471 44.2926 17.5606 44.2813 17.6362 44.3151C29.2558 49.6202 41.8354 49.6202 53.3179 44.3151C53.3935 44.2785 53.4831 44.2898 53.5502 44.3433C53.9057 44.6363 54.2779 44.9293 54.6529 45.2082C54.7816 45.304 54.7732 45.5041 54.6333 45.5858C52.8646 46.6197 51.0259 47.4931 49.0921 48.2228C48.9662 48.2707 48.9102 48.4172 48.9718 48.5383C50.038 50.6034 51.2554 52.5699 52.5959 54.435C52.6519 54.5139 52.7526 54.5477 52.845 54.5195C58.6464 52.7249 64.529 50.0174 70.6019 45.5576C70.6551 45.5182 70.6887 45.459 70.6943 45.3942C72.1747 30.0791 68.2147 16.7757 60.1968 4.9823C60.1772 4.9429 60.1437 4.9147 60.1045 4.8978ZM23.7259 37.3253C20.2276 37.3253 17.3451 34.1136 17.3451 30.1693C17.3451 26.225 20.1717 23.0133 23.7259 23.0133C27.308 23.0133 30.1626 26.2532 30.1066 30.1693C30.1066 34.1136 27.28 37.3253 23.7259 37.3253ZM47.3178 37.3253C43.8196 37.3253 40.9371 34.1136 40.9371 30.1693C40.9371 26.225 43.7636 23.0133 47.3178 23.0133C50.9 23.0133 53.7545 26.2532 53.6986 30.1693C53.6986 34.1136 50.9 37.3253 47.3178 37.3253Z
22 |
23 |
--------------------------------------------------------------------------------
/FloatTool/Assets/Found.wav:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Prevter/FloatTool/dc502e8dcf1dd7a25df2ef04de81c3899a40c6a3/FloatTool/Assets/Found.wav
--------------------------------------------------------------------------------
/FloatTool/Assets/Icon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Prevter/FloatTool/dc502e8dcf1dd7a25df2ef04de81c3899a40c6a3/FloatTool/Assets/Icon.ico
--------------------------------------------------------------------------------
/FloatTool/Assets/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Prevter/FloatTool/dc502e8dcf1dd7a25df2ef04de81c3899a40c6a3/FloatTool/Assets/Icon.png
--------------------------------------------------------------------------------
/FloatTool/Assets/SettingsIcon.xaml:
--------------------------------------------------------------------------------
1 |
17 |
20 |
21 | M 32.871094 73.265758 C 32.313691 73.088238 31.865564 72.628887 31.723912 72.089844 31.701329 72.003906 31.410005 70 31.076525 67.636719 30.743046 65.273437 30.461043 63.286746 30.449854 63.221852 30.430838 63.111562 30.388066 63.08527 29.794833 62.819187 28.317912 62.15675 26.757678 61.243215 25.297511 60.185957 L 24.79424 59.821555 22.485011 60.753 c -6.427632 2.592633 -6.167792 2.491375 -6.454751 2.515387 -0.49373 0.04132 -1.025649 -0.166703 -1.343227 -0.525301 C 14.521766 62.556469 7.7637008 50.873008 7.6711184 50.613844 7.5276805 50.212328 7.5654445 49.688027 7.7649426 49.311227 7.912016 49.033441 8.0137945 48.924488 8.4596551 48.567543 8.7291402 48.351801 15.062009 43.384969 15.226306 43.2605 c 0.0063 -0.0048 -0.008 -0.16466 -0.03185 -0.355297 C 14.94365 40.89802 14.951372 38.820425 15.216866 36.875 l 0.01866 -0.136719 -1.452574 -1.132812 c -3.453831 -2.693524 -5.5337915 -4.334656 -5.7031365 -4.499892 -0.4369922 -0.42639 -0.6068691 -1.07319 -0.4306074 -1.63952 0.045145 -0.145051 1.3171438 -2.387953 3.4855639 -6.146058 2.770366 -4.801344 3.451464 -5.954952 3.610553 -6.115367 0.352444 -0.355383 0.908869 -0.537903 1.394507 -0.45743 0.158796 0.02631 0.923439 0.313683 2.141466 0.804809 1.041963 0.420135 2.933992 1.183101 4.204508 1.69548 l 2.310028 0.931597 0.443878 -0.328311 c 1.395086 -1.031865 3.135083 -2.046744 4.672195 -2.725126 0.479522 -0.211631 0.518875 -0.237014 0.537833 -0.346916 0.01125 -0.06522 0.293302 -2.052173 0.626781 -4.415454 C 31.410005 10 31.701329 7.9960937 31.723912 7.9101562 31.844657 7.450673 32.195758 7.0376441 32.647526 6.823632 l 0.26263 -0.1244133 H 40 47.089844 l 0.260922 0.1236141 c 0.423445 0.2006109 0.762183 0.5680094 0.910015 0.9870133 0.04626 0.1311199 1.308824 8.8457279 1.309742 9.0402539 0 0.02444 0.197868 0.130137 0.439454 0.234888 1.492015 0.646942 3.391671 1.751808 4.777367 2.77858 l 0.431875 0.320011 1.228281 -0.496129 c 7.280309 -2.940676 7.263852 -2.934218 7.535809 -2.957018 0.477293 -0.04001 0.960632 0.141375 1.301714 0.488512 0.136743 0.139171 1.00159 1.605873 3.58618 6.081837 2.125535 3.680974 3.434363 5.986549 3.481473 6.132813 0.11014 0.341947 0.0842 0.854418 -0.05899 1.165464 -0.05772 0.125381 -0.159164 0.296428 -0.225437 0.380106 -0.06627 0.08368 -1.732082 1.412293 -3.701797 2.952481 -1.969715 1.540186 -3.586457 2.803985 -3.592762 2.80844 -0.0063 0.0045 0.008 0.164075 0.03185 0.354711 0.236336 1.891386 0.247461 3.540677 0.03683 5.460528 -0.04223 0.384918 -0.07238 0.702653 -0.067 0.706078 0.0183 0.01165 2.346359 1.834918 4.697281 3.678782 1.289063 1.011027 2.417207 1.917984 2.506992 2.015453 0.396293 0.430234 0.539274 1.03809 0.371204 1.578105 -0.04498 0.144512 -1.285575 2.334059 -3.382754 5.970278 -1.821453 3.15814 -3.388621 5.859796 -3.482602 6.003675 -0.365769 0.56 -1.033684 0.857571 -1.662504 0.740684 -0.160844 -0.0299 -8.429996 -3.326125 -8.585941 -3.422504 -0.01315 -0.0081 -0.199297 0.117141 -0.413676 0.278367 -1.34957 1.014961 -3.230539 2.113653 -4.774293 2.788703 -0.441617 0.193114 -0.479844 0.218242 -0.498937 0.328016 -0.01137 0.06539 -0.293454 2.052476 -0.626848 4.415758 -0.333395 2.363281 -0.624645 4.367187 -0.647219 4.453125 -0.120703 0.459445 -0.471828 0.872508 -0.923605 1.086523 l -0.262629 0.124414 -7.03125 0.0074 c -5.603834 0.0059 -7.062971 -0.0027 -7.1875 -0.04239 z M 41.404645 51.57857 c 2.841339 -0.3288 5.529312 -1.757886 7.414226 -3.941851 1.535609 -1.779239 2.480906 -3.92134 2.767785 -6.271969 0.08563 -0.701641 0.08563 -2.027859 0 -2.729499 -0.169008 -1.384834 -0.51623 -2.548638 -1.137023 -3.811032 -0.566695 -1.152388 -1.269852 -2.12995 -2.206649 -3.067798 -0.938289 -0.939347 -1.90357 -1.633587 -3.067203 -2.205966 -1.690593 -0.831586 -3.271574 -1.200331 -5.15625 -1.202633 -0.856621 -0.001 -1.337513 0.03871 -2.088583 0.172648 -4.324698 0.771247 -7.828019 3.90703 -9.115541 8.159217 -0.534089 1.763893 -0.620328 3.838145 -0.237011 5.700688 0.361122 1.754691 1.187107 3.507047 2.321109 4.924312 0.424673 0.53075 1.275214 1.380274 1.795807 1.793657 1.318379 1.046867 2.811858 1.794644 4.38106 2.19357 0.779536 0.198176 1.468227 0.303656 2.376753 0.364027 0.366129 0.02433 1.440906 -0.01828 1.95152 -0.07737 z
22 |
23 |
--------------------------------------------------------------------------------
/FloatTool/Assets/WarningIcon.xaml:
--------------------------------------------------------------------------------
1 |
17 |
19 |
20 |
48 |
49 |
--------------------------------------------------------------------------------
/FloatTool/Common/BaseViewModel.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using System.ComponentModel;
3 | using System.Runtime.CompilerServices;
4 |
5 | namespace FloatTool.Common
6 | {
7 | public abstract class BaseViewModel : INotifyPropertyChanged
8 | {
9 | public event PropertyChangedEventHandler? PropertyChanged;
10 |
11 | public BaseViewModel()
12 | {
13 |
14 | }
15 |
16 | public void OnPropertyChanged([CallerMemberName] string propertyName = "")
17 | {
18 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
19 | }
20 |
21 | public void SetField(ref T field, T value, [CallerMemberName] string propertyName = "")
22 | {
23 | if (EqualityComparer.Default.Equals(field, value))
24 | return;
25 |
26 | field = value;
27 | OnPropertyChanged(propertyName);
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/FloatTool/Common/Calculations.cs:
--------------------------------------------------------------------------------
1 | /*
2 | - Copyright(C) 2022 Prevter
3 | -
4 | - This program is free software: you can redistribute it and/or modify
5 | - it under the terms of the GNU General Public License as published by
6 | - the Free Software Foundation, either version 3 of the License, or
7 | - (at your option) any later version.
8 | -
9 | - This program is distributed in the hope that it will be useful,
10 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | - GNU General Public License for more details.
13 | -
14 | - You should have received a copy of the GNU General Public License
15 | - along with this program. If not, see .
16 | */
17 |
18 | using System.Numerics;
19 |
20 | namespace FloatTool.Common
21 | {
22 | static public class Calculations
23 | {
24 | public static double Craft(InputSkin[] ingridients, double minFloat, double floatRange)
25 | {
26 | return floatRange * (ingridients[0].WearValue
27 | + ingridients[1].WearValue
28 | + ingridients[2].WearValue
29 | + ingridients[3].WearValue
30 | + ingridients[4].WearValue
31 | + ingridients[5].WearValue
32 | + ingridients[6].WearValue
33 | + ingridients[7].WearValue
34 | + ingridients[8].WearValue
35 | + ingridients[9].WearValue) + minFloat;
36 | }
37 |
38 | public static bool NextCombination(int[] num, int n)
39 | {
40 | bool finished = false;
41 | for (int i = 9; !finished; --i)
42 | {
43 | if (num[i] < n + i)
44 | {
45 | ++num[i];
46 | if (i < 9)
47 | for (int j = i + 1; j < 10; ++j)
48 | num[j] = num[j - 1] + 1;
49 | return true;
50 | }
51 | finished = i == 0;
52 | }
53 | return false;
54 | }
55 |
56 | public static bool NextCombination(int[] arr, int n, int step)
57 | {
58 | arr[9] += step;
59 | if (arr[9] < n + 10) return true;
60 | else
61 | {
62 | fix_loop:
63 | int overflow = arr[9] - (n + 10);
64 | for (int i = 9; i >= 0; --i)
65 | {
66 | if (arr[i] < n + i)
67 | {
68 | ++arr[i];
69 | for (int j = i + 1; j < 10; ++j)
70 | arr[j] = arr[j - 1] + 1;
71 |
72 | arr[9] += overflow;
73 |
74 | if (arr[9] < n + 10) return true;
75 | else goto fix_loop;
76 | }
77 | }
78 | return false;
79 | }
80 | }
81 |
82 | public static long GetCombinationsCount(int poolSize)
83 | {
84 | BigInteger fact1 = poolSize;
85 | for (int i = poolSize - 1; i > 10; i--)
86 | fact1 *= i;
87 |
88 | BigInteger fact2 = poolSize - 10;
89 | for (int i = poolSize - 11; i > 1; i--)
90 | fact2 *= i;
91 |
92 | return (long)(fact1 / fact2);
93 | }
94 | }
95 | }
96 |
--------------------------------------------------------------------------------
/FloatTool/Common/Logger.cs:
--------------------------------------------------------------------------------
1 | /*
2 | - Copyright(C) 2022 Prevter
3 | -
4 | - This program is free software: you can redistribute it and/or modify
5 | - it under the terms of the GNU General Public License as published by
6 | - the Free Software Foundation, either version 3 of the License, or
7 | - (at your option) any later version.
8 | -
9 | - This program is distributed in the hope that it will be useful,
10 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | - GNU General Public License for more details.
13 | -
14 | - You should have received a copy of the GNU General Public License
15 | - along with this program. If not, see .
16 | */
17 |
18 | using log4net;
19 | using log4net.Appender;
20 | using log4net.Core;
21 | using log4net.Layout;
22 | using log4net.Repository.Hierarchy;
23 | using System.Reflection;
24 |
25 | namespace FloatTool.Common
26 | {
27 | public sealed class Logger
28 | {
29 | public static ILog Log { get; } = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
30 |
31 | public static void Initialize()
32 | {
33 | Hierarchy hierarchy = (Hierarchy)LogManager.GetRepository();
34 |
35 | PatternLayout patternLayout = new()
36 | {
37 | ConversionPattern = "%date [%thread] %-5level - %message%newline"
38 | };
39 | patternLayout.ActivateOptions();
40 |
41 | RollingFileAppender roller = new()
42 | {
43 | AppendToFile = false,
44 | File = @"logs/log.txt",
45 | Layout = patternLayout,
46 | MaxSizeRollBackups = 5,
47 | MaximumFileSize = "250KB",
48 | RollingStyle = RollingFileAppender.RollingMode.Size,
49 | StaticLogFileName = true
50 | };
51 | roller.ActivateOptions();
52 | hierarchy.Root.AddAppender(roller);
53 |
54 | MemoryAppender memory = new();
55 | memory.ActivateOptions();
56 | hierarchy.Root.AddAppender(memory);
57 |
58 | hierarchy.Root.Level = Level.Info;
59 | hierarchy.Configured = true;
60 | }
61 |
62 | public static void Debug(object message) => Log.Debug(message);
63 | public static void Info(object message) => Log.Info(message);
64 | public static void Warn(object message) => Log.Warn(message);
65 | public static void Error(object message) => Log.Error(message);
66 | public static void Fatal(object message) => Log.Fatal(message);
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/FloatTool/Common/RelayCommand.cs:
--------------------------------------------------------------------------------
1 | /*
2 | - Copyright(C) 2022 Prevter
3 | -
4 | - This program is free software: you can redistribute it and/or modify
5 | - it under the terms of the GNU General Public License as published by
6 | - the Free Software Foundation, either version 3 of the License, or
7 | - (at your option) any later version.
8 | -
9 | - This program is distributed in the hope that it will be useful,
10 | - but WITHOUT ANY WARRANTY; without even the implied warranty of
11 | - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 | - GNU General Public License for more details.
13 | -
14 | - You should have received a copy of the GNU General Public License
15 | - along with this program. If not, see .
16 | */
17 |
18 | using System;
19 | using System.Windows.Input;
20 |
21 | namespace FloatTool.Common
22 | {
23 | public sealed class RelayCommand : ICommand
24 | {
25 | readonly Action