public static PersistentDialog CreateInstance(Map map, Dialog_NodeTree dialog) { Type target = bindings.TryGetValue(dialog.GetType()); if (target == null) { Log.Warning($"Unknow Window Type {target}"); return(null); } return((PersistentDialog)Activator.CreateInstance(target, map, dialog)); }