Esempio n. 1
0
        public bool IsConfigurationChanged(ConfigurationEnvironmentView view)
        {
            if (_alwaysCreateNew)
            {
                return(true);
            }

            var factory = view.EnvironmentView.Factory;

            return(view.Description != factory.Configuration.Description ||
                   view.PrefixPath != factory.Configuration.GetPrefixPath() ||
                   view.InterpreterPath != factory.Configuration.InterpreterPath ||
                   view.WindowsInterpreterPath != factory.Configuration.GetWindowsInterpreterPath() ||
                   view.PathEnvironmentVariable != factory.Configuration.PathEnvironmentVariable ||
                   InterpreterArchitecture.TryParse(view.ArchitectureName) != factory.Configuration.Architecture ||
                   view.VersionName != factory.Configuration.Version.ToString());
        }
Esempio n. 2
0
        private async void AutoDetect_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            ConfigurationEnvironmentView view = (ConfigurationEnvironmentView)e.Parameter;

            try
            {
                view.IsAutoDetectRunning = true;
                CommandManager.InvalidateRequerySuggested();

                var newView = await AutoDetectAsync(view.Values);

                view.Values = newView;
                CommandManager.InvalidateRequerySuggested();
            }
            finally
            {
                view.IsAutoDetectRunning = false;
            }
        }