Skip to content

Commit

Permalink
Updated with latest Krypton
Browse files Browse the repository at this point in the history
  • Loading branch information
Nordlien committed Jan 23, 2024
1 parent 1e26e73 commit 56a9570
Show file tree
Hide file tree
Showing 62 changed files with 1,143 additions and 1,136 deletions.
2 changes: 1 addition & 1 deletion ApplicationAssociations/ApplicationAssociations.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Data.Sqlite.Core" Version="8.0.1" />
<PackageReference Include="Microsoft.WindowsAPICodePack.Shell" Version="1.1.0" />
<PackageReference Include="NLog" Version="5.2.4" />
<PackageReference Include="NLog" Version="5.2.8" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\PhotoTagsCommonComponets\PhotoTagsCommonComponets.csproj" />
Expand Down
6 changes: 3 additions & 3 deletions DataGridViewGeneric/ClipboardUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ public static void CopyDataGridViewSelectedCellsToClipboard(DataGridView dataGri
}
catch (Exception ex)
{
KryptonMessageBox.Show("Can't copy cells to clipboard. Reason:\r\n\r\n" + ex.Message, "Warning!", MessageBoxButtons.OK, KryptonMessageBoxIcon.Error, showCtrlCopy: true);
KryptonMessageBox.Show("Can't copy cells to clipboard. Reason:\r\n\r\n" + ex.Message, "Warning!", (KryptonMessageBoxButtons)MessageBoxButtons.OK, KryptonMessageBoxIcon.Error, showCtrlCopy: true);
}
}
#endregion
Expand Down Expand Up @@ -666,7 +666,7 @@ public static void PasteDataGridViewSelectedCellsFromClipboard(
KryptonMessageBox.Show("Can't paste selection. Can only paste selection when have selected equal numbers of columns.\r\n" +
"Columns selected for copy: " + columnConentsCount + "\r\n" +
"Columns selected for paste: " + columnsSelected.Count,
"Can't paste selected text", MessageBoxButtons.OK, KryptonMessageBoxIcon.Warning, showCtrlCopy: true);
"Can't paste selected text", (KryptonMessageBoxButtons)MessageBoxButtons.OK, KryptonMessageBoxIcon.Warning, showCtrlCopy: true);
return;
}

Expand Down Expand Up @@ -720,7 +720,7 @@ public static void PasteDataGridViewSelectedCellsFromClipboard(
KryptonMessageBox.Show("Can't paste selection. Can only paste selection when have selected equal numbers of rows.\r\n" +
"Rows selected for copy: " + rowContents.Count + "\r\n" +
"Rows selected for paste: " + rowsSelected.Count,
"Can't paste selected text", MessageBoxButtons.OK, KryptonMessageBoxIcon.Warning, showCtrlCopy: true);
"Can't paste selected text", (KryptonMessageBoxButtons)MessageBoxButtons.OK, KryptonMessageBoxIcon.Warning, showCtrlCopy: true);
return;
}

Expand Down
4 changes: 2 additions & 2 deletions DataGridViewGeneric/DataGridViewGeneric.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Krypton.Navigator" Version="70.22.11.312" />
<PackageReference Include="Krypton.Toolkit" Version="70.22.11.312" />
<PackageReference Include="Krypton.Navigator" Version="80.23.11.321" />
<PackageReference Include="Krypton.Toolkit" Version="80.23.11.321" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion DataGridViewGeneric/DataGridViewGenericData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class DataGridViewGenericData
public string DataGridViewName { get; set; } = "";
public DataGridViewSize CellSize { get; set; } = DataGridViewSize.Medium;
public int CellHeight { get; set; } = 24;
public KryptonPalette KryptonPalette { get; set; } = null;
public KryptonCustomPaletteBase KryptonCustomPaletteBase { get; set; } = null;
public List<ColumnNameAndWidth> ColumnNameAndWidthsLarge { get; set; }
public List<ColumnNameAndWidth> ColumnNameAndWidthsMedium { get; set; }
public List<ColumnNameAndWidth> ColumnNameAndWidthsSmall { get; set; }
Expand Down
48 changes: 24 additions & 24 deletions DataGridViewGeneric/DataGridViewHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,140 +43,140 @@ public static bool IsFilenameEqual(string fullFileName1, string fullFileName2)
public static Color ColorBackCellNormal(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return SystemColors.ControlLightLight;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCommon.StateNormal.DataCell.Back.Color1;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCommon.StateNormal.DataCell.Back.Color1;
}


public static Color ColorTextCellNormal(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return SystemColors.ControlText;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCommon.StateNormal.DataCell.Content.Color1;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCommon.StateNormal.DataCell.Content.Color1;
}
#endregion

#region Color - Cell - Favorite
public static Color ColorBackCellFavorite(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return SystemColors.ControlLight;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCommon.StateNormal.DataCell.Back.Color2;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCommon.StateNormal.DataCell.Back.Color2;
}

public static Color ColorTextCellFavorite(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return SystemColors.ControlText;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCommon.StateNormal.DataCell.Content.Color2;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCommon.StateNormal.DataCell.Content.Color2;
}
#endregion

#region Color - Cell - ReadOnly
public static Color ColorBackCellReadOnly(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return SystemColors.GradientInactiveCaption;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCommon.StateDisabled.DataCell.Back.Color1;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCommon.StateDisabled.DataCell.Back.Color1;
}

public static Color ColorTextCellReadOnly(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return SystemColors.ControlText;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCommon.StateDisabled.DataCell.Content.Color1;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCommon.StateDisabled.DataCell.Content.Color1;
}
#endregion

#region Color - Cell - Favorite - ReadOnly
public static Color ColorBackCellFavoriteReadOnly(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return SystemColors.MenuHighlight;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCommon.StateDisabled.DataCell.Back.Color2;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCommon.StateDisabled.DataCell.Back.Color2;
}

public static Color ColorTextCellFavoriteReadOnly(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return SystemColors.ControlText;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCommon.StateDisabled.DataCell.Content.Color2;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCommon.StateDisabled.DataCell.Content.Color2;
}
#endregion

#region Color - Cell - Error
public static Color ColorBackCellError(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return Color.FromArgb(255, 192, 192);
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCustom2.StateNormal.DataCell.Back.Color1;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCustom2.StateNormal.DataCell.Back.Color1;
}

public static Color ColorTextCellError(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return SystemColors.ControlText;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCustom2.StateNormal.DataCell.Content.Color1;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCustom2.StateNormal.DataCell.Content.Color1;
}
#endregion

#region Color - Cell - Image
public static Color ColorBackCellImage(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return Color.White;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCustom3.StateNormal.DataCell.Back.Color1;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCustom3.StateNormal.DataCell.Back.Color1;
}

public static Color ColorTextCellImage(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return SystemColors.ControlText;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCustom3.StateNormal.DataCell.Content.Color1;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCustom3.StateNormal.DataCell.Content.Color1;
}
#endregion

#region Color - Header - Normal
public static Color ColorBackHeaderNormal(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return SystemColors.Control;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCommon.StateCommon.HeaderColumn.Back.Color1;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCommon.StateCommon.HeaderColumn.Back.Color1;
}

public static Color ColorTextHeaderNormal(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return SystemColors.ControlText;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCommon.StateCommon.HeaderColumn.Content.Color1;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCommon.StateCommon.HeaderColumn.Content.Color1;
}
#endregion

#region Color - Header - Warning
public static Color ColorBackHeaderWarning(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return Color.Yellow;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCustom1.StateCommon.HeaderColumn.Back.Color1;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCustom1.StateCommon.HeaderColumn.Back.Color1;
}

public static Color ColorTextHeaderWarning(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return SystemColors.ControlText;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCustom1.StateCommon.HeaderColumn.Content.Color1;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCustom1.StateCommon.HeaderColumn.Content.Color1;
}
#endregion

#region Color - Header - Error
public static Color ColorBackHeaderError(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return Color.Red;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCustom2.StateCommon.HeaderColumn.Back.Color1;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCustom2.StateCommon.HeaderColumn.Back.Color1;
}

public static Color ColorTextHeaderError(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return SystemColors.ControlText;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCustom2.StateCommon.HeaderColumn.Content.Color1;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCustom2.StateCommon.HeaderColumn.Content.Color1;
}
#endregion

#region Color - Header - Image
public static Color ColorBackHeaderImage(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return Color.LightSteelBlue;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCustom3.StateCommon.HeaderColumn.Back.Color1;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCustom3.StateCommon.HeaderColumn.Back.Color1;
}

public static Color ColorTextHeaderImage(DataGridView dataGridView)
{
if (dataGridView == null || dataGridView.TopLeftHeaderCell.Tag == null) return SystemColors.ControlText;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonPalette.GridStyles.GridCustom3.StateCommon.HeaderColumn.Content.Color1;
return ((DataGridViewGenericData)dataGridView.TopLeftHeaderCell.Tag).KryptonCustomPaletteBase.GridStyles.GridCustom3.StateCommon.HeaderColumn.Content.Color1;
}
#endregion

Expand Down Expand Up @@ -358,11 +358,11 @@ public static void DataGridViewInit(DataGridView dataGridView, bool allowUserToA

#region DataGridViewInitGenericData
private static void DataGridViewInitGenericData(
DataGridView dataGridView, KryptonPalette palette, string dataGridViewName, string topLeftHeaderCellName, DataGridViewSize cellSize,
DataGridView dataGridView, KryptonCustomPaletteBase palette, string dataGridViewName, string topLeftHeaderCellName, DataGridViewSize cellSize,
List<ColumnNameAndWidth> columnNameAndWidthsLarge, List<ColumnNameAndWidth> columnNameAndWidthsMedium, List<ColumnNameAndWidth> columnNameAndWidthsSmall)
{
DataGridViewGenericData dataGridViewGenericData = new DataGridViewGenericData();
dataGridViewGenericData.KryptonPalette = palette;
dataGridViewGenericData.KryptonCustomPaletteBase = palette;
dataGridViewGenericData.TopCellName = topLeftHeaderCellName;
dataGridViewGenericData.DataGridViewName = dataGridViewName;
dataGridViewGenericData.FavoriteList = FavouriteRead(CreateFavoriteFilename(dataGridViewGenericData.DataGridViewName));
Expand Down Expand Up @@ -393,12 +393,12 @@ private void DataGridViewInitEvents(DataGridView dataGridView)
}
#endregion

public DataGridViewHandler(DataGridView dataGridView, KryptonPalette palette, string dataGridViewName, string topLeftHeaderCellName,
public DataGridViewHandler(DataGridView dataGridView, KryptonCustomPaletteBase palette, string dataGridViewName, string topLeftHeaderCellName,
DataGridViewSize cellSize, bool allowUserToAddRow) : this
(dataGridView, palette, dataGridViewName, topLeftHeaderCellName, cellSize, null, null, null, allowUserToAddRow) {
}

public DataGridViewHandler(DataGridView dataGridView, KryptonPalette palette, string dataGridViewName, string topLeftHeaderCellName,
public DataGridViewHandler(DataGridView dataGridView, KryptonCustomPaletteBase palette, string dataGridViewName, string topLeftHeaderCellName,
DataGridViewSize cellSize, List<ColumnNameAndWidth> columnNameAndWidthsLarge, List<ColumnNameAndWidth> columnNameAndWidthsMedium,
List<ColumnNameAndWidth> columnNameAndWidthsSmall, bool allowUserToAddRow)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ public static bool RotateVideo(string sourceFile, string outputFile, int rotateD
// catch (Exception ex)
// {
// Logger.Error(ex);
// KryptonMessageBox.Show(ex.Message, "Syntax error...", MessageBoxButtons.OK, KryptonMessageBoxIcon.Error, showCtrlCopy: true);
// KryptonMessageBox.Show(ex.Message, "Syntax error...", (KryptonMessageBoxButtons)MessageBoxButtons.OK, KryptonMessageBoxIcon.Error, showCtrlCopy: true);
// }
//}

Expand All @@ -393,7 +393,7 @@ public static bool RotateVideo(string sourceFile, string outputFile, int rotateD
// catch (Exception ex)
// {
// Logger.Error(ex);
// KryptonMessageBox.Show(ex.Message, "Syntax error...", MessageBoxButtons.OK, KryptonMessageBoxIcon.Error, showCtrlCopy: true);
// KryptonMessageBox.Show(ex.Message, "Syntax error...", (KryptonMessageBoxButtons)MessageBoxButtons.OK, KryptonMessageBoxIcon.Error, showCtrlCopy: true);
// }
//}

Expand Down
4 changes: 2 additions & 2 deletions ImageListView/ImageListView.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
<EmbeddedResource Include="ImageListView.bmp" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Krypton.Toolkit" Version="70.22.11.312" />
<PackageReference Include="Krypton.Toolkit" Version="80.23.11.321" />
<PackageReference Include="NLog">
<Version>5.2.4</Version>
<Version>5.2.8</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
Expand Down
Binary file modified IncludeFilesAlways/exiftool.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion LocationNames/LocationNames.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<ItemGroup>
<PackageReference Include="Mono.Data.Sqlite" Version="1.0.61" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.2.4" />
<PackageReference Include="NLog" Version="5.2.8" />
<PackageReference Include="Nominatim.API" Version="1.6.1" />
</ItemGroup>
</Project>
Loading

0 comments on commit 56a9570

Please sign in to comment.