Exemplo n.º 1
0
        private void InitializeComponents()
        {
            Text            = "Comprobando...";
            Width           = 320;
            Height          = 70;
            BackColor       = Color.FromArgb(177, 210, 229);
            FormBorderStyle = FormBorderStyle.FixedDialog;
            MaximizeBox     = false;
            MinimizeBox     = false;
            ControlBox      = false;
            StartPosition   = FormStartPosition.CenterParent;
            ShowInTaskbar   = false;

            Label label = new Label();

            label.Text     = "Comprobando la ROM.\nEsto puede llevar unos instantes.";
            label.AutoSize = true;
            label.Location = new Point(116, 10);
            Controls.Add(label);

            animationPanel          = new Panel();
            animationPanel.Location = new Point(10, 10);
            animationPanel.Size     = new Size(100, 25);
            Controls.Add(animationPanel);

            familiars = new Sprite(0, -1, 1,
                                   new Point(0, 0), new Point(0, 0),
                                   new Size(0, 0), 1,
                                   ResourcesManager.GetImage("Loading.loading_0.png"),
                                   ResourcesManager.GetImage("Loading.loading_1.png"),
                                   ResourcesManager.GetImage("Loading.loading_2.png"),
                                   ResourcesManager.GetImage("Loading.loading_3.png"),
                                   ResourcesManager.GetImage("Loading.loading_4.png"),
                                   ResourcesManager.GetImage("Loading.loading_5.png"));
        }
Exemplo n.º 2
0
        private void InitializeComponents(string message)
        {
            Width           = 335;
            Height          = 132;
            MaximizeBox     = false;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            BackColor       = Color.FromArgb(177, 210, 229);
            StartPosition   = FormStartPosition.CenterParent;
            ShowInTaskbar   = false;

            Label lblMessage = new Label();

            lblMessage.Location = new Point(100, 35);
            lblMessage.AutoSize = true;
            lblMessage.Text     = message;
            Controls.Add(lblMessage);

            PictureBox shizukuImageBox = new PictureBox();

            shizukuImageBox.Location = new Point(10, 10);
            shizukuImageBox.Size     = new Size(75, 100);
            shizukuImageBox.Image    = ResourcesManager.GetImage("oliver_info.png");
            Controls.Add(shizukuImageBox);

            Button closeBtn = new Button();

            closeBtn.Location  = new Point(250, 80);
            closeBtn.AutoSize  = true;
            closeBtn.Text      = "Cerrar";
            closeBtn.BackColor = SystemColors.Control;
            closeBtn.Click    += delegate { this.Close(); };
            Controls.Add(closeBtn);
        }
Exemplo n.º 3
0
        private void InitializeComponents(ErrorCode error)
        {
            Width           = 335;
            Height          = 100;
            MaximizeBox     = false;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            BackColor       = Color.FromArgb(177, 210, 229);
            StartPosition   = FormStartPosition.CenterParent;
            ShowInTaskbar   = false;

            Button closeBtn = new Button();

            closeBtn.Location  = new Point(250, 48);
            closeBtn.AutoSize  = true;
            closeBtn.Text      = "Cerrar";
            closeBtn.BackColor = SystemColors.Control;
            closeBtn.Click    += delegate { this.Close(); };
            Controls.Add(closeBtn);

            Label lblError = new Label();

            lblError.Location = new Point(80, 15);
            lblError.AutoSize = true;
            lblError.Text     = Messages[error];
            Controls.Add(lblError);

            PictureBox shizukuImageBox = new PictureBox();

            shizukuImageBox.Location = new Point(10, 10);
            shizukuImageBox.Size     = new Size(60, 70);
            shizukuImageBox.Image    = ResourcesManager.GetImage("shizuku_error.png");
            Controls.Add(shizukuImageBox);
        }
Exemplo n.º 4
0
        private void InitializeComponents()
        {
            Width           = 250;
            Height          = 75;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            StartPosition   = FormStartPosition.CenterParent;
            BackColor       = Color.FromArgb(177, 210, 229);
            MaximizeBox     = false;
            ShowInTaskbar   = false;

            Label lblText = new Label();

            lblText.Text     = "¡Parcheo completado con éxito!";
            lblText.Location = new Point(55, 5);
            lblText.AutoSize = true;
            Controls.Add(lblText);

            Button closeBtn = new Button();

            closeBtn.Location  = new Point(105, 23);
            closeBtn.AutoSize  = true;
            closeBtn.Text      = "Cerrar";
            closeBtn.BackColor = SystemColors.Control;
            closeBtn.Click    += delegate { this.Close(); };
            Controls.Add(closeBtn);

            spritePanel          = new Panel();
            spritePanel.Location = new Point(5, 0);
            spritePanel.Size     = new Size(42, 45);
            Controls.Add(spritePanel);

            shizuku = new Sprite(0, -1, 1,
                                 new Point(0, 0), new Point(0, 0), new Size(0, 0), 1,
                                 ResourcesManager.GetImage("Done.shizuku_happy_0.png"),
                                 ResourcesManager.GetImage("Done.shizuku_happy_1.png"),
                                 ResourcesManager.GetImage("Done.shizuku_happy_2.png"),
                                 ResourcesManager.GetImage("Done.shizuku_happy_3.png"),
                                 ResourcesManager.GetImage("Done.shizuku_happy_4.png"),
                                 ResourcesManager.GetImage("Done.shizuku_happy_5.png"),
                                 ResourcesManager.GetImage("Done.shizuku_happy_6.png"));
            Animation.Instance.Add(spritePanel, shizuku);
        }
Exemplo n.º 5
0
        private void InitializeComponents()
        {
            Text            = "Créditos";
            Width           = 800;
            Height          = 600;
            MaximizeBox     = false;
            FormBorderStyle = FormBorderStyle.FixedDialog;
            StartPosition   = FormStartPosition.CenterParent;
            BackgroundImage = ResourcesManager.GetImage("credits.png");
            ShowInTaskbar   = false;

            Button closeBtn = new Button();

            closeBtn.Location  = new Point(715, 548);
            closeBtn.AutoSize  = true;
            closeBtn.Text      = "Cerrar";
            closeBtn.BackColor = SystemColors.Control;
            closeBtn.Click    += delegate { this.Close(); };
            Controls.Add(closeBtn);
        }
Exemplo n.º 6
0
        private void CreateAnimation()
        {
            // For smooth animations
            SetStyle(ControlStyles.UserPaint, true);
            SetStyle(ControlStyles.OptimizedDoubleBuffer, true);
            SetStyle(ControlStyles.AllPaintingInWmPaint, true);

            Panel bgPanel = new Panel();

            bgPanel.BackColor = Color.Black;
            bgPanel.Location  = new Point(0, 0);
            bgPanel.Size      = new Size(800, 480);
            Controls.Add(bgPanel);

            Image jaboImage  = ResourcesManager.GetImage("Jabologo.png");
            Point jaboOffset = new Point(93, 0);
            Fade  jaboFade   = new Fade(5, 85, 1, jaboOffset, -1, 0.020f, jaboImage);
            Fade  jaboBlink  = new Fade(90, -1, 1, jaboOffset, 12, -0.030f, jaboImage, 1.0f);

            Image           textImage  = ResourcesManager.GetImage("logonombre.png");
            Point           textOffset = new Point(84, 0);
            Fade            textFade   = new Fade(50, 40, 1, textOffset, -1, 0.025f, textImage);
            BackgroundImage textFixed  = new BackgroundImage(90, -1, 1, textOffset, textImage);

            Animation animation = Animation.Instance;

            animation.Add(bgPanel, jaboFade);
            animation.Add(bgPanel, textFade);
            animation.Add(bgPanel, jaboBlink);
            animation.Add(bgPanel, textFixed);
            animation.Interval = 150;                   // Setting that, it starts

            // Create sprite animations for later use
            termito = new Sprite(0, -1, 1,                                          // delay, duration, steps
                                 new Point(10, 30), new Point(10, 30),              // start, end pos
                                 new Size(3, 0), 1,                                 // movement
                                 ResourcesManager.GetImage("Termito.anime_0.png"),  // frame 0
                                 ResourcesManager.GetImage("Termito.anime_1.png"),  // frame 1
                                 ResourcesManager.GetImage("Termito.anime_2.png"),  // frame 2
                                 ResourcesManager.GetImage("Termito.anime_3.png")); // frame 3
        }
Exemplo n.º 7
0
        private void InitializeComponents()
        {
            SuspendLayout();

            FormBorderStyle = FormBorderStyle.FixedSingle;
            MaximizeBox     = false;
            Width           = 800;
            Height          = 600;
            MinimumSize     = new Size(800, 600);
            MaximumSize     = new Size(800, 600);
            Text            = "Ninokuni - El Mago de las Tinieblas v1.0 ~~ GradienWords";
            Icon            = ResourcesManager.GetIcon("icon.ico");

            CreateAnimation();

            bgBottom                 = new Panel();
            bgBottom.BackColor       = Color.Transparent;
            bgBottom.Location        = new Point(0, 480);
            bgBottom.Size            = new Size(800, 120);
            bgBottom.BackgroundImage = ResourcesManager.GetImage("skingold.png");
            Controls.Add(bgBottom);

            Panel separationLine = new Panel();

            separationLine.BackColor = Color.White;
            separationLine.Location  = new Point(0, 0);
            separationLine.Size      = new Size(800, 3);
            bgBottom.Controls.Add(separationLine);

            progressBar           = new ProgressBar();
            progressBar.Value     = 0;
            progressBar.Location  = new Point(10, 73);
            progressBar.Size      = new Size(523, 15);
            progressBar.Style     = ProgressBarStyle.Continuous;
            progressBar.ForeColor = Color.SkyBlue;
            bgBottom.Controls.Add(progressBar);

            btnPatch              = new ImageButton();
            btnPatch.Location     = new Point(543, 10);
            btnPatch.DefaultImage = ResourcesManager.GetImage("Buttons.patch_0.png");
            btnPatch.PressedImage = ResourcesManager.GetImage("Buttons.patch_1.png");
            btnPatch.Click       += BtnPatchOnClick;
            bgBottom.Controls.Add(btnPatch);

            btnDownloadBook = new ImageButton();
            btnDownloadBook.DefaultImage = ResourcesManager.GetImage("Buttons.book_0.png");
            btnDownloadBook.PressedImage = ResourcesManager.GetImage("Buttons.book_1.png");
            btnDownloadBook.Location     = new Point(668, 10);
            btnDownloadBook.Click       += ExportTorrentFile;
            bgBottom.Controls.Add(btnDownloadBook);

            btnShowCredits = new ImageButton();
            btnShowCredits.DefaultImage = ResourcesManager.GetImage("Buttons.credits_0.png");
            btnShowCredits.PressedImage = ResourcesManager.GetImage("Buttons.credits_1.png");
            btnShowCredits.Location     = new Point(668, 55);
            btnShowCredits.Click       += delegate {
                CreditsWindow credits = new CreditsWindow();
                credits.ShowDialog(this);
                credits.Dispose();
            };
            bgBottom.Controls.Add(btnShowCredits);

            btnShowExtras = new ImageButton();
            btnShowExtras.DefaultImage = ResourcesManager.GetImage("Buttons.options_0.png");
            btnShowExtras.PressedImage = ResourcesManager.GetImage("Buttons.options_1.png");
            btnShowExtras.Location     = new Point(543, 55);
            bgBottom.Controls.Add(btnShowExtras);
            btnShowExtras.Click += delegate {
                ExtrasWindow extras = new ExtrasWindow();
                extras.ShowDialog(this);
                extras.Dispose();
            };

            ResumeLayout(false);
        }