-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f4a796
commit 2957db8
Showing
18 changed files
with
570 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
/* | ||
* "GEDKeeper", the personal genealogical database editor. | ||
* Copyright (C) 2009-2023 by Sergey V. Zhdanovskih. | ||
* | ||
* This file is part of "GEDKeeper". | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
using System; | ||
using Eto.Forms; | ||
using Eto.Serialization.Xaml; | ||
using GKCore; | ||
using GKCore.Interfaces; | ||
|
||
namespace GKCalendarPlugin | ||
{ | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
public partial class CalendarWidget : Form, IWidgetForm | ||
{ | ||
#region Design components | ||
#pragma warning disable CS0169, CS0649, IDE0044, IDE0051 | ||
|
||
private GroupBox grpSourceDate; | ||
private HistoryDateBox historyDateBox1; | ||
private GroupBox grpConvertedDate; | ||
private HistoryDateBox historyDateBox2; | ||
|
||
#pragma warning restore CS0169, CS0649, IDE0044, IDE0051 | ||
#endregion | ||
|
||
private readonly Plugin fPlugin; | ||
|
||
public CalendarWidget(Plugin plugin) | ||
{ | ||
XamlReader.Load(this); | ||
|
||
fPlugin = plugin; | ||
|
||
historyDateBox1.DateChanged += hdb_DateChanged; | ||
|
||
historyDateBox2.ReadOnly = true; | ||
historyDateBox2.CalendarChanged += hdb_DateChanged; | ||
|
||
SetLocale(); | ||
} | ||
|
||
private void CalendarWidget_Shown(object sender, EventArgs e) | ||
{ | ||
AppHost.Instance.WidgetLocate(this, WidgetLocation.HRight | WidgetLocation.VTop); | ||
|
||
fPlugin.Host.WidgetShow(fPlugin); | ||
} | ||
|
||
private void CalendarWidget_Closed(object sender, EventArgs e) | ||
{ | ||
fPlugin.Host.WidgetClose(fPlugin); | ||
} | ||
|
||
private void hdb_DateChanged(object sender, EventArgs e) | ||
{ | ||
double jd = historyDateBox1.Date; | ||
historyDateBox2.Date = jd; | ||
} | ||
|
||
#region ILocalizable support | ||
|
||
public void SetLocale() | ||
{ | ||
var langMan = fPlugin.LangMan; | ||
|
||
Title = langMan.LS(PLS.LSID_MICalendar); | ||
grpSourceDate.Text = langMan.LS(PLS.LSID_SourceDate); | ||
grpConvertedDate.Text = langMan.LS(PLS.LSID_ConvertedDate); | ||
} | ||
|
||
#endregion | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Form xmlns="http://schema.picoe.ca/eto.forms" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:plg="clr-namespace:GKCalendarPlugin" | ||
x:Class="GKCalendarPlugin.CalendarWidget" | ||
Closed="CalendarWidget_Closed" Shown="CalendarWidget_Shown" Maximizable="False" Minimizable="False" Resizable="False" ShowInTaskbar="False" Topmost="True"> | ||
|
||
<StackLayout Orientation="Vertical" Padding="8" Spacing="8"> | ||
|
||
<GroupBox x:Name="grpSourceDate"> | ||
<StackLayout> | ||
<plg:HistoryDateBox x:Name="historyDateBox1" /> | ||
</StackLayout> | ||
</GroupBox> | ||
|
||
<GroupBox x:Name="grpConvertedDate"> | ||
<StackLayout> | ||
<plg:HistoryDateBox x:Name="historyDateBox2" /> | ||
</StackLayout> | ||
</GroupBox> | ||
|
||
</StackLayout> | ||
|
||
</Form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
40 changes: 40 additions & 0 deletions
40
projects/plugins/GKCalendarPlugin/GKCalendarPlugin.net.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>netstandard2.0</TargetFrameworks> | ||
<AssemblyName>GKCalendarPlugin</AssemblyName> | ||
<RootNamespace>GKCalendarPlugin</RootNamespace> | ||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> | ||
<OutputPath>..\..\..\plugins\</OutputPath> | ||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | ||
<EnableDefaultCompileItems>false</EnableDefaultCompileItems> | ||
|
||
<Configurations>MSWin_Debug;MSWin_Release;Linux_Debug;Linux_Release;MacOS_Debug;MacOS_Release;FreeBSD_Debug;FreeBSD_Release</Configurations> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<Reference Include="BSLib"> | ||
<HintPath>..\..\libs\netstd\BSLib.dll</HintPath> | ||
</Reference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\GKCore\GKCore.nstd.csproj" /> | ||
<ProjectReference Include="..\..\GKv3\GKComponents\GKComponents.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Eto.Forms" Version="2.7.4" /> | ||
<PackageReference Include="Eto.Serialization.Xaml" Version="2.7.4" /> | ||
</ItemGroup> | ||
|
||
<Import Project="GKCalendarPlugin.props" /> | ||
|
||
<ItemGroup> | ||
<Compile Include="GKCalendarPlugin.cs" /> | ||
<Compile Include="CalendarWidget.net.cs" /> | ||
<EmbeddedResource Include="CalendarWidget.xeto" /> | ||
<Compile Include="HistoryDateBox.net.cs" /> | ||
</ItemGroup> | ||
|
||
</Project> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
|
||
<ItemGroup> | ||
<None Include="GKCalendarPlugin.enu"> | ||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
</None> | ||
<None Include="GKCalendarPlugin.pol"> | ||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
</None> | ||
<None Include="GKCalendarPlugin.rus"> | ||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
</None> | ||
<None Include="GKCalendarPlugin.ukr"> | ||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
</None> | ||
<EmbeddedResource Include="Resources\icon_time.gif" /> | ||
</ItemGroup> | ||
|
||
</Project> |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.