Action

Ultima Cena


Info
   1:  <%@ Page Language="C#" AutoEventWireup="true" Title="AtomicDialog -- Animation" CodeBehind="Animation.aspx.cs" Inherits="Atom.Website.Samples.AtomicDialog.Animation" %>
   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:   
  18:      <script type="text/javascript">  
  19:          $(document).ready(function(){
  20:              $('#Open').button().click(function(){
  21:                  <%=AtomicDialog1.ClientID %>.dialog('open');  
  22:              });  
  23:          });
  24:      </script>
  25:  </head>
  26:  <body>
  27:      <form id="form1" runat="server">
  28:      <fieldset>
  29:          <legend>Action</legend>
  30:          <input type="button" id="Open" value="Open" /><br />
  31:          <label for="ShowAnimation">
  32:              Show Animation
  33:          </label>
  34:          <asp:DropDownList runat="server" ID="ShowAnimation" AutoPostBack="true" OnSelectedIndexChanged="ShowAnimation_SelectedIndexChanged">
  35:          </asp:DropDownList>
  36:          <br />
  37:          <label for="HideAnimation">
  38:              Hide Animation
  39:          </label>
  40:          <asp:DropDownList runat="server" ID="HideAnimation" AutoPostBack="true" OnSelectedIndexChanged="HideAnimation_SelectedIndexChanged">
  41:          </asp:DropDownList>
  42:      </fieldset>
  43:      <div>
  44:          <atom:AtomicDialog ID="AtomicDialog1" runat="server" Title="La Última Cena de Leonardo da Vinci"
  45:              Height="300" Width="460">
  46:              <Template>
  47:                  <img alt="Ultima Cena" src="../images/art/ultima_cena_leonardo.jpg" title="Ultima Cena" />
  48:              </Template>
  49:          </atom:AtomicDialog>
  50:      </div>
  51:      <br />
  52:      <sample:Source ID="Code" runat="server" />
  53:      </form>
  54:  </body>
  55:  </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:   
   8:  namespace Atom.Website.Samples.AtomicDialog
   9:  {
  10:      public partial class Animation : System.Web.UI.Page
  11:      {
  12:          protected void Page_Load(object sender, EventArgs e)
  13:          {
  14:              if (!Page.IsPostBack)
  15:              {
  16:                  foreach (var item in Enum.GetValues(typeof(Atom.Web.UI.WebControls.Animation)))
  17:                  {
  18:                      ShowAnimation.Items.Add(new ListItem(item.ToString(), item.ToString()));
  19:                      HideAnimation.Items.Add(new ListItem(item.ToString(), item.ToString()));
  20:                  }
  21:              }
  22:          }
  23:   
  24:          protected void HideAnimation_SelectedIndexChanged(object sender, EventArgs e)
  25:          {
  26:              AtomicDialog1.HideAnimation = (Atom.Web.UI.WebControls.Animation)Enum.Parse(typeof(Atom.Web.UI.WebControls.Animation), HideAnimation.SelectedValue.ToString(), true);
  27:          }
  28:   
  29:          protected void ShowAnimation_SelectedIndexChanged(object sender, EventArgs e)
  30:          {
  31:              AtomicDialog1.ShowAnimation = (Atom.Web.UI.WebControls.Animation)Enum.Parse(typeof(Atom.Web.UI.WebControls.Animation), HideAnimation.SelectedValue.ToString(), true);
  32:          }
  33:      }
  34:  }
   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:  Namespace Atom.Website.Samples.AtomicDialog
   8:      Public Partial Class Animation
   9:          Inherits System.Web.UI.Page
  10:          Protected Sub Page_Load(sender As Object, e As EventArgs)
  11:              If Not Page.IsPostBack Then
  12:                  For Each item As var In [Enum].GetValues(GetType(Atom.Web.UI.WebControls.Animation))
  13:                      ShowAnimation.Items.Add(New ListItem(item.ToString(), item.ToString()))
  14:                      HideAnimation.Items.Add(New ListItem(item.ToString(), item.ToString()))
  15:                  Next
  16:              End If
  17:          End Sub
  18:          Protected Sub HideAnimation_SelectedIndexChanged(sender As Object, e As EventArgs)
  19:              AtomicDialog1.HideAnimation = DirectCast([Enum].Parse(GetType(Atom.Web.UI.WebControls.Animation), HideAnimation.SelectedValue.ToString(), True), Atom.Web.UI.WebControls.Animation)
  20:          End Sub
  21:          Protected Sub ShowAnimation_SelectedIndexChanged(sender As Object, e As EventArgs)
  22:              AtomicDialog1.ShowAnimation = DirectCast([Enum].Parse(GetType(Atom.Web.UI.WebControls.Animation), HideAnimation.SelectedValue.ToString(), True), Atom.Web.UI.WebControls.Animation)
  23:          End Sub
  24:      End Class
  25:  End Namespace