Esempio n. 1
0
 public AddRectangleForm(string enemyname,string[] rectanglenames)
 {
     InitializeComponent();
     builder = new ContentBuilder();
     this.enemyname = enemyname;
     alreadyExsistingRectangles = rectanglenames;
     OpenImg.Filter = "Image Files(*.BMP;*.JPG;*.PNG)|*.BMP;*.JPG;*.PNG|All files (*.*)|*.*";
 }
Esempio n. 2
0
        /// <summary>
        /// Constructs the main form.
        /// </summary>
        public MainForm()
        {
            InitializeComponent();

            contentBuilder = new ContentBuilder();

            contentManager = new ContentManager(modelViewerControl.Services,
                                                contentBuilder.OutputDirectory);

            /// Automatically bring up the "Load Model" dialog when we are first shown.
            this.Shown += OpenMenuClicked;
        }
Esempio n. 3
0
        /// <summary>
        /// ���C�� �t�H�[����\�z���܂��B
        /// </summary>
        public MainForm()
        {
            // �R���|�[�l���g�����������B
            InitializeComponent();

            // �R���e���c�R���p�C����쐬����B
            contentBuilder = new ContentBuilder();

            // �R���e���c�Ǘ���쐬����B
            contentManager = new ContentManager(modelViewerControl.Services,
                                                contentBuilder.OutputDirectory);

            /// �ŏ��Ƀt�H�[����\������Ƃ��ɁA�����I�� [Load Model] �_�C�A���O��\�����܂��B
            /// +=��C#�̕��@�B�C�x���g�̓o�^�B
            //this.Shown += OpenMenuClicked;
        }
Esempio n. 4
0
        /// <summary>
        /// メイン フォームを構築します。
        /// </summary>
        public MainForm()
        {
            // コンポーネントを初期化する。
            InitializeComponent();

            // コンテンツコンパイラを作成する。
            contentBuilder = new ContentBuilder();

            // コンテンツ管理を作成する。
            contentManager = new ContentManager(modelViewerControl.Services,
                                                contentBuilder.OutputDirectory);

            /// 最初にフォームを表示するときに、自動的に [Load Model] ダイアログを表示します。
            /// +=はC#の文法。イベントの登録。
            //this.Shown += OpenMenuClicked;
        }
        /// <summary>
        /// Constructs the main form.
        /// </summary>
        public MainForm()
        {
            InitializeComponent();

            fpsLabel = lblFPSREAL;
            particleCountLabel = lblParticlesActive;
            maxParticleCount = lblMaxParticles;

            contentBuilder = new ContentBuilder();

            contentManager = new ContentManager(modelViewerControl.Services,
                                                contentBuilder.OutputDirectory);

            ParticleEngine.Instance.main_form_reference = this;

            /// Automatically bring up the "Load Model" dialog when we are first shown.
            //this.Shown += OpenMenuClicked;
        }
Esempio n. 6
0
        /// <summary>
        /// Initializes the control.
        /// </summary>
        protected override void Initialize()
        {
            if (_isIntialized)
                return;

            // Hook the idle event to constantly redraw our animation.
            Application.Idle += delegate { Invalidate(); };

            /* _scene.GraphicsDevice = (GraphicsDevice)this.Services.
                 GetService(typeof(GraphicsDevice));*/

            _scene.GraphicsDevice = ((IGraphicsDeviceService)this.Services.
                GetService(typeof(IGraphicsDeviceService))).GraphicsDevice;

            contentBuilder = new ContentBuilder();

            contentManager = new MyContentManager(this.Services,
                                                contentBuilder.OutputDirectory);

            dCamera cam = new dCamera(_scene);
            dCamOrth front = new dCamOrth(new Vector3(0,0,10),new Vector3(0,0,0),_scene);
            front.ID = "ƽ��ͼ";
            _scene.Components.Add(front);
            //dCamera cam2 = new dCamera(_scene);
            //new SelectFunction(_scene);
            //new Compass(_scene);

            //_scene.Components.Add(cam);
            _scene.Components.Add(new MouseSelectionManager(_scene));
            _scene.Components.Add(new SelectFunction(_scene));
            _scene.Components.Add(_dataReactor);

            _scene.Services = this.Services;
            _scene.Services.AddService<ContentBuilder>(contentBuilder);
            _scene.Services.AddService<MyContentManager>(contentManager);
            _scene.Services.AddService<ICamera>(cam);

            _scene.Services.AddService<DataReactor>(_dataReactor);

            //
            //this.MouseMove += new MouseEventHandler(RegistMouse);
            //this.MouseLeave += new EventHandler(UnRegistMouse);
               // this.ClientSizeChanged += new EventHandler(OnSizeChanged);

            _isIntialized = true;
        }