override protected void Save(object sender, RoutedEventArgs e) { if (!string.IsNullOrWhiteSpace(folderName.Text)) { string mediaNotes = folderName.Text + "\\Citadel_XML\\media_notes.xml"; XMLParser.Instance = new XMLParser(folderName.Text); if (!File.Exists(mediaNotes)) { NewMediaWindow nmw = new NewMediaWindow(); nmw.Topmost = true; nmw.Topmost = false; nmw.Show(); } else { FrontPage frontPage = new FrontPage(); frontPage.Topmost = true; frontPage.Topmost = false; frontPage.Show(); } this.Close(); } }
public FrontPage() : base() { InitializeComponent(); XMLParser.Instance.UpdateMediaXDocument(); base.Title += " - " + XMLParser.FolderPath; FillNotePages(); FrontPageReference = this; base.SizeChanged += FrontPage_SizeChanged; MinWidth = NoteNode.NoteNodeWidth * 2.22; AttachToXDocument(ref XMLParser.CharacterXDocument); AttachToXDocument(ref XMLParser.EventXDocument); AttachToXDocument(ref XMLParser.LocationXDocument); AttachToXDocument(ref XMLParser.NoteXDocument); SetDecorations(MainTabControl); MainTabControl.BorderThickness = new Thickness(0, 0, 0, 0); Background = Brushes.White; MiddleColumn.MaxWidth = SystemParameters.PrimaryScreenWidth * 0.6; MiddleRow.MaxHeight = SystemParameters.PrimaryScreenHeight * 0.6; }