protected override void Load(MSBuildBasedProject project, string configuration, string platform)
        {
            var assemblyInfoFileName = GetAssemblyInfoFileName(project);

            if (string.IsNullOrEmpty(assemblyInfoFileName))
            {
                assemblyInfo = new AssemblyInfo();
                MessageService.ShowError("${res:Dialog.ProjectOptions.AssemblyInfo.AssemblyInfoNotFound}");
            }
            else
            {
                var assemblyInfoProvider = new AssemblyInfoProvider();
                assemblyInfo = assemblyInfoProvider.ReadAssemblyInfo(assemblyInfoFileName);
            }

            var assemblyInfoViewModel = new AssemblyInfoViewModel(assemblyInfo);
            assemblyInfoViewModel.PropertyChanged += OnAssemblyInfoChanged;
            DataContext = assemblyInfoViewModel;

            base.Load(project, configuration, platform);
        }
Esempio n. 2
0
        protected override void Load(MSBuildBasedProject project, string configuration, string platform)
        {
            var assemblyInfoFileName = GetAssemblyInfoFileName(project);

            if (string.IsNullOrEmpty(assemblyInfoFileName))
            {
                assemblyInfo = new AssemblyInfo();
                MessageService.ShowError("${res:Dialog.ProjectOptions.AssemblyInfo.AssemblyInfoNotFound}");
            }
            else
            {
                var assemblyInfoProvider = new AssemblyInfoProvider();
                assemblyInfo = assemblyInfoProvider.ReadAssemblyInfo(assemblyInfoFileName);
            }

            var assemblyInfoViewModel = new AssemblyInfoViewModel(assemblyInfo);

            assemblyInfoViewModel.PropertyChanged += OnAssemblyInfoChanged;
            DataContext = assemblyInfoViewModel;

            base.Load(project, configuration, platform);
        }