private TabItem MakeNewTab(FileLoader currentLoader)
        {
            var newTab = new TabItem {DataContext = new FileData(currentLoader)};

            var headerBinding = new Binding("Name");
            headerBinding.Mode = BindingMode.OneTime;
            newTab.SetBinding(HeaderedContentControl.HeaderProperty, headerBinding);

            newTab.Content = new FileView();
            return newTab;
        }
        public FileData(FileLoader loader)
        {
            m_loader = loader;
            m_loader.Storage.OnNewData += OnUpdatedContents;
            m_contents = new StoredFile(m_loader.Storage, m_loader.Id);

            m_searcher = m_loader.Storage.MakeSearcher(m_loader.Id);
            FindResults = new ObservableCollection<CompressedFileSearcher.MatchResult>();

            m_findResultsTimer = new DispatcherTimer {Interval = TimeSpan.FromMilliseconds(250)};
            m_findResultsTimer.Tick += CheckForNewResults;
            m_findResultsTimer.Start();

            CanStartFind = true;
        }