Action



Info
   1:  <%@ Page Title="AtomicSlider -- Vertical" Language="C#" AutoEventWireup="true" CodeBehind="Vertical.aspx.cs" Inherits="Atom.Website.Samples.AtomicSlider.Vertical" %>
   2:   
   3:  <%@ Register Src="../Source.ascx" TagName="Source" TagPrefix="sample" %>
   4:  <%@ Register Assembly="Atom.Web" Namespace="Atom.Web.UI.WebControls" TagPrefix="atom" %>
   5:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   6:  <html xmlns="http://www.w3.org/1999/xhtml">
   7:  <head id="Header1" runat="server">
   8:      <link rel="Shortcut Icon" type="image/ico" href="../images/icon.png" /> 
   9:      <!-- The jQuery UI theme that will be used by the components. -->
  10:      <link href="../themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
  11:      <!-- jQuery runtime minified -->
  12:      <script src="../Scripts/jquery-1.9.1.js" type="text/javascript"></script>
  13:      <!-- jQuery UI runtime minified, client-side javascript of the components.-->
  14:      <script src="../Scripts/jquery-ui-1.10.3.custom.min.js" type="text/javascript"></script>
  15:      <!-- This style reference is needed only for the current example. -->
  16:      <link href="../css/example.css" rel="stylesheet" type="text/css" />
  17:  </head>
  18:  <body>
  19:      <form id="form1" runat="server">
  20:      <fieldset>
  21:          <legend>Action </legend>
  22:          <asp:DropDownList runat="server" AutoPostBack="true" ID="SliderOrientationSelector"
  23:              OnSelectedIndexChanged="SliderOrientationSelector_SelectedIndexChanged">
  24:              <asp:ListItem Text="Vertical" Selected="True" />
  25:              <asp:ListItem Text="Horizontal" />
  26:          </asp:DropDownList>
  27:          <br />
  28:          <asp:CheckBox Text="Allow Range" runat="server" ID="IsRange" Checked="false" AutoPostBack="true"
  29:              OnCheckedChanged="IsRange_CheckedChanged" />
  30:      </fieldset>
  31:      <br />
  32:      <div>
  33:          <atom:AtomicSlider ID="AtomicSlider1" runat="server" SliderOrientation="Vertical">
  34:          </atom:AtomicSlider>
  35:      </div>
  36:      <br />
  37:      <sample:Source ID="Code" runat="server" />
  38:      </form>
  39:  </body>
  40:  </html>
   1:  using System;
   2:  using System.Collections.Generic;
   3:  using System.Linq;
   4:  using System.Web;
   5:  using System.Web.UI;
   6:  using System.Web.UI.WebControls;
   7:  using Atom.Web.UI.WebControls.Slider;
   8:   
   9:  namespace Atom.Website.Samples.AtomicSlider
  10:  {
  11:      public partial class Vertical : System.Web.UI.Page
  12:      {
  13:          protected void Page_Load(object sender, EventArgs e)
  14:          {
  15:   
  16:          }
  17:   
  18:          protected void SliderOrientationSelector_SelectedIndexChanged(object sender, EventArgs e)
  19:          {
  20:              AtomicSlider1.SliderOrientation = (Orientation)Enum.Parse(typeof(Orientation), SliderOrientationSelector.Text, true);
  21:          }
  22:   
  23:          protected void IsRange_CheckedChanged(object sender, EventArgs e)
  24:          {
  25:              AtomicSlider1.Range = (SliderRange)Enum.Parse(typeof(SliderRange), IsRange.Checked.ToString(), true);
  26:          }
  27:   
  28:      }
  29:  }
   1:  Imports System
   2:  Imports System.Collections.Generic
   3:  Imports System.Linq
   4:  Imports System.Web
   5:  Imports System.Web.UI
   6:  Imports System.Web.UI.WebControls
   7:  Imports Atom.Web.UI.WebControls.Slider
   8:  Namespace Atom.Website.Samples.AtomicSlider
   9:      Public Partial Class Vertical
  10:          Inherits System.Web.UI.Page
  11:          Protected Sub Page_Load(sender As Object, e As EventArgs)
  12:          End Sub
  13:          Protected Sub SliderOrientationSelector_SelectedIndexChanged(sender As Object, e As EventArgs)
  14:              AtomicSlider1.SliderOrientation = DirectCast([Enum].Parse(GetType(Orientation), SliderOrientationSelector.Text, True), Orientation)
  15:          End Sub
  16:          Protected Sub IsRange_CheckedChanged(sender As Object, e As EventArgs)
  17:              AtomicSlider1.Range = DirectCast([Enum].Parse(GetType(SliderRange), IsRange.Checked.ToString(), True), SliderRange)
  18:          End Sub
  19:      End Class
  20:  End Namespace