Skip to content

Commit

Permalink
Finish cs-color-picker
Browse files Browse the repository at this point in the history
  • Loading branch information
bcssov committed Mar 19, 2024
2 parents cfa4cb0 + c360ac3 commit f383564
Show file tree
Hide file tree
Showing 34 changed files with 1,451 additions and 118 deletions.
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<Avalonia>[0.10.22]</Avalonia>
<AvaloniaEdit>[0.10.12.2]</AvaloniaEdit>
<AvaloniaMaterialIcons>[1.1.10]</AvaloniaMaterialIcons>
<AvaloniaColorPicker>[0.10.17]</AvaloniaColorPicker>
<!-- 2.5.0 version breaks tests, 1.26 rev still broken. I really don't want to investigate -->
<XUnitRunnerVS>[2.4.5]</XUnitRunnerVS>
<!-- SixLabors should be removed at some point -->
Expand Down
54 changes: 54 additions & 0 deletions src/IronyModManager.Models.Common/IConflictSolverColors.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// ***********************************************************************
// Assembly : IronyModManager.Models.Common
// Author : Mario
// Created : 03-18-2024
//
// Last Modified By : Mario
// Last Modified On : 03-18-2024
// ***********************************************************************
// <copyright file="IConflictSolverColors.cs" company="Mario">
// Mario
// </copyright>
// <summary></summary>
// ***********************************************************************

using System;
using System.Collections.Generic;
using System.Linq;

namespace IronyModManager.Models.Common
{
/// <summary>
/// An conflict solver colors interface.
/// </summary>
public interface IConflictSolverColors : IModel
{
#region Properties

/// <summary>
/// Gets or sets the color of the conflict solver deleted line.
/// </summary>
/// <value>The color of the conflict solver deleted line.</value>
string ConflictSolverDeletedLineColor { get; set; }

/// <summary>
/// Gets or sets the color of the conflict solver imaginary line.
/// </summary>
/// <value>The color of the conflict solver imaginary line.</value>
string ConflictSolverImaginaryLineColor { get; set; }

/// <summary>
/// Gets or sets a value representing the conflict solver inserted line color.
/// </summary>
/// <value>The conflict solver inserted line color.</value>
string ConflictSolverInsertedLineColor { get; set; }

/// <summary>
/// Gets or sets the color of the conflict solver modified line.
/// </summary>
/// <value>The color of the conflict solver modified line.</value>
string ConflictSolverModifiedLineColor { get; set; }

#endregion Properties
}
}
26 changes: 25 additions & 1 deletion src/IronyModManager.Models.Common/IPreferences.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Created : 01-11-2020
//
// Last Modified By : Mario
// Last Modified On : 02-26-2024
// Last Modified On : 03-18-2024
// ***********************************************************************
// <copyright file="IPreferences.cs" company="Mario">
// Mario
Expand Down Expand Up @@ -43,6 +43,24 @@ public interface IPreferences : IModel
/// <value><c>true</c> if [check for prerelease]; otherwise, <c>false</c>.</value>
bool CheckForPrerelease { get; set; }

/// <summary>
/// Gets or sets the color of the conflict solver deleted line.
/// </summary>
/// <value>The color of the conflict solver deleted line.</value>
string ConflictSolverDeletedLineColor { get; set; }

/// <summary>
/// Gets or sets the color of the conflict solver imaginary line.
/// </summary>
/// <value>The color of the conflict solver imaginary line.</value>
string ConflictSolverImaginaryLineColor { get; set; }

/// <summary>
/// Gets or sets the color of the conflict solver inserted line.
/// </summary>
/// <value>The color of the conflict solver inserted line.</value>
string ConflictSolverInsertedLineColor { get; set; }

/// <summary>
/// Gets or sets a value representing the conflict solver languages.<see cref="System.Collections.Generic.List{string}" />
/// </summary>
Expand All @@ -55,6 +73,12 @@ public interface IPreferences : IModel
/// <value><c>true</c> if conflict solver languages set; otherwise, <c>false</c>.</value>
bool ConflictSolverLanguagesSet { get; set; }

/// <summary>
/// Gets or sets the color of the conflict solver modified line.
/// </summary>
/// <value>The color of the conflict solver modified line.</value>
string ConflictSolverModifiedLineColor { get; set; }

/// <summary>
/// Gets or sets a value indicating whether [conflict solver prompt shown].
/// </summary>
Expand Down
59 changes: 59 additions & 0 deletions src/IronyModManager.Models/ConflictSolverColors.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// ***********************************************************************
// Assembly : IronyModManager.Models
// Author : Mario
// Created : 03-18-2024
//
// Last Modified By : Mario
// Last Modified On : 03-18-2024
// ***********************************************************************
// <copyright file="ConflictSolverColors.cs" company="Mario">
// Mario
// </copyright>
// <summary></summary>
// ***********************************************************************

using System;
using System.Collections.Generic;
using System.Linq;
using IronyModManager.Models.Common;

namespace IronyModManager.Models
{
/// <summary>
/// Class ConflictSolverColors.
/// Implements the <see cref="BaseModel" />
/// Implements the <see cref="IConflictSolverColors" />
/// </summary>
/// <seealso cref="BaseModel" />
/// <seealso cref="IConflictSolverColors" />
public class ConflictSolverColors : BaseModel, IConflictSolverColors
{
#region Properties

/// <summary>
/// Gets or sets the color of the conflict solver deleted line.
/// </summary>
/// <value>The color of the conflict solver deleted line.</value>
public virtual string ConflictSolverDeletedLineColor { get; set; }

/// <summary>
/// Gets or sets the color of the conflict solver imaginary line.
/// </summary>
/// <value>The color of the conflict solver imaginary line.</value>
public virtual string ConflictSolverImaginaryLineColor { get; set; }

/// <summary>
/// Gets or sets a value representing the conflict solver inserted line color.
/// </summary>
/// <value>The conflict solver inserted line color.</value>
public virtual string ConflictSolverInsertedLineColor { get; set; }

/// <summary>
/// Gets or sets the color of the conflict solver modified line.
/// </summary>
/// <value>The color of the conflict solver modified line.</value>
public virtual string ConflictSolverModifiedLineColor { get; set; }

#endregion Properties
}
}
3 changes: 2 additions & 1 deletion src/IronyModManager.Models/DIPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Created : 01-15-2020
//
// Last Modified By : Mario
// Last Modified On : 02-25-2024
// Last Modified On : 03-18-2024
// ***********************************************************************
// <copyright file="DIPackage.cs" company="Mario">
// Mario
Expand Down Expand Up @@ -66,6 +66,7 @@ public void RegisterServices(Container container)
container.Register<IModCollectionSourceInfo, ModCollectionSourceInfo>();
container.RegisterModel<IModIgnoreConfiguration, ModIgnoreConfiguration>();
container.RegisterLocalization<IGameLanguage, GameLanguage>();
container.RegisterModel<IConflictSolverColors, ConflictSolverColors>();
}

#endregion Methods
Expand Down
3 changes: 2 additions & 1 deletion src/IronyModManager.Models/MappingProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Created : 01-11-2020
//
// Last Modified By : Mario
// Last Modified On : 02-25-2024
// Last Modified On : 03-18-2024
// ***********************************************************************
// <copyright file="MappingProfile.cs" company="Mario">
// Copyright (c) Mario. All rights reserved.
Expand Down Expand Up @@ -63,6 +63,7 @@ public MappingProfile()
CreateMap<IModCollectionSourceInfo, ModCollectionSourceInfo>().ReverseMap();
CreateMap<IModIgnoreConfiguration, ModIgnoreConfiguration>().ReverseMap();
CreateMap<IGameLanguage, GameLanguage>().ReverseMap();
CreateMap<IConflictSolverColors, ConflictSolverColors>().ReverseMap();
}

#endregion Constructors
Expand Down
26 changes: 25 additions & 1 deletion src/IronyModManager.Models/Preferences.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Created : 01-11-2020
//
// Last Modified By : Mario
// Last Modified On : 02-26-2024
// Last Modified On : 03-18-2024
// ***********************************************************************
// <copyright file="Preferences.cs" company="Mario">
// Mario
Expand Down Expand Up @@ -45,6 +45,24 @@ public class Preferences : BaseModel, IPreferences
/// <value><c>true</c> if [check for prerelease]; otherwise, <c>false</c>.</value>
public virtual bool CheckForPrerelease { get; set; }

/// <summary>
/// Gets or sets the color of the conflict solver deleted line.
/// </summary>
/// <value>The color of the conflict solver deleted line.</value>
public virtual string ConflictSolverDeletedLineColor { get; set; }

/// <summary>
/// Gets or sets the color of the conflict solver imaginary line.
/// </summary>
/// <value>The color of the conflict solver imaginary line.</value>
public virtual string ConflictSolverImaginaryLineColor { get; set; }

/// <summary>
/// Gets or sets the color of the conflict solver inserted line.
/// </summary>
/// <value>The color of the conflict solver inserted line.</value>
public virtual string ConflictSolverInsertedLineColor { get; set; }

/// <summary>
/// Gets or sets a value representing the conflict solver languages.<see cref="System.Collections.Generic.List{string}" />
/// </summary>
Expand All @@ -57,6 +75,12 @@ public class Preferences : BaseModel, IPreferences
/// <value><c>true</c> if [conflict solver languages set]; otherwise, <c>false</c>.</value>
public virtual bool ConflictSolverLanguagesSet { get; set; }

/// <summary>
/// Gets or sets a value representing the conflict solver modified line color.
/// </summary>
/// <value>The conflict solver modified line color.</value>
public virtual string ConflictSolverModifiedLineColor { get; set; }

/// <summary>
/// Gets or sets a value indicating whether [conflict solver prompt shown].
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

// ***********************************************************************
// Assembly : IronyModManager.Services.Common
// Author : Mario
// Created : 03-18-2024
//
// Last Modified By : Mario
// Last Modified On : 03-18-2024
// ***********************************************************************
// <copyright file="IConflictSolverColorsService.cs" company="Mario">
// Mario
// </copyright>
// <summary></summary>
// ***********************************************************************

using System;
using System.Collections.Generic;
using System.Linq;
using IronyModManager.Models.Common;

namespace IronyModManager.Services.Common
{

/// <summary>
/// An conflict solver colors service interface.
/// </summary>
public interface IConflictSolverColorsService : IBaseService
{
#region Methods

/// <summary>
/// Get.
/// </summary>
/// <returns>An IConflictSolverColors.<see cref="IConflictSolverColors" /></returns>
IConflictSolverColors Get();

/// <summary>
/// Has any.
/// </summary>
/// <param name="color">The color.</param>
/// <returns>A bool.</returns>
bool HasAny(IConflictSolverColors color);

/// <summary>
/// Save.
/// </summary>
/// <param name="color">The color.</param>
void Save(IConflictSolverColors color);

#endregion Methods
}
}
Loading

0 comments on commit f383564

Please sign in to comment.