public MyPreferences(string lang, ProjectEnum proj, string customproj, string protocol)
{
InitializeComponent();
foreach (ProjectEnum l in Enum.GetValues(typeof(ProjectEnum)))
{
cmboProject.Items.Add(l);
}
cmboProject.SelectedItem = proj;
cmboProject_SelectedIndexChanged(null, null);
cmboLang.SelectedItem = lang.ToLower();
cmboCustomProject.Items.Clear();
foreach (string s in Properties.Settings.Default.CustomWikis.Split('|').Where(s => !cmboCustomProject.Items.Contains(s)))
{
cmboCustomProject.Items.Add(s);
}
cmboCustomProject.Text = customproj;
chkSupressAWB.Enabled = (cmboProject.Text == "custom" || cmboProject.Text == "wikia");
chkAlwaysConfirmExit.Checked = Properties.Settings.Default.AskForTerminate;
chkPrivacy.Checked = !Properties.Settings.Default.Privacy;
if (Globals.UsingMono)
{
chkFlash.Enabled = false;
chkFlash.Checked = false;
}
cmboProtocol.SelectedIndex = (protocol == "http://") ? 0 : 1;
}