private void OnRegisterApplicationExecute()
        {
            var applicationInfo = ApplicationInfo;

            applicationInfo.SupportedExtensions.Clear();
            foreach (var extension in FileAssociations.Split(new string[] { ",", ";" }, StringSplitOptions.RemoveEmptyEntries))
            {
                applicationInfo.SupportedExtensions.Add(extension);
            }

            _applicationRegistrationService.RegisterApplication(ApplicationInfo);

            UpdateState();
        }
Exemplo n.º 2
0
        private void RegisterApplication()
        {
            var applicationInfo = ApplicationInfo;

            applicationInfo.SupportedExtensions.Clear();
            foreach (var extension in FileAssociations.Split(new[] { ",", ";" }, StringSplitOptions.RemoveEmptyEntries))
            {
                applicationInfo.SupportedExtensions.Add(extension);
            }

            _applicationRegistrationService.Value.RegisterApplication(ApplicationInfo);

            UpdateState();

            if (IsApplicationRegistered)
            {
                _fileAssociationService.Value.AssociateFilesWithApplication(ApplicationInfo.Name);
            }
        }