Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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));
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 10
0
 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;
 }
Ejemplo n.º 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();
     }
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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";
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 25
0
 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;
     }
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
     }
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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));
 }