예제 #1
0
        public HexDataContext(Stream stream)
        {
            _vm.Stream = stream;
            StackGrid.AddChild(
                UIObjectProviderFactory.CreateNew(ViewProvider.CreateView(Contracts.Hex.Constants.HexView, _vm)),
                GridChildLength.Auto
                );

            _vm.FocusPositionChanged += delegate {
                FocusPositionChanged?.Invoke(this, EventArgs.Empty);
            };

            _vm.SelectionStateChanged += delegate {
                SelectionStateChanged?.Invoke(this, EventArgs.Empty);
            };

            _vm.FocusPositionChanged += delegate {
                //LostFocus?.Invoke(this, EventArgs.Empty);
            };

            _vm.SelectedToolTipItemModelChanged += delegate {
                SelectedToolTipItemChanged?.Invoke(this, EventArgs.Empty);
            };

            _customBackgroundBlocksWrapper = new CollectionWrapper <
                IBrushBlock,
                WpfHexaEditor.Core.Interfaces.IBrushBlock
                >(p => new BrushBlockWrapper(p), _vm.CustomBackgroundBlocks);
        }
예제 #2
0
        public EnumerableDocument()
        {
            _vm = new EnumerableTabViewModel();
            _vm.SelectedDocumentChanged += OnSelectedTabChanged;

            UIObject = ViewProvider.CreateView(Constants.EnumerableTabView, _vm);
        }
예제 #3
0
 public PropertyListDataContext()
 {
     _vm      = new PropertyListViewViewModel();
     UIObject = ViewProvider.CreateView(Contracts.TreeView.Constants.PorpertyListView, _vm);
     _vm.SelectedPropertyChanged += delegate {
         SelectedMemberInfoChanged?.Invoke(this, EventArgs.Empty);
     };
 }
        public FolderBrowserDataContext(IHaveFileCollection haveFileCollection)
        {
            FolderBrowserViewModel = new FolderBrowserViewModel(haveFileCollection);
            //var vm = FileExplorerDataContextFactory.CreateFolderBrowserDataContext(haveFileCollection);

            var folderBrowser         = ViewProvider.CreateView(Constants.FolderBrowserView, FolderBrowserViewModel);
            var folderBrowserUIObject = UIObjectProviderFactory.CreateNew(folderBrowser);

            StackGrid.AddChild(folderBrowserUIObject,
                               new GridChildLength(new System.Windows.GridLength(1, System.Windows.GridUnitType.Star)));
        }
 public UsnJrnlPreviewer(Stream stream)
 {
     this._stream = stream ?? throw new ArgumentNullException(nameof(stream));
     _vm          = new UsnJrnlPreviewerViewModel(stream);
     UIObject     = ViewProvider.CreateView(Constants.UsnJrnlPreviewerView, _vm);
 }
예제 #6
0
 public NavMenuDataContext()
 {
     UIObject = ViewProvider.CreateView(Constants.NavMenuView, NavMenuViewModel);
 }