예제 #1
0
 private void FileSelected(FileSelectedMessage obj)
 {
     if (obj.FilePath.EndsWith("txt"))
     {
         var pp = new TextPresenter(obj.FilePath);
         var tabItem = new TabItem {Header = obj.FilePath, Content = pp};
         var region = _regionManager.GetRegion("mainTabs");
         region.AddView(tabItem);
         region.Activate(tabItem);
     }
 }
예제 #2
0
 private void FileSelected(FileSelectedMessage obj)
 {
     // this happens always in gui thread
     if (obj.FilePath.EndsWith("png") || obj.FilePath.EndsWith("jpg"))
     {
         var pp = new PicturePresenter(obj.FilePath, _graphicFilesEditToolbar);
         //var tabItem = new TabItem {Header = obj.FilePath, Content = pp};
         IRegion region = _regionManager.GetRegion("mainTabs");
         region.AddView(pp);
         region.Activate(pp);
     }
 }