public void Parse() { ArrayList plugininfocol = new ArrayList(); StreamReader sr = new StreamReader(pathToCurrentPluginInfoList); string line = ""; while ((line = sr.ReadLine()) != null) { plugininfocol.Add(PluginInfo.Load(line)); } }
public General() { redr = false; pluginlist = new ArrayList(); tp = new TempParameters(); if ((FirstParameters.Load(tp.basedirectory)) != null) { fp = FirstParameters.Load(tp.basedirectory); } else { fp = FirstParameters.CreateDefaultFirstParameters(this.tp.basedirectory); } if (fp.firstTimeStarted == 1) { fp = FirstParameters.CreateDefaultFirstParameters(this.tp.basedirectory); pm = ViewParameters.CreateDefaultViewParameters(); pi = PluginInfo.CreateDefaultPluginInfo(); } else { try { pm = ViewParameters.Load(fp.pathToViewParameters); } catch (Exception e) { MessageBox.Show(e.Message, "Ошибка!", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } try { pi = PluginInfo.Load(fp.pathToCurrentPluginInfo); } catch (Exception e) { MessageBox.Show(e.Message, "Ошибка!", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } } Update_curas(); InitializeComponent(); }
private void AddButton_Click(object sender, System.EventArgs e) { PluginInfoOpenDialog.ShowDialog(); pluginlist.Add(PluginInfo.Load(PluginInfoOpenDialog.FileName)); UpdateList(); }