Movensys.Login.WinForms 1.1.0

dotnet add package Movensys.Login.WinForms --version 1.1.0
                    
NuGet\Install-Package Movensys.Login.WinForms -Version 1.1.0
                    
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="Movensys.Login.WinForms" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Movensys.Login.WinForms" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Movensys.Login.WinForms" />
                    
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 Movensys.Login.WinForms --version 1.1.0
                    
#r "nuget: Movensys.Login.WinForms, 1.1.0"
                    
#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 Movensys.Login.WinForms@1.1.0
                    
#: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=Movensys.Login.WinForms&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Movensys.Login.WinForms&version=1.1.0
                    
Install as a Cake Tool

Movensys.Login.WinForms

This is a function for login dialog, remain time view and account editor GUI developed by the Movensys Application Team.

Features

  • LoginStatusView control : [Login ↔ Logout] button │ current account (level) │ remain time │ [Extend] button
  • The first button has two faces : [Login] (white) opens the login dialog, [Logout] (light green, while someone is logged in) logs out. A touch panel session keeps [Login]
  • Remain time and [Extend] blink every 0.5 s : orange under half of the keep time, red when almost expired
  • Login dialog : user · password · keep time (5 / 10 / 30 / 60 min · Unlimited, the last one is selected) → Login / Cancel
  • Quick login shortcut key in the login dialog (when an administrator turned it on)
  • Settings button → administrator login → account editor (add · delete · level, quick login, touch panel account, hide file)
  • Forces the initial password to be changed at the first login of a newly created LoginConfig.json
  • Colors : not logged in = gray, logged in = green, touch panel = blue, change password = orange
  • Marshals every Movensys.Login.Core event to the UI thread
  • Shows a wait cursor while the password hash is being computed
  • .NET Framework 4.5 ~ 4.8.1, .NET 5 and .NET 8 (Windows). Movensys.Login.Core is installed with it

Code Highlighting

using Movensys.Login;
using Movensys.Login.WinForms;

namespace WinFormsApp1
{
    //Define Level (higher value = higher level, the highest value = administrator)
    enum MyLevel
    {
        Operator,
        Engineer,
        Admin
    }

    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();

            //Bind marshals every Core event to the UI thread of this control
            LoginUi<MyLevel>.Bind(this);

            //LoginStatusView dropped on the form from the toolbox
            LoginUi<MyLevel>.Attach(loginStatusView1);

            //These handlers are safe to touch controls directly
            LoginUi<MyLevel>.SessionExpired += () => MessageBox.Show("Session expired.");
            LoginUi<MyLevel>.LoggedIn       += userName => RefreshButtons();
        }

        private void btnLogin_Click(object sender, EventArgs e)
        {
            //The [Login] button of LoginStatusView does the same
            LoginUi<MyLevel>.ShowLoginDialog(this);
        }
    }
}

Tip

Call Login<T>.Init first and then LoginUi<T>.Bind / Attach. LoginStatusView reads the state every 250 ms on the UI thread, so it needs no marshalling.

The administrator login of the Settings button is a real login : the session becomes the administrator with the keep time selected in the login dialog. An account below the highest level is refused and the current session stays.

The quick login key is captured in the account editor by pressing it. A plain letter / digit key is refused because it would block typing in the login dialog : use a function key (F1 ~ F24) or a key with Ctrl / Alt.

Handlers connected to LoginUi<T> run on the UI thread, while handlers connected to Login<T> run on the monitor thread. Do not touch controls from the latter.

The login dialog reports the same message for a wrong password and for an account that does not exist, so that account names cannot be discovered from the UI.

Release History

Nov 12, 2026 - 1.1.0 ver<br> First Release (Movensys.Login.Core 1.1.0) LoginStatusView (login / logout two-face button · account · remain time · extend button, blink under half / almost expired), keep time in the login dialog (last value remembered), quick login key, Settings → administrator login → account editor. 13 target frameworks (net45 ~ net481, net5.0-windows, net8.0-windows).

Product Compatible and additional computed target framework versions.
.NET net5.0-windows7.0 is compatible.  net6.0-windows was computed.  net7.0-windows was computed.  net8.0-windows was computed.  net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
.NET Framework net45 is compatible.  net451 is compatible.  net452 is compatible.  net46 is compatible.  net461 is compatible.  net462 is compatible.  net463 was computed.  net47 is compatible.  net471 is compatible.  net472 is compatible.  net48 is compatible.  net481 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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.1.0 46 11/24/2026