예제 #1
0
        private bool SaveImplementation(string fileName, bool saveAs)
        {
            try
            {
                if (!SaveMainConfiguration(fileName, saveAs))
                {
                    return(false);
                }


                foreach (var envrionment in Environments.OfType <EnvironmentSourceViewModel>())
                {
                    if (!envrionment.SaveDelta())
                    {
                        return(false);
                    }
                }

                IsDirty = false;
                return(true);
            }
            catch (Exception ex)
            {
                uiService.ShowMessageWpf(string.Format(CultureInfo.CurrentCulture, Resources.SaveApplicationErrorMessage, ex.Message),
                                         Resources.SaveApplicationErrorMessageTitle, MessageBoxButton.OK);

                return(false);
            }
        }