public Form1() { InitializeComponent(); Stream stream; if(File.Exists("config.osl")){ stream = File.Open("config.osl", FileMode.Open); BinaryFormatter bformatter = new BinaryFormatter(); config = (Config)bformatter.Deserialize(stream); stream.Close(); } else { optionForm = new Options(this); optionForm.Show(); } //Thread t = new Thread(new ThreadStart(RefreshingThread)); try { using (stream = File.Open("data.bin", FileMode.Open)) { BinaryFormatter bin = new BinaryFormatter(); var uuids = (List<string>)bin.Deserialize(stream); foreach (string uuid in uuids) { readMails.Add(uuid); } } } catch (IOException) { } t.Start(); this.Location = config.startLoc; this.Opacity = config.opacity; this.TopMost = config.onTop; this.ShowInTaskbar = config.onTaskbar; alwaysOnTopToolStripMenuItem.Checked = this.TopMost; }
private void optionsToolStripMenuItem_Click(object sender, EventArgs e) { optionForm = new Options(this); optionForm.Show(); }