Пример #1
0
        public static void Next()
        {
            ++ScriptPosition;
            if (ScriptPosition <= ScriptLength)
            {
                ActionType = int.Parse(SQLEngine.GetValue("SELECT CmdID FROm ScnScript WHERE ID =" + ScriptPosition.ToString()));
                switch (ActionType)
                {
                case 1:
                    TryHard.This(() => SQLEngine.ImagePath());
                    GraphicEngine.SetBackground();
                    //MessageBox.Show(text: ScriptPosition.ToString());
                    break;

                case 2:
                    break;

                case 3:
                    break;
                }
            }

            else
            {
                MessageBox.Show(text: "End of Script.");
            }
        }
Пример #2
0
        public static void GameInit()
        {
            ActionType = int.Parse(SQLEngine.GetValue("SELECT CmdID FROm ScnScript WHERE ID =" + ScriptPosition.ToString()));
            switch (ActionType)
            {
            case 1:
                TryHard.This(() => SQLEngine.ImagePath());
                GraphicEngine.SetBackground();
                break;

            case 2:
                break;

            case 3:
                break;
            }
        }
Пример #3
0
        private void GameWindow_Load(object sender, EventArgs e)
        {
            //<--Maximize window
            this.WindowState     = FormWindowState.Normal;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.Bounds          = Screen.PrimaryScreen.Bounds;
            this.WindowState     = FormWindowState.Maximized;
            GraphicEngine.GetResolution(); //sets resolution for rendering
                                           //-->

            this.panelOptions.AllowDrop = true;
            foreach (Control c in this.panelOptions.Controls)
            {
                c.MouseDown += new MouseEventHandler(c_MouseDown);
            }
            this.panelOptions.DragOver += new DragEventHandler(panelOptions_DragOver);
            this.panelOptions.DragDrop += new DragEventHandler(panelOptions_DragDrop);

            //<--Resize/Move components according to resolution
            button1.Location = new Point(GraphicEngine.X(button1.Location.X), GraphicEngine.Y(button1.Location.Y));
            button1.Size     = new Size(GraphicEngine.X(button1.Size.Width), GraphicEngine.Y(button1.Size.Height));

            //-->

            //<--sets hidable Text are to visible state by default
            this.TextAreaVisible = true;
            //-->

            // this.LoadBackground(@"G:\Temp\Images\13.jpg");


            ScriptEngine.GameInit();
            int Value = int.Parse(SQLEngine.GetValue("Select Value from GameOptions where ID=1"));

            if (Value == 1)
            {
                checkBoxOptions_toggleDominantColor.Checked = true; GraphicEngine.UseDominantColor = true;
            }
            else
            {
                checkBoxOptions_toggleDominantColor.Checked = false; GraphicEngine.UseDominantColor = false;
            }
        }
Пример #4
0
        public static void ScenarioSelected(ListBox x, Label y)
        {
            String r = SQLEngine.GetValue("SELECT Description FROM Scenarios WHERE Name ='" + x.Text + "'");

            y.Text = r;
        }