bool TryToOpen(string path) { const string errorheader = "Could not open file"; if (!File.Exists(path)) { Error.Show( "\"{0}\" does not exist" , errorheader, path); return(false); } else { try { Kmt kmt = new Kmt(); kmt.Load(path); ResetData(); msv_Program.LoadKmt(kmt); openkmt = kmt; openfname = new StringValue(path); } catch (Exception ex) { Error.Show(ex.Message, errorheader); return(false); } } return(true); }