Init() public method

public Init ( bool bare, bool shared ) : string
bare bool
shared bool
return string
Exemplo n.º 1
0
        private void InitClick(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Directory.Text))
            {
                MessageBox.Show(this, _chooseDirectory.Text,_chooseDirectoryCaption.Text);
                return;
            }

            if (File.Exists(Directory.Text))
            {
                MessageBox.Show(this, _chooseDirectoryNotFile.Text,_chooseDirectoryNotFileCaption.Text);
                return;
            }

            GitModule module = new GitModule(Directory.Text);

            if (!System.IO.Directory.Exists(module.WorkingDir))
                System.IO.Directory.CreateDirectory(module.WorkingDir);

            MessageBox.Show(this, module.Init(Central.Checked, Central.Checked), _initMsgBoxCaption.Text);

            if (GitModuleChanged != null)
                GitModuleChanged(this, new GitModuleEventArgs(module));

            Repositories.AddMostRecentRepository(Directory.Text);

            Close();
        }