This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DriveInfoStruct | |
{ | |
public string Access; | |
public string Caption; | |
public string Compressed; | |
public string Description; | |
public string DevicePath; | |
public List<DiskInfoStruct> DiskInformations = new List<DiskInfoStruct>(); | |
public string DiskNumbers; | |
public string Drive; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public struct SData | |
{ | |
public string Attribute; | |
public int RAWValue; | |
public string RAWValueS; | |
public int Value; | |
} | |
public static class SmartInformation | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// var ff = new FindFile(); ff.Path = @"c:\"; (var _fd in ff) {var filepath = _fd.cFileName;} | |
/// </summary> | |
public class FindFile : IEnumerable<WIN32_FIND_DATA> | |
{ | |
public string Path { get; set; } | |
IEnumerator IEnumerable.GetEnumerator() | |
{ | |
return new Enumerator(Path); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Circular Progress bar with percentage | |
/// </summary> | |
public class CircularProgressBar : Control | |
{ | |
public enum graphtypes | |
{ | |
Standard, | |
Spin | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Ellipse : Control | |
{ | |
private readonly IContainer components = null; | |
private Color _centerreflectioncolor = Color.FromArgb(180, 135, 206, 250); | |
private Color _color = Color.DodgerBlue; | |
private Color _lightColor, _darkColor, _darkDarkColor; | |
private bool _on = true; | |
private bool _reflectionon = true; | |
private readonly Color[] _surroundcolors = {Color.FromArgb(0, 135, 206, 250)}; | |
public Ellipse() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ShadowBox : UserPanel | |
{ | |
private Color _backColor = Color.White; | |
private Color _frameColor = Color.Silver; | |
private float _frameWidth = 12; | |
private Bitmap _offScreenBitmap; | |
private IContainer components; | |
public ShadowBox() | |
{ | |
InitializeComponent(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Serializable] | |
public class TicksToTime | |
{ | |
////--------------Constants--------------- | |
public const double TicksPerMicrosecond = 10; | |
private const double MicrosecondsPerTick = 1.0 / TicksPerMicrosecond; | |
public const long TicksPerMillisecond = 10000; | |
private const double MillisecondsPerTick = 1.0 / TicksPerMillisecond; | |
public const long TicksPerSecond = TicksPerMillisecond * 1000; | |
private const double SecondsPerTick = 1.0 / TicksPerSecond; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class StopwatchMs | |
{ | |
private const long TicksPerMillisecond = 10000; | |
private const long TicksPerSecond = TicksPerMillisecond * 1000; | |
private const double TicksPerMicrosecond = 10; | |
public static readonly long Frequency; | |
public static readonly bool IsHighResolution; | |
private static readonly double tickFrequency; | |
private long elapsed; | |
private long startTimeStamp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class TextFontGraphics | |
{ | |
public static int GetNumberOfLines(this string text) | |
{ | |
return text.Split('\n').Length; | |
} | |
public static int GetTextCharacterCount(this string text) | |
{ | |
return text.Count(c => c != '\r' && c != '\n'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CustomToolTip : ToolTip | |
{ | |
private readonly float[] _GradientPositions; | |
private readonly ColorBlend gradientBlender; | |
private Color _gradientEndColor = Color.DeepSkyBlue; | |
private Color _gradientMiddleColor = Color.LightSkyBlue; | |
private Color _gradientStartColor = Color.LightSkyBlue; | |
public CustomToolTip() | |
{ | |
Font = new Font("Arial Narrow", 9.75F, FontStyle.Bold, GraphicsUnit.Point, 0); |