Пример #1
0
 public ObjectMenu(IObjectsRepository objectsRepository, IFileProvider fileProvider, ITabServiceProvider tabServiceProvider, IObjectModifier objectModifier)
 {
     _objectsRepository  = objectsRepository;
     _objectModifier     = objectModifier;
     _fileProvider       = fileProvider;
     _tabServiceProvider = tabServiceProvider;
     _fileModifier       = new FileModifier(_objectModifier, _objectsRepository);
 }
Пример #2
0
        static public async void ShowInfo(Guid id, IObjectsRepository objectsRepository, IFileProvider fileProvider, ITabServiceProvider tabServiceProvider, FileModifier fileModifier)
        {
            var obj = (await objectsRepository.GetObjectsAsync(new Guid[] { id }, o => o, System.Threading.CancellationToken.None)).FirstOrDefault();

            ShowInfo(obj, objectsRepository, fileProvider, tabServiceProvider, fileModifier);
        }
Пример #3
0
        static public void ShowInfo(IDataObject obj, IObjectsRepository objectsRepository, IFileProvider fileProvider, ITabServiceProvider tabServiceProvider, FileModifier fileModifier)
        {
            if (obj == null)
            {
                return;
            }
            var vm = new MainViewModel(obj, objectsRepository, fileModifier, fileProvider, tabServiceProvider);
            var v  = new MainView()
            {
                DataContext = vm
            };

            v.Show();
        }