Skip to content

Commit

Permalink
Tweaks and stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
WithoutCaps committed May 19, 2017
1 parent 831a373 commit 1bdf4de
Show file tree
Hide file tree
Showing 14 changed files with 358 additions and 214 deletions.
4 changes: 2 additions & 2 deletions LimitlessUI.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
# Visual Studio 15
VisualStudioVersion = 15.0.26430.6
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LimitlessUI", "LimitlessUI\LimitlessUI.csproj", "{EE394A8D-F664-4D66-8E28-35F075FDC79D}"
EndProject
Expand Down
6 changes: 4 additions & 2 deletions LimitlessUI/Chart_WOC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ protected override void OnPaint(PaintEventArgs pe)
{
pen1.Color = serie.lineColor;
float xLineCord = 0;
PointF lastPoint = new PointF(0, -serie.values.First());
PointF lastPoint;
if (serie.values.Count != 0)
lastPoint = new PointF(0, -serie.values.First());
foreach (int yVal in serie.values)
{
PointF point = new PointF(xLineCord, -yVal);
Expand Down Expand Up @@ -177,7 +179,7 @@ public int ChartLength
{
get { return _chartLength; }
set { _chartLength = value; Invalidate(); }
}
}
#endregion
//-----------------------------------[Serie Class]-----------------------------------//
public class Serie
Expand Down
9 changes: 2 additions & 7 deletions LimitlessUI/FlatButton_WOC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ private void onClick(object sender, MouseEventArgs e)
if (control is FlatButton_WOC)
((FlatButton_WOC)control).unselect();
_selected = true;
Invalidate();
}
}

Expand All @@ -61,7 +60,6 @@ public void unselect()
BackColor = _defaultBackColor;
ForeColor = _defaultForeColor;
}
Invalidate();
}

private void onMouseExit(object sender, EventArgs e)
Expand Down Expand Up @@ -97,7 +95,7 @@ protected override void OnPaint(PaintEventArgs pe)
if (_drawImage && _image != null)
{
float drawHeight = Height / 2 - _imageSize.Height / 2;
pe.Graphics.DrawImage(_selected || (_mouseHovering && _useActiveImageWhileHovering) ? (_selectedImage != null ? _selectedImage : _image) : _image, drawHeight, drawHeight, _imageSize.Width, _imageSize.Height);
pe.Graphics.DrawImage(_selected || (_mouseHovering && _useActiveImageWhileHovering) ? ( _selectedImage ?? _image) : _image, drawHeight, drawHeight, _imageSize.Width, _imageSize.Height);
}
}

Expand Down Expand Up @@ -194,8 +192,6 @@ public ContentAlignment TextAligment
}
}



public Image ActiveImage
{
get { return _selectedImage; }
Expand Down Expand Up @@ -266,5 +262,4 @@ public SizeF ImageSize
}
}
#endregion
}

}
8 changes: 7 additions & 1 deletion LimitlessUI/LimitlessUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>LimitlessUI</RootNamespace>
<AssemblyName>LimitlessUI_1.3.0</AssemblyName>
<AssemblyName>LimitlessUI_1.5.0</AssemblyName>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
Expand Down Expand Up @@ -48,6 +48,9 @@
<Compile Include="ArchProgressBar_WOC.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Chart_WOC.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="DragControl_WOC.cs">
<SubType>Component</SubType>
</Compile>
Expand All @@ -66,6 +69,9 @@
<Compile Include="GradientPanel_WOC.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="Legend_WOC.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="ListView_WOC.cs">
<SubType>Component</SubType>
</Compile>
Expand Down
6 changes: 3 additions & 3 deletions LimitlessUI/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LimitlessUI")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyCopyright("Copyright WithoutCaps © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyVersion("1.5.0.0")]
[assembly: AssemblyFileVersion("1.5.0.0")]
147 changes: 0 additions & 147 deletions LimitlessUISample/Chart_WOC.cs

This file was deleted.

93 changes: 93 additions & 0 deletions LimitlessUISample/Childs/Chart_UC.Designer.cs

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

34 changes: 34 additions & 0 deletions LimitlessUISample/Childs/Chart_UC.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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 LimitlessUISample.Childs
{
public partial class Chart_UC : UserControl
{
public Chart_UC()
{
InitializeComponent();
timer1.Start();
chart_WOC2.addSerie(Color.Green, "serie1", true);
chart_WOC2.addSerie(Color.Red, "serie2", false);
legend_WOC2.notifySeriesChanged();
}


private void timer1_Tick(object sender, EventArgs e)
{
Random r = new Random();
int val = r.Next(100);
chart_WOC2.addValue(0, val);
chart_WOC2.addValue(1, val + 10);

}
}
}
Loading

0 comments on commit 1bdf4de

Please sign in to comment.