private void loadSettings() { if (!File.Exists(ScalaIDESettings.path)) { writeSettings(); } FileStream file = new FileStream(ScalaIDESettings.path, FileMode.Open); BinaryFormatter bf = new BinaryFormatter(); settings = bf.Deserialize(file) as ScalaIDESettings; file.Close(); textBoxScalaFolder.Text = settings.scalaFolder; textBoxWorkspaceFolder.Text = settings.workspaceFolder; saveFileDialog1.InitialDirectory = settings.workspaceFolder; openFileDialog1.InitialDirectory = settings.workspaceFolder; }
private void loadSettings() { if (!File.Exists(ScalaIDESettings.path)) writeSettings(); FileStream file = new FileStream(ScalaIDESettings.path, FileMode.Open); BinaryFormatter bf = new BinaryFormatter(); settings = bf.Deserialize(file) as ScalaIDESettings; file.Close(); textBoxScalaFolder.Text = settings.scalaFolder; textBoxWorkspaceFolder.Text = settings.workspaceFolder; saveFileDialog1.InitialDirectory = settings.workspaceFolder; openFileDialog1.InitialDirectory = settings.workspaceFolder; }