Пример #1
0
        protected PropertyServiceBase(ICremaAppHost cremaAppHost, IEnumerable <IPropertyItem> propertyItems)
        {
            this.cremaAppHost         = cremaAppHost;
            this.cremaAppHost.Opened += CremaAppHost_Opened;
            this.cremaAppHost.Closed += CremaAppHost_Closed;

            this.propertyItems = ParentItemUtility.GetItems(this, propertyItems).ToArray();
        }
 public AddDifferenceItemViewModel(Authenticator authenticator, ICremaHost cremaHost, ICremaAppHost cremaAppHost, Lazy <BrowserService> browserService, IStatusBarService statusBarService)
 {
     this.authenticator    = authenticator;
     this.cremaHost        = cremaHost;
     this.cremaAppHost     = cremaAppHost;
     this.browserService   = browserService;
     this.statusBarService = statusBarService;
 }
Пример #3
0
 public DataBaseMenuItem(ICremaAppHost cremaAppHost)
 {
     this.cremaAppHost         = cremaAppHost;
     this.cremaAppHost.Opened += this.InvokeCanExecuteChangedEvent;
     this.cremaAppHost.Closed += this.InvokeCanExecuteChangedEvent;
     this.DisplayName          = Resources.MenuItem_ManageDataBase;
     this.HideOnDisabled       = true;
 }
Пример #4
0
 public SelectDataBaseViewModel(Authentication authentication, ICremaAppHost cremaAppHost, Func <DataBaseItemViewModel, bool> predicate)
 {
     this.authentication     = authentication;
     this.predicate          = predicate;
     this.action             = new Action(() => this.Initialize(authentication, cremaAppHost));
     this.supportsDescriptor = true;
     this.DisplayName        = Resources.Title_SelectDataBase;
 }
Пример #5
0
 public DomainsViewModel(ICremaAppHost cremaAppHost)
 {
     this.cremaAppHost         = cremaAppHost;
     this.cremaAppHost.Opened += CremaAppHost_Opened;
     this.cremaAppHost.Closed += CremaAppHost_Closed;
     this.DisplayName          = Resources.Title_DomainList;
     this.Dispatcher.InvokeAsync(() => this.AttachPropertyService(this.propertyService));
 }
Пример #6
0
 public CopyDataBaseMenuItem(Authenticator authenticator, ICremaAppHost cremaAppHost)
 {
     this.authenticator        = authenticator;
     this.cremaAppHost         = cremaAppHost;
     this.cremaAppHost.Opened += this.InvokeCanExecuteChangedEvent;
     this.cremaAppHost.Closed += this.InvokeCanExecuteChangedEvent;
     this.DisplayName          = Resources.MenuItem_CopyDataBase;
 }
Пример #7
0
 public TableSmartSetBrowserViewModel(ICremaAppHost cremaAppHost, [ImportMany] IEnumerable <IRule> rules, TableSmartSetContext smartSetContext)
     : base(cremaAppHost, rules.Where(item => item.SupportType == typeof(ITableDescriptor)))
 {
     this.smartSetContext = smartSetContext;
     this.smartSetContext.BookmarkChanged += SmartSetContext_BookmarkChanged;
     this.DisplayName = Resources.Title_TableSmartCollection;
     this.Dispatcher.InvokeAsync(() => this.AttachPropertyService(this.propertyService.Value));
 }
Пример #8
0
 public DomainsViewModel(ICremaAppHost cremaAppHost)
 {
     this.cremaAppHost         = cremaAppHost;
     this.cremaAppHost.Opened += CremaAppHost_Opened;
     this.cremaAppHost.Closed += CremaAppHost_Closed;
     this.domainsReadOnly      = new ReadOnlyObservableCollection <DomainTreeItemBase>(this.domains);
     this.DisplayName          = Resources.Title_UserDomainList;
 }
Пример #9
0
 public ImportMenuItem(ICremaAppHost cremaAppHost)
 {
     this.cremaAppHost           = cremaAppHost;
     this.cremaAppHost.Loaded   += this.InvokeCanExecuteChangedEvent;
     this.cremaAppHost.Unloaded += this.InvokeCanExecuteChangedEvent;
     this.DisplayName            = Resources.MenuItem_Import;
     this.InputGesture           = new KeyGesture(Key.I, ModifierKeys.Control);
 }
 public SelectDataBaseViewModel(ICremaAppHost cremaAppHost, string address, Func <DataBaseItemViewModel, bool> predicate)
     : base(cremaAppHost)
 {
     this.cremaAppHost = cremaAppHost;
     this.predicate    = predicate;
     this.actionAsync  = () => this.InitializeAsync(address);
     this.DisplayName  = Resources.Title_SelectDataBase;
 }
Пример #11
0
 private async void CremaAppHost_Unloaded(object sender, EventArgs e)
 {
     if (this.cremaAppHost != null && this.Scope == ModalDialogAppScope.Loaded)
     {
         this.cremaAppHost = null;
         await this.TryCloseAsync();
     }
 }
Пример #12
0
 public TypeDocumentServiceViewModel(ICremaAppHost cremaAppHost)
 {
     this.cremaAppHost            = cremaAppHost;
     this.cremaAppHost.Unloaded  += CremaAppHost_Unloaded;
     this.cremaAppHost.Resetting += CremaAppHost_Resetting;
     this.cremaAppHost.Reset     += CremaAppHost_Reset;
     this.DisplayName             = Resources.Title_Types;
 }
Пример #13
0
 public ChangeDataBaseMenuItem(ICremaAppHost cremaAppHost)
 {
     this.cremaAppHost           = cremaAppHost;
     this.cremaAppHost.Loaded   += this.InvokeCanExecuteChangedEvent;
     this.cremaAppHost.Unloaded += this.InvokeCanExecuteChangedEvent;
     this.DisplayName            = Resources.MenuItem_ChangeDataBase;
     this.HideOnDisabled         = true;
 }
Пример #14
0
 public DataBaseServiceViewModel(ICremaAppHost cremaAppHost)
 {
     this.cremaAppHost           = cremaAppHost;
     this.cremaAppHost.Opened   += CremaAppHost_Opened;
     this.cremaAppHost.Closed   += CremaAppHost_Closed;
     this.cremaAppHost.Loaded   += CremaAppHost_Loaded;
     this.cremaAppHost.Unloaded += CremaAppHost_Unloaded;
 }
Пример #15
0
 public TableTemplateExporterViewModel(ICremaAppHost cremaAppHost, IAppConfiguration configs)
 {
     this.cremaAppHost              = cremaAppHost;
     this.configs                   = configs;
     this.settings                  = new ExcelTableTemplateExporterSettings();
     this.settings.PropertyChanged += Settings_PropertyChanged;
     this.configs.Update(this.settings);
 }
Пример #16
0
 public TableExportMenuItem(Authenticator authenticator, ICremaAppHost cremaAppHost)
 {
     this.authenticator          = authenticator;
     this.cremaAppHost           = cremaAppHost;
     this.cremaAppHost.Loaded   += this.InvokeCanExecuteChangedEvent;
     this.cremaAppHost.Unloaded += this.InvokeCanExecuteChangedEvent;
     this.DisplayName            = Resources.MenuItem_Export;
 }
Пример #17
0
 public TableSmartSetContext(ICremaAppHost cremaAppHost, ITableBrowser tableBrowser, [ImportMany] IEnumerable <IRule> rules)
 {
     this.cremaAppHost           = cremaAppHost;
     this.cremaAppHost.Loaded   += CremaAppHost_Loaded;
     this.cremaAppHost.Unloaded += CremaAppHost_Unloaded;
     this.tableBrowser           = tableBrowser;
     this.rules = rules.Where(item => item.SupportType == typeof(ITableDescriptor)).ToArray();
 }
Пример #18
0
 public StatusBarViewModel(ICremaAppHost cremaAppHost)
 {
     this.cremaAppHost                = cremaAppHost;
     this.cremaAppHost.Loaded        += CremaAppHost_Loaded;
     this.cremaAppHost.Unloaded      += CremaAppHost_Unloaded;
     this.taskItems                   = new ReadOnlyObservableCollection <BackgroundTaskItemViewModel>(this.taskItemList);
     this.taskbarItemInfo             = new TaskbarItemInfo();
     this.taskbarItemInfo.Description = "Crema Desc";
 }
Пример #19
0
 public CreateDataBaseToolBarItem(ICremaAppHost cremaAppHost)
 {
     this.cremaAppHost         = cremaAppHost;
     this.cremaAppHost.Opened += this.InvokeCanExecuteChangedEvent;
     this.cremaAppHost.Closed += this.InvokeCanExecuteChangedEvent;
     this.Icon           = "/Ntreev.Crema.Client.Base;component/Images/add.png";
     this.DisplayName    = Resources.MenuItem_CreateDataBase;
     this.HideOnDisabled = true;
 }
Пример #20
0
 public DataBaseListView(ICremaAppHost cremaAppHost, IAppConfiguration configs, IPropertyService propertyService)
 {
     this.cremaAppHost         = cremaAppHost;
     this.cremaAppHost.Opened += CremaAppHost_Opened;
     this.cremaAppHost.Closed += CremaAppHost_Closed;
     this.configs              = configs;
     this.propertyService      = propertyService;
     this.InitializeComponent();
 }
Пример #21
0
 public TypeServiceViewModel(ICremaAppHost cremaAppHost)
 {
     this.cremaAppHost           = cremaAppHost;
     this.cremaAppHost.Opened   += CremaAppHost_Opened;
     this.cremaAppHost.Closed   += CremaAppHost_Closed;
     this.cremaAppHost.Loaded   += CremaAppHost_Loaded;
     this.cremaAppHost.Unloaded += CremaAppHost_Unloaded;
     this.DisplayName            = Resources.Title_Type;
 }
Пример #22
0
 public BrowserViewModel(Authenticator authenticator, ICremaHost cremaHost, ICremaAppHost cremaAppHost, PropertyService propertyService, BrowserService browserService, DocumentServiceViewModel documentService)
 {
     this.authenticator   = authenticator;
     this.cremaHost       = cremaHost;
     this.cremaAppHost    = cremaAppHost;
     this.propertyService = propertyService;
     this.browserService  = browserService;
     this.documentService = documentService;
 }
Пример #23
0
 public ExportMenuItem(Authenticator authenticator, ICremaAppHost cremaAppHost)
 {
     this.authenticator          = authenticator;
     this.cremaAppHost           = cremaAppHost;
     this.cremaAppHost.Loaded   += this.InvokeCanExecuteChangedEvent;
     this.cremaAppHost.Unloaded += this.InvokeCanExecuteChangedEvent;
     this.DisplayName            = Resources.MenuItem_Export;
     this.InputGesture           = new KeyGesture(Key.E, ModifierKeys.Control);
 }
 public TableDocumentServiceViewModel(ICremaAppHost cremaAppHost, Lazy <TableBrowserViewModel> browser)
 {
     this.cremaAppHost            = cremaAppHost;
     this.cremaAppHost.Unloaded  += CremaAppHost_Unloaded;
     this.cremaAppHost.Resetting += CremaAppHost_Resetting;
     this.cremaAppHost.Reset     += CremaAppHost_Reset;
     this.browser     = browser;
     this.DisplayName = Resources.Title_Tables;
 }
 protected DeleteAsyncAppViewModel(IServiceProvider serviceProvider)
 {
     if (serviceProvider.GetService(typeof(ICremaAppHost)) is ICremaAppHost cremaAppHost)
     {
         this.cremaAppHost           = cremaAppHost;
         this.cremaAppHost.Closed   += CremaAppHost_Closed;
         this.cremaAppHost.Unloaded += CremaAppHost_Unloaded;
     }
 }
Пример #26
0
 public DifferencesServiceViewModel(ICremaAppHost cremaAppHost, IBrowserService browserService, DocumentServiceViewModel contentsService, IPropertyService propertyService)
 {
     this.cremaAppHost           = cremaAppHost;
     this.cremaAppHost.Opened   += CremaAppHost_Opened;
     this.cremaAppHost.Closed   += CremaAppHost_Closed;
     this.cremaAppHost.Loaded   += CremaAppHost_Loaded;
     this.cremaAppHost.Unloaded += CremaAppHost_Unloaded;
     this.DisplayName            = Resources.Title_Differences;
 }
Пример #27
0
 protected MoveAsyncAppViewModel(IServiceProvider serviceProvider, string currentPath, string[] targetPaths)
     : base(currentPath, targetPaths)
 {
     if (serviceProvider.GetService(typeof(ICremaAppHost)) is ICremaAppHost cremaAppHost)
     {
         this.cremaAppHost           = cremaAppHost;
         this.cremaAppHost.Closed   += CremaAppHost_Closed;
         this.cremaAppHost.Unloaded += CremaAppHost_Unloaded;
     }
 }
Пример #28
0
 public TableMenuItem(IShell shell, ICremaAppHost cremaAppHost)
 {
     this.shell = shell;
     this.shell.ServiceChanged  += this.InvokeCanExecuteChangedEvent;
     this.cremaAppHost           = cremaAppHost;
     this.cremaAppHost.Loaded   += this.InvokeCanExecuteChangedEvent;
     this.cremaAppHost.Unloaded += this.InvokeCanExecuteChangedEvent;
     this.DisplayName            = Resources.MenuItem_Table;
     this.HideOnDisabled         = true;
 }
Пример #29
0
 public CreateDataBaseToolBarItem(Authenticator authenticator, ICremaAppHost cremaAppHost)
 {
     this.authenticator        = authenticator;
     this.cremaAppHost         = cremaAppHost;
     this.cremaAppHost.Opened += this.InvokeCanExecuteChangedEvent;
     this.cremaAppHost.Closed += this.InvokeCanExecuteChangedEvent;
     this.Icon           = "Images/add.png";
     this.DisplayName    = Resources.MenuItem_CreateDataBase;
     this.HideOnDisabled = true;
 }
Пример #30
0
 public DomainsViewModel(Authenticator authenticator, ICremaAppHost cremaAppHost, IPropertyService propertyService)
     : base(cremaAppHost)
 {
     this.authenticator = authenticator;
     this.cremaAppHost = cremaAppHost;
     this.cremaAppHost.Opened += CremaAppHost_Opened;
     this.cremaAppHost.Closed += CremaAppHost_Closed;
     this.propertyService = propertyService;
     this.DisplayName = Resources.Title_DomainList;
     this.Dispatcher.InvokeAsync(() => this.AttachPropertyService(this.propertyService));
 }