public Dictionary<string, Upda> rebi(string path) { Dictionary<string, Upda> meme = new Dictionary<string, Upda>(); using (var bi = new BinaryReader(File.Open(path, FileMode.Open))) { int x = bi.ReadInt32(); for (int i = 0; i < x; i++) { Upda xz = new Upda(); xz.version = bi.ReadString(); x = bi.ReadInt32(); for (int i2= 0; i2 < x; i2++) { xz.n.upda.Add(i2 + 1, bi.ReadString().TrimStart("-".ToCharArray())); } x = bi.ReadInt32(); for (int i2 = 0; i2 < x; i2++) { xz.p.upda.Add(i2+1, bi.ReadString().TrimStart("-".ToCharArray())); } x = bi.ReadInt32(); for (int i2 = 0; i2 < x; i2++) { xz.m.upda.Add(i2 + 1, bi.ReadString().TrimStart("-".ToCharArray())); } x = bi.ReadInt32(); for (int i2 = 0; i2 < x; i2++) { xz.o.upda.Add(i2 + 1, bi.ReadString().TrimStart("-".ToCharArray())); } meme.Add(xz.version,xz); } return meme; } }
private void button6_Click(object sender, EventArgs e) { this.comboBox1.Items.Clear(); Upda a = new Upda(); a.version = this.textBox1.Text; this.updae.Add(a.version, a); this.totre(); }