/// <summary> /// Method renders new window with passed data, window's title and name /// </summary> /// <param name="fielData"></param> /// <param name="windowTitle"></param> /// <param name="windowName"></param> private void RenderNewWindow(List <string> fileData, string windowTitle, string windowName) { if (!IsWindowOpen <MetroWindow>(windowName)) { PreviewFile previewFileWindow = new PreviewFile(fileData, windowTitle); previewFileWindow.Name = windowName; previewFileWindow.Show(); } }
/// <summary> /// Show file with its content /// </summary> private void ShowFile() { if (!IsWindowOpen <MetroWindow>(Name.Substring(0, Name.IndexOf('.')))) { PreviewFile previewFileWindow = new PreviewFile(fileData, "Podgląd pliku " + Name); previewFileWindow.Name = Name.Substring(0, Name.IndexOf('.')).Replace(' ', '_'); previewFileWindow.Show(); } }