Exemplo n.º 1
0
 public override void Place(ISpaceObject target)
 {
     CommonExtensions.Place(this, target);
 }
Exemplo n.º 2
0
 public static void add_complete(Sound that, Action <Event> value)
 {
     CommonExtensions.CombineDelegate(that, value, Event.COMPLETE);
 }
Exemplo n.º 3
0
 public static void remove_enterFrame(DisplayObject that, Action <Event> value)
 {
     CommonExtensions.RemoveDelegate(that, value, Event.ENTER_FRAME);
 }
Exemplo n.º 4
0
 public static void remove_removedFromStage(DisplayObject that, Action <Event> value)
 {
     CommonExtensions.RemoveDelegate(that, value, Event.REMOVED_FROM_STAGE);
 }
Exemplo n.º 5
0
 public static void add_status(Camera that, Action <StatusEvent> value)
 {
     CommonExtensions.CombineDelegate(that, value, StatusEvent.STATUS);
 }
        /// <summary>
        /// Default constructor
        /// </summary>
        public FlashGoogleMapsExample()
        {
            var MyMap = this;

            // lets create a hyperlink
            var powered_by_jsc = new TextField
            {
                x = 72,
                y = 32,

                defaultTextFormat = new TextFormat
                {
                    size = 24
                },
                autoSize   = TextFieldAutoSize.LEFT,
                htmlText   = "<a href='http://jsc.sf.net' target='_blank'>powered by <b>jsc</b></a>",
                selectable = false,
                filters    = new[] { new BlurFilter() },
                textColor  = ColorWhite
            }.AttachTo(this);

            // based on http://code.google.com/p/gmaps-samples-flash/source/browse/trunk/samplecode/com/google/maps/examples/HelloWorld.as


            //MyMap.width = 500;
            //MyMap.height = 400;

            // This key is good for all URLs in this directory:
            // http://jsc.sourceforge.net/
            MyMap.key = "ABQIAAAAP8RnR45oCW_IQn841NsRUxTWTeJzEP4t7om06_BG8dFdNnzkzRSRwPJSLIikpLP_90z2Fvj1rJhFWw";

            CommonExtensions.CombineDelegate(MyMap,

                                             (MapEvent e) =>
            {
                MyMap.setCenter(new LatLng(40.736072, -73.992062), 14, MapType.HYBRID_MAP_TYPE);

                var status = new TextField
                {
                    x               = 64,
                    y               = 164,
                    autoSize        = TextFieldAutoSize.LEFT,
                    background      = true,
                    mouseEnabled    = false,
                    backgroundColor = ColorBlack,
                    textColor       = ColorWhite,
                    filters         = new[] { new GlowFilter(ColorBlack) }
                }.AttachTo(this);

                //MyMap.MapMoveStep += e =>
                //    {
                //        status.text = "move: " + e.latLng.ToString();
                //    };

                //MyMap.MapClick += e =>
                //    {
                //        status.text = "click: " + e.latLng.ToString();
                //    };
                powered_by_jsc.AttachTo(this);
            }

                                             , MapEvent.MAP_READY);



            MyMap.addControl(new ZoomControl());
            MyMap.addControl(new PositionControl());
            MyMap.addControl(new MapTypeControl());


            this.contextMenu = new ContextMenu();
            this.contextMenu.hideBuiltInItems();

            #region powered by jsc



            powered_by_jsc.mouseOver +=

                delegate
            {
                powered_by_jsc.textColor = ColorYellow;
                powered_by_jsc.filters   = new[] { new DropShadowFilter() };
            };

            powered_by_jsc.mouseOut +=
                delegate
            {
                powered_by_jsc.filters   = new[] { new BlurFilter() };
                powered_by_jsc.textColor = ColorWhite;
            };

            #endregion
        }
Exemplo n.º 7
0
 public static void remove_link(TextField that, Action <TextEvent> value)
 {
     CommonExtensions.RemoveDelegate(that, value, TextEvent.LINK);
 }
 public void IsEmpty_should_be_null_guarded()
 {
     NullGuardedConstraint.Assert(() =>
                                  CommonExtensions.IsEmpty(new List <string>()));
 }
Exemplo n.º 9
0
 public static void remove_change(TextField that, Action <Event> value)
 {
     CommonExtensions.RemoveDelegate(that, value, Event.CHANGE);
 }
Exemplo n.º 10
0
 public static void add_link(TextField that, Action <TextEvent> value)
 {
     CommonExtensions.CombineDelegate(that, value, TextEvent.LINK);
 }
Exemplo n.º 11
0
 public static void add_change(TextField that, Action <Event> value)
 {
     CommonExtensions.CombineDelegate(that, value, Event.CHANGE);
 }
Exemplo n.º 12
0
        public void TestRandomNumber()
        {
            var generateRandomNumberCode = CommonExtensions.GenerateRandomNumberCode(5);

            Assert.AreEqual(5, generateRandomNumberCode.Length);
        }
Exemplo n.º 13
0
 public static void remove_securityError(URLLoader that, Action <SecurityErrorEvent> value)
 {
     CommonExtensions.RemoveDelegate(that, value, SecurityErrorEvent.SECURITY_ERROR);
 }
Exemplo n.º 14
0
 public static void remove_progress(URLLoader that, Action <ProgressEvent> value)
 {
     CommonExtensions.RemoveDelegate(that, value, ProgressEvent.PROGRESS);
 }
Exemplo n.º 15
0
 public static void add_scroll(TextField that, Action <Event> value)
 {
     CommonExtensions.CombineDelegate(that, value, Event.SCROLL);
 }
 public void Pairwise_should_be_null_guarded()
 {
     NullGuardedConstraint.Assert(() =>
                                  CommonExtensions.Pairwise(new List <string>(), new List <string>()));
 }
Exemplo n.º 17
0
 public static void remove_scroll(TextField that, Action <Event> value)
 {
     CommonExtensions.RemoveDelegate(that, value, Event.SCROLL);
 }
Exemplo n.º 18
0
 public static void remove_activity(Camera that, Action <ActivityEvent> value)
 {
     CommonExtensions.RemoveDelegate(that, value, ActivityEvent.ACTIVITY);
 }
Exemplo n.º 19
0
 public static void remove_textInput(TextField that, Action <TextEvent> value)
 {
     CommonExtensions.RemoveDelegate(that, value, TextEvent.TEXT_INPUT);
 }
Exemplo n.º 20
0
 public static void remove_status(Camera that, Action <StatusEvent> value)
 {
     CommonExtensions.RemoveDelegate(that, value, StatusEvent.STATUS);
 }
Exemplo n.º 21
0
 public static void remove_menuItemSelect(ContextMenuItem that, Action <ContextMenuEvent> value)
 {
     CommonExtensions.RemoveDelegate(that, value, ContextMenuEvent.MENU_ITEM_SELECT);
 }
Exemplo n.º 22
0
 public static void remove_addedToStage(DisplayObject that, Action <Event> value)
 {
     CommonExtensions.RemoveDelegate(that, value, Event.ADDED_TO_STAGE);
 }
Exemplo n.º 23
0
 public static void remove_channelMessage(ScriptCoreLib.ActionScript.flash.system.MessageChannel that, Action <Event> value)
 {
     CommonExtensions.RemoveDelegate(that, value, Event.CHANNEL_MESSAGE);
 }
Exemplo n.º 24
0
 public static void add_removed(DisplayObject that, Action <Event> value)
 {
     CommonExtensions.CombineDelegate(that, value, Event.REMOVED);
 }
Exemplo n.º 25
0
 public static void remove_asyncError(NetStream that, Action <AsyncErrorEvent> value)
 {
     CommonExtensions.RemoveDelegate(that, value, AsyncErrorEvent.ASYNC_ERROR);
 }
Exemplo n.º 26
0
 public static void remove_render(DisplayObject that, Action <Event> value)
 {
     CommonExtensions.RemoveDelegate(that, value, Event.RENDER);
 }
Exemplo n.º 27
0
 public static void remove_ioError(NetStream that, Action <IOErrorEvent> value)
 {
     CommonExtensions.RemoveDelegate(that, value, IOErrorEvent.IO_ERROR);
 }
Exemplo n.º 28
0
 private void btnPrint_Click(object sender, EventArgs e)
 {
     CommonExtensions.ShellExecute(IntPtr.Zero, "Print", this.LungModel.ImgPath, "", "", 0);
 }
Exemplo n.º 29
0
 public static void remove_netStatus(NetStream that, Action <NetStatusEvent> value)
 {
     CommonExtensions.RemoveDelegate(that, value, NetStatusEvent.NET_STATUS);
 }
Exemplo n.º 30
0
 public InvokeWhenStageIsReady()
 {
     Name = "InvokeWhenStageIsReady";
     IsStatic = true;
     IsExtensionMethod = true;
     DeclaringType = new CommonExtensions();
 }
Exemplo n.º 31
0
 public static void remove_open(URLLoader that, Action <Event> value)
 {
     CommonExtensions.RemoveDelegate(that, value, Event.OPEN);
 }