private void btn_wczytaj_Click(object sender, EventArgs e) { try { Stream strim = File.Open("dane.bin", FileMode.Open); var konwerter = new System.Runtime.Serialization.Formatters.Binary.BinaryFormatter(); menedzer = konwerter.Deserialize(strim) as menedzerEq; list_doWyboru.SelectedIndex = 1; list_doWyboru.SelectedIndex = 0; btn_Zapisz.Enabled = true; strim.Close(); } catch (FileNotFoundException f) { return; } }
public import(ref menedzerEq menedzerRef) { InitializeComponent(); menedzer = menedzerRef; }
public modApl(ref menedzerEq menedzerRef) { InitializeComponent(); menedzer = menedzerRef; richTextBox1.Text = menedzer.apl; }