Esempio n. 1
0
        public void Init(SelectScriptDelegate SelectScript)
        {
            this.SelectScript = SelectScript;
            ActiveScriptIndex = -1;

            fntScriptName = new Font("Calibri", 8);
            brScriptBrush = Brushes.White;
            brScriptLink  = Brushes.Black;

            imgScriptTopLeft      = new UnsafeScriptImage("Content/ScriptTopLeft2.png");
            imgScriptTopMiddle    = new UnsafeScriptImage("Content/ScriptTopMiddle2.png");
            imgScriptTopRight     = new UnsafeScriptImage("Content/ScriptTopRight2.png");
            imgScriptMiddleLeft   = new UnsafeScriptImage("Content/ScriptMiddleLeft2.png");
            imgScriptMiddleMiddle = new UnsafeScriptImage("Content/ScriptMiddleMiddle2.png");
            imgScriptMiddleRight  = new UnsafeScriptImage("Content/ScriptMiddleRight2.png");
            imgScriptBottomLeft   = new UnsafeScriptImage("Content/ScriptBottomLeft2.png");
            imgScriptBottomMiddle = new UnsafeScriptImage("Content/ScriptBottomMiddle2.png");
            imgScriptBottomRight  = new UnsafeScriptImage("Content/ScriptBottomRight2.png");

            //Create a new buffer based on the picturebox.
            pbDrawingSurfaceGraphics = panDrawingSurface.CreateGraphics();
            this.pbMapPreviewContext = BufferedGraphicsManager.Current;
            this.pbMapPreviewContext.MaximumBuffer = new Size(panDrawingSurface.Width, panDrawingSurface.Height);
            this.pbMapPreviewGraphicDevice         = pbMapPreviewContext.Allocate(pbDrawingSurfaceGraphics, new Rectangle(0, 0, panDrawingSurface.Width, panDrawingSurface.Height));

            if (ActiveCutscene != null)
            {
                panDrawingSurface_Resize(this, null);

                InitCutscene(ActiveCutscene);
            }
        }
Esempio n. 2
0
        public void Init(SelectScriptDelegate SelectScript)
        {
            this.SelectScript  = SelectScript;
            ActiveScriptIndex  = -1;
            ShowExecutionOrder = true;

            StringFormatCenter.Alignment     = StringAlignment.Center;
            StringFormatCenter.LineAlignment = StringAlignment.Center;

            StringFormatRight.Alignment     = StringAlignment.Far;
            StringFormatRight.LineAlignment = StringAlignment.Center;

            fntScriptName = new Font("Calibri", 8);
            brScriptBrush = Brushes.White;
            brScriptLink  = Brushes.Black;

            imgScriptTopLeft      = new UnsafeScriptImage("Content/ScriptTopLeft2.png");
            imgScriptTopMiddle    = new UnsafeScriptImage("Content/ScriptTopMiddle2.png");
            imgScriptTopRight     = new UnsafeScriptImage("Content/ScriptTopRight2.png");
            imgScriptMiddleLeft   = new UnsafeScriptImage("Content/ScriptMiddleLeft2.png");
            imgScriptMiddleMiddle = new UnsafeScriptImage("Content/ScriptMiddleMiddle2.png");
            imgScriptMiddleRight  = new UnsafeScriptImage("Content/ScriptMiddleRight2.png");
            imgScriptBottomLeft   = new UnsafeScriptImage("Content/ScriptBottomLeft2.png");
            imgScriptBottomMiddle = new UnsafeScriptImage("Content/ScriptBottomMiddle2.png");
            imgScriptBottomRight  = new UnsafeScriptImage("Content/ScriptBottomRight2.png");

            //Create a new buffer based on the picturebox.
            pbDrawingSurfaceGraphics = panDrawingSurface.CreateGraphics();
            this.pbMapPreviewContext = BufferedGraphicsManager.Current;
            this.pbMapPreviewContext.MaximumBuffer = new Size(panDrawingSurface.Width, panDrawingSurface.Height);
            this.pbMapPreviewGraphicDevice         = pbMapPreviewContext.Allocate(pbDrawingSurfaceGraphics, new Rectangle(0, 0, panDrawingSurface.Width, panDrawingSurface.Height));

            AI.Load(AIPath);
            panDrawingSurface_Resize(this, null);
            for (int S = 0; S < AI.ListScript.Count; S++)
            {
                InitScript(AI.ListScript[S]);
            }
        }