Пример #1
0
        private void btnInstall_Click(object sender, EventArgs e)
        {
            if (Install.IsInstall())
            {
                if (Install.Remove())
                {
                    MessageBox.Show("Odinstalowano pomyślnie", "Podsumowanie", MessageBoxButtons.OK, MessageBoxIcon.Information);

                    btnInstall.Text = "Instaluj";
                }

                else
                {
                    MessageBox.Show("Wystąpił błąd podczas deinstalacji", "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }

            else
            {
                if (Install.Installation())
                {
                    MessageBox.Show("Zainstalowano pomyślnie", "Podsumowanie", MessageBoxButtons.OK, MessageBoxIcon.Information);

                    btnInstall.Text = "Odinstaluj";
                }

                else
                {
                    MessageBox.Show("Wystąpił błąd podczas instalacji", "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
Пример #2
0
        private void FormAdvanced_Load(object sender, EventArgs e)
        {
            UserMaxWidth.Value  = ImageHandler.MaxWidth;
            UserMaxHeight.Value = ImageHandler.MaxHeight;

            changedQuality.SelectedItem = ImageHandler.Quality.ToString();

            if (Install.IsAdmin())
            {
                if (Install.IsInstall())
                {
                    btnInstall.Text = "Odinstaluj";
                }

                else
                {
                    btnInstall.Text = "Instaluj";
                }

                btnInstall.Enabled     = true;
                labelAdminInfo.Visible = false;
            }
        }