Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Serg-Norseman committed Jan 23, 2024
1 parent 894b423 commit 1f59466
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
3 changes: 3 additions & 0 deletions clean.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ rmdir .\projects\GKMap\GKMap.WinForms\obj /s /q
rmdir .\projects\GKMap\GKMap.EtoForms\bin /s /q
rmdir .\projects\GKMap\GKMap.EtoForms\obj /s /q

rmdir .\projects\GKMap\GKMap.Xamarin\bin /s /q
rmdir .\projects\GKMap\GKMap.Xamarin\obj /s /q

rem <<< GKv3 >>>

rmdir .\projects\GKv3\.vs /s /q
Expand Down
11 changes: 10 additions & 1 deletion projects/GKCore/GDModel/GDMLocationName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,16 @@ namespace GDModel
{
public sealed class GDMLocationName : GDMValueTag
{
private string fAbbreviation;
private readonly GDMDateValue fDate;
private GDMLanguageID fLanguage;

public string Abbreviation
{
get { return fAbbreviation; }
set { fAbbreviation = value; }
}

public GDMDateValue Date
{
get { return fDate; }
Expand Down Expand Up @@ -67,20 +74,22 @@ public override void Assign(GDMTag source)
throw new ArgumentException(@"Argument is null or wrong type", "source");

base.Assign(sourceObj);
fAbbreviation = sourceObj.fAbbreviation;
fDate.Assign(sourceObj.fDate);
fLanguage = sourceObj.fLanguage;
}

public override void Clear()
{
base.Clear();
fAbbreviation = string.Empty;
fDate.Clear();
fLanguage = GDMLanguageID.Unknown;
}

public override bool IsEmpty()
{
return base.IsEmpty() && fDate.IsEmpty() && (fLanguage == GDMLanguageID.Unknown);
return base.IsEmpty() && fDate.IsEmpty() && string.IsNullOrEmpty(fAbbreviation) && (fLanguage == GDMLanguageID.Unknown);
}

public override void ReplaceXRefs(GDMXRefReplacer map)
Expand Down
3 changes: 2 additions & 1 deletion projects/GKv2/GEDKeeper2/GKUI/Platform/WFAppHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ public override async Task<bool> ShowModalAsync(ICommonDialog dialog, IView owne
}
}

UIHelper.CenterFormByParent((Form)dialog, mainHandle);
// for WinForms works better without this
//UIHelper.CenterFormByParent((Form)dialog, mainHandle);

wfModal.ShowDialog(owner as IWin32Window);
return await wfModal.DialogResultTask;
Expand Down
1 change: 1 addition & 0 deletions projects/GKv3/GEDKeeper3/GKUI/Platform/EtoAppHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ public override async Task<bool> ShowModalAsync(ICommonDialog dialog, IView owne
#endif
}*/

// for EtoForms works without this (Win10)
//UIHelper.CenterFormByParent((Window)form, mainHandle);

efModal.ShowModal(owner as Control);
Expand Down

0 comments on commit 1f59466

Please sign in to comment.