public MainWindow() { InitializeComponent(); //@"Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=TextEditor.DAL.FileDbContext;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False;ApplicationIntent=ReadWrite;MultiSubnetFailover=False" m_repository = new ConnectedRepository(ReadConnectionString()); LoadTextFile(-1); }
public LoadFileDialog(ConnectedRepository repository) { InitializeComponent(); m_repository = repository; var filesInfo = m_repository.AllFilesWithoutContent(); m_filesGrid.DataContext = filesInfo; if (!filesInfo.Any()) { m_createdClmn.Width = 100; m_filesGrid.Width = 100; } SelectedFileId = -1; }