예제 #1
0
        public ApplicationSprite()
        {
            this.InvokeWhenStageIsReady(
                delegate
            {
                this.stage.align     = StageAlign.TOP_LEFT;
                this.stage.scaleMode = StageScaleMode.NO_SCALE;

                var fullscreen = new ScriptCoreLib.ActionScript.flash.ui.ContextMenuItem("Go fullscreen!");

                fullscreen.menuItemSelect +=
                    delegate
                {
                    this.stage.SetFullscreen(true);
                };

#if FcontextMenu
                this.contextMenu = new ScriptCoreLib.ActionScript.flash.ui.ContextMenu
                {
                    customItems = new[] { fullscreen }
                };
#endif


                var c = new ApplicationCanvas();
                c.AttachToContainer(this);


                this.stage.resize +=
                    e =>
                {
                    c.SizeTo(this.stage.stageWidth, this.stage.stageHeight);
                };

                c.SizeTo(this.stage.stageWidth, this.stage.stageHeight);
            }
                );
        }
예제 #2
0
        public ApplicationSprite()
        {
            this.InvokeWhenStageIsReady(
                delegate
                {
                    this.stage.align = StageAlign.TOP_LEFT;
                    this.stage.scaleMode = StageScaleMode.NO_SCALE;

                    var fullscreen = new ScriptCoreLib.ActionScript.flash.ui.ContextMenuItem("Go fullscreen!");

                    fullscreen.menuItemSelect +=
                        delegate
                        {
                            this.stage.SetFullscreen(true);
                        };

#if FcontextMenu
                    this.contextMenu = new ScriptCoreLib.ActionScript.flash.ui.ContextMenu
                    {
                        customItems = new[] { fullscreen }
                    };
#endif


                    var c = new ApplicationCanvas();
                    c.AttachToContainer(this);


                    this.stage.resize +=
                        e =>
                        {

                            c.SizeTo(this.stage.stageWidth, this.stage.stageHeight);
                        };

                    c.SizeTo(this.stage.stageWidth, this.stage.stageHeight);
                }
            );
        }