コード例 #1
0
        public bool Save(Func <string> chooseFileName)
        {
            if (string.IsNullOrEmpty(chosenFileName))
            {
                chosenFileName = chooseFileName();
                if (chooseFileName == null)
                {
                    return(false);
                }
            }

            bool estateSave  = _estateManager.BinarySerialize(chosenFileName + ".estates");
            bool addressSave = _addressManager.BinarySerialize(chosenFileName + ".addresses");

            if (estateSave && addressSave)
            {
                UnsavedChanges = false;
                return(true);
            }
            return(false);
        }