Advertisement
Guest User

Untitled

a guest
Dec 13th, 2012
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
  3.                        xmlns:s="library://ns.adobe.com/flex/spark"
  4.                        xmlns:mx="library://ns.adobe.com/flex/mx"
  5.                        width="800" height="700" minWidth="700" minHeight="700"
  6.                        backgroundColor="#E0E0E0" creationComplete="Initialize(event)"
  7.                        currentState="LogIn">
  8.     <fx:Declarations>
  9.         <!-- Place non-visual elements (e.g., services, value objects) here -->
  10.     </fx:Declarations>
  11.      
  12.     <s:states>
  13.         <s:State name="LogIn">
  14.         </s:State>
  15.         <s:State name="StepOne"/>
  16.         <s:State name="StepThree"/>
  17.         <s:State name="EditMessage"/>
  18.     </s:states>
  19.     <fx:Script>
  20.         <![CDATA[
  21.             import mx.rpc.http.HTTPService;
  22.             import mx.collections.ArrayCollection;
  23.             import mx.events.FlexEvent;
  24.             import mx.controls.Alert;
  25.             import org.EditMessage;
  26.             import org.Login;
  27.             import org.Main;
  28.             import flash.events.*;
  29.             import mx.rpc.events.*
  30.            
  31.             private var MainApplication:Main;  
  32.             private var LoginClass:Login;
  33.             private var EditMessageClass:EditMessage = new EditMessage();
  34.             public var treeData:Object;
  35.             private var httpService:HTTPService = new HTTPService();
  36.            
  37.             protected function Initialize(event:FlexEvent):void
  38.             {
  39.                 this.MainApplication = new Main(this);
  40.                 this.LoginClass = new Login(this);
  41.             }
  42.            
  43.             protected function loadLibraries(event:MouseEvent):void
  44.             {  
  45.                 EditMessageClass.PopulateLibraries();
  46.                
  47.                 treeData = EditMessageClass.jsonResults;
  48.                 currentState = 'EditMessage';
  49.             }          
  50.         ]]>
  51.     </fx:Script>
  52.     <!-- Validation -->
  53.    
  54.  
  55.     <!-- Main Form Controls -->
  56.     <s:Group id="loginForm" width="100%" height="100%">
  57.         <s:Rect id="backgroundRect" left="0" right="0" top="0" bottom="0">
  58.             <s:fill>
  59.                 <s:BitmapFill source="@Embed('images/default.jpg')" fillMode="repeat"/>
  60.             </s:fill>
  61.         </s:Rect>
  62.         <s:BorderContainer x="0" y="0" width="100%" height="85" backgroundColor="#ABABAB" backgroundAlpha="0.2" borderColor="#A1A1A1" dropShadowVisible="true">
  63.             <s:Image x="10" id="loginLogo" source="@Embed(source='Images/logo.png')">              
  64.             </s:Image>
  65.             <s:Image x="616" y="52" source="Images/record24.png"/>
  66.         </s:BorderContainer>
  67.         <s:Panel width="300" skinClass="spark.skins.spark.PanelSkin" height="206" fontFamily="Verdana" horizontalCenter="0" verticalCenter="0" title="Client Login">   
  68.             <s:Form x="10" y="10" width="278" height="153">
  69.                 <s:FormItem width="261" height="47" label="Username" fontFamily="verdana"
  70.                             fontSize="12" fontWeight="normal">
  71.                     <s:layout>
  72.                         <s:FormItemLayout/>
  73.                     </s:layout>
  74.                     <s:TextInput id="Username" width="165" color="#000000"
  75.                                  contentBackgroundColor="#B3B3B3" enabled="true"
  76.                                  horizontalCenter="0" paddingLeft="5" verticalCenter="15">
  77.                        
  78.                     </s:TextInput>
  79.                 </s:FormItem>
  80.                 <s:FormItem width="261" height="41" label="Password" fontFamily="verdana"
  81.                             fontSize="12" fontWeight="normal">
  82.                     <s:layout>
  83.                         <s:FormItemLayout/>
  84.                     </s:layout>
  85.                     <s:TextInput id="Password" width="165" color="#000000"
  86.                                  contentBackgroundColor="#B3B3B3" enabled="true"
  87.                                  horizontalCenter="0" paddingLeft="5" verticalCenter="15" displayAsPassword="true">
  88.                        
  89.                     </s:TextInput>
  90.                 </s:FormItem>
  91.                 <s:Button width="261" id="SignIn" height="32" label="Login" click="LoginClass.SignIn()" cornerRadius="1"/>
  92.             </s:Form>
  93.         </s:Panel>
  94.         <s:Panel includeIn="EditMessage,StepOne,StepThree" x="10" y="117" width="781" height="573"
  95.                  title="Recording Dock"
  96.                  height.EditMessage="550" title.EditMessage="Record 24 Libraries"
  97.                  height.StepOne="550" title.StepOne="Record 24 Wizard"
  98.                  height.StepThree="550">
  99.             <s:Button id="recordNew" includeIn="StepOne" x="239" y="102" width="300"
  100.                       height="90" label="Record New Message" fontFamily="Verdana" fontSize="16"/>
  101.             <s:Button id="editMessage" includeIn="StepOne" x="239" y="200" width="300" height="90"
  102.                       label="Edit Existing Message" click="loadLibraries(event)"
  103.                       fontFamily="Verdana" fontSize="16"/>
  104.             <s:Button id="scheduleMessages" includeIn="StepOne" x="239" y="298" width="300"
  105.                       height="90" label="Schedule Messages" fontFamily="Verdana" fontSize="16"/>
  106.             <s:ToggleButton id="recButton" includeIn="StepThree" x="686" y="475" width="82"
  107.                             height="33" label="Record" click="MainApplication.startRecording(event)"/>
  108.             <s:ToggleButton id="previewButton" includeIn="StepThree" x="686" y="434" width="82"
  109.                             height="33" label="Preview" click="MainApplication.startRecording(event)"/>
  110.             <s:ToggleButton id="saveButton" includeIn="StepThree" x="687" y="393" width="82"
  111.                             height="33" label="Save" click="MainApplication.startRecording(event)"/>
  112.             <mx:Tree id="libraryTree" labelField="CategoryName" dataProvider="{EditMessageClass.jsonResults}" includeIn="EditMessage" x="10" y="25" width="202" height="482">          
  113.             </mx:Tree>
  114.            
  115.             <s:Label id="timer" includeIn="StepThree" x="717" y="363"/>
  116.             <s:Label includeIn="EditMessage" x="10" y="5" fontFamily="Verdana" fontSize="20"
  117.                      text="Libraries"/>
  118.            
  119.         </s:Panel>
  120.     </s:Group>
  121. </s:WindowedApplication>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement