示例#1
0
 public override void Place(ISpaceObject target)
 {
     CommonExtensions.Place(this, target);
 }
示例#2
0
 public static void add_complete(Sound that, Action <Event> value)
 {
     CommonExtensions.CombineDelegate(that, value, Event.COMPLETE);
 }
示例#3
0
 public static void remove_enterFrame(DisplayObject that, Action <Event> value)
 {
     CommonExtensions.RemoveDelegate(that, value, Event.ENTER_FRAME);
 }
示例#4
0
 public static void remove_removedFromStage(DisplayObject that, Action <Event> value)
 {
     CommonExtensions.RemoveDelegate(that, value, Event.REMOVED_FROM_STAGE);
 }
示例#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
        }
示例#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>()));
 }
示例#9
0
 public static void remove_change(TextField that, Action <Event> value)
 {
     CommonExtensions.RemoveDelegate(that, value, Event.CHANGE);
 }
示例#10
0
 public static void add_link(TextField that, Action <TextEvent> value)
 {
     CommonExtensions.CombineDelegate(that, value, TextEvent.LINK);
 }
示例#11
0
 public static void add_change(TextField that, Action <Event> value)
 {
     CommonExtensions.CombineDelegate(that, value, Event.CHANGE);
 }
示例#12
0
        public void TestRandomNumber()
        {
            var generateRandomNumberCode = CommonExtensions.GenerateRandomNumberCode(5);

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