Your (Folder_Browser
) Form's constructor is declared as
public Folder_Browser(Back_up_Options host)
That means you cannot pass a Schedual_Tasks
instance as the host
parameter because there is no way to convert from a Schedual_Tasks
object into a Back_up_Options
object. The compiler detects this and creates an error message.
If you cannot pass the host
parameter, you can pass null
instead:
new Folder_Browser(null).Show();
But then you need to make sure that you check the backOptions
member for null reference each time you use it. For example:
if(backOptions != null)
{
deviceSel = backOptions.deviceSel;
}
else
{
deviceSel = null;
}
That in turn means that you will need to check deviceSel
for null each time you use it and so on.
And of course, using your Form without a "host" needs to be possible at all. If you have code that requires a "host", it will fail.