private void Init() { try { if(!Directory.Exists("tmp\\")) Directory.CreateDirectory("tmp\\"); //new Loading("http://www.giovannicapuano.net/repository/package.xml", "package.xml").Show(); if(!Utils.Download("http://www.giovannicapuano.net/repository/package.xml", "package.xml")) { MessageBox.Show("Repository malformed or does not exists."); Environment.Exit(1); } engine = new Engine("package.xml"); reset(); textBox3.Text = engine.Packages.Count + " packages"; } catch(FileNotFoundException) { MessageBox.Show("Repository malformed or does not exists."); Environment.Exit(1); } catch(IOException) { MessageBox.Show("Error creating tmp\\ directory."); Environment.Exit(1); } }
public PackageForm(Engine engine, string package) { InitializeComponent(); this.engine = engine; this.package = package; }
private void Init(string url) { try { if(!Directory.Exists("tmp\\")) Directory.CreateDirectory("tmp\\"); new Loading(url, "package.xml").Show(); engine = new Engine("package.xml"); reset(); textBox3.Text = engine.Packages.Count + " packages"; } catch(FileNotFoundException) { MessageBox.Show("Repository malformed or does not exists."); Environment.Exit(1); } catch(ArgumentException) { MessageBox.Show("Repository malformed or does not exists."); Environment.Exit(1); } catch(IOException) { MessageBox.Show("Error creating tmp\\ directory."); Environment.Exit(1); } }