mirror of
https://github.com/Code-Artist/ToggleSwitch.git
synced 2025-10-10 13:27:40 +00:00
Added from Code Project
This commit is contained in:
parent
4a80f4e2e2
commit
5fe6fb398e
98 changed files with 10490 additions and 0 deletions
1176
ToggleSwitchDemo/DemoForm.Designer.cs
generated
Normal file
1176
ToggleSwitchDemo/DemoForm.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load diff
407
ToggleSwitchDemo/DemoForm.cs
Normal file
407
ToggleSwitchDemo/DemoForm.cs
Normal file
|
@ -0,0 +1,407 @@
|
|||
using System.Drawing;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
using JCS;
|
||||
using ToggleSwitchDemo.Properties;
|
||||
|
||||
namespace ToggleSwitchDemo
|
||||
{
|
||||
public partial class DemoForm : Form
|
||||
{
|
||||
public DemoForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
SetPropertiesForStylesTabSwitches();
|
||||
SetPropertiesForPropertiesTabSwitches();
|
||||
SetPropertiesForCustomizationsTabSwitches();
|
||||
}
|
||||
|
||||
public void SetPropertiesForStylesTabSwitches()
|
||||
{
|
||||
//Set the properties for the ToggleSwitches on the "Styles" tab
|
||||
|
||||
MetroStyleToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.Metro; //Default
|
||||
MetroStyleToggleSwitch.Size = new Size(75, 23);
|
||||
|
||||
IOS5StyleToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.IOS5;
|
||||
IOS5StyleToggleSwitch.Size = new Size(98, 42);
|
||||
IOS5StyleToggleSwitch.OnText = "ON";
|
||||
IOS5StyleToggleSwitch.OnFont = new Font(DemoTabControl.Font.FontFamily, 12, FontStyle.Bold);
|
||||
IOS5StyleToggleSwitch.OnForeColor = Color.White;
|
||||
IOS5StyleToggleSwitch.OffText = "OFF";
|
||||
IOS5StyleToggleSwitch.OffFont = new Font(DemoTabControl.Font.FontFamily, 12, FontStyle.Bold);
|
||||
IOS5StyleToggleSwitch.OffForeColor = Color.FromArgb(141, 123, 141);
|
||||
|
||||
AndroidStyleToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.Android;
|
||||
AndroidStyleToggleSwitch.Size = new Size(78, 23);
|
||||
AndroidStyleToggleSwitch.OnText = "ON";
|
||||
AndroidStyleToggleSwitch.OnFont = new Font(DemoTabControl.Font.FontFamily, 8, FontStyle.Bold);
|
||||
AndroidStyleToggleSwitch.OnForeColor = Color.White;
|
||||
AndroidStyleToggleSwitch.OffText = "OFF";
|
||||
AndroidStyleToggleSwitch.OffFont = new Font(DemoTabControl.Font.FontFamily, 8, FontStyle.Bold);
|
||||
AndroidStyleToggleSwitch.OffForeColor = Color.FromArgb(141, 123, 141);
|
||||
|
||||
BrushedMetalStyleToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.BrushedMetal;
|
||||
BrushedMetalStyleToggleSwitch.Size = new Size(93, 30);
|
||||
BrushedMetalStyleToggleSwitch.OnText = "ON";
|
||||
BrushedMetalStyleToggleSwitch.OnFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold);
|
||||
BrushedMetalStyleToggleSwitch.OnForeColor = Color.White;
|
||||
BrushedMetalStyleToggleSwitch.OffText = "OFF";
|
||||
BrushedMetalStyleToggleSwitch.OffFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold);
|
||||
BrushedMetalStyleToggleSwitch.OffForeColor = Color.White;
|
||||
|
||||
IphoneStyleToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.Iphone;
|
||||
IphoneStyleToggleSwitch.Size = new Size(93, 30);
|
||||
IphoneStyleToggleSwitch.OnText = "ON";
|
||||
IphoneStyleToggleSwitch.OnFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold);
|
||||
IphoneStyleToggleSwitch.OnForeColor = Color.White;
|
||||
IphoneStyleToggleSwitch.OffText = "OFF";
|
||||
IphoneStyleToggleSwitch.OffFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold);
|
||||
IphoneStyleToggleSwitch.OffForeColor = Color.FromArgb(92, 92, 92);
|
||||
|
||||
ModernStyleToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.Modern;
|
||||
ModernStyleToggleSwitch.Size = new Size(85, 32);
|
||||
ModernStyleToggleSwitch.OnText = "ON";
|
||||
ModernStyleToggleSwitch.OnFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold);
|
||||
ModernStyleToggleSwitch.OnForeColor = Color.White;
|
||||
ModernStyleToggleSwitch.OffText = "OFF";
|
||||
ModernStyleToggleSwitch.OffFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold);
|
||||
ModernStyleToggleSwitch.OffForeColor = Color.FromArgb(153, 153, 153);
|
||||
|
||||
CarbonStyleToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.Carbon;
|
||||
CarbonStyleToggleSwitch.Size = new Size(93, 30);
|
||||
CarbonStyleToggleSwitch.OnText = "On";
|
||||
CarbonStyleToggleSwitch.OnFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold);
|
||||
CarbonStyleToggleSwitch.OnForeColor = Color.White;
|
||||
CarbonStyleToggleSwitch.OffText = "Off";
|
||||
CarbonStyleToggleSwitch.OffFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold);
|
||||
CarbonStyleToggleSwitch.OffForeColor = Color.White;
|
||||
|
||||
OSXStyleToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.OSX;
|
||||
OSXStyleToggleSwitch.Size = new Size(93, 25);
|
||||
|
||||
FancyStyleToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.Fancy;
|
||||
FancyStyleToggleSwitch.Size = new Size(100, 30);
|
||||
FancyStyleToggleSwitch.OnText = "ON";
|
||||
FancyStyleToggleSwitch.OnFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold);
|
||||
FancyStyleToggleSwitch.OnForeColor = Color.White;
|
||||
FancyStyleToggleSwitch.OffText = "OFF";
|
||||
FancyStyleToggleSwitch.OffFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold);
|
||||
FancyStyleToggleSwitch.OffForeColor = Color.White;
|
||||
FancyStyleToggleSwitch.ButtonImage = Resources.handle;
|
||||
|
||||
PlainAndSimpleStyleToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.PlainAndSimpel;
|
||||
PlainAndSimpleStyleToggleSwitch.Size = new Size(44, 22);
|
||||
}
|
||||
|
||||
public void SetPropertiesForPropertiesTabSwitches()
|
||||
{
|
||||
//Set the properties for the ToggleSwitches on the "(Semi)-Important Properties" tab
|
||||
|
||||
//AllowUserChange example:
|
||||
|
||||
AllowUserChangeToggleSwitch1.AllowUserChange = false;
|
||||
AllowUserChangeToggleSwitch2.AllowUserChange = true;
|
||||
|
||||
//Animation example:
|
||||
|
||||
NoAnimationToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.Carbon; //Only to provide an interesting look
|
||||
NoAnimationToggleSwitch.Size = new Size(93, 30); //Only to provide an interesting look
|
||||
NoAnimationToggleSwitch.OnText = "On"; //Only to provide an interesting look
|
||||
NoAnimationToggleSwitch.OnFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold); //Only to provide an interesting look
|
||||
NoAnimationToggleSwitch.OnForeColor = Color.White; //Only to provide an interesting look
|
||||
NoAnimationToggleSwitch.OffText = "Off"; //Only to provide an interesting look
|
||||
NoAnimationToggleSwitch.OffFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold); //Only to provide an interesting look
|
||||
NoAnimationToggleSwitch.OffForeColor = Color.White; //Only to provide an interesting look
|
||||
NoAnimationToggleSwitch.UseAnimation = false;
|
||||
|
||||
FastAnimationToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.Carbon; //Only to provide an interesting look
|
||||
FastAnimationToggleSwitch.Size = new Size(93, 30); //Only to provide an interesting look
|
||||
FastAnimationToggleSwitch.OnText = "On"; //Only to provide an interesting look
|
||||
FastAnimationToggleSwitch.OnFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold); //Only to provide an interesting look
|
||||
FastAnimationToggleSwitch.OnForeColor = Color.White; //Only to provide an interesting look
|
||||
FastAnimationToggleSwitch.OffText = "Off"; //Only to provide an interesting look
|
||||
FastAnimationToggleSwitch.OffFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold); //Only to provide an interesting look
|
||||
FastAnimationToggleSwitch.OffForeColor = Color.White; //Only to provide an interesting look
|
||||
FastAnimationToggleSwitch.UseAnimation = true; //Default
|
||||
FastAnimationToggleSwitch.AnimationInterval = 1; //Default
|
||||
FastAnimationToggleSwitch.AnimationStep = 10; //Default
|
||||
|
||||
SlowAnimationToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.Carbon; //Only to provide an interesting look
|
||||
SlowAnimationToggleSwitch.Size = new Size(93, 30); //Only to provide an interesting look
|
||||
SlowAnimationToggleSwitch.OnText = "On"; //Only to provide an interesting look
|
||||
SlowAnimationToggleSwitch.OnFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold); //Only to provide an interesting look
|
||||
SlowAnimationToggleSwitch.OnForeColor = Color.White; //Only to provide an interesting look
|
||||
SlowAnimationToggleSwitch.OffText = "Off"; //Only to provide an interesting look
|
||||
SlowAnimationToggleSwitch.OffFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold); //Only to provide an interesting look
|
||||
SlowAnimationToggleSwitch.OffForeColor = Color.White; //Only to provide an interesting look
|
||||
SlowAnimationToggleSwitch.UseAnimation = true; //Default
|
||||
SlowAnimationToggleSwitch.AnimationInterval = 10;
|
||||
SlowAnimationToggleSwitch.AnimationStep = 1;
|
||||
|
||||
//GrayWhenDisabled example:
|
||||
|
||||
GrayWhenDisabledToggleSwitch1.Style = JCS.ToggleSwitch.ToggleSwitchStyle.Fancy; //Only to provide an interesting look
|
||||
GrayWhenDisabledToggleSwitch1.Size = new Size(100, 30); //Only to provide an interesting look
|
||||
GrayWhenDisabledToggleSwitch1.OnText = "ON"; //Only to provide an interesting look
|
||||
GrayWhenDisabledToggleSwitch1.OnFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold); //Only to provide an interesting look
|
||||
GrayWhenDisabledToggleSwitch1.OnForeColor = Color.White; //Only to provide an interesting look
|
||||
GrayWhenDisabledToggleSwitch1.OffText = "OFF"; //Only to provide an interesting look
|
||||
GrayWhenDisabledToggleSwitch1.OffFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold); //Only to provide an interesting look
|
||||
GrayWhenDisabledToggleSwitch1.OffForeColor = Color.White; //Only to provide an interesting look
|
||||
GrayWhenDisabledToggleSwitch1.ButtonImage = Resources.arrowright; //Only to provide an interesting look
|
||||
GrayWhenDisabledToggleSwitch1.GrayWhenDisabled = false;
|
||||
|
||||
GrayWhenDisabledToggleSwitch2.Style = JCS.ToggleSwitch.ToggleSwitchStyle.Fancy; //Only to provide an interesting look
|
||||
GrayWhenDisabledToggleSwitch2.Size = new Size(100, 30); //Only to provide an interesting look
|
||||
GrayWhenDisabledToggleSwitch2.OnText = "ON"; //Only to provide an interesting look
|
||||
GrayWhenDisabledToggleSwitch2.OnFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold); //Only to provide an interesting look
|
||||
GrayWhenDisabledToggleSwitch2.OnForeColor = Color.White; //Only to provide an interesting look
|
||||
GrayWhenDisabledToggleSwitch2.OffText = "OFF"; //Only to provide an interesting look
|
||||
GrayWhenDisabledToggleSwitch2.OffFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold); //Only to provide an interesting look
|
||||
GrayWhenDisabledToggleSwitch2.OffForeColor = Color.White; //Only to provide an interesting look
|
||||
GrayWhenDisabledToggleSwitch2.ButtonImage = Resources.arrowright; //Only to provide an interesting look
|
||||
GrayWhenDisabledToggleSwitch2.GrayWhenDisabled = true; //Default
|
||||
|
||||
//ThresholdPercentage example:
|
||||
|
||||
ThresholdPercentageToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.IOS5; //Only to provide an interesting look
|
||||
ThresholdPercentageToggleSwitch.Size = new Size(98, 42); //Only to provide an interesting look
|
||||
ThresholdPercentageToggleSwitch.OnText = "ON"; //Only to provide an interesting look
|
||||
ThresholdPercentageToggleSwitch.OnFont = new Font(DemoTabControl.Font.FontFamily, 12, FontStyle.Bold); //Only to provide an interesting look
|
||||
ThresholdPercentageToggleSwitch.OnForeColor = Color.White; //Only to provide an interesting look
|
||||
ThresholdPercentageToggleSwitch.OffText = "OFF"; //Only to provide an interesting look
|
||||
ThresholdPercentageToggleSwitch.OffFont = new Font(DemoTabControl.Font.FontFamily, 12, FontStyle.Bold); //Only to provide an interesting look
|
||||
ThresholdPercentageToggleSwitch.OffForeColor = Color.FromArgb(141, 123, 141); //Only to provide an interesting look
|
||||
ThresholdPercentageToggleSwitch.ThresholdPercentage = 50; //Default
|
||||
|
||||
//ToggleOnButtonClick & ToggleOnSideClick example:
|
||||
|
||||
ToggleOnClickToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.BrushedMetal; //Only to provide an interesting look
|
||||
ToggleOnClickToggleSwitch.Size = new Size(93, 30); //Only to provide an interesting look
|
||||
ToggleOnClickToggleSwitch.OnText = "ON"; //Only to provide an interesting look
|
||||
ToggleOnClickToggleSwitch.OnFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold); //Only to provide an interesting look
|
||||
ToggleOnClickToggleSwitch.OnForeColor = Color.White; //Only to provide an interesting look
|
||||
ToggleOnClickToggleSwitch.OffText = "OFF"; //Only to provide an interesting look
|
||||
ToggleOnClickToggleSwitch.OffFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold); //Only to provide an interesting look
|
||||
ToggleOnClickToggleSwitch.OffForeColor = Color.White; //Only to provide an interesting look
|
||||
ToggleOnClickToggleSwitch.ToggleOnButtonClick = true; //Default
|
||||
ToggleOnClickToggleSwitch.ToggleOnSideClick = true; //Default
|
||||
}
|
||||
|
||||
public void SetPropertiesForCustomizationsTabSwitches()
|
||||
{
|
||||
//Set the properties for the ToggleSwitches on the "Special Customizations" tab
|
||||
|
||||
//Color customization example, Metro Style ToggleSwitch:
|
||||
|
||||
NormalMetroToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.Metro; //Default
|
||||
NormalMetroToggleSwitch.Size = new Size(75, 23);
|
||||
|
||||
ToggleSwitchMetroRenderer customizedMetroRenderer = new ToggleSwitchMetroRenderer();
|
||||
customizedMetroRenderer.LeftSideColor = Color.Red;
|
||||
customizedMetroRenderer.LeftSideColorHovered = Color.FromArgb(210, 0, 0);
|
||||
customizedMetroRenderer.LeftSideColorPressed = Color.FromArgb(190, 0, 0);
|
||||
customizedMetroRenderer.RightSideColor = Color.Yellow;
|
||||
customizedMetroRenderer.RightSideColorHovered = Color.FromArgb(245, 245, 0);
|
||||
customizedMetroRenderer.RightSideColorPressed = Color.FromArgb(235, 235, 0);
|
||||
|
||||
CustomizedMetroToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.Metro; //Default
|
||||
CustomizedMetroToggleSwitch.Size = new Size(75, 23);
|
||||
CustomizedMetroToggleSwitch.SetRenderer(customizedMetroRenderer);
|
||||
|
||||
//Color customization example, IOS5 Style ToggleSwitch:
|
||||
|
||||
NormalIOS5ToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.IOS5;
|
||||
NormalIOS5ToggleSwitch.Size = new Size(98, 42);
|
||||
NormalIOS5ToggleSwitch.OnText = "ON";
|
||||
NormalIOS5ToggleSwitch.OnFont = new Font(DemoTabControl.Font.FontFamily, 12, FontStyle.Bold);
|
||||
NormalIOS5ToggleSwitch.OnForeColor = Color.White;
|
||||
NormalIOS5ToggleSwitch.OffText = "OFF";
|
||||
NormalIOS5ToggleSwitch.OffFont = new Font(DemoTabControl.Font.FontFamily, 12, FontStyle.Bold);
|
||||
NormalIOS5ToggleSwitch.OffForeColor = Color.FromArgb(141, 123, 141);
|
||||
|
||||
//Maybe not the prettiest color scheme in the world - It's just for demonstration :-)
|
||||
ToggleSwitchIOS5Renderer customizedIos5Renderer = new ToggleSwitchIOS5Renderer();
|
||||
customizedIos5Renderer.LeftSideUpperColor1 = Color.FromArgb(128, 0, 64);
|
||||
customizedIos5Renderer.LeftSideUpperColor2 = Color.FromArgb(180, 0, 90);
|
||||
customizedIos5Renderer.LeftSideLowerColor1 = Color.FromArgb(250, 0, 125);
|
||||
customizedIos5Renderer.LeftSideLowerColor2 = Color.FromArgb(255, 120, 190);
|
||||
customizedIos5Renderer.RightSideUpperColor1 = Color.FromArgb(0, 64, 128);
|
||||
customizedIos5Renderer.RightSideUpperColor2 = Color.FromArgb(0, 90, 180);
|
||||
customizedIos5Renderer.RightSideLowerColor1 = Color.FromArgb(0, 125, 250);
|
||||
customizedIos5Renderer.RightSideLowerColor2 = Color.FromArgb(120, 190, 255);
|
||||
customizedIos5Renderer.ButtonNormalOuterBorderColor = Color.Green;
|
||||
customizedIos5Renderer.ButtonNormalInnerBorderColor = Color.Green;
|
||||
customizedIos5Renderer.ButtonNormalSurfaceColor1 = Color.Red;
|
||||
customizedIos5Renderer.ButtonNormalSurfaceColor2 = Color.Red;
|
||||
customizedIos5Renderer.ButtonHoverOuterBorderColor = Color.Green;
|
||||
customizedIos5Renderer.ButtonHoverInnerBorderColor = Color.Green;
|
||||
customizedIos5Renderer.ButtonHoverSurfaceColor1 = Color.Red;
|
||||
customizedIos5Renderer.ButtonHoverSurfaceColor2 = Color.Red;
|
||||
customizedIos5Renderer.ButtonPressedOuterBorderColor = Color.Green;
|
||||
customizedIos5Renderer.ButtonPressedInnerBorderColor = Color.Green;
|
||||
customizedIos5Renderer.ButtonPressedSurfaceColor1 = Color.Red;
|
||||
customizedIos5Renderer.ButtonPressedSurfaceColor2 = Color.Red;
|
||||
|
||||
CustomizedIOS5ToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.IOS5;
|
||||
CustomizedIOS5ToggleSwitch.Size = new Size(98, 42);
|
||||
CustomizedIOS5ToggleSwitch.OnText = "ON";
|
||||
CustomizedIOS5ToggleSwitch.OnFont = new Font(DemoTabControl.Font.FontFamily, 12, FontStyle.Bold);
|
||||
CustomizedIOS5ToggleSwitch.OnForeColor = Color.White;
|
||||
CustomizedIOS5ToggleSwitch.OffText = "OFF";
|
||||
CustomizedIOS5ToggleSwitch.OffFont = new Font(DemoTabControl.Font.FontFamily, 12, FontStyle.Bold);
|
||||
CustomizedIOS5ToggleSwitch.OffForeColor = Color.White; //OBS: Need to change this for text visibility
|
||||
CustomizedIOS5ToggleSwitch.SetRenderer(customizedIos5Renderer);
|
||||
|
||||
//Color customization example using RendererChanged event
|
||||
|
||||
NormalPlainAndSimpleToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.PlainAndSimpel;
|
||||
NormalPlainAndSimpleToggleSwitch.Size = new Size(44, 22);
|
||||
|
||||
CustomizedPlainAndSimpleToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.PlainAndSimpel;
|
||||
CustomizedPlainAndSimpleToggleSwitch.Size = new Size(44, 22);
|
||||
CustomizedPlainAndSimpleToggleSwitch.BeforeRendering += CustomizedPlainAndSimpleToggleSwitch_BeforeRendering;
|
||||
|
||||
//Image customization example, Fancy Style ToggleSwitch:
|
||||
|
||||
NormalFancyToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.Fancy;
|
||||
NormalFancyToggleSwitch.Size = new Size(100, 30);
|
||||
NormalFancyToggleSwitch.OnText = "ON";
|
||||
NormalFancyToggleSwitch.OnFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold);
|
||||
NormalFancyToggleSwitch.OnForeColor = Color.White;
|
||||
NormalFancyToggleSwitch.OffText = "OFF";
|
||||
NormalFancyToggleSwitch.OffFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold);
|
||||
NormalFancyToggleSwitch.OffForeColor = Color.White;
|
||||
|
||||
CustomizedFancyToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.Fancy;
|
||||
CustomizedFancyToggleSwitch.Size = new Size(100, 30);
|
||||
CustomizedFancyToggleSwitch.OffButtonImage = Resources.arrowright;
|
||||
CustomizedFancyToggleSwitch.OffSideImage = Resources.cross;
|
||||
CustomizedFancyToggleSwitch.OnButtonImage = Resources.arrowleft;
|
||||
CustomizedFancyToggleSwitch.OnSideImage = Resources.check;
|
||||
|
||||
//Advanced behavior example, Fancy Style ToggleSwitch:
|
||||
|
||||
Color tempColor;
|
||||
|
||||
ToggleSwitchFancyRenderer customizedFancyRenderer = new ToggleSwitchFancyRenderer();
|
||||
tempColor = customizedFancyRenderer.LeftSideBackColor1;
|
||||
customizedFancyRenderer.LeftSideBackColor1 = customizedFancyRenderer.RightSideBackColor1;
|
||||
customizedFancyRenderer.RightSideBackColor1 = tempColor;
|
||||
tempColor = customizedFancyRenderer.LeftSideBackColor2;
|
||||
customizedFancyRenderer.LeftSideBackColor2 = customizedFancyRenderer.RightSideBackColor2;
|
||||
customizedFancyRenderer.RightSideBackColor2 = tempColor;
|
||||
|
||||
AdvancedBehaviorFancyToggleSwitch.Style = JCS.ToggleSwitch.ToggleSwitchStyle.Fancy;
|
||||
AdvancedBehaviorFancyToggleSwitch.Size = new Size(150, 30);
|
||||
AdvancedBehaviorFancyToggleSwitch.OnText = "Restart";
|
||||
AdvancedBehaviorFancyToggleSwitch.OnFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold);
|
||||
AdvancedBehaviorFancyToggleSwitch.OnForeColor = Color.White;
|
||||
AdvancedBehaviorFancyToggleSwitch.OffText = "Online";
|
||||
AdvancedBehaviorFancyToggleSwitch.OffFont = new Font(DemoTabControl.Font.FontFamily, 10, FontStyle.Bold);
|
||||
AdvancedBehaviorFancyToggleSwitch.OffForeColor = Color.White;
|
||||
AdvancedBehaviorFancyToggleSwitch.OffButtonImage = Resources.arrowright;
|
||||
AdvancedBehaviorFancyToggleSwitch.UseAnimation = false;
|
||||
AdvancedBehaviorFancyToggleSwitch.SetRenderer(customizedFancyRenderer);
|
||||
AdvancedBehaviorFancyToggleSwitch.CheckedChanged += AdvancedBehaviorFancyToggleSwitch_CheckedChanged;
|
||||
|
||||
AnimatedGifPictureBox.Parent = AdvancedBehaviorFancyToggleSwitch; //Necessary to get the ToggleSwitch button to show through the picture box' transparent background
|
||||
}
|
||||
|
||||
private void CustomizedPlainAndSimpleToggleSwitch_BeforeRendering(object sender, ToggleSwitch.BeforeRenderingEventArgs e)
|
||||
{
|
||||
if (e.Renderer is ToggleSwitchPlainAndSimpleRenderer)
|
||||
{
|
||||
ToggleSwitchPlainAndSimpleRenderer renderer = e.Renderer as ToggleSwitchPlainAndSimpleRenderer;
|
||||
|
||||
renderer.BorderColorChecked = Color.Green;
|
||||
renderer.BorderColorUnchecked = Color.Red;
|
||||
|
||||
//Observe: in the BeforeRendering event, the Checked property will not yet have changed to the final state
|
||||
if (!CustomizedPlainAndSimpleToggleSwitch.Checked)
|
||||
{
|
||||
renderer.ButtonColor = Color.DarkGray;
|
||||
renderer.InnerBackgroundColor = Color.LightGray;
|
||||
}
|
||||
else
|
||||
{
|
||||
renderer.ButtonColor = Color.DarkBlue;
|
||||
renderer.InnerBackgroundColor = Color.LightBlue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void AllowUserChangeCheckBox_CheckedChanged(object sender, System.EventArgs e)
|
||||
{
|
||||
AllowUserChangeToggleSwitch1.Checked = AllowUserChangeCheckBox.Checked;
|
||||
AllowUserChangeToggleSwitch2.Checked = AllowUserChangeCheckBox.Checked;
|
||||
}
|
||||
|
||||
private void GrayWhenDisabledCheckBox_CheckedChanged(object sender, System.EventArgs e)
|
||||
{
|
||||
GrayWhenDisabledToggleSwitch1.Enabled = GrayWhenDisabledCheckBox.Checked;
|
||||
GrayWhenDisabledToggleSwitch2.Enabled = GrayWhenDisabledCheckBox.Checked;
|
||||
}
|
||||
|
||||
private void ThresholdPercentageTrackBar_Scroll(object sender, System.EventArgs e)
|
||||
{
|
||||
label15.Text = string.Format("Value = {0} (Default = 50)", ThresholdPercentageTrackBar.Value);
|
||||
ThresholdPercentageToggleSwitch.ThresholdPercentage = ThresholdPercentageTrackBar.Value;
|
||||
}
|
||||
|
||||
private void ToggleOnButtonClickCheckBox_CheckedChanged(object sender, System.EventArgs e)
|
||||
{
|
||||
ToggleOnClickToggleSwitch.ToggleOnButtonClick = ToggleOnButtonClickCheckBox.Checked;
|
||||
}
|
||||
|
||||
private void ToggleOnSideClickCheckBox_CheckedChanged(object sender, System.EventArgs e)
|
||||
{
|
||||
ToggleOnClickToggleSwitch.ToggleOnSideClick = ToggleOnSideClickCheckBox.Checked;
|
||||
}
|
||||
|
||||
private void AdvancedBehaviorFancyToggleSwitch_CheckedChanged(object sender, System.EventArgs e)
|
||||
{
|
||||
if (AdvancedBehaviorFancyToggleSwitch.Checked)
|
||||
{
|
||||
AdvancedBehaviorFancyToggleSwitch.AllowUserChange = false;
|
||||
AdvancedBehaviorFancyToggleSwitch.OnText = "Restarting...";
|
||||
|
||||
PositionAniGifPictureBox();
|
||||
AnimatedGifPictureBox.Visible = true;
|
||||
|
||||
if (!SimulateRestartBackgroundWorker.IsBusy)
|
||||
SimulateRestartBackgroundWorker.RunWorkerAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
AdvancedBehaviorFancyToggleSwitch.AllowUserChange = true;
|
||||
AdvancedBehaviorFancyToggleSwitch.OnText = "Restart";
|
||||
}
|
||||
}
|
||||
|
||||
private void PositionAniGifPictureBox()
|
||||
{
|
||||
//Position anigif picturebox
|
||||
|
||||
Rectangle buttonRectangle = AdvancedBehaviorFancyToggleSwitch.ButtonRectangle;
|
||||
|
||||
AnimatedGifPictureBox.Height = buttonRectangle.Height - 2;
|
||||
AnimatedGifPictureBox.Width = AnimatedGifPictureBox.Height;
|
||||
AnimatedGifPictureBox.Left = buttonRectangle.X + ((buttonRectangle.Width - AnimatedGifPictureBox.Width) / 2);
|
||||
AnimatedGifPictureBox.Top = buttonRectangle.Y + ((buttonRectangle.Height - AnimatedGifPictureBox.Height) / 2);
|
||||
}
|
||||
|
||||
private void SimulateRestartBackgroundWorker_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
|
||||
{
|
||||
//Simulate restart delay
|
||||
Thread.Sleep(1500);
|
||||
}
|
||||
|
||||
private void SimulateRestartBackgroundWorker_RunWorkerCompleted(object sender, System.ComponentModel.RunWorkerCompletedEventArgs e)
|
||||
{
|
||||
AnimatedGifPictureBox.Visible = false;
|
||||
AdvancedBehaviorFancyToggleSwitch.Checked = false;
|
||||
}
|
||||
}
|
||||
}
|
1880
ToggleSwitchDemo/DemoForm.resx
Normal file
1880
ToggleSwitchDemo/DemoForm.resx
Normal file
File diff suppressed because it is too large
Load diff
19
ToggleSwitchDemo/Program.cs
Normal file
19
ToggleSwitchDemo/Program.cs
Normal file
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ToggleSwitchDemo
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new DemoForm());
|
||||
}
|
||||
}
|
||||
}
|
36
ToggleSwitchDemo/Properties/AssemblyInfo.cs
Normal file
36
ToggleSwitchDemo/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("ToggleSwitchDemo")]
|
||||
[assembly: AssemblyDescription("JCS ToggleSwitch Demo Application")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("JC Software Solutions")]
|
||||
[assembly: AssemblyProduct("JCS ToggleSwitch")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2015")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("6fd40b22-0c51-4557-af5c-879774fec629")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// 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")]
|
113
ToggleSwitchDemo/Properties/Resources.Designer.cs
generated
Normal file
113
ToggleSwitchDemo/Properties/Resources.Designer.cs
generated
Normal file
|
@ -0,0 +1,113 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34209
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ToggleSwitchDemo.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ToggleSwitchDemo.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap arrowleft {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("arrowleft", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap arrowright {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("arrowright", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap check {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("check", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap cross {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("cross", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap handle {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("handle", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
136
ToggleSwitchDemo/Properties/Resources.resx
Normal file
136
ToggleSwitchDemo/Properties/Resources.resx
Normal file
|
@ -0,0 +1,136 @@
|
|||
<?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.
|
||||
-->
|
||||
<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">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="arrowleft" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\arrowleft.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="arrowright" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Image70.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="check" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\check.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="cross" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\cross.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="handle" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\handle.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
30
ToggleSwitchDemo/Properties/Settings.Designer.cs
generated
Normal file
30
ToggleSwitchDemo/Properties/Settings.Designer.cs
generated
Normal file
|
@ -0,0 +1,30 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.34209
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ToggleSwitchDemo.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
7
ToggleSwitchDemo/Properties/Settings.settings
Normal file
7
ToggleSwitchDemo/Properties/Settings.settings
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
BIN
ToggleSwitchDemo/Resources/Image70.png
Normal file
BIN
ToggleSwitchDemo/Resources/Image70.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 322 B |
BIN
ToggleSwitchDemo/Resources/arrowleft.png
Normal file
BIN
ToggleSwitchDemo/Resources/arrowleft.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 326 B |
BIN
ToggleSwitchDemo/Resources/check.png
Normal file
BIN
ToggleSwitchDemo/Resources/check.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 407 B |
BIN
ToggleSwitchDemo/Resources/cross.png
Normal file
BIN
ToggleSwitchDemo/Resources/cross.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 467 B |
BIN
ToggleSwitchDemo/Resources/handle.png
Normal file
BIN
ToggleSwitchDemo/Resources/handle.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 315 B |
107
ToggleSwitchDemo/ToggleSwitchDemo.csproj
Normal file
107
ToggleSwitchDemo/ToggleSwitchDemo.csproj
Normal file
|
@ -0,0 +1,107 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{2F7ADBD8-EC70-4407-8B09-474E8F2043AC}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ToggleSwitchDemo</RootNamespace>
|
||||
<AssemblyName>ToggleSwitchDemo</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DemoForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="DemoForm.Designer.cs">
|
||||
<DependentUpon>DemoForm.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="DemoForm.resx">
|
||||
<DependentUpon>DemoForm.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\Image70.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ToggleSwitch\ToggleSwitch.csproj">
|
||||
<Project>{49b88ffa-f02c-4709-ba65-9f8996444ecd}</Project>
|
||||
<Name>ToggleSwitch</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\handle.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\arrowleft.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\check.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\cross.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -0,0 +1,4 @@
|
|||
// <autogenerated />
|
||||
using System;
|
||||
using System.Reflection;
|
||||
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.0", FrameworkDisplayName = ".NET Framework 4")]
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ToggleSwitchDemo/obj/Debug/ToggleSwitchDemo.DemoForm.resources
Normal file
BIN
ToggleSwitchDemo/obj/Debug/ToggleSwitchDemo.DemoForm.resources
Normal file
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
a3b23e74090a80e3128188f6cf3a320fb2c4b627
|
|
@ -0,0 +1,25 @@
|
|||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\bin\Debug\ToggleSwitchDemo.exe
|
||||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\bin\Debug\ToggleSwitchDemo.pdb
|
||||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\bin\Debug\ToggleSwitch.dll
|
||||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\bin\Debug\ToggleSwitch.pdb
|
||||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\obj\Debug\ToggleSwitchDemo.csprojResolveAssemblyReference.cache
|
||||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\obj\Debug\ToggleSwitchDemo.DemoForm.resources
|
||||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\obj\Debug\ToggleSwitchDemo.Properties.Resources.resources
|
||||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\obj\Debug\ToggleSwitchDemo.csproj.GenerateResource.Cache
|
||||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\obj\Debug\ToggleSwitchDemo.exe
|
||||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\obj\Debug\ToggleSwitchDemo.pdb
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\bin\Debug\ToggleSwitchDemo.exe
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\bin\Debug\ToggleSwitchDemo.pdb
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\bin\Debug\ToggleSwitch.dll
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\bin\Debug\ToggleSwitch.pdb
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\obj\Debug\ToggleSwitchDemo.csprojAssemblyReference.cache
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\obj\Debug\ToggleSwitchDemo.DemoForm.resources
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\obj\Debug\ToggleSwitchDemo.Properties.Resources.resources
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\obj\Debug\ToggleSwitchDemo.csproj.GenerateResource.cache
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\obj\Debug\ToggleSwitchDemo.csproj.CoreCompileInputs.cache
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\obj\Debug\ToggleSwitchDemo.csproj.CopyComplete
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\obj\Debug\ToggleSwitchDemo.exe
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\obj\Debug\ToggleSwitchDemo.pdb
|
||||
D:\CKMAI_Documents\Programming\GitHub\ToggleSwitch\ToggleSwitchDemo\obj\Debug\ToggleSwitchDemo.csprojAssemblyReference.cache
|
||||
D:\CKMAI_Documents\Programming\GitHub\ToggleSwitch\ToggleSwitchDemo\obj\Debug\ToggleSwitchDemo.exe
|
||||
D:\CKMAI_Documents\Programming\GitHub\ToggleSwitch\ToggleSwitchDemo\obj\Debug\ToggleSwitchDemo.pdb
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ToggleSwitchDemo/obj/Debug/ToggleSwitchDemo.exe
Normal file
BIN
ToggleSwitchDemo/obj/Debug/ToggleSwitchDemo.exe
Normal file
Binary file not shown.
BIN
ToggleSwitchDemo/obj/Debug/ToggleSwitchDemo.pdb
Normal file
BIN
ToggleSwitchDemo/obj/Debug/ToggleSwitchDemo.pdb
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ToggleSwitchDemo/obj/Release/ToggleSwitchDemo.DemoForm.resources
Normal file
BIN
ToggleSwitchDemo/obj/Release/ToggleSwitchDemo.DemoForm.resources
Normal file
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
fd4dbdbc4ebb23053bb7500549871212fffaf366
|
|
@ -0,0 +1,22 @@
|
|||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\bin\Release\ToggleSwitchDemo.exe
|
||||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\bin\Release\ToggleSwitchDemo.pdb
|
||||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\bin\Release\ToggleSwitch.dll
|
||||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\bin\Release\ToggleSwitch.pdb
|
||||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\obj\Release\ToggleSwitchDemo.csprojResolveAssemblyReference.cache
|
||||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\obj\Release\ToggleSwitchDemo.DemoForm.resources
|
||||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\obj\Release\ToggleSwitchDemo.Properties.Resources.resources
|
||||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\obj\Release\ToggleSwitchDemo.csproj.GenerateResource.Cache
|
||||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\obj\Release\ToggleSwitchDemo.exe
|
||||
C:\Users\Johnny\Documents\_Visual Studio Projects\ToggleSwitch\ToggleSwitchDemo\obj\Release\ToggleSwitchDemo.pdb
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\bin\Release\ToggleSwitchDemo.exe
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\bin\Release\ToggleSwitchDemo.pdb
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\bin\Release\ToggleSwitch.dll
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\bin\Release\ToggleSwitch.pdb
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\obj\Release\ToggleSwitchDemo.csprojAssemblyReference.cache
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\obj\Release\ToggleSwitchDemo.DemoForm.resources
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\obj\Release\ToggleSwitchDemo.Properties.Resources.resources
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\obj\Release\ToggleSwitchDemo.csproj.GenerateResource.cache
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\obj\Release\ToggleSwitchDemo.csproj.CoreCompileInputs.cache
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\obj\Release\ToggleSwitchDemo.csproj.CopyComplete
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\obj\Release\ToggleSwitchDemo.exe
|
||||
D:\Projekt\CodeProject\ToggleSwitch\ToggleSwitchDemo\obj\Release\ToggleSwitchDemo.pdb
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ToggleSwitchDemo/obj/Release/ToggleSwitchDemo.exe
Normal file
BIN
ToggleSwitchDemo/obj/Release/ToggleSwitchDemo.exe
Normal file
Binary file not shown.
BIN
ToggleSwitchDemo/obj/Release/ToggleSwitchDemo.pdb
Normal file
BIN
ToggleSwitchDemo/obj/Release/ToggleSwitchDemo.pdb
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue