namespace UI_WinForms; public partial class Loader : Form { public string DataFile { get; set; } = string.Empty; public Loader() { this.InitializeComponent(); } private void loaderStart_LoadProject(object sender, string projectFilePath) { if(this.DesignMode) return; this.DataFile = projectFilePath; this.DialogResult = DialogResult.OK; this.Close(); } }