private void CreatingArea() { Window_TextEntry window = new Window_TextEntry("Area Name", ""); window.Closed += (x, y) => { if (window.Accepted) GinTubBuilderManager.CreateArea(window.Text); }; window.Show(); }
private void NewResultTypeDialog() { Window_TextEntry window = new Window_TextEntry("Result Type", ""); window.Closed += (x, y) => { if (window.Accepted) GinTubBuilderManager.CreateResultType(window.Text); }; window.Show(); }
private void NewLocationDialog() { bool accepted = !string.IsNullOrWhiteSpace(s_relativeUrl); while (!accepted) { var window_relativeUrl = new Window_TextEntry("Image Relative Url", ""); window_relativeUrl.ShowDialog(); if (window_relativeUrl.Accepted) { accepted = true; s_relativeUrl = window_relativeUrl.Text; } } if (accepted) { Window_OpenFile window_openFile = new Window_OpenFile("Location File", string.Empty); window_openFile.Closed += (x, y) => { if (window_openFile.Accepted) { Window_TextEntry window_textEntry = new Window_TextEntry("Location Name", Path.GetFileNameWithoutExtension(window_openFile.FileName)); window_textEntry.Closed += (a, b) => { if (window_textEntry.Accepted) GinTubBuilderManager.CreateLocation(window_textEntry.Text, Path.Combine(s_relativeUrl, Path.GetFileName(window_openFile.FileName))); }; window_textEntry.Show(); } }; window_openFile.Show(); } }