* 修改了图表中的两个小Bug

This commit is contained in:
Sunny 2021-01-18 21:05:26 +08:00
parent 8ddd9858bc
commit 9a6732ee31
9 changed files with 18 additions and 75 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -197,7 +197,7 @@ namespace Sunny.UI
if (Option.XAxis.AxisLabel.AutoFormat)
label = XLabels[i].ToString(XScale.Format);
else
label = new DateTimeInt64(XLabels[i]).ToString("F" + Option.XAxis.AxisLabel.DecimalCount);
label = XLabels[i].ToString("F" + Option.XAxis.AxisLabel.DecimalCount);
}
SizeF sf = g.MeasureString(label, SubFont);

View File

@ -21,7 +21,6 @@
using System;
using System.Globalization;
using static System.Double;
namespace Sunny.UI
{
@ -162,9 +161,9 @@ namespace Sunny.UI
double minVal = _rangeMin;
double maxVal = _rangeMax;
if (IsInfinity(minVal) || IsNaN(minVal) || minVal.Equals(MaxValue))
if (double.IsInfinity(minVal) || double.IsNaN(minVal) || minVal.Equals(double.MinValue))
minVal = 0.0;
if (IsInfinity(maxVal) || IsNaN(maxVal) || maxVal.Equals(MaxValue))
if (double.IsInfinity(maxVal) || double.IsNaN(maxVal) || maxVal.Equals(double.MaxValue))
maxVal = 0.0;
double range = maxVal - minVal;

View File

@ -41,7 +41,15 @@ namespace Sunny.UI
public UIForm()
{
base.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);//设置最大化尺寸
InitializeComponent();
InitializeComponent();
SetStyle(
ControlStyles.UserPaint |
ControlStyles.DoubleBuffer |
ControlStyles.OptimizedDoubleBuffer |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.SupportsTransparentBackColor, true);
UpdateStyles();
Version = UIGlobal.Version;
FormBorderStyle = FormBorderStyle.None;
@ -62,20 +70,15 @@ namespace Sunny.UI
{
SetStyle(UIStyles.Style);
}
private void UIForm_Load(object sender, EventArgs e)
{
if (this.Register())
{
SetStyle(UIStyles.Style);
}
SetStyle(
ControlStyles.UserPaint |
ControlStyles.DoubleBuffer |
ControlStyles.OptimizedDoubleBuffer |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.SupportsTransparentBackColor, true);
UpdateStyles();
}
protected override void OnBackColorChanged(EventArgs e)
{
base.OnBackColorChanged(e);
@ -1566,7 +1569,7 @@ namespace Sunny.UI
public void ShowSuccessNotifier(string desc, bool isDialog = false, int timeout = 2000)
{
UINotifierHelper.ShowNotifier(desc, UINotifierType.OK, UILocalize.SuccessTitle, false, timeout);
}
}
public void ShowWarningNotifier(string desc, bool isDialog = false, int timeout = 2000)
{

View File

@ -38,7 +38,7 @@
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
this.ClientSize = new System.Drawing.Size(800, 480);
this.DoubleBuffered = true;
this.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "UIForm";
this.Padding = new System.Windows.Forms.Padding(0, 35, 0, 0);
@ -46,6 +46,7 @@
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "UIForm";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.UIForm_FormClosing);
this.Load += new System.EventHandler(this.UIForm_Load);
this.ResumeLayout(false);
}

View File

@ -1,64 +1,4 @@
<?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.
-->
<root>
<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">