- spinner.zip
- CustomControls
- bin
- calendar
- css
- img
- ui-bg_flat_0_aaaaaa_40x100.png
- ui-bg_flat_75_ffffff_40x100.png
- ui-bg_glass_55_fbf9ee_1x400.png
- ui-bg_glass_65_ffffff_1x400.png
- ui-bg_glass_75_dadada_1x400.png
- ui-bg_glass_75_e6e6e6_1x400.png
- ui-bg_glass_95_fef1ec_1x400.png
- ui-bg_highlight-soft_75_cccccc_1x100.png
- ui-icons_222222_256x240.png
- ui-icons_2e83ff_256x240.png
- ui-icons_454545_256x240.png
- ui-icons_888888_256x240.png
- ui-icons_cd0a0a_256x240.png
- js
- colorpicker
- css
- img
- colorpicker_overlay.png
- colorpicker_select.gif
- custom_background.png
- custom_cancel.png
- custom_hex.png
- custom_hsb_b.png
- custom_hsb_h.png
- custom_hsb_s.png
- custom_indic.gif
- custom_rgb_b.png
- custom_rgb_g.png
- custom_rgb_r.png
- custom_submit.png
- js
- elrte
- css
- img
- elrte-toolbar.png
- pixel.gif
- js
- lang
- obj
- Debug
- DesignTimeResolveAssemblyReferences.cache
- DesignTimeResolveAssemblyReferencesInput.cache
- ResGen.read.1.tlog
- ResGen.write.1.tlog
- TempPE
- VisualJS.Web.Forms.SliderControl.resources
- WebControls.csproj.FileListAbsolute.txt
- WebControls.dll
- WebControls.pdb
- x86
- Debug
- DesignTimeResolveAssemblyReferencesInput.cache
- ResGen.read.1.tlog
- ResGen.write.1.tlog
- TempPE
- VisualJS.Web.Forms.SliderControl.resources
- WebControls.csproj.FileListAbsolute.txt
- WebControls.dll
- WebControls.pdb
- Properties
- slider
- css
- img
- arrows.png
- bullets.png
- loading.gif
- js
- spinner
- css
- img
- ui-bg_diagonals-thick_18_b81900_40x40.png
- ui-bg_diagonals-thick_20_666666_40x40.png
- ui-bg_flat_10_000000_40x100.png
- ui-bg_glass_100_f6f6f6_1x400.png
- ui-bg_glass_100_fdf5ce_1x400.png
- ui-bg_glass_65_ffffff_1x400.png
- ui-bg_gloss-wave_35_f6a828_500x100.png
- ui-bg_highlight-soft_100_eeeeee_1x100.png
- ui-bg_highlight-soft_75_ffe45c_1x100.png
- ui-icons_222222_256x240.png
- ui-icons_228ef1_256x240.png
- ui-icons_ef8c08_256x240.png
- ui-icons_ffd27a_256x240.png
- ui-icons_ffffff_256x240.png
- js
- Web
- WebControls.csproj
- WebControls.csproj.user
- SpinnerTest
- VisualJSSetup_1.042.zip
- spinner-noexe.zip
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Windows.Forms;
using VisualJS;
using VisualJS.Kernel;
using VisualJS.Service;
namespace VisualJS.Web.Forms
{
[ToolboxItem(true),ToolboxBitmap(typeof(System.Windows.Forms.ToolStripContainer)), Description("VisualJS UserControl")]
public partial class SliderControl : VisualJS.Web.Forms.ExternalControl
{
public SliderControl():base("SliderControl")
{
this.OnCommit = Resources;
InitializeComponent();
}
void Resources()
{
VisualJS.Kernel.Settings.JQuerySupport = true;
if (ComponentRegister.Register(typeof(SliderControl)))
{
Assembly appAsm = Assembly.GetExecutingAssembly();
ComponentRegister.RegisterFolder(appAsm, "WebControls.slider");
ComponentRegister.Merge(new string[]{
"WebControls.slider.js.jquery.nivo.slider.pack.js",
"WebControls.slider.js.slider.js"}
, "WebControls.slider.js", "js", Encoding.UTF8);
}
this.ClientLoadCheck("WebControls.slider.js", ClientSideDocuments.Script);
this.ClientLoadCheck("WebControls.slider.css.nivo-slider.css", ClientSideDocuments.CSS);
}
public class SliderItem
{
internal string ImageURL = "", TargetURL = "", CaptionText = "";
public override string ToString()
{
return "{" + "imageURL:\"" + ImageURL + "\"," + "targetURL:\"" + TargetURL + "\","
+ "captionText:\"" + CaptionText + "\"}";
}
public override int GetHashCode()
{
return ToString().Length + ImageURL.GetHashCode();
}
public override bool Equals(object obj)
{
SliderItem item = (SliderItem)obj;
return item.ToString() == this.ToString();
}
public SliderItem(string imageURL, string targetURL, string captionText)
{
ImageURL = imageURL;
TargetURL = targetURL;
CaptionText = captionText;
}
}
internal bool dataSet = false;
/// <summary>
/// Add list of slides (you may only call this method one time within object's lifetime)
/// </summary>
/// <param name="slides">list of slides</param>
public void AddSlide(List<SliderItem> slides)
{
if (dataSet)
return;
dataSet = true;
ContentCollection.Contents.BeginUpdate();
foreach (SliderItem slide in slides)
{
ContentCollection.Contents.Add(slide.ToString());
}
ContentCollection.Contents.EndUpdate();
}
/// <summary>
/// Client side component doesn't support docking
/// </summary>
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
public new DockStyle Dock
{
get { return base.Dock; }
set { }
}
[Browsable(false)]
public new bool AutoScroll
{
get
{
return base.AutoScroll;
}
set
{
}
}
internal int slices = 5;
[Browsable(true), Description("For slice animations")]
public int Slices
{
get
{
return slices;
}
set
{
if (slices != value)
SetProperty("Slices", value);
slices = value;
}
}
internal int boxCols = 5;
[Browsable(true), Description("For box animations")]
public int BoxCols
{
get
{
return boxCols;
}
set
{
if (boxCols != value)
SetProperty("BoxCols", value);
boxCols = value;
}
}
internal int boxRows = 5;
[Browsable(true), Description("For box animations")]
public int BoxRows
{
get
{
return boxRows;
}
set
{
if (boxRows != value)
SetProperty("BoxRows", value);
boxRows = value;
}
}
internal int pauseTime = 4000;
[Browsable(true), Description("How long each slide will show")]
public int PauseTime
{
get
{
return pauseTime;
}
set
{
if (pauseTime != value)
SetProperty("PauseTime", value);
pauseTime = value;
}
}
internal int startSlide = 0;
[Browsable(true), Description("Set starting Slide (0 index)")]
public int StartSlide
{
get
{
return startSlide;
}
set
{
if (startSlide != value)
SetProperty("StartSlide", value);
startSlide = value;
}
}
internal bool directNav = true;
[Browsable(true), Description("Next & Prev navigation")]
public bool DirectNav
{
get
{
return directNav;
}
set
{
if (directNav != value)
SetProperty("DirectNav", value);
directNav = value;
}
}
internal bool directNavHide = true;
[Browsable(true), Description("Only show on hover")]
public bool DirectNavHide
{
get
{
return directNavHide;
}
set
{
if (directNavHide != value)
SetProperty("DirectNavHide", value);
directNavHide = value;
}
}
[Browsable(false)]
public new bool ReadOnly
{
get
{
return base.ReadOnly;
}
set
{
}
}
[Browsable(false)]
public string ClickInfo
{
get
{
return base.ClickData;
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.