Example #1
0
        public StringReourceOperationViewModel()
        {
            matchoption = InstanseManager.ResolveService <ErrorStringMatchMatchOption>();
            DetailsInfo = new ObservableCollection <string>();
            BindingOperations.EnableCollectionSynchronization(DetailsInfo, locker);
            FileMatcheOptions = new FileMatchOptionSource();
            FileMatcheOptions.Add(InstanseManager.ResolveService <ErrorStringMatchOption>(initializeCallback: p =>
            {
                p.IsEnabled = true;
            }));
            FileMatcheOptions.Add(InstanseManager.ResolveService <CustermErrorStringMatchOption>(initializeCallback: p =>
            {
                p.IsEnabled = true;
            }));
            FileMatcheOptions.Add(InstanseManager.ResolveService <StringFormatMatchOption>(initializeCallback: p =>
            {
                p.IsEnabled = true;
            }));

            SkinAssistanceCommands.SelecDirectoryCommand.RegistorCommand(this, OnSelecDirectoryCommandsExcuted, OnSelecDirectoryCommandsCanExuted);
            SkinAssistanceCommands.StartSearchCommand.RegistorCommand(this, OnStartSearchCommandsExcuted,
                                                                      OnStartSearchCommandsCanExcuted);
            SkinAssistanceCommands.ShowDetailsInformationCommand.RegistorCommand(this,
                                                                                 OnShowDetailsInformationCommandsExcuted, OnShowDetailsInformationCommandsCanExcuted);
        }
        public LocalReourceOperationViewModel()
        {
            matchoption = InstanseManager.ResolveService <LocalResourceDictionaryMatchOptionOption>();
            DetailsInfo = new ObservableCollection <string>();
            BindingOperations.EnableCollectionSynchronization(DetailsInfo, locker);
            FileMatcheOptions = new FileMatchOptionSource();
            FileMatcheOptions.Add(InstanseManager.ResolveService <LocalResourceDictionaryMatchOption>(initializeCallback: p =>
            {
                p.IsEnabled = true;
            }));

            UICultrues = new FileMatchOptionMultiSource();
            CultureInfo.GetCultures(CultureTypes.AllCultures).ToList().ForEach(o =>
            {
                if (!String.IsNullOrEmpty(o.Name))
                {
                    UICultrues.Add(InstanseManager.ResolveService <LocalCultureMatchOption>(isNew: true, initializeCallback: p =>
                    {
                        p.MatchName = o.Name;
                        p.IsEnabled = true;
                    }));
                }
            });

            SkinAssistanceCommands.SelecDirectoryCommand.RegistorCommand(this, OnSelecDirectoryCommandsExcuted, OnSelecDirectoryCommandsCanExuted);
            SkinAssistanceCommands.StartSearchCommand.RegistorCommand(this, OnStartSearchCommandsExcuted,
                                                                      OnStartSearchCommandsCanExcuted);
            SkinAssistanceCommands.ShowDetailsInformationCommand.RegistorCommand(this,
                                                                                 OnShowDetailsInformationCommandsExcuted, OnShowDetailsInformationCommandsCanExcuted);
        }
 public ExportOperationViewModel()
 {
     matchOption = InstanseManager.ResolveService <BrushMatchOptionOption>(isNew: false, initializeCallback: p =>
     {
         p.ReplaceInNewFile = false;
     });
     DetailsInfo = new ObservableCollection <string>();
     BindingOperations.EnableCollectionSynchronization(DetailsInfo, locker);
     FileMatcheOptions = new FileMatchOptionSource();
     FileMatcheOptions.Add(InstanseManager.ResolveService <BrushMatchOption>(initializeCallback: p =>
     {
         p.IsEnabled = true;
     }));
     FileMatcheOptions.Add(InstanseManager.ResolveService <ImageMatchOption>());
     SkinAssistanceCommands.SelecDirectoryCommand.RegistorCommand(this, OnSelecDirectoryCommandsExcuted, OnSelecDirectoryCommandsCanExuted);
     SkinAssistanceCommands.StartSearchCommand.RegistorCommand(this, OnStartSearchCommandsExcuted,
                                                               OnStartSearchCommandsCanExcuted);
     SkinAssistanceCommands.ShowDetailsInformationCommand.RegistorCommand(this,
                                                                          OnShowDetailsInformationCommandsExcuted, OnShowDetailsInformationCommandsCanExcuted);
     globalRelink = InstanseManager.ResolveService <GlobalRelinkSource>();
 }