CalendarioSL 1.0.4

dotnet add package CalendarioSL --version 1.0.4
                    
NuGet\Install-Package CalendarioSL -Version 1.0.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="CalendarioSL" Version="1.0.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="CalendarioSL" Version="1.0.4" />
                    
Directory.Packages.props
<PackageReference Include="CalendarioSL" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add CalendarioSL --version 1.0.4
                    
#r "nuget: CalendarioSL, 1.0.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package CalendarioSL@1.0.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=CalendarioSL&version=1.0.4
                    
Install as a Cake Addin
#tool nuget:?package=CalendarioSL&version=1.0.4
                    
Install as a Cake Tool

CONTROL CALENDARIO .Net Framework >= 4.7.2

Calendario Moderno

Control que puyede mostrar festivos, dias de descanso y dias bloqueados a voluntad.

  1. Instanciar Clase Calendar()

Al instanciar la clase Calendar() se pueden pasar por constructor los siguientes parametros:

 public class CargarCalendario
{
   public int DiasDeBloqueo { get; set; }
   public List<DiasAgenda> DiasFestivos { get; set; }
   public List<DiasWeb> OtrosDiasBloqueados { get; set; }
}

Clases Auxiliares

public class DiasAgenda
{
    public string oAño { get; set; } //Año en formato de 4 digitos, por ejemplo: 2024
    public string oMes { get; set; } //Mes en formato de 2 digitos, por ejemplo: 01 para Enero, 02 para Febrero, etc.
    public string oDia { get; set; } //Dia en formato de 2 digitos, por ejemplo: 01, 02, etc.
}
public class DiasWeb
{
   public DateTime Fecha { get; set; } //Fecha del dia bloqueado
   public string Nombre { get; set; } //Nombre del dia bloqueado, por ejemplo: "Mantenimiento del sistema", "Día de descanso", etc.
}
  1. DiasDeBloqueo: Es un entero que indica el numero de dias a bloquear a partir del dia actual. Por ejemplo, si se pasan 3, el calendario bloquea los dias actuales y los siguientes 2 dias. a tener en cuenta que para evitar bloquear dias y dejarlos todos habilitados, se debe pasar el valor 0.
  2. DiasFestivos: Es una lista de objetos de tipo DiasAgenda, que es una clase que contiene la fecha del dia festivo Por ejemplo:
DiasFestivos = new List<DiasAgenda>
{
    new DiasAgenda { oAño = "2024", oMes = "01", oDia = "01" }, // Año Nuevo
    new DiasAgenda { oAño = "2024", oMes = "02", oDia = "14" }, // Día de San Valentín
    new DiasAgenda { oAño = "2024", oMes = "03", oDia = "17" }, // Día de San Patricio
    new DiasAgenda { oAño = "2024", oMes = "04", oDia = "04" }, // Domingo de Resurrección
    new DiasAgenda { oAño = "2024", oMes = "05", oDia = "01" }, // Día del Trabajador
    new DiasAgenda { oAño = "2024", oMes = "06", oDia = "21" }, // Solsticio de Verano
    new DiasAgenda { oAño = "2024", oMes = "09", oDia = "23" }, // Equinoccio de Otoño
    new DiasAgenda { oAño = "2024", oMes = "10", oDia = "31" }, // Halloween
    new DiasAgenda { oAño = "2024", oMes = "11", oDia = "28" }, // Día de Acción de Gracias
    new DiasAgenda { oAño = "2024", oMes = "12", oDia = "25" }  // Navidad
}
  1. OtrosDiasBloqueados: Es una lista de objetos de tipo DiasWeb, que es una clase que contiene la fecha y el nombre del dia bloqueado por ejemplo:
OtrosDiasBloqueados = new List<DiasWeb>
{
    new DiasWeb { Fecha = new DateTime(2024, 01, 15), Nombre = "Mantenimiento del sistema" },
    new DiasWeb { Fecha = new DateTime(2024, 02, 20), Nombre = "Día de descanso" },
    new DiasWeb { Fecha = new DateTime(2024, 03, 10), Nombre = "Actualización de software" },
    new DiasWeb { Fecha = new DateTime(2024, 04, 05), Nombre = "Día de capacitación" },
    new DiasWeb { Fecha = new DateTime(2024, 05, 20), Nombre = "Día de auditoría" },
    new DiasWeb { Fecha = new DateTime(2024, 06, 15), Nombre = "Día de mantenimiento preventivo" },
    new DiasWeb { Fecha = new DateTime(2024, 07, 10), Nombre = "Día de actualización de seguridad" },
    new DiasWeb { Fecha = new DateTime(2024, 08, 25), Nombre = "Día de revisión de sistemas" },
    new DiasWeb { Fecha = new DateTime(2024, 09, 30), Nombre = "Día de prueba de rendimiento" },
    new DiasWeb { Fecha = new DateTime(2024, 10, 15), Nombre = "Día de mantenimiento correctivo" }
}

Las clases auxiliares se pueden instanciar y llenar con los datos que se deseen, y luego se pasan por constructor a la clase Calendar() para configurar el calendario con los dias festivos, dias de bloqueo y otros dias bloqueados, tambien pueder ir en null si no son nesesarios los dias.

  1. Variables de la clase Calendar()

Valores Defecto:

public bool Anclar;     
public int diasBloq = 0;        
public Color colorFondo = Color.White;
public Color colorBorde = Color.Navy;

Al instaciar la clase Calendar() se pueden modificar las variables de la clase para personalizar el calendario a gusto, por ejemplo:

Calendar calendario = new Calendar();
calendario.Anclar = true; // Anclar el calendario en el formulario, True lo deja visible y False lo oculta
calendario.diasBloq = 3; // Bloquear los dias actuales y los siguientes 2 dias
calendario.colorFondo = Color.LightBlue; // Cambiar el color de fondo del calendario a azul claro
calendario.colorBorde = Color.Red; // Cambiar el color del borde del calendario a rojo

Autor

LICENCE MIT

License Copyright (c) 2024 Fabian Adolfo Gamba Barbosa Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Product Compatible and additional computed target framework versions.
.NET Framework net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.7.2

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.4 111 2/10/2026
1.0.2 105 2/9/2026
1.0.1 102 2/9/2026