Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
- xmlns:s="library://ns.adobe.com/flex/spark"
- xmlns:mx="library://ns.adobe.com/flex/mx"
- width="800" height="700" minWidth="700" minHeight="700"
- backgroundColor="#E0E0E0" creationComplete="Initialize(event)"
- currentState="LogIn">
- <fx:Declarations>
- <!-- Place non-visual elements (e.g., services, value objects) here -->
- </fx:Declarations>
- <s:states>
- <s:State name="LogIn">
- </s:State>
- <s:State name="StepOne"/>
- <s:State name="StepThree"/>
- <s:State name="EditMessage"/>
- </s:states>
- <fx:Script>
- <![CDATA[
- import mx.rpc.http.HTTPService;
- import mx.collections.ArrayCollection;
- import mx.events.FlexEvent;
- import mx.controls.Alert;
- import org.EditMessage;
- import org.Login;
- import org.Main;
- import flash.events.*;
- import mx.rpc.events.*
- private var MainApplication:Main;
- private var LoginClass:Login;
- private var EditMessageClass:EditMessage = new EditMessage();
- public var treeData:Object;
- private var httpService:HTTPService = new HTTPService();
- protected function Initialize(event:FlexEvent):void
- {
- this.MainApplication = new Main(this);
- this.LoginClass = new Login(this);
- }
- protected function loadLibraries(event:MouseEvent):void
- {
- EditMessageClass.PopulateLibraries();
- treeData = EditMessageClass.jsonResults;
- currentState = 'EditMessage';
- }
- ]]>
- </fx:Script>
- <!-- Validation -->
- <!-- Main Form Controls -->
- <s:Group id="loginForm" width="100%" height="100%">
- <s:Rect id="backgroundRect" left="0" right="0" top="0" bottom="0">
- <s:fill>
- <s:BitmapFill source="@Embed('images/default.jpg')" fillMode="repeat"/>
- </s:fill>
- </s:Rect>
- <s:BorderContainer x="0" y="0" width="100%" height="85" backgroundColor="#ABABAB" backgroundAlpha="0.2" borderColor="#A1A1A1" dropShadowVisible="true">
- <s:Image x="10" id="loginLogo" source="@Embed(source='Images/logo.png')">
- </s:Image>
- <s:Image x="616" y="52" source="Images/record24.png"/>
- </s:BorderContainer>
- <s:Panel width="300" skinClass="spark.skins.spark.PanelSkin" height="206" fontFamily="Verdana" horizontalCenter="0" verticalCenter="0" title="Client Login">
- <s:Form x="10" y="10" width="278" height="153">
- <s:FormItem width="261" height="47" label="Username" fontFamily="verdana"
- fontSize="12" fontWeight="normal">
- <s:layout>
- <s:FormItemLayout/>
- </s:layout>
- <s:TextInput id="Username" width="165" color="#000000"
- contentBackgroundColor="#B3B3B3" enabled="true"
- horizontalCenter="0" paddingLeft="5" verticalCenter="15">
- </s:TextInput>
- </s:FormItem>
- <s:FormItem width="261" height="41" label="Password" fontFamily="verdana"
- fontSize="12" fontWeight="normal">
- <s:layout>
- <s:FormItemLayout/>
- </s:layout>
- <s:TextInput id="Password" width="165" color="#000000"
- contentBackgroundColor="#B3B3B3" enabled="true"
- horizontalCenter="0" paddingLeft="5" verticalCenter="15" displayAsPassword="true">
- </s:TextInput>
- </s:FormItem>
- <s:Button width="261" id="SignIn" height="32" label="Login" click="LoginClass.SignIn()" cornerRadius="1"/>
- </s:Form>
- </s:Panel>
- <s:Panel includeIn="EditMessage,StepOne,StepThree" x="10" y="117" width="781" height="573"
- title="Recording Dock"
- height.EditMessage="550" title.EditMessage="Record 24 Libraries"
- height.StepOne="550" title.StepOne="Record 24 Wizard"
- height.StepThree="550">
- <s:Button id="recordNew" includeIn="StepOne" x="239" y="102" width="300"
- height="90" label="Record New Message" fontFamily="Verdana" fontSize="16"/>
- <s:Button id="editMessage" includeIn="StepOne" x="239" y="200" width="300" height="90"
- label="Edit Existing Message" click="loadLibraries(event)"
- fontFamily="Verdana" fontSize="16"/>
- <s:Button id="scheduleMessages" includeIn="StepOne" x="239" y="298" width="300"
- height="90" label="Schedule Messages" fontFamily="Verdana" fontSize="16"/>
- <s:ToggleButton id="recButton" includeIn="StepThree" x="686" y="475" width="82"
- height="33" label="Record" click="MainApplication.startRecording(event)"/>
- <s:ToggleButton id="previewButton" includeIn="StepThree" x="686" y="434" width="82"
- height="33" label="Preview" click="MainApplication.startRecording(event)"/>
- <s:ToggleButton id="saveButton" includeIn="StepThree" x="687" y="393" width="82"
- height="33" label="Save" click="MainApplication.startRecording(event)"/>
- <mx:Tree id="libraryTree" labelField="CategoryName" dataProvider="{EditMessageClass.jsonResults}" includeIn="EditMessage" x="10" y="25" width="202" height="482">
- </mx:Tree>
- <s:Label id="timer" includeIn="StepThree" x="717" y="363"/>
- <s:Label includeIn="EditMessage" x="10" y="5" fontFamily="Verdana" fontSize="20"
- text="Libraries"/>
- </s:Panel>
- </s:Group>
- </s:WindowedApplication>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement