Skip to content

Commit

Permalink
v.0.5.2
Browse files Browse the repository at this point in the history
403 Connection error to cssgofloat api fix
  • Loading branch information
Prevter committed Apr 5, 2021
1 parent a1ed803 commit 402eac6
Show file tree
Hide file tree
Showing 9 changed files with 571 additions and 4 deletions.
70 changes: 70 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,72 @@
FloatToolGUI\bin
FloatToolGUI\obj
FloatToolGUI/bin/Debug/DiscordRPC.dll
FloatToolGUI/bin/Debug/DiscordRPC.pdb
FloatToolGUI/bin/Debug/DiscordRPC.xml
FloatToolGUI/bin/Debug/en/FloatTool.resources.dll
FloatToolGUI/bin/Debug/FloatTool.exe
FloatToolGUI/bin/Debug/FloatTool.exe.config
FloatToolGUI/bin/Debug/FloatTool.pdb
FloatToolGUI/bin/Debug/itemData.json
FloatToolGUI/bin/Debug/Newtonsoft.Json.dll
FloatToolGUI/bin/Debug/Newtonsoft.Json.xml
FloatToolGUI/bin/Debug/ru/FloatTool.resources.dll
FloatToolGUI/bin/Release/DiscordRPC.dll
FloatToolGUI/bin/Release/DiscordRPC.pdb
FloatToolGUI/bin/Release/DiscordRPC.xml
FloatToolGUI/bin/Release/en/FloatTool.resources.dll
FloatToolGUI/bin/Release/FloatTool.exe
FloatToolGUI/bin/Release/FloatTool.exe.config
FloatToolGUI/bin/Release/FloatTool.pdb
FloatToolGUI/bin/Release/itemData.json
FloatToolGUI/bin/Release/Newtonsoft.Json.dll
FloatToolGUI/bin/Release/Newtonsoft.Json.xml
FloatToolGUI/bin/Release/ru/FloatTool.resources.dll
FloatToolGUI/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs
FloatToolGUI/obj/Debug/en/FloatTool.resources.dll
FloatToolGUI/obj/Debug/FloatTool.exe
FloatToolGUI/obj/Debug/FloatTool.pdb
FloatToolGUI/obj/Debug/FloatToolGUI.Benchmark.resources
FloatToolGUI/obj/Debug/FloatToolGUI.csproj.CopyComplete
FloatToolGUI/obj/Debug/FloatToolGUI.csproj.CoreCompileInputs.cache
FloatToolGUI/obj/Debug/FloatToolGUI.csproj.FileListAbsolute.txt
FloatToolGUI/obj/Debug/FloatToolGUI.csproj.GenerateResource.cache
FloatToolGUI/obj/Debug/FloatToolGUI.csprojAssemblyReference.cache
FloatToolGUI/obj/Debug/FloatToolGUI.CustomControls.CustomToggleSwitch.resources
FloatToolGUI/obj/Debug/FloatToolGUI.CustomProgressBar.resources
FloatToolGUI/obj/Debug/FloatToolGUI.FloatTool.en.resources
FloatToolGUI/obj/Debug/FloatToolGUI.FloatTool.resources
FloatToolGUI/obj/Debug/FloatToolGUI.FloatTool.ru.resources
FloatToolGUI/obj/Debug/FloatToolGUI.Properties.Resources.resources
FloatToolGUI/obj/Debug/FloatToolGUI.Resources.strings.en.resources
FloatToolGUI/obj/Debug/FloatToolGUI.Resources.strings.resources
FloatToolGUI/obj/Debug/FloatToolGUI.SettingsForm.resources
FloatToolGUI/obj/Debug/ru/FloatTool.resources.dll
FloatToolGUI/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll
FloatToolGUI/obj/Release/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs
FloatToolGUI/obj/Release/DesignTimeResolveAssemblyReferences.cache
FloatToolGUI/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache
FloatToolGUI/obj/Release/en/FloatTool.resources.dll
FloatToolGUI/obj/Release/FloatTool.exe
FloatToolGUI/obj/Release/FloatTool.pdb
FloatToolGUI/obj/Release/FloatToolGUI.Benchmark.resources
FloatToolGUI/obj/Release/FloatToolGUI.csproj.CopyComplete
FloatToolGUI/obj/Release/FloatToolGUI.csproj.CoreCompileInputs.cache
FloatToolGUI/obj/Release/FloatToolGUI.csproj.FileListAbsolute.txt
FloatToolGUI/obj/Release/FloatToolGUI.csproj.GenerateResource.cache
FloatToolGUI/obj/Release/FloatToolGUI.csprojAssemblyReference.cache
FloatToolGUI/obj/Release/FloatToolGUI.CustomControls.CustomToggleSwitch.resources
FloatToolGUI/obj/Release/FloatToolGUI.CustomProgressBar.resources
FloatToolGUI/obj/Release/FloatToolGUI.FloatTool.en.resources
FloatToolGUI/obj/Release/FloatToolGUI.FloatTool.resources
FloatToolGUI/obj/Release/FloatToolGUI.FloatTool.ru.resources
FloatToolGUI/obj/Release/FloatToolGUI.Properties.Resources.resources
FloatToolGUI/obj/Release/FloatToolGUI.Resources.strings.en.resources
FloatToolGUI/obj/Release/FloatToolGUI.Resources.strings.resources
FloatToolGUI/obj/Release/FloatToolGUI.SettingsForm.resources
FloatToolGUI/obj/Release/ru/FloatTool.resources.dll
FloatToolGUI/obj/Release/TempPE/Properties.Resources.Designer.cs.dll
FloatToolGUI/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache
FloatToolGUI/obj/Release/FloatToolGUI.csprojAssemblyReference.cache
FloatToolGUI/obj/Release/FloatToolGUI.csprojAssemblyReference.cache
FloatToolGUI/obj/Release/FloatToolGUI.csprojAssemblyReference.cache
46 changes: 46 additions & 0 deletions FloatToolGUI/CustomControls/CustomProgressBar.Designer.cs

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

86 changes: 86 additions & 0 deletions FloatToolGUI/CustomControls/CustomProgressBar.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace FloatToolGUI
{
public partial class CustomProgressBar : UserControl
{
private int minimum = 0;
private int maximum = 100;
private float progressValue = 0;
private Color progressColor = Color.Green;
private Font progressFont = new Font("Microsoft JhengHei UI", 11.25f, FontStyle.Bold);

/// <summary>
/// Цвет заливки прогресс-бара
/// </summary>
public Color ProgressColor
{
get { return progressColor; }
set { progressColor = value; Invalidate(); }
}

/// <summary>
/// Шрифт процентов
/// </summary>
public Font ProgressFont
{
get { return progressFont; }
set { progressFont = value; Invalidate(); }
}

/// <summary>
/// Текущее значение прогресс-бара
/// </summary>
public float Value
{
get { return progressValue; }
set { progressValue = value; Invalidate(); }
}

/// <summary>
/// Минимальное значение прогресс-бара
/// </summary>
public int Minimum
{
get { return minimum; }
set { minimum = value; Invalidate(); }
}

/// <summary>
/// Максимальное значение прогресс-бара
/// </summary>
public int Maximum
{
get { return maximum; }
set { maximum = value; Invalidate(); }
}

public CustomProgressBar()
{
InitializeComponent();
}

private void CustomProgressBar_Paint(object sender, PaintEventArgs e)
{
float fill = (Value - Minimum) / (Maximum - Minimum);
Brush brush = new SolidBrush(ProgressColor);
e.Graphics.FillRectangle(brush, new RectangleF(0, 0, Width * fill, Height));

using (ProgressFont)
{
Rectangle rect2 = new Rectangle(150, 10, 130, 140);
TextFormatFlags flags = TextFormatFlags.HorizontalCenter |
TextFormatFlags.VerticalCenter | TextFormatFlags.WordBreak;
TextRenderer.DrawText(e.Graphics, $"{Math.Floor(fill * 100)}%", ProgressFont, new Rectangle(0, 0, Width, Height), ForeColor, flags);
}
}
}
}
120 changes: 120 additions & 0 deletions FloatToolGUI/CustomControls/CustomProgressBar.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
47 changes: 47 additions & 0 deletions FloatToolGUI/CustomControls/CustomToggleSwitch.Designer.cs

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

Loading

0 comments on commit 402eac6

Please sign in to comment.