Ejemplo n.º 1
0
 private void optionsToolStripMenuItem_Click(object sender, EventArgs e)
 {
     Options options = new Options();
     options.ShowDialog();
 }
Ejemplo n.º 2
0
        private void Main_Load(object sender, EventArgs e)
        {
            updateCheck(false);

            if (Settings.Default.Path == "")
            {
                MessageBox.Show("It seems as though this is SubBuddy's first launch. Please configure all enabled options before using the program.");
                Options options = new Options();
                options.ShowDialog();
            }

            if (Settings.Default.Remember == true)
            {
                // I should really learn a bit more about C# before I implement terrible solutions like this.
                internalCheckChange = 1;
                Remember.Checked = true;
                internalCheckChange = 0;
            }

            Username.Text = Settings.Default.Username;
            Password.Text = Settings.Default.Password;

            if (!Directory.Exists(Settings.Default.Path))
            {
                Directory.CreateDirectory(Settings.Default.Path);
            }

            if (!File.Exists(Settings.Default.Path + "/downloaded"))
            {
                FileStream myStream = File.Create(Settings.Default.Path + "/downloaded");
                myStream.Flush();
                myStream.Close();
            }
            if (!File.Exists(Settings.Default.Path + "/blacklist"))
            {
                FileStream myStream = File.Create(Settings.Default.Path + "/blacklist");
                myStream.Flush();
                myStream.Close();
            }
            if (!File.Exists(Settings.Default.Path + "/localsubs"))
            {
                FileStream myStream = File.Create(Settings.Default.Path + "/localsubs");
                myStream.Flush();
                myStream.Close();
            }
            if (!File.Exists(Settings.Default.Path + "/synonyms"))
            {
                FileStream myStream = File.Create(Settings.Default.Path + "/synonyms");
                myStream.Flush();
                myStream.Close();
            }
        }