Skip to content

Commit

Permalink
Merge branch 'master' of github.com:Serg-Norseman/GEDKeeper
Browse files Browse the repository at this point in the history
  • Loading branch information
Serg-Norseman committed Jul 2, 2024
2 parents aa0352f + 60eb243 commit 7175ef3
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions projects/GKCore/GKCore/ScriptEngine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
using System.IO;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using BSLib;
using GDModel;
using GDModel.Providers.GEDCOM;
Expand Down Expand Up @@ -271,14 +270,14 @@ public void update_view()
fBase.RefreshLists(false);
}

public async Task<string> select_file()
public string select_file()
{
return await AppHost.StdDialogs.GetOpenFile("", "", "All files (*.*)|*.*", 0, "");
return AppHost.StdDialogs.GetOpenFile("", "", "All files (*.*)|*.*", 0, "").Result;
}

public async Task<string> select_new_file()
public string select_new_file()
{
return await AppHost.StdDialogs.GetSaveFile("", "", "All files (*.*)|*.*", 0, "", "", true);
return AppHost.StdDialogs.GetSaveFile("", "", "All files (*.*)|*.*", 0, "", "", true).Result;
}

#endregion
Expand All @@ -301,10 +300,10 @@ public int get_record_type(object recPtr)
return (rec == null) ? (int)GDMRecordType.rtNone : (int)rec.RecordType;
}

public async Task<bool> delete_record(object recPtr)
public bool delete_record(object recPtr)
{
GDMRecord rec = recPtr as GDMRecord;
return await BaseController.DeleteRecord(fBase, rec, false);
return BaseController.DeleteRecord(fBase, rec, false).Result;
}

public string get_record_xref(object recPtr)
Expand Down Expand Up @@ -564,9 +563,9 @@ public void bind_family_child(object familyPtr, object childPtr)
fRec.AddChild(chRec);
}

public async Task<string> define_sex(string name, string patr)
public string define_sex(string name, string patr)
{
GDMSex sx = await fBase.Context.DefineSex(fView, name, patr);
GDMSex sx = fBase.Context.DefineSex(fView, name, patr).Result;

return GKData.SexData[(int)sx].Sign;
}
Expand All @@ -583,11 +582,11 @@ public object create_event(object recPtr, string sign)
return evt;
}

public async Task<string> define_patronymic(string fatherName, string childSex, bool confirm)
public string define_patronymic(string fatherName, string childSex, bool confirm)
{
GDMSex sex = (childSex.Length == 1) ? GKUtils.GetSexBySign(childSex[0]) : GDMSex.svUnknown;

return await fBase.Context.DefinePatronymic(fView, fatherName, sex, confirm);
return fBase.Context.DefinePatronymic(fView, fatherName, sex, confirm).Result;
}

public object get_individual_parents_family(object recPtr)
Expand Down

0 comments on commit 7175ef3

Please sign in to comment.