private bool ReadSinglePresetFromFile() { bool Result = false; OpenDialog.InitialDirectory = AppDomain.CurrentDomain.BaseDirectory; OpenDialog.Filter = string.Format("PresetExportFile({0})|*.{0}", FinalConst.PresetFilter); if (OpenDialog.ShowDialog() == true) { string filepath = OpenDialog.FileName; if (File.Exists(filepath)) { int filelen = (int)IOBinaryOperation.fileLength(filepath); if (filelen != (FinalConst.Len_Sence_Pack + 16)) { return(false); } //PresetLoadData = IOBinaryOperation.readBinaryFile(filepath, filelen); CoreData.SetLocalPreset(IOBinaryOperation.readBinaryFile(filepath, filelen)); Result = true; } } return(Result); }