1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
| #region Imports
|
| using System;
| using System.Drawing;
|
| #endregion
|
| namespace DPumpHydr.WinFrmUI.RLT.Extension
| {
| #region LostExtension
|
| public static class ExtensionLost
| {
| public static Color Shade(this Color baseColor, int shades, int index)
| {
| int delta = 200 - (index * (255 / shades));
| return Color.FromArgb(Math.Max(0, delta), baseColor);
| }
|
| public static string Between(this string s, string start, string end)
| {
| return s.Split(new string[] { start }, StringSplitOptions.None)[1]
| .Split(new string[] { end }, StringSplitOptions.None)[0];
| }
| }
|
| #endregion
| }
|
|