I want to display dialog, that ask user to select directory, and if everything is ok the main form will be displayed, otherwise program will close, and i want to make it gently, but i thing my solution is not.
In Program class (Program.cs) i defined method which calls dialog, and depending of its result Main method will call form, or not.
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
if (DisplayFolderDialog())
Application.Run(new addonInstallerForm());
}
Is there better way to achieve this?