* 修改了图表中的两个小Bug
This commit is contained in:
parent
8ddd9858bc
commit
9a6732ee31
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -197,7 +197,7 @@ namespace Sunny.UI
|
|||||||
if (Option.XAxis.AxisLabel.AutoFormat)
|
if (Option.XAxis.AxisLabel.AutoFormat)
|
||||||
label = XLabels[i].ToString(XScale.Format);
|
label = XLabels[i].ToString(XScale.Format);
|
||||||
else
|
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);
|
SizeF sf = g.MeasureString(label, SubFont);
|
||||||
|
@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using static System.Double;
|
|
||||||
|
|
||||||
namespace Sunny.UI
|
namespace Sunny.UI
|
||||||
{
|
{
|
||||||
@ -162,9 +161,9 @@ namespace Sunny.UI
|
|||||||
double minVal = _rangeMin;
|
double minVal = _rangeMin;
|
||||||
double maxVal = _rangeMax;
|
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;
|
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;
|
maxVal = 0.0;
|
||||||
|
|
||||||
double range = maxVal - minVal;
|
double range = maxVal - minVal;
|
||||||
|
@ -41,7 +41,15 @@ namespace Sunny.UI
|
|||||||
public UIForm()
|
public UIForm()
|
||||||
{
|
{
|
||||||
base.MaximumSize = new Size(Screen.PrimaryScreen.WorkingArea.Width, Screen.PrimaryScreen.WorkingArea.Height);//设置最大化尺寸
|
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;
|
Version = UIGlobal.Version;
|
||||||
FormBorderStyle = FormBorderStyle.None;
|
FormBorderStyle = FormBorderStyle.None;
|
||||||
@ -62,20 +70,15 @@ namespace Sunny.UI
|
|||||||
{
|
{
|
||||||
SetStyle(UIStyles.Style);
|
SetStyle(UIStyles.Style);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UIForm_Load(object sender, EventArgs e)
|
private void UIForm_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (this.Register())
|
if (this.Register())
|
||||||
{
|
{
|
||||||
SetStyle(UIStyles.Style);
|
SetStyle(UIStyles.Style);
|
||||||
}
|
}
|
||||||
SetStyle(
|
|
||||||
ControlStyles.UserPaint |
|
|
||||||
ControlStyles.DoubleBuffer |
|
|
||||||
ControlStyles.OptimizedDoubleBuffer |
|
|
||||||
ControlStyles.AllPaintingInWmPaint |
|
|
||||||
ControlStyles.SupportsTransparentBackColor, true);
|
|
||||||
UpdateStyles();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnBackColorChanged(EventArgs e)
|
protected override void OnBackColorChanged(EventArgs e)
|
||||||
{
|
{
|
||||||
base.OnBackColorChanged(e);
|
base.OnBackColorChanged(e);
|
||||||
@ -1566,7 +1569,7 @@ namespace Sunny.UI
|
|||||||
public void ShowSuccessNotifier(string desc, bool isDialog = false, int timeout = 2000)
|
public void ShowSuccessNotifier(string desc, bool isDialog = false, int timeout = 2000)
|
||||||
{
|
{
|
||||||
UINotifierHelper.ShowNotifier(desc, UINotifierType.OK, UILocalize.SuccessTitle, false, timeout);
|
UINotifierHelper.ShowNotifier(desc, UINotifierType.OK, UILocalize.SuccessTitle, false, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShowWarningNotifier(string desc, bool isDialog = false, int timeout = 2000)
|
public void ShowWarningNotifier(string desc, bool isDialog = false, int timeout = 2000)
|
||||||
{
|
{
|
||||||
|
3
SunnyUI/Forms/UIForm.designer.cs
generated
3
SunnyUI/Forms/UIForm.designer.cs
generated
@ -38,7 +38,7 @@
|
|||||||
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255)))));
|
||||||
this.ClientSize = new System.Drawing.Size(800, 480);
|
this.ClientSize = new System.Drawing.Size(800, 480);
|
||||||
this.DoubleBuffered = true;
|
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.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
|
||||||
this.Name = "UIForm";
|
this.Name = "UIForm";
|
||||||
this.Padding = new System.Windows.Forms.Padding(0, 35, 0, 0);
|
this.Padding = new System.Windows.Forms.Padding(0, 35, 0, 0);
|
||||||
@ -46,6 +46,7 @@
|
|||||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||||
this.Text = "UIForm";
|
this.Text = "UIForm";
|
||||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.UIForm_FormClosing);
|
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.UIForm_FormClosing);
|
||||||
|
this.Load += new System.EventHandler(this.UIForm_Load);
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,64 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<root>
|
||||||
<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: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:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user