public frmPrefs(Preferences p, List<string> languages) { InitializeComponent(); preferences = p; preferences.Restore(); foreach (string language in languages) { if (language != "English") lsbAllLanguages.Items.Add(language); } foreach (string language in preferences.LoadOnStartup) { lsbOnStartup.Items.Add(language); } txtFolder.Text = preferences.RootFolder; }
public frmPrefs(Preferences p, List <string> languages) { InitializeComponent(); preferences = p; preferences.Restore(); foreach (string language in languages) { if (language != "English") { lsbAllLanguages.Items.Add(language); } } foreach (string language in preferences.LoadOnStartup) { lsbOnStartup.Items.Add(language); } txtFolder.Text = preferences.RootFolder; }
static void Main(string[] args) { Preferences prefs = new Preferences(); prefs.Restore(); string xbmc = Environment.CurrentDirectory; if (args.Length == 0) { string env = Environment.GetEnvironmentVariable("XBMC_ROOT"); if (env == null) { if (prefs.RootFolder.Length > 0) { xbmc = prefs.RootFolder; } else { ; // try the current directory } } else { xbmc = env; } } else { xbmc = args[0]; } System.IO.DirectoryInfo root = new System.IO.DirectoryInfo(xbmc); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new frmMain(root, prefs)); }