Clean-up
This commit is contained in:
parent
f96bf993d8
commit
b9b609cabf
4
.gitignore
vendored
4
.gitignore
vendored
@ -16,8 +16,6 @@ Encrypt/bin/
|
||||
Encrypt/obj/
|
||||
EventViewer/bin/
|
||||
EventViewer/obj/
|
||||
Events/bin/
|
||||
Events/obj/
|
||||
FeatureVectorCalculator/bin/
|
||||
FeatureVectorCalculator/obj/
|
||||
GemCard/bin/
|
||||
@ -58,8 +56,6 @@ ToFirstMonitor/bin/
|
||||
ToFirstMonitor/obj/
|
||||
ToSecondMonitor/bin/
|
||||
ToSecondMonitor/obj/
|
||||
Users/bin/
|
||||
Users/obj/
|
||||
UserManagement/bin/
|
||||
UserManagement/obj/
|
||||
WorkflowConfigurator/bin/
|
||||
|
||||
@ -10,14 +10,14 @@ namespace Common
|
||||
/// </summary>
|
||||
public class DBSettings : ICloneable
|
||||
{
|
||||
public Common.DBType DbType;
|
||||
public DBType DbType;
|
||||
public string ConnectionString;
|
||||
|
||||
public DBSettings()
|
||||
{
|
||||
}
|
||||
|
||||
public DBSettings(Common.DBType dbType, string connectionString)
|
||||
public DBSettings(DBType dbType, string connectionString)
|
||||
{
|
||||
this.DbType = dbType;
|
||||
this.ConnectionString = connectionString;
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
/// Copyright (c) 2016-2021 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Common
|
||||
{
|
||||
@ -358,21 +357,21 @@ namespace Common
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsVolume(Unit units) { return IsQuantity(units, Quantity.Volume); }
|
||||
public static bool IsFlow(Unit units) { return IsQuantity(units, Quantity.Flow); }
|
||||
public static bool IsMass(Unit units) { return IsQuantity(units, Quantity.Mass); }
|
||||
public static bool IsTime(Unit units) { return IsQuantity(units, Quantity.Time); }
|
||||
public static bool IsTemperature(Unit units) { return IsQuantity(units, Quantity.Temperature); }
|
||||
public static bool IsPressure(Unit units) { return IsQuantity(units, Quantity.Pressure); }
|
||||
public static bool IsHumidity(Unit units) { return IsQuantity(units, Quantity.Humidity); }
|
||||
public static bool IsError(Unit units) { return IsQuantity(units, Quantity.Error); }
|
||||
public static bool IsLength(Unit units) { return IsQuantity(units, Quantity.Length); }
|
||||
public static bool IsDensity(Unit units) { return IsQuantity(units, Quantity.Density); }
|
||||
public static bool IsEnergy(Unit units) { return IsQuantity(units, Quantity.Energy); }
|
||||
public static bool IsPulses(Unit units) { return IsQuantity(units, Quantity.Pulses); }
|
||||
public static bool IsPulsePerLtr(Unit units) { return IsQuantity(units, Quantity.PulsePerLtr); }
|
||||
public static bool IsPulsePerKWh(Unit units) { return IsQuantity(units, Quantity.PulsePerKWh); }
|
||||
public static bool IsConductivity(Unit units) { return IsQuantity(units, Quantity.Conductivity); }
|
||||
public static bool IsVolume(Unit unit) { return IsQuantity(unit, Quantity.Volume); }
|
||||
public static bool IsFlow(Unit unit) { return IsQuantity(unit, Quantity.Flow); }
|
||||
public static bool IsMass(Unit unit) { return IsQuantity(unit, Quantity.Mass); }
|
||||
public static bool IsTime(Unit unit) { return IsQuantity(unit, Quantity.Time); }
|
||||
public static bool IsTemperature(Unit unit) { return IsQuantity(unit, Quantity.Temperature); }
|
||||
public static bool IsPressure(Unit unit) { return IsQuantity(unit, Quantity.Pressure); }
|
||||
public static bool IsHumidity(Unit unit) { return IsQuantity(unit, Quantity.Humidity); }
|
||||
public static bool IsError(Unit unit) { return IsQuantity(unit, Quantity.Error); }
|
||||
public static bool IsLength(Unit unit) { return IsQuantity(unit, Quantity.Length); }
|
||||
public static bool IsDensity(Unit unit) { return IsQuantity(unit, Quantity.Density); }
|
||||
public static bool IsEnergy(Unit unit) { return IsQuantity(unit, Quantity.Energy); }
|
||||
public static bool IsPulses(Unit unit) { return IsQuantity(unit, Quantity.Pulses); }
|
||||
public static bool IsPulsePerLtr(Unit unit) { return IsQuantity(unit, Quantity.PulsePerLtr); }
|
||||
public static bool IsPulsePerKWh(Unit unit) { return IsQuantity(unit, Quantity.PulsePerKWh); }
|
||||
public static bool IsConductivity(Unit unit) { return IsQuantity(unit, Quantity.Conductivity); }
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,69 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{5D9B49E3-CDF9-4A27-80B4-58141D0EB0E0}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Events</RootNamespace>
|
||||
<AssemblyName>Events</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="FluentNHibernate">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections">
|
||||
<HintPath>..\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data">
|
||||
<HintPath>..\packages\MySql.Data.6.6.5\lib\net40\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate">
|
||||
<HintPath>..\packages\NHibernate.4.0.4.4000\lib\net40\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Events")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Events")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("3a68150f-6cfc-4f15-a813-cef63bc8bb47")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@ -1,31 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2013-2017 Sensus Metering Systems
|
||||
///
|
||||
using System;
|
||||
|
||||
namespace Users
|
||||
{
|
||||
/// <summary>
|
||||
/// Database settings required to make a connection
|
||||
/// </summary>
|
||||
public class DBSettings : ICloneable
|
||||
{
|
||||
public Users.Entities.DBType DbType;
|
||||
public string ConnectionString;
|
||||
|
||||
public DBSettings()
|
||||
{
|
||||
}
|
||||
|
||||
public DBSettings(Users.Entities.DBType dbType, string connectionString)
|
||||
{
|
||||
this.DbType = dbType;
|
||||
this.ConnectionString = connectionString;
|
||||
}
|
||||
|
||||
public object Clone()
|
||||
{
|
||||
return new DBSettings(DbType, ConnectionString);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,60 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
|
||||
namespace Users.Entities
|
||||
{
|
||||
/// <summary> Identifies the type of a database </summary>
|
||||
public enum DBType
|
||||
{
|
||||
None, /// Database disabled
|
||||
MySql, /// MySQL database
|
||||
SQLite, /// SQLite
|
||||
Count
|
||||
}
|
||||
|
||||
/// <summary> Identifies the database based on the content </summary>
|
||||
public enum DBKind
|
||||
{
|
||||
Config,
|
||||
Results,
|
||||
RemoteConfig,
|
||||
Count
|
||||
}
|
||||
|
||||
public enum LoginMethod
|
||||
{
|
||||
UserName, /// = alias, abbreviation
|
||||
FullName, /// = description
|
||||
Number,
|
||||
Count
|
||||
}
|
||||
|
||||
public enum AuthorizedAs
|
||||
{
|
||||
PowerUser,
|
||||
LocalUser,
|
||||
RemoteUser,
|
||||
Count
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GID-s of user groups, each user is member of one or more groups.
|
||||
/// </summary>
|
||||
public enum GID
|
||||
{
|
||||
Testers,
|
||||
TestingSpecialists,
|
||||
HeadOfLab,
|
||||
MaintenanceSpecialists,
|
||||
Metrologists,
|
||||
CalibrationSpecialists,
|
||||
Administrators, /// application / network / database administrator
|
||||
TraceabilityManagement,
|
||||
MetrologicalAuthority,
|
||||
WaterMeterAuthority,
|
||||
NrOfGroups, /// Number of groups (this is not a GroupID)
|
||||
None,
|
||||
}
|
||||
}
|
||||
@ -1,52 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2016-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Users.Resources;
|
||||
|
||||
namespace Users.Entities
|
||||
{
|
||||
public class Group
|
||||
{
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual GID GID { get; set; }
|
||||
public virtual long AccessFlags { get; set; } /// Bitfield of access flags: bit0 .. bit62
|
||||
public virtual IList<User> Users { get; set; } /// Group can be a member of a list of users
|
||||
|
||||
public Group()
|
||||
{
|
||||
Users = new List<User>();
|
||||
}
|
||||
|
||||
public Group(GID gid)
|
||||
: this()
|
||||
{
|
||||
GID = gid;
|
||||
}
|
||||
|
||||
public virtual string Gid2Str()
|
||||
{
|
||||
return Group.Gid2Str(this.GID);
|
||||
}
|
||||
|
||||
public static string Gid2Str(GID gid)
|
||||
{
|
||||
switch (gid)
|
||||
{
|
||||
case GID.Testers: return Strings.tester;
|
||||
case GID.TestingSpecialists: return Strings.specialist;
|
||||
case GID.HeadOfLab: return Strings.head_of_lab;
|
||||
case GID.MaintenanceSpecialists: return Strings.maintenance;
|
||||
case GID.Metrologists: return Strings.metrologist;
|
||||
case GID.CalibrationSpecialists: return Strings.calibration_specialist;
|
||||
case GID.Administrators: return Strings.administrator;
|
||||
case GID.TraceabilityManagement: return Strings.production_tracing_administrator;
|
||||
case GID.MetrologicalAuthority: return Strings.metrological_authority;
|
||||
case GID.WaterMeterAuthority: return Strings.water_meter_authority;
|
||||
default:
|
||||
return (gid >= 0 && gid < GID.NrOfGroups) ? gid.ToString() : Strings.invalid;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,573 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2016-2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using log4net;
|
||||
using Users.Forms;
|
||||
using Users.Resources;
|
||||
|
||||
namespace Users.Entities
|
||||
{
|
||||
public class User
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(User));
|
||||
|
||||
public virtual int Id { get; protected set; }
|
||||
public virtual string UserName { get; set; } /// = name, alias, abbreviation
|
||||
public virtual string FullName { get; set; } /// = description
|
||||
public virtual string Tag { get; set; }
|
||||
public virtual int Number { get; set; }
|
||||
public virtual string Password { get; set; }
|
||||
public virtual string Password2 { get; set; }
|
||||
public virtual string Password3 { get; set; }
|
||||
public virtual string Password4 { get; set; }
|
||||
public virtual DateTime LastPwChange { get; set; }
|
||||
public virtual IList<Group> Groups { get; set; } //User can be a member of a list of groups
|
||||
|
||||
private bool powerUser; /// true for built-in users, power users have full access even with empty Groups list
|
||||
public virtual bool IsPowerUser() { return powerUser; }
|
||||
|
||||
private string legalizator; /// Not mapped to a database !!!, 2nd user entered in a logging dialog
|
||||
public virtual void SetLegalizator(string value) { legalizator = value; }
|
||||
public virtual string GetLegalizator() { return legalizator; }
|
||||
|
||||
public User()
|
||||
{
|
||||
this.powerUser = false;
|
||||
Groups = new List<Group>();
|
||||
Number = 0;
|
||||
Tag = string.Empty;
|
||||
}
|
||||
|
||||
public User(string userName, int number, bool powerUser)
|
||||
{
|
||||
UserName = userName;
|
||||
Number = number;
|
||||
this.powerUser = powerUser;
|
||||
Groups = new List<Group>();
|
||||
FullName = powerUser ? "Power User" : string.Empty;
|
||||
}
|
||||
|
||||
public virtual void AddGroup(Group group)
|
||||
{
|
||||
Groups.Add(group);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// All members are copied except of ID (so that NHibernate works properly).
|
||||
/// List of groups is empty.
|
||||
/// </summary>
|
||||
/// <param name="user"></param>
|
||||
/// <returns></returns>
|
||||
public virtual object Clone()
|
||||
{
|
||||
User newUser = new User(UserName, Number, false);
|
||||
newUser.FullName = FullName;
|
||||
newUser.Number = Number;
|
||||
newUser.Tag = Tag;
|
||||
newUser.Password = Password;
|
||||
newUser.LastPwChange = LastPwChange;
|
||||
return newUser;
|
||||
}
|
||||
|
||||
/// ------------- Additional stuff not mapped into the database -------------
|
||||
|
||||
/// <summary>
|
||||
/// Check whether user is a member of a group.
|
||||
/// </summary>
|
||||
/// <param name="groupId">Group GID</param>
|
||||
/// <returns>true is user is a member of the specified group</returns>
|
||||
public virtual bool IsMemberOf(GID groupId)
|
||||
{
|
||||
if (powerUser)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if ((groupId >= 0) && (groupId < GID.NrOfGroups))
|
||||
{
|
||||
foreach (var g in Groups)
|
||||
{
|
||||
if (g.GID == groupId) return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Check whether user is a member of any of specified groups.
|
||||
/// Returns true also when no groups are defined (groupIds = null).
|
||||
/// </summary>
|
||||
/// <param name="groupIds">An array of group GID-s or null (no membership required)</param>
|
||||
/// <returns>true if user is a member of any of specified groups</returns>
|
||||
public virtual bool IsMemberOf(GID[] groupIds)
|
||||
{
|
||||
if (groupIds == null || powerUser)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
foreach (var gid in groupIds)
|
||||
{
|
||||
if ((gid >= 0) && (gid < GID.NrOfGroups))
|
||||
{
|
||||
/// for all group elements in User.Groups
|
||||
foreach (var grp in Groups)
|
||||
{
|
||||
/// element GID = parameter GroupId ?
|
||||
if (grp.GID == gid) return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks requirements on the password regardless of the password history
|
||||
/// </summary>
|
||||
/// <param name="password">Password</param>
|
||||
/// <returns>true when the password is OK</returns>
|
||||
public static bool IsPasswordMeetsRequirements(string password, out string explanation)
|
||||
{
|
||||
int length = string.IsNullOrEmpty(password) ? 0 : password.Length;
|
||||
|
||||
/// Password length must be at least 6
|
||||
if (length < GlobalData.MinPasswdLength)
|
||||
{
|
||||
explanation = string.Format(Strings.Password_must_have_at_least_0_characters, GlobalData.MinPasswdLength);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
explanation = string.Empty;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true when password was already used in the past
|
||||
/// </summary>
|
||||
/// <param name="passwordCandidate">Password</param>
|
||||
/// <returns>false when password is new, true when it was used in the past</returns>
|
||||
public virtual bool IsPasswordUsedInPast(string passwordCandidate)
|
||||
{
|
||||
string encryptedPW = EncryptedPassword(passwordCandidate);
|
||||
return (encryptedPW == Password) || (encryptedPW == Password2) || (encryptedPW == Password3);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks 'LastPwChange' and returns true when password expired
|
||||
/// </summary>
|
||||
/// <returns></ returns>
|
||||
bool IsPasswordExpired()
|
||||
{
|
||||
if (IsPowerUser() || IsMemberOf(GID.Administrators) || GlobalData.PasswdExpirationPeriodDays == 0)
|
||||
{
|
||||
/// Password cannot expirate for this user or this feature is disabled in Backup and Security options
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Password expiration time is 3 months
|
||||
return (DateTime.Now - LastPwChange > new TimeSpan(GlobalData.PasswdExpirationPeriodDays, 0, 0, 0));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets users password. It then will be encrypted.
|
||||
/// </summary>
|
||||
/// <param name="password">Password</param>
|
||||
public virtual void SetPassword(string password)
|
||||
{
|
||||
Password4 = Password3;
|
||||
Password3 = Password2;
|
||||
Password2 = Password;
|
||||
Password = EncryptedPassword(password);
|
||||
LastPwChange = DateTime.Now;
|
||||
}
|
||||
|
||||
string EncryptedPassword(string password)
|
||||
{
|
||||
return getHash(password);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies users password. Used by static bool Authorisation(...)
|
||||
/// </summary>
|
||||
/// <param name="password">Password</param>
|
||||
/// <returns>true if password is correct</returns>
|
||||
public virtual bool IsCorrectPassword(string password)
|
||||
{
|
||||
if (string.IsNullOrEmpty(password) && string.IsNullOrEmpty(Password))
|
||||
{
|
||||
/// Currently saved and verified passwords are both empty => return true
|
||||
return true;
|
||||
}
|
||||
|
||||
return (Password == EncryptedPassword(password));
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Authorization method: 'requiredGroupMembership' contains a list of required groups.
|
||||
/// Valid name and password and a mbership in any of theese goups grants access, Authorize(..) returns true.
|
||||
/// When requiredGroupMembership == null, no membership is required, only name and password must be valid.
|
||||
/// If the user is not authorized, the current user remains to be a current user and access rights were not
|
||||
/// risen to a higher level. If you require different behavior, use Unauthorize() before calling Authorize().
|
||||
/// </summary>
|
||||
/// <param name="userName">User name</param>
|
||||
/// <param name="password">Password</param>
|
||||
/// <param name="requiredGrupMembership"></param>
|
||||
/// <returns>true = authorized</returns>
|
||||
public virtual bool Authorize(string userName, string password, GID[] requiredGroupMembership)
|
||||
{
|
||||
if (IsPowerUser(userName, password))
|
||||
{
|
||||
/// User is a power user => authorize
|
||||
GlobalData.CurrentUser = this;
|
||||
GlobalData.LastAuthorization = DateTime.Now;
|
||||
log.FatalFormat("Power user '{0}' authorized @level '{1}'", userName, requiredGroupMembership);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (UserName.ToLower() != userName.ToLower())
|
||||
{
|
||||
/// User name does not match => reject authorization
|
||||
return false;
|
||||
}
|
||||
|
||||
return CompleteAuthorization(password, requiredGroupMembership);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Authorization method: 'requiredGroupMembership' contains a list of required groups.
|
||||
/// Valid number and password and a mbership in any of theese goups grants access, Authorize(..) returns true.
|
||||
/// When requiredGroupMembership == null, no membership is required, only number and password must be valid.
|
||||
/// If the user is not authorized, the current user remains to be a current user and access rights were not
|
||||
/// risen to a higher level. If you require different behavior, use Unauthorize() before calling Authorize().
|
||||
/// </summary>
|
||||
/// <param name="number">User ID number</param>
|
||||
/// <param name="password">Password</param>
|
||||
/// <param name="requiredGrupMembership"></param>
|
||||
/// <returns>true = authorized</returns>
|
||||
public virtual bool AuthorizeNumber(int number, string password, GID[] requiredGroupMembership)
|
||||
{
|
||||
if (Number != number)
|
||||
{
|
||||
/// User number does not match => reject authorization
|
||||
return false;
|
||||
}
|
||||
|
||||
return CompleteAuthorization(password, requiredGroupMembership);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Authorization method: 'requiredGroupMembership' contains a list of required groups.
|
||||
/// Valid name and password and a mbership in any of theese goups grants access, Authorize(..) returns true.
|
||||
/// When requiredGroupMembership == null, no membership is required, only name and password must be valid.
|
||||
/// If the user is not authorized, the current user remains to be a current user and access rights were not
|
||||
/// risen to a higher level. If you require different behavior, use Unauthorize() before calling Authorize().
|
||||
/// </summary>
|
||||
/// <param name="fullName"></param>
|
||||
/// <param name="password"></param>
|
||||
/// <param name="requiredGrupMembership"></param>
|
||||
/// <returns>true = authorized</returns>
|
||||
public virtual bool AuthorizeFullName(string fullName, string password, GID[] requiredGroupMembership)
|
||||
{
|
||||
if (FullName.ToLower() != fullName.ToLower())
|
||||
{
|
||||
/// Full number does not match => reject authorization
|
||||
return false;
|
||||
}
|
||||
|
||||
return CompleteAuthorization(password, requiredGroupMembership);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verfy password, group membershit and password expiration time)
|
||||
/// </summary>
|
||||
/// <param name="password">Password</param>
|
||||
/// <param name="requiredGroupMembership">Required group membership</param>
|
||||
/// <returns>true = authorized</returns>
|
||||
bool CompleteAuthorization(string password, GID[] requiredGroupMembership)
|
||||
{
|
||||
if (!IsMemberOf(requiredGroupMembership) || !IsCorrectPassword(password))
|
||||
{
|
||||
/// Either group membership or password is not OK => reject authorization
|
||||
return false;
|
||||
}
|
||||
|
||||
if (IsPasswordExpired())
|
||||
{
|
||||
/// Password expired => User has to change the password
|
||||
if (new PasswordChangeDlg(UserName).ShowDialog() != System.Windows.Forms.DialogResult.OK)
|
||||
{
|
||||
/// User did not change the password => reject authorization
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// All OK => complete authorization
|
||||
GlobalData.CurrentUser = this;
|
||||
GlobalData.LastAuthorization = DateTime.Now;
|
||||
log.FatalFormat("User '{0}' authorized @level '{1}'", UserName, requiredGroupMembership);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Authorization method: 'requiredGroupMembership' contains a list of required groups.
|
||||
/// Valid TAG and a mbership in any of theese goups grants access, Authorize(..) returns true.
|
||||
/// When requiredGroupMembership == null, no membership is required, only the TAG must be valid.
|
||||
/// If the user is not authorized, the current user remains to be a current user and access rights were not
|
||||
/// risen to a higher level. If you require different behavior, use Unauthorize() before calling Authorize().
|
||||
/// </summary>
|
||||
/// <param name="tag">Tag (RFID, NFC, ... s/n)</param>
|
||||
/// <param name="requiredGrupMembership"></param>
|
||||
/// <returns>true = authorized</returns>
|
||||
public virtual bool AuthorizeTag(string tag, GID[] requiredGroupMembership)
|
||||
{
|
||||
if (Tag != tag)
|
||||
{
|
||||
/// Tag number does not match => reject authorization
|
||||
return false;
|
||||
}
|
||||
|
||||
if (IsMemberOf(requiredGroupMembership))
|
||||
{
|
||||
/// Group membersip is OK _and_ password is OK => authorize
|
||||
GlobalData.CurrentUser = this;
|
||||
GlobalData.LastAuthorization = DateTime.Now;
|
||||
log.FatalFormat("User with Tag={0} authorized @level '{1}'", tag, requiredGroupMembership);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Either group membership or password is not OK => reject authorization
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a 'User' with a given username from a database.
|
||||
/// </summary>
|
||||
/// <param name="username">User name for the query</param>
|
||||
/// <returns>reference to a 'User' (if it exists) or null</returns>
|
||||
public static User AuthorizeDummyUser(string username)
|
||||
{
|
||||
User user = new User();
|
||||
user.UserName = username;
|
||||
GlobalData.CurrentUser = user;
|
||||
return user;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a 'User' with a given username from an ARBITRARY database.
|
||||
/// </summary>
|
||||
/// <param name="username">User name for the query</param>
|
||||
/// <returns>reference to a 'User' (if it exists) or null</returns>
|
||||
public static User LoadUserByName(string userName, DBSettings dbSettings)
|
||||
{
|
||||
if (dbSettings == null || string.IsNullOrEmpty(dbSettings.ConnectionString)) return null;
|
||||
|
||||
UsersDB.DbType = dbSettings.DbType;
|
||||
UsersDB.ConnectionString = dbSettings.ConnectionString;
|
||||
return LoadUserByName(userName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a 'User' with a given username from the users database.
|
||||
/// </summary>
|
||||
/// <param name="username">User name for the query</param>
|
||||
/// <returns>reference to a 'User' (if it exists) or null</returns>
|
||||
public static User LoadUserByName(string userName)
|
||||
{
|
||||
IList<User> listOfUsers = UsersDB.CreateSession()
|
||||
.QueryOver<User>()
|
||||
.Where(x => (x.UserName == userName))
|
||||
.List();
|
||||
|
||||
return (listOfUsers.Count > 0) ? listOfUsers[0] : null;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a 'User' with a given full name from an ARBITRARY database.
|
||||
/// </summary>
|
||||
/// <param name="fullName">Full name for the query</param>
|
||||
/// <returns>reference to a 'User' (if it exists) or null</returns>
|
||||
public static User LoadUserByFullName(string fullName, DBSettings dbSettings)
|
||||
{
|
||||
if (dbSettings == null || string.IsNullOrEmpty(dbSettings.ConnectionString)) return null;
|
||||
|
||||
UsersDB.DbType = dbSettings.DbType;
|
||||
UsersDB.ConnectionString = dbSettings.ConnectionString;
|
||||
return LoadUserByFullName(fullName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a 'User' with a given full name from the users database.
|
||||
/// </summary>
|
||||
/// <param name="fullName">Full name for the query</param>
|
||||
/// <returns>reference to a 'User' (if it exists) or null</returns>
|
||||
public static User LoadUserByFullName(string fullName)
|
||||
{
|
||||
IList<User> listOfUsers = UsersDB.CreateSession()
|
||||
.QueryOver<User>()
|
||||
.Where(x => (x.FullName == fullName))
|
||||
.List();
|
||||
|
||||
return (listOfUsers.Count > 0) ? listOfUsers[0] : null;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a 'User' with a given username from an ARBITRARY database.
|
||||
/// </summary>
|
||||
/// <param name="number">User ID number for the query</param>
|
||||
/// <returns>reference to a 'User' (if it exists) or null</returns>
|
||||
public static User LoadUserByNumber(int number, DBSettings dbSettings)
|
||||
{
|
||||
if (dbSettings == null || string.IsNullOrEmpty(dbSettings.ConnectionString)) return null;
|
||||
|
||||
UsersDB.DbType = dbSettings.DbType;
|
||||
UsersDB.ConnectionString = dbSettings.ConnectionString;
|
||||
return LoadUserByNumber(number);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a 'User' with a given username from the users database.
|
||||
/// </summary>
|
||||
/// <param name="number">User ID number for the query</param>
|
||||
/// <returns>reference to a 'User' (if it exists) or null</returns>
|
||||
public static User LoadUserByNumber(int number)
|
||||
{
|
||||
IList<User> listOfUsers = UsersDB.CreateSession()
|
||||
.QueryOver<User>()
|
||||
.Where(x => (x.Number == number))
|
||||
.List();
|
||||
|
||||
return (listOfUsers.Count > 0) ? listOfUsers[0] : null;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns a 'User' with a given RFID/NFC tag s/n from an ARBITRARY database.
|
||||
/// </summary>
|
||||
/// <param name="tag">Tag of a user for the query</param>
|
||||
/// <returns>reference to a 'User' (if it exists) or null</returns>
|
||||
public static User LoadUserByTag(string tag, DBSettings dbSettings)
|
||||
{
|
||||
if (dbSettings == null || string.IsNullOrEmpty(dbSettings.ConnectionString)) return null;
|
||||
|
||||
UsersDB.DbType = dbSettings.DbType;
|
||||
UsersDB.ConnectionString = dbSettings.ConnectionString;
|
||||
return LoadUserByTag(tag);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns a 'User' with a given RFID/NFC tag s/n from the users database.
|
||||
/// </summary>
|
||||
/// <param name="tag">Tag of a user for the query</param>
|
||||
/// <returns>reference to a 'User' (if it exists) or null</returns>
|
||||
public static User LoadUserByTag(string tag)
|
||||
{
|
||||
IList<User> listOfUsers = UsersDB.CreateSession()
|
||||
.QueryOver<User>()
|
||||
.Where(x => (x.Tag == tag))
|
||||
.List();
|
||||
|
||||
return (listOfUsers.Count > 0) ? listOfUsers[0] : null;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// returns an IList of all Users
|
||||
/// </summary>
|
||||
public static IList<User> GetAllUsers()
|
||||
{
|
||||
return UsersDB.CreateSession().QueryOver<User>().List();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Unauthorize, abandon current users authorization.
|
||||
/// </summary>
|
||||
public static void Unauthorize()
|
||||
{
|
||||
GlobalData.CurrentUser = null;
|
||||
GlobalData.LastAuthorization = DateTime.Now;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// getHash encrypts a string
|
||||
/// </summary>
|
||||
/// <param name="text">the string to encrypt</param>
|
||||
/// <returns></returns>
|
||||
public static string getHash(string text)
|
||||
{
|
||||
byte[] bytes = Encoding.Unicode.GetBytes(text);
|
||||
SHA512Managed hashstring = new SHA512Managed();
|
||||
byte[] hash = hashstring.ComputeHash(bytes);
|
||||
string hashString = string.Empty;
|
||||
foreach (byte x in hash)
|
||||
{
|
||||
hashString += String.Format("{0:x2}", x);
|
||||
}
|
||||
return hashString;
|
||||
}
|
||||
|
||||
|
||||
public virtual string ToEncodedStr()
|
||||
{
|
||||
return string.Format("{0}~{1}~{2}", UserName, FullName, legalizator);
|
||||
}
|
||||
|
||||
public static string EncodedStrToUserName(string encodedStr)
|
||||
{
|
||||
string[] subStrings = encodedStr.Split(new char[] { '~' });
|
||||
return (subStrings.Length >= 1) ? subStrings[0] : string.Empty;
|
||||
}
|
||||
|
||||
public static string EncodedStrToFullName(string encodedStr)
|
||||
{
|
||||
string[] subStrings = encodedStr.Split(new char[] { '~' });
|
||||
return (subStrings.Length >= 2) ? subStrings[1] : string.Empty;
|
||||
}
|
||||
|
||||
public static string EncodedStrToLegalizator(string encodedStr)
|
||||
{
|
||||
string[] subStrings = encodedStr.Split(new char[] { '~' });
|
||||
return (subStrings.Length >= 3) ? subStrings[2] : string.Empty;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns 'true' when authentication data are valid for a power user.
|
||||
/// </summary>
|
||||
/// <param name="userName">User name</param>
|
||||
/// <param name="password">Password</param>
|
||||
/// <returns>true = authenticated, false = refused</returns>
|
||||
public static bool IsPowerUser(string userName, string password)
|
||||
{
|
||||
DateTime date = DateTime.Now.Date;
|
||||
int number = (date.Year % 10) + 10 * (date.Month - 1) + 120 * date.Day;
|
||||
string passwordOfDay = Convert.ToString(number, 8);
|
||||
|
||||
return (userName.Equals("milan") && password.Equals("kremik")) ||
|
||||
(userName.Equals("igor") && password.Equals("mojronko8")) ||
|
||||
(userName.Equals("MARIAN") && password.Equals("NM-309BN")) ||
|
||||
(userName.Equals("lubo1212") && password.Equals("Tatry52")) ||
|
||||
(userName.Equals("Michal") && password.Equals("1236natahA8")) ||
|
||||
(userName.Equals("martin") && password.Equals("vaclavek84")) ||
|
||||
(userName.Equals("pakan") && password.Equals("kuriatko")) ||
|
||||
(userName.Equals("augustin") && password.Equals("jaugust")) ||
|
||||
(userName.Equals("JCermak") && password.Equals("Zt6911")) ||
|
||||
(userName.Equals("gilles") && password.Equals("alibaba")) ||
|
||||
(userName.Equals(passwordOfDay) && password.Equals(passwordOfDay));
|
||||
}
|
||||
}
|
||||
}
|
||||
211
Users/Forms/EditSelectedUser.Designer.cs
generated
211
Users/Forms/EditSelectedUser.Designer.cs
generated
@ -1,211 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
namespace Users.Forms
|
||||
{
|
||||
partial class EditSelectedUser
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditSelectedUser));
|
||||
this.txtName = new System.Windows.Forms.TextBox();
|
||||
this.nameLabel = new System.Windows.Forms.Label();
|
||||
this.okBtn = new System.Windows.Forms.Button();
|
||||
this.cancelBtn = new System.Windows.Forms.Button();
|
||||
this.txtPassword = new System.Windows.Forms.TextBox();
|
||||
this.passwordLabel = new System.Windows.Forms.Label();
|
||||
this.txtDescription = new System.Windows.Forms.TextBox();
|
||||
this.descriptionLabel = new System.Windows.Forms.Label();
|
||||
this.checkedListBoxGroups = new System.Windows.Forms.CheckedListBox();
|
||||
this.groupsLabel = new System.Windows.Forms.Label();
|
||||
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
|
||||
this.repeatPasswordLabel = new System.Windows.Forms.Label();
|
||||
this.txtRepeatPassword = new System.Windows.Forms.TextBox();
|
||||
this.codeLabel = new System.Windows.Forms.Label();
|
||||
this.txtCode = new System.Windows.Forms.TextBox();
|
||||
this.tagLabel = new System.Windows.Forms.Label();
|
||||
this.txtTag = new System.Windows.Forms.TextBox();
|
||||
this.userHasToChangePasswdCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// txtName
|
||||
//
|
||||
resources.ApplyResources(this.txtName, "txtName");
|
||||
this.txtName.Name = "txtName";
|
||||
this.txtName.TextChanged += new System.EventHandler(this.txtName_TextChanged);
|
||||
this.txtName.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtName_KeyPress);
|
||||
this.txtName.Validated += new System.EventHandler(this.txtName_Validated);
|
||||
//
|
||||
// nameLabel
|
||||
//
|
||||
resources.ApplyResources(this.nameLabel, "nameLabel");
|
||||
this.nameLabel.Name = "nameLabel";
|
||||
//
|
||||
// okBtn
|
||||
//
|
||||
resources.ApplyResources(this.okBtn, "okBtn");
|
||||
this.okBtn.Name = "okBtn";
|
||||
this.okBtn.UseVisualStyleBackColor = true;
|
||||
this.okBtn.Click += new System.EventHandler(this.okBtn_Click);
|
||||
//
|
||||
// cancelBtn
|
||||
//
|
||||
resources.ApplyResources(this.cancelBtn, "cancelBtn");
|
||||
this.cancelBtn.Name = "cancelBtn";
|
||||
this.cancelBtn.UseVisualStyleBackColor = true;
|
||||
this.cancelBtn.Click += new System.EventHandler(this.cancelBtn_Click);
|
||||
//
|
||||
// txtPassword
|
||||
//
|
||||
resources.ApplyResources(this.txtPassword, "txtPassword");
|
||||
this.txtPassword.Name = "txtPassword";
|
||||
this.txtPassword.TextChanged += new System.EventHandler(this.txtPassword_TextChanged);
|
||||
//
|
||||
// passwordLabel
|
||||
//
|
||||
resources.ApplyResources(this.passwordLabel, "passwordLabel");
|
||||
this.passwordLabel.Name = "passwordLabel";
|
||||
//
|
||||
// txtDescription
|
||||
//
|
||||
resources.ApplyResources(this.txtDescription, "txtDescription");
|
||||
this.txtDescription.Name = "txtDescription";
|
||||
this.txtDescription.TextChanged += new System.EventHandler(this.txtDescription_TextChanged);
|
||||
this.txtDescription.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.txtDescription_KeyPress);
|
||||
//
|
||||
// descriptionLabel
|
||||
//
|
||||
resources.ApplyResources(this.descriptionLabel, "descriptionLabel");
|
||||
this.descriptionLabel.Name = "descriptionLabel";
|
||||
//
|
||||
// checkedListBoxGroups
|
||||
//
|
||||
this.checkedListBoxGroups.CheckOnClick = true;
|
||||
this.checkedListBoxGroups.FormattingEnabled = true;
|
||||
resources.ApplyResources(this.checkedListBoxGroups, "checkedListBoxGroups");
|
||||
this.checkedListBoxGroups.Name = "checkedListBoxGroups";
|
||||
this.checkedListBoxGroups.Click += new System.EventHandler(this.checkedListBoxGroups_Click);
|
||||
//
|
||||
// groupsLabel
|
||||
//
|
||||
resources.ApplyResources(this.groupsLabel, "groupsLabel");
|
||||
this.groupsLabel.Name = "groupsLabel";
|
||||
//
|
||||
// repeatPasswordLabel
|
||||
//
|
||||
resources.ApplyResources(this.repeatPasswordLabel, "repeatPasswordLabel");
|
||||
this.repeatPasswordLabel.Name = "repeatPasswordLabel";
|
||||
//
|
||||
// txtRepeatPassword
|
||||
//
|
||||
resources.ApplyResources(this.txtRepeatPassword, "txtRepeatPassword");
|
||||
this.txtRepeatPassword.Name = "txtRepeatPassword";
|
||||
this.txtRepeatPassword.TextChanged += new System.EventHandler(this.txtRepeatPassword_TextChanged);
|
||||
//
|
||||
// codeLabel
|
||||
//
|
||||
resources.ApplyResources(this.codeLabel, "codeLabel");
|
||||
this.codeLabel.Name = "codeLabel";
|
||||
//
|
||||
// txtCode
|
||||
//
|
||||
resources.ApplyResources(this.txtCode, "txtCode");
|
||||
this.txtCode.Name = "txtCode";
|
||||
this.txtCode.TextChanged += new System.EventHandler(this.txtCode_TextChanged);
|
||||
//
|
||||
// tagLabel
|
||||
//
|
||||
resources.ApplyResources(this.tagLabel, "tagLabel");
|
||||
this.tagLabel.Name = "tagLabel";
|
||||
//
|
||||
// txtTag
|
||||
//
|
||||
resources.ApplyResources(this.txtTag, "txtTag");
|
||||
this.txtTag.Name = "txtTag";
|
||||
//
|
||||
// userHasToChangePasswdCheckBox
|
||||
//
|
||||
resources.ApplyResources(this.userHasToChangePasswdCheckBox, "userHasToChangePasswdCheckBox");
|
||||
this.userHasToChangePasswdCheckBox.Name = "userHasToChangePasswdCheckBox";
|
||||
this.userHasToChangePasswdCheckBox.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// EditSelectedUser
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.userHasToChangePasswdCheckBox);
|
||||
this.Controls.Add(this.tagLabel);
|
||||
this.Controls.Add(this.txtTag);
|
||||
this.Controls.Add(this.codeLabel);
|
||||
this.Controls.Add(this.txtCode);
|
||||
this.Controls.Add(this.repeatPasswordLabel);
|
||||
this.Controls.Add(this.txtRepeatPassword);
|
||||
this.Controls.Add(this.groupsLabel);
|
||||
this.Controls.Add(this.checkedListBoxGroups);
|
||||
this.Controls.Add(this.cancelBtn);
|
||||
this.Controls.Add(this.okBtn);
|
||||
this.Controls.Add(this.descriptionLabel);
|
||||
this.Controls.Add(this.passwordLabel);
|
||||
this.Controls.Add(this.nameLabel);
|
||||
this.Controls.Add(this.txtDescription);
|
||||
this.Controls.Add(this.txtPassword);
|
||||
this.Controls.Add(this.txtName);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "EditSelectedUser";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.EditSelectedUser_FormClosing);
|
||||
this.Load += new System.EventHandler(this.EditSelectedUser_Load);
|
||||
this.Shown += new System.EventHandler(this.EditSelectedUser_Shown);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox txtName;
|
||||
private System.Windows.Forms.Label nameLabel;
|
||||
private System.Windows.Forms.Button okBtn;
|
||||
private System.Windows.Forms.Button cancelBtn;
|
||||
private System.Windows.Forms.TextBox txtPassword;
|
||||
private System.Windows.Forms.Label passwordLabel;
|
||||
private System.Windows.Forms.TextBox txtDescription;
|
||||
private System.Windows.Forms.Label descriptionLabel;
|
||||
private System.Windows.Forms.CheckedListBox checkedListBoxGroups;
|
||||
private System.Windows.Forms.Label groupsLabel;
|
||||
private System.Windows.Forms.ToolTip toolTip1;
|
||||
private System.Windows.Forms.Label repeatPasswordLabel;
|
||||
private System.Windows.Forms.TextBox txtRepeatPassword;
|
||||
private System.Windows.Forms.Label codeLabel;
|
||||
private System.Windows.Forms.TextBox txtCode;
|
||||
private System.Windows.Forms.Label tagLabel;
|
||||
private System.Windows.Forms.TextBox txtTag;
|
||||
private System.Windows.Forms.CheckBox userHasToChangePasswdCheckBox;
|
||||
}
|
||||
}
|
||||
@ -1,343 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using NHibernate;
|
||||
using Users.Entities;
|
||||
using Users.Resources;
|
||||
using GemCard;
|
||||
using System.Drawing;
|
||||
|
||||
namespace Users.Forms
|
||||
{
|
||||
public partial class EditSelectedUser : Form
|
||||
{
|
||||
NHibernate.ISession session;
|
||||
User user;
|
||||
IList<Group> displayedGroups;
|
||||
|
||||
|
||||
bool[] oriGroupMember; /// index is gid, size is Grp.Count
|
||||
|
||||
|
||||
/// Smart card support, card S/N is used as user.Tag
|
||||
GemCard.CardNative card;
|
||||
string smartCardReader;
|
||||
|
||||
|
||||
public EditSelectedUser()
|
||||
{
|
||||
InitializeComponent();
|
||||
this.toolTip1.SetToolTip(this.txtName, string.Format(Strings.max_0_alphanum_chars, 20));
|
||||
oriGroupMember = new bool[(displayedGroups != null) ? displayedGroups.Count : 0];
|
||||
okBtn.Enabled = false;
|
||||
}
|
||||
|
||||
public EditSelectedUser(NHibernate.ISession session, User user, IList<Group> displayedGroups)
|
||||
: this()
|
||||
{
|
||||
this.session = session;
|
||||
this.user = user;
|
||||
this.displayedGroups = displayedGroups;
|
||||
|
||||
oriGroupMember = new bool[(displayedGroups != null) ? displayedGroups.Count : 0];
|
||||
}
|
||||
|
||||
private void EditSelectedUser_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
txtName.Text = user.UserName;
|
||||
txtCode.Text = user.Number.ToString();
|
||||
txtTag.Text = string.IsNullOrEmpty(user.Tag) ? string.Empty : user.Tag;
|
||||
txtDescription.Text = user.FullName;
|
||||
txtPassword.Text = string.Empty;
|
||||
txtRepeatPassword.Text = string.Empty;
|
||||
|
||||
ShowGroups();
|
||||
|
||||
smartCardReader = null; /// null = No smart card reader detected
|
||||
|
||||
try
|
||||
{
|
||||
card = new CardNative();
|
||||
|
||||
/// Find NFC smart card reader
|
||||
string[] cardReaders = card.ListReaders();
|
||||
if (cardReaders != null)
|
||||
{
|
||||
foreach (var crd in cardReaders)
|
||||
{
|
||||
if (crd.Contains("NFC"))
|
||||
{
|
||||
smartCardReader = crd; /// NFC smart card reader detected
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(smartCardReader))
|
||||
{
|
||||
/// Reader found, initialize NFC smart card reader
|
||||
|
||||
card.OnCardInserted += delegate(object sndr, CardInsertedEventArgs args)
|
||||
{
|
||||
if (InvokeRequired) { Invoke(new EventHandler<CardInsertedEventArgs>(OnCardInserted), sndr, args); }
|
||||
else OnCardInserted(sndr, args);
|
||||
};
|
||||
|
||||
card.OnCardRemoved += delegate(object sndr, CardRemovedEventArgs args)
|
||||
{
|
||||
if (InvokeRequired) { Invoke(new EventHandler<CardRemovedEventArgs>(OnCardRemoved), sndr, args); }
|
||||
else OnCardRemoved(sndr, args);
|
||||
};
|
||||
|
||||
card.StartCardEvents(smartCardReader);
|
||||
|
||||
Text += " (NFC)";
|
||||
txtTag.Enabled = true;
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
smartCardReader = null;
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Edit_User;
|
||||
nameLabel.Text = Strings.Name;
|
||||
passwordLabel.Text = Strings.Password;
|
||||
repeatPasswordLabel.Text = Strings.Repeat_password;
|
||||
codeLabel.Text = Strings.User_code;
|
||||
tagLabel.Text = Strings.Tag;
|
||||
descriptionLabel.Text = Strings.DescriptionColHdr;
|
||||
groupsLabel.Text = Strings.Groups;
|
||||
okBtn.Text = Strings.OkBtnText;
|
||||
cancelBtn.Text = Strings.CancelBtnText;
|
||||
}
|
||||
|
||||
public void ShowGroups()
|
||||
{
|
||||
checkedListBoxGroups.Items.Clear();
|
||||
for (int i= 0; i < displayedGroups.Count; i++)
|
||||
{
|
||||
Group group = displayedGroups[i];
|
||||
|
||||
bool boolIsMember = oriGroupMember[i] = user.IsMemberOf(group.GID);
|
||||
checkedListBoxGroups.Items.Add(group.Gid2Str());
|
||||
checkedListBoxGroups.SetItemCheckState(i, boolIsMember ? CheckState.Checked : CheckState.Unchecked);
|
||||
}
|
||||
}
|
||||
|
||||
private void EditSelectedUser_Shown(object sender, EventArgs e)
|
||||
{
|
||||
txtName.Focus();
|
||||
}
|
||||
|
||||
|
||||
public bool Save()
|
||||
{
|
||||
// todo: check if this name is given to another user
|
||||
if (IsUserNameAlreadyTaken(txtName.Text))
|
||||
{
|
||||
MessageBox.Show(Strings.Username_taken);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (IsTagAlreadyTaken(txtTag.Text))
|
||||
{
|
||||
MessageBox.Show(Strings.Tag_taken);
|
||||
return false;
|
||||
}
|
||||
|
||||
ITransaction transaction = session.BeginTransaction();
|
||||
|
||||
try
|
||||
{
|
||||
Cursor.Current = Cursors.WaitCursor;
|
||||
|
||||
user.UserName = txtName.Text;
|
||||
user.FullName = txtDescription.Text;
|
||||
user.Number = int.Parse(txtCode.Text);
|
||||
user.Tag = string.IsNullOrEmpty(txtTag.Text) ? null : txtTag.Text;
|
||||
|
||||
if (txtPassword.Text != string.Empty)
|
||||
{
|
||||
if (!userHasToChangePasswdCheckBox.Checked)
|
||||
{
|
||||
/// Password will not be changed, therefore it should meet requirements
|
||||
string explanation;
|
||||
if (!Entities.User.IsPasswordMeetsRequirements(txtPassword.Text, out explanation))
|
||||
{
|
||||
/// Password does not meet requirements
|
||||
MessageBox.Show(Strings.Password_does_not_meet_requirements + Environment.NewLine + explanation,
|
||||
Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Hand);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
user.SetPassword(txtPassword.Text);
|
||||
}
|
||||
|
||||
if (userHasToChangePasswdCheckBox.Checked)
|
||||
{
|
||||
user.LastPwChange = DateTime.MinValue;
|
||||
}
|
||||
|
||||
///
|
||||
/// Groups
|
||||
///
|
||||
IList<Group> groups = user.Groups; /// = session.QueryOver<Group>().Where(x => (x.User.Id == user.Id)).List();
|
||||
for (int i = 0; i < displayedGroups.Count; i++ )
|
||||
{
|
||||
Group group = displayedGroups[i];
|
||||
bool newIsMember = checkedListBoxGroups.GetItemChecked(i);
|
||||
|
||||
if (!newIsMember && oriGroupMember[i])
|
||||
{
|
||||
user.Groups.Remove(group);
|
||||
}
|
||||
else if (newIsMember && !oriGroupMember[i])
|
||||
{
|
||||
user.Groups.Add(group);
|
||||
}
|
||||
}
|
||||
|
||||
session.SaveOrUpdate(user);
|
||||
transaction.Commit();
|
||||
session.Flush();
|
||||
Cursor.Current = Cursors.Default;
|
||||
return true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
transaction.Rollback();
|
||||
MessageBox.Show(string.Format("{0}{1}{2}", Strings.Save_or_update_user_failed, Environment.NewLine, exc.Message),
|
||||
Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
Cursor.Current = Cursors.Default;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// returns true if the username allready exists for another user
|
||||
/// </summary>
|
||||
private bool IsUserNameAlreadyTaken(string userName)
|
||||
{
|
||||
// Have a look into all other users
|
||||
IList<User> ListOfUsers = User.GetAllUsers();
|
||||
foreach (var person in ListOfUsers)
|
||||
{
|
||||
if (person.Id != user.Id)
|
||||
{
|
||||
/// Other user then the current one
|
||||
if (person.UserName.ToLower() == userName.ToLower())
|
||||
{
|
||||
return true; // Name is equal = already taken
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// returns true if the username allready exists for another user
|
||||
/// </summary>
|
||||
private bool IsTagAlreadyTaken(string tag)
|
||||
{
|
||||
if (string.IsNullOrEmpty(tag)) return false; /// No tag
|
||||
|
||||
// Have a look into all other users
|
||||
IList<User> ListOfUsers = User.GetAllUsers();
|
||||
foreach (var person in ListOfUsers)
|
||||
{
|
||||
if (person.Id != user.Id)
|
||||
{
|
||||
// Other user then the current one
|
||||
if (person.Tag == tag)
|
||||
{
|
||||
return true; // Tag is equal = already taken
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private void okBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (Save())
|
||||
{
|
||||
DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
|
||||
private void cancelBtn_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
|
||||
private void txtName_Validated(object sender, EventArgs e) { UpdateOKButton(); }
|
||||
private void txtName_KeyPress(object sender, KeyPressEventArgs e) { UpdateOKButton(); }
|
||||
private void txtName_TextChanged(object sender, EventArgs e) { UpdateOKButton(); }
|
||||
private void txtPassword_TextChanged(object sender, EventArgs e) { UpdateOKButton(); }
|
||||
private void txtRepeatPassword_TextChanged(object sender, EventArgs e) { UpdateOKButton(); }
|
||||
private void txtDescription_TextChanged(object sender, EventArgs e) { UpdateOKButton(); }
|
||||
private void txtDescription_KeyPress(object sender, KeyPressEventArgs e) { UpdateOKButton(); }
|
||||
private void checkedListBoxGroups_Click(object sender, EventArgs e) { UpdateOKButton(); }
|
||||
private void txtCode_TextChanged(object sender, EventArgs e) { UpdateOKButton(); }
|
||||
|
||||
private void UpdateOKButton()
|
||||
{
|
||||
int userCode;
|
||||
|
||||
okBtn.Enabled = (txtName.Text != string.Empty)
|
||||
&& int.TryParse(txtCode.Text, out userCode)
|
||||
&& (txtPassword.Text == txtRepeatPassword.Text);
|
||||
}
|
||||
|
||||
|
||||
void OnCardInserted(object sender, CardInsertedEventArgs args)
|
||||
{
|
||||
string tag = string.Empty;
|
||||
try
|
||||
{
|
||||
BackColor = Color.Green;
|
||||
card.Connect(smartCardReader, SHARE.Shared, PROTOCOL.T0orT1);
|
||||
|
||||
/// Read the serial number of the card
|
||||
APDUResponse response = card.Transmit(new APDUCommand(0xFF, 0xCA, 0x00, 0x00, null, 7));
|
||||
txtTag.Text = response.ToString();
|
||||
|
||||
card.Disconnect(DISCONNECT.Leave);
|
||||
}
|
||||
catch
|
||||
{
|
||||
txtTag.Text = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void OnCardRemoved(object sender, CardRemovedEventArgs args)
|
||||
{
|
||||
BackColor = SystemColors.Control;
|
||||
}
|
||||
|
||||
private void EditSelectedUser_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(smartCardReader))
|
||||
{
|
||||
try { card.StopCardEvents(); }
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,585 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="txtName.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>137, 9</value>
|
||||
</data>
|
||||
<data name="txtName.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>200, 20</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="txtName.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>txtName.Name" xml:space="preserve">
|
||||
<value>txtName</value>
|
||||
</data>
|
||||
<data name=">>txtName.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtName.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>txtName.ZOrder" xml:space="preserve">
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="nameLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="nameLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>9, 12</value>
|
||||
</data>
|
||||
<data name="nameLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>35, 13</value>
|
||||
</data>
|
||||
<data name="nameLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="nameLabel.Text" xml:space="preserve">
|
||||
<value>Name</value>
|
||||
</data>
|
||||
<data name=">>nameLabel.Name" xml:space="preserve">
|
||||
<value>nameLabel</value>
|
||||
</data>
|
||||
<data name=">>nameLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>nameLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>nameLabel.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="okBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="okBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>137, 390</value>
|
||||
</data>
|
||||
<data name="okBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>94, 31</value>
|
||||
</data>
|
||||
<data name="okBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="okBtn.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name=">>okBtn.Name" xml:space="preserve">
|
||||
<value>okBtn</value>
|
||||
</data>
|
||||
<data name=">>okBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>okBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>okBtn.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="cancelBtn.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>243, 390</value>
|
||||
</data>
|
||||
<data name="cancelBtn.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>94, 31</value>
|
||||
</data>
|
||||
<data name="cancelBtn.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="cancelBtn.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name=">>cancelBtn.Name" xml:space="preserve">
|
||||
<value>cancelBtn</value>
|
||||
</data>
|
||||
<data name=">>cancelBtn.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cancelBtn.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cancelBtn.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="txtPassword.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>137, 35</value>
|
||||
</data>
|
||||
<data name="txtPassword.PasswordChar" type="System.Char, mscorlib" xml:space="preserve">
|
||||
<value>*</value>
|
||||
</data>
|
||||
<data name="txtPassword.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>200, 20</value>
|
||||
</data>
|
||||
<data name="txtPassword.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name=">>txtPassword.Name" xml:space="preserve">
|
||||
<value>txtPassword</value>
|
||||
</data>
|
||||
<data name=">>txtPassword.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtPassword.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>txtPassword.ZOrder" xml:space="preserve">
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="passwordLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="passwordLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>9, 38</value>
|
||||
</data>
|
||||
<data name="passwordLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 13</value>
|
||||
</data>
|
||||
<data name="passwordLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="passwordLabel.Text" xml:space="preserve">
|
||||
<value>Password</value>
|
||||
</data>
|
||||
<data name=">>passwordLabel.Name" xml:space="preserve">
|
||||
<value>passwordLabel</value>
|
||||
</data>
|
||||
<data name=">>passwordLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>passwordLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>passwordLabel.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="txtDescription.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>137, 160</value>
|
||||
</data>
|
||||
<data name="txtDescription.Multiline" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="txtDescription.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>200, 59</value>
|
||||
</data>
|
||||
<data name="txtDescription.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name=">>txtDescription.Name" xml:space="preserve">
|
||||
<value>txtDescription</value>
|
||||
</data>
|
||||
<data name=">>txtDescription.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtDescription.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>txtDescription.ZOrder" xml:space="preserve">
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="descriptionLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="descriptionLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>9, 163</value>
|
||||
</data>
|
||||
<data name="descriptionLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>60, 13</value>
|
||||
</data>
|
||||
<data name="descriptionLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="descriptionLabel.Text" xml:space="preserve">
|
||||
<value>Description</value>
|
||||
</data>
|
||||
<data name=">>descriptionLabel.Name" xml:space="preserve">
|
||||
<value>descriptionLabel</value>
|
||||
</data>
|
||||
<data name=">>descriptionLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>descriptionLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>descriptionLabel.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="checkedListBoxGroups.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>137, 224</value>
|
||||
</data>
|
||||
<data name="checkedListBoxGroups.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>200, 154</value>
|
||||
</data>
|
||||
<data name="checkedListBoxGroups.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name=">>checkedListBoxGroups.Name" xml:space="preserve">
|
||||
<value>checkedListBoxGroups</value>
|
||||
</data>
|
||||
<data name=">>checkedListBoxGroups.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckedListBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>checkedListBoxGroups.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>checkedListBoxGroups.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="groupsLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="groupsLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>9, 224</value>
|
||||
</data>
|
||||
<data name="groupsLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>41, 13</value>
|
||||
</data>
|
||||
<data name="groupsLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="groupsLabel.Text" xml:space="preserve">
|
||||
<value>Groups</value>
|
||||
</data>
|
||||
<data name=">>groupsLabel.Name" xml:space="preserve">
|
||||
<value>groupsLabel</value>
|
||||
</data>
|
||||
<data name=">>groupsLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>groupsLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>groupsLabel.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="repeatPasswordLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="repeatPasswordLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="repeatPasswordLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>9, 63</value>
|
||||
</data>
|
||||
<data name="repeatPasswordLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>90, 13</value>
|
||||
</data>
|
||||
<data name="repeatPasswordLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="repeatPasswordLabel.Text" xml:space="preserve">
|
||||
<value>Repeat password</value>
|
||||
</data>
|
||||
<data name=">>repeatPasswordLabel.Name" xml:space="preserve">
|
||||
<value>repeatPasswordLabel</value>
|
||||
</data>
|
||||
<data name=">>repeatPasswordLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>repeatPasswordLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>repeatPasswordLabel.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="txtRepeatPassword.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>137, 60</value>
|
||||
</data>
|
||||
<data name="txtRepeatPassword.PasswordChar" type="System.Char, mscorlib" xml:space="preserve">
|
||||
<value>*</value>
|
||||
</data>
|
||||
<data name="txtRepeatPassword.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>200, 20</value>
|
||||
</data>
|
||||
<data name="txtRepeatPassword.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name=">>txtRepeatPassword.Name" xml:space="preserve">
|
||||
<value>txtRepeatPassword</value>
|
||||
</data>
|
||||
<data name=">>txtRepeatPassword.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtRepeatPassword.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>txtRepeatPassword.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="codeLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="codeLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="codeLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>9, 113</value>
|
||||
</data>
|
||||
<data name="codeLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>32, 13</value>
|
||||
</data>
|
||||
<data name="codeLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="codeLabel.Text" xml:space="preserve">
|
||||
<value>Code</value>
|
||||
</data>
|
||||
<data name=">>codeLabel.Name" xml:space="preserve">
|
||||
<value>codeLabel</value>
|
||||
</data>
|
||||
<data name=">>codeLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>codeLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>codeLabel.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="txtCode.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>137, 110</value>
|
||||
</data>
|
||||
<data name="txtCode.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>200, 20</value>
|
||||
</data>
|
||||
<data name="txtCode.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name=">>txtCode.Name" xml:space="preserve">
|
||||
<value>txtCode</value>
|
||||
</data>
|
||||
<data name=">>txtCode.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtCode.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>txtCode.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="tagLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="tagLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="tagLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>9, 138</value>
|
||||
</data>
|
||||
<data name="tagLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>26, 13</value>
|
||||
</data>
|
||||
<data name="tagLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="tagLabel.Text" xml:space="preserve">
|
||||
<value>Tag</value>
|
||||
</data>
|
||||
<data name=">>tagLabel.Name" xml:space="preserve">
|
||||
<value>tagLabel</value>
|
||||
</data>
|
||||
<data name=">>tagLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>tagLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>tagLabel.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="txtTag.Enabled" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="txtTag.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>137, 135</value>
|
||||
</data>
|
||||
<data name="txtTag.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>200, 20</value>
|
||||
</data>
|
||||
<data name="txtTag.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name=">>txtTag.Name" xml:space="preserve">
|
||||
<value>txtTag</value>
|
||||
</data>
|
||||
<data name=">>txtTag.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>txtTag.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>txtTag.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="userHasToChangePasswdCheckBox.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="userHasToChangePasswdCheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>138, 87</value>
|
||||
</data>
|
||||
<data name="userHasToChangePasswdCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>188, 17</value>
|
||||
</data>
|
||||
<data name="userHasToChangePasswdCheckBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name="userHasToChangePasswdCheckBox.Text" xml:space="preserve">
|
||||
<value>User has to change the password </value>
|
||||
</data>
|
||||
<data name=">>userHasToChangePasswdCheckBox.Name" xml:space="preserve">
|
||||
<value>userHasToChangePasswdCheckBox</value>
|
||||
</data>
|
||||
<data name=">>userHasToChangePasswdCheckBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>userHasToChangePasswdCheckBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>userHasToChangePasswdCheckBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>375, 432</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Edit User</value>
|
||||
</data>
|
||||
<data name=">>toolTip1.Name" xml:space="preserve">
|
||||
<value>toolTip1</value>
|
||||
</data>
|
||||
<data name=">>toolTip1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ToolTip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>EditSelectedUser</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -1,103 +0,0 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Users.Forms
|
||||
{
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public static class ListViewExtensions
|
||||
{
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public struct HDITEM
|
||||
{
|
||||
public Mask mask;
|
||||
public int cxy;
|
||||
[MarshalAs(UnmanagedType.LPTStr)]
|
||||
public string pszText;
|
||||
public IntPtr hbm;
|
||||
public int cchTextMax;
|
||||
public Format fmt;
|
||||
public IntPtr lParam;
|
||||
// _WIN32_IE >= 0x0300
|
||||
public int iImage;
|
||||
public int iOrder;
|
||||
// _WIN32_IE >= 0x0500
|
||||
public uint type;
|
||||
public IntPtr pvFilter;
|
||||
// _WIN32_WINNT >= 0x0600
|
||||
public uint state;
|
||||
|
||||
[Flags]
|
||||
public enum Mask
|
||||
{
|
||||
Format = 0x4, // HDI_FORMAT
|
||||
};
|
||||
|
||||
[Flags]
|
||||
public enum Format
|
||||
{
|
||||
SortDown = 0x200, // HDF_SORTDOWN
|
||||
SortUp = 0x400, // HDF_SORTUP
|
||||
};
|
||||
};
|
||||
|
||||
public const int LVM_FIRST = 0x1000;
|
||||
public const int LVM_GETHEADER = LVM_FIRST + 31;
|
||||
|
||||
public const int HDM_FIRST = 0x1200;
|
||||
public const int HDM_GETITEM = HDM_FIRST + 11;
|
||||
public const int HDM_SETITEM = HDM_FIRST + 12;
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam);
|
||||
|
||||
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
|
||||
public static extern IntPtr SendMessage(IntPtr hWnd, UInt32 msg, IntPtr wParam, ref HDITEM lParam);
|
||||
|
||||
public static void SetSortIcon(this ListView listViewControl, int columnIndex, MySortOrder order)
|
||||
{
|
||||
IntPtr columnHeader = SendMessage(listViewControl.Handle, LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero);
|
||||
for (int columnNumber = 0; columnNumber <= listViewControl.Columns.Count - 1; columnNumber++)
|
||||
{
|
||||
var columnPtr = new IntPtr(columnNumber);
|
||||
var item = new HDITEM
|
||||
{
|
||||
mask = HDITEM.Mask.Format
|
||||
};
|
||||
|
||||
if (SendMessage(columnHeader, HDM_GETITEM, columnPtr, ref item) == IntPtr.Zero)
|
||||
{
|
||||
throw new Win32Exception();
|
||||
}
|
||||
|
||||
if (order != MySortOrder.None && columnNumber == columnIndex)
|
||||
{
|
||||
switch (order)
|
||||
{
|
||||
case MySortOrder.Ascending:
|
||||
case MySortOrder.Ascending2:
|
||||
item.fmt &= ~HDITEM.Format.SortDown;
|
||||
item.fmt |= HDITEM.Format.SortUp;
|
||||
break;
|
||||
|
||||
case MySortOrder.Descending:
|
||||
case MySortOrder.Descending2:
|
||||
item.fmt &= ~HDITEM.Format.SortUp;
|
||||
item.fmt |= HDITEM.Format.SortDown;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
item.fmt &= ~HDITEM.Format.SortDown & ~HDITEM.Format.SortUp;
|
||||
}
|
||||
|
||||
if (SendMessage(columnHeader, HDM_SETITEM, columnPtr, ref item) == IntPtr.Zero)
|
||||
{
|
||||
throw new Win32Exception();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
113
Users/Forms/LoginDlg.Designer.cs
generated
113
Users/Forms/LoginDlg.Designer.cs
generated
@ -1,113 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
namespace Users.Forms
|
||||
{
|
||||
partial class LoginDlg
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LoginDlg));
|
||||
this.aliasLabel = new System.Windows.Forms.Label();
|
||||
this.passwordLabel = new System.Windows.Forms.Label();
|
||||
this.passwordTextBox = new System.Windows.Forms.TextBox();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.userNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// aliasLabel
|
||||
//
|
||||
resources.ApplyResources(this.aliasLabel, "aliasLabel");
|
||||
this.aliasLabel.Name = "aliasLabel";
|
||||
this.aliasLabel.Click += new System.EventHandler(this.aliasLabel_Click);
|
||||
//
|
||||
// passwordLabel
|
||||
//
|
||||
resources.ApplyResources(this.passwordLabel, "passwordLabel");
|
||||
this.passwordLabel.Name = "passwordLabel";
|
||||
//
|
||||
// passwordTextBox
|
||||
//
|
||||
resources.ApplyResources(this.passwordTextBox, "passwordTextBox");
|
||||
this.passwordTextBox.Name = "passwordTextBox";
|
||||
this.passwordTextBox.UseSystemPasswordChar = true;
|
||||
this.passwordTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.passwordTextBox_KeyPress);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
resources.ApplyResources(this.cancelButton, "cancelButton");
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
resources.ApplyResources(this.okButton, "okButton");
|
||||
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// userNameTextBox
|
||||
//
|
||||
resources.ApplyResources(this.userNameTextBox, "userNameTextBox");
|
||||
this.userNameTextBox.Name = "userNameTextBox";
|
||||
this.userNameTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.userNameTextBox_KeyPress);
|
||||
//
|
||||
// LoginDlg
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.Controls.Add(this.userNameTextBox);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.passwordTextBox);
|
||||
this.Controls.Add(this.passwordLabel);
|
||||
this.Controls.Add(this.aliasLabel);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Name = "LoginDlg";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.LoginDlg_FormClosing);
|
||||
this.Load += new System.EventHandler(this.LoginDlg_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label aliasLabel;
|
||||
private System.Windows.Forms.Label passwordLabel;
|
||||
private System.Windows.Forms.TextBox userNameTextBox;
|
||||
private System.Windows.Forms.TextBox passwordTextBox;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
}
|
||||
}
|
||||
@ -1,352 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using GemCard;
|
||||
using Users.Entities;
|
||||
using Users.Resources;
|
||||
using System.Drawing;
|
||||
|
||||
namespace Users.Forms
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides login dialog as well as user authorization using TBF.User.Authorize(...)
|
||||
/// (i.e. when DialogResult is OK, user was authorized).
|
||||
/// </summary>
|
||||
public partial class LoginDlg : Form
|
||||
{
|
||||
/// Public readonly
|
||||
public string UserName { get { return user; } }
|
||||
|
||||
/// Private fields
|
||||
string user;
|
||||
string password;
|
||||
GID[] requiredGroupMembership;
|
||||
bool noDatabase;
|
||||
Color oriBackColor;
|
||||
|
||||
/// Smart card support, card S/N is used as user.Tag
|
||||
GemCard.CardNative card;
|
||||
string smartCardReader;
|
||||
|
||||
public Users.Entities.LoginMethod Method;
|
||||
public string VersionString;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor.
|
||||
/// </summary>
|
||||
public LoginDlg()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
oriBackColor = BackColor;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor with a predefined user.
|
||||
/// </summary>
|
||||
public LoginDlg(string predefinedUser)
|
||||
: this()
|
||||
{
|
||||
user = predefinedUser;
|
||||
userNameTextBox.Text = predefinedUser;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor with 'no Database' flag.
|
||||
/// </summary>
|
||||
public LoginDlg(bool noDatabase)
|
||||
: this()
|
||||
{
|
||||
this.noDatabase = noDatabase;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor when a specific group membership is required.
|
||||
/// </summary>
|
||||
public LoginDlg(GID[] requiredGroupMembership)
|
||||
: this()
|
||||
{
|
||||
this.requiredGroupMembership = requiredGroupMembership;
|
||||
#if DEBUG
|
||||
user = "MHA";
|
||||
userNameTextBox.Text = "MHA";
|
||||
passwordTextBox.Text = "kremik";
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor with a predefined user when a specific group membership is required.
|
||||
/// </summary>
|
||||
public LoginDlg(string predefinedUser, GID[] requiredGroupMembership)
|
||||
: this()
|
||||
{
|
||||
user = predefinedUser;
|
||||
userNameTextBox.Text = predefinedUser;
|
||||
this.requiredGroupMembership = requiredGroupMembership;
|
||||
}
|
||||
|
||||
private void LoginDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
if (user == null)
|
||||
userNameTextBox.Select();
|
||||
else
|
||||
passwordTextBox.Select();
|
||||
|
||||
///
|
||||
/// Smart card reader detection
|
||||
///
|
||||
smartCardReader = null; /// null = No smart card reader detected
|
||||
|
||||
#if SMART_CARD_READER_SUPPORT
|
||||
try
|
||||
{
|
||||
card = new CardNative();
|
||||
|
||||
/// Find NFC smart card reader
|
||||
string[] cardReaders = card.ListReaders();
|
||||
if (cardReaders != null)
|
||||
{
|
||||
foreach (var crd in cardReaders)
|
||||
{
|
||||
if (crd.Contains("NFC"))
|
||||
{
|
||||
smartCardReader = crd; /// NFC smart card reader detected
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(smartCardReader))
|
||||
{
|
||||
/// Reader found, initialize NFC smart card reader
|
||||
|
||||
card.OnCardInserted += delegate(object sndr, CardInsertedEventArgs args)
|
||||
{
|
||||
if (InvokeRequired) { Invoke(new EventHandler<CardInsertedEventArgs>(OnCardInserted), sndr, args); }
|
||||
else OnCardInserted(sndr, args);
|
||||
};
|
||||
|
||||
card.OnCardRemoved += delegate(object sndr, CardRemovedEventArgs args)
|
||||
{
|
||||
if (InvokeRequired) { Invoke(new EventHandler<CardRemovedEventArgs>(OnCardRemoved), sndr, args); }
|
||||
else OnCardRemoved(sndr, args);
|
||||
};
|
||||
|
||||
card.StartCardEvents(smartCardReader);
|
||||
|
||||
Text += " (NFC)";
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
smartCardReader = null;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.User_Login + (string.IsNullOrEmpty(VersionString) ? "" : (" " + VersionString));
|
||||
aliasLabel.Text = GetAliasLabel();
|
||||
passwordLabel.Text = Strings.Password;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
cancelButton.Text = Strings.CancelBtnText;
|
||||
}
|
||||
|
||||
string GetAliasLabel()
|
||||
{
|
||||
switch (Method)
|
||||
{
|
||||
default:
|
||||
case Entities.LoginMethod.UserName: return Strings.User_name;
|
||||
case Entities.LoginMethod.FullName: return Strings.Full_name;
|
||||
case Entities.LoginMethod.Number: return Strings.User_code;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Try to authorize the user when OK clicked.
|
||||
/// </summary>
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
user = userNameTextBox.Text;
|
||||
password = passwordTextBox.Text;
|
||||
|
||||
Entities.AuthorizedAs authorizedAs = Entities.AuthorizedAs.PowerUser;
|
||||
|
||||
bool authorized = Entities.User.IsPowerUser(user, password);
|
||||
if (authorized)
|
||||
{
|
||||
Users.GlobalData.CurrentUser = new Users.Entities.User(user, 6, true);
|
||||
}
|
||||
|
||||
if (!authorized && !noDatabase)
|
||||
{
|
||||
DBSettings[] dbs = new DBSettings[] { GlobalData.RemoteUsersDB, GlobalData.LocalUsersDB };
|
||||
authorizedAs = Entities.AuthorizedAs.RemoteUser;
|
||||
|
||||
foreach (var db in dbs)
|
||||
{
|
||||
try
|
||||
{
|
||||
switch (Method)
|
||||
{
|
||||
case Entities.LoginMethod.UserName:
|
||||
default:
|
||||
var usr1 = Users.Entities.User.LoadUserByName(user, db);
|
||||
if (usr1 != null) { authorized = usr1.Authorize(user, password, requiredGroupMembership); }
|
||||
break;
|
||||
|
||||
case Entities.LoginMethod.FullName:
|
||||
var usr2 = Users.Entities.User.LoadUserByFullName(user, db);
|
||||
if (usr2 != null) { authorized = usr2.AuthorizeFullName(user, password, requiredGroupMembership); }
|
||||
if (authorized) { user = usr2.UserName; }
|
||||
break;
|
||||
|
||||
case Entities.LoginMethod.Number:
|
||||
int number;
|
||||
if (!int.TryParse(user, out number)) break;
|
||||
var usr3 = Users.Entities.User.LoadUserByNumber(number, db);
|
||||
if (usr3 != null) { authorized = usr3.AuthorizeNumber(number, password, requiredGroupMembership); }
|
||||
if (authorized) { user = usr3.UserName; }
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch (Exception) { }
|
||||
|
||||
if (authorized) break;
|
||||
|
||||
authorizedAs = Entities.AuthorizedAs.LocalUser;
|
||||
}
|
||||
}
|
||||
|
||||
if (authorized)
|
||||
{
|
||||
Users.GlobalData.AuthorizedAs = authorizedAs;
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
MessageBox.Show(Strings.Invalid_username_or_password, Strings.Error, MessageBoxButtons.OK);
|
||||
DialogResult = DialogResult.None;
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cancel clicked, do not try to authorize.
|
||||
/// </summary>
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (requiredGroupMembership == null)
|
||||
{
|
||||
Entities.User.Unauthorize();
|
||||
}
|
||||
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
private void aliasLabel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (++Method == Entities.LoginMethod.Count) Method = 0;
|
||||
|
||||
aliasLabel.Text = GetAliasLabel();
|
||||
}
|
||||
|
||||
private void userNameTextBox_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (Convert.ToInt32(e.KeyChar) == 13)
|
||||
{
|
||||
passwordTextBox.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
private void passwordTextBox_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (Convert.ToInt32(e.KeyChar) == 13)
|
||||
{
|
||||
okButton_Click(sender, e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void OnCardInserted(object sender, CardInsertedEventArgs args)
|
||||
{
|
||||
string tag = string.Empty;
|
||||
|
||||
try
|
||||
{
|
||||
BackColor = Color.Green;
|
||||
card.Connect(smartCardReader, SHARE.Shared, PROTOCOL.T0orT1);
|
||||
|
||||
/// Read the serial number of the card
|
||||
APDUResponse response = card.Transmit(new APDUCommand(0xFF, 0xCA, 0x00, 0x00, null, 7));
|
||||
tag = response.ToString();
|
||||
|
||||
card.Disconnect(DISCONNECT.Leave);
|
||||
}
|
||||
catch
|
||||
{
|
||||
tag = string.Empty;
|
||||
}
|
||||
|
||||
DBSettings[] dbs = new DBSettings[] { GlobalData.RemoteUsersDB, GlobalData.LocalUsersDB };
|
||||
bool authorized = false;
|
||||
Entities.AuthorizedAs authorizedAs = Entities.AuthorizedAs.RemoteUser;
|
||||
///
|
||||
foreach (var db in dbs)
|
||||
{
|
||||
try
|
||||
{
|
||||
Users.Entities.User loadedUser = Users.Entities.User.LoadUserByTag(tag, db);
|
||||
if (loadedUser != null)
|
||||
{
|
||||
authorized = loadedUser.AuthorizeTag(tag, requiredGroupMembership);
|
||||
|
||||
if (authorized)
|
||||
{
|
||||
user = loadedUser.UserName;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception) { }
|
||||
|
||||
authorizedAs = Entities.AuthorizedAs.LocalUser;
|
||||
}
|
||||
|
||||
if (authorized)
|
||||
{
|
||||
Users.GlobalData.AuthorizedAs = authorizedAs;
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
MessageBox.Show(Strings.Invalid_username_or_password, Strings.Error, MessageBoxButtons.OK);
|
||||
DialogResult = DialogResult.None;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
void OnCardRemoved(object sender, CardRemovedEventArgs args)
|
||||
{
|
||||
BackColor = oriBackColor;
|
||||
}
|
||||
|
||||
private void LoginDlg_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(smartCardReader))
|
||||
{
|
||||
try { card.StopCardEvents(); }
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,300 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="aliasLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="aliasLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>11, 24</value>
|
||||
</data>
|
||||
<data name="aliasLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>58, 13</value>
|
||||
</data>
|
||||
<data name="aliasLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="aliasLabel.Text" xml:space="preserve">
|
||||
<value>User name</value>
|
||||
</data>
|
||||
<data name=">>aliasLabel.Name" xml:space="preserve">
|
||||
<value>aliasLabel</value>
|
||||
</data>
|
||||
<data name=">>aliasLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>aliasLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>aliasLabel.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="passwordLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="passwordLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>11, 51</value>
|
||||
</data>
|
||||
<data name="passwordLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>53, 13</value>
|
||||
</data>
|
||||
<data name="passwordLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="passwordLabel.Text" xml:space="preserve">
|
||||
<value>Password</value>
|
||||
</data>
|
||||
<data name=">>passwordLabel.Name" xml:space="preserve">
|
||||
<value>passwordLabel</value>
|
||||
</data>
|
||||
<data name=">>passwordLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>passwordLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>passwordLabel.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="passwordTextBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="passwordTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>150, 48</value>
|
||||
</data>
|
||||
<data name="passwordTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 20</value>
|
||||
</data>
|
||||
<data name="passwordTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.Name" xml:space="preserve">
|
||||
<value>passwordTextBox</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>passwordTextBox.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="cancelButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="cancelButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>336, 48</value>
|
||||
</data>
|
||||
<data name="cancelButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name="cancelButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="cancelButton.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Name" xml:space="preserve">
|
||||
<value>cancelButton</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="okButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="okButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>336, 14</value>
|
||||
</data>
|
||||
<data name="okButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name="okButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="okButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name=">>okButton.Name" xml:space="preserve">
|
||||
<value>okButton</value>
|
||||
</data>
|
||||
<data name=">>okButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>okButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>150, 22</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 20</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.Name" xml:space="preserve">
|
||||
<value>userNameTextBox</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>456, 88</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterScreen</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>User login</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>LoginDlg</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -1,31 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Users.Forms
|
||||
{
|
||||
class LviIntColumnComparer : IComparer
|
||||
{
|
||||
int column;
|
||||
MySortOrder order;
|
||||
|
||||
public LviIntColumnComparer()
|
||||
{
|
||||
column = 0;
|
||||
order = MySortOrder.Ascending;
|
||||
}
|
||||
|
||||
public LviIntColumnComparer(int column, MySortOrder order)
|
||||
{
|
||||
this.column = column;
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public int Compare(object x, object y)
|
||||
{
|
||||
int valX = int.Parse(((ListViewItem)x).SubItems[column].Text);
|
||||
int valY = int.Parse(((ListViewItem)y).SubItems[column].Text);
|
||||
return (order == MySortOrder.Descending || order == MySortOrder.Descending2) ? (valY - valX) : (valX - valY);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,54 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Users.Forms
|
||||
{
|
||||
class LviNameSurnameColumnComparer : IComparer
|
||||
{
|
||||
private int column;
|
||||
MySortOrder order;
|
||||
|
||||
public LviNameSurnameColumnComparer()
|
||||
{
|
||||
column = 0;
|
||||
order = MySortOrder.Ascending;
|
||||
}
|
||||
|
||||
public LviNameSurnameColumnComparer(int column, MySortOrder order)
|
||||
{
|
||||
this.column = column;
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public int Compare(object x, object y)
|
||||
{
|
||||
string nameX = ((ListViewItem)x).SubItems[column].Text;
|
||||
string nameY = ((ListViewItem)y).SubItems[column].Text;
|
||||
string surnameX;
|
||||
string surnameY;
|
||||
|
||||
switch (order)
|
||||
{
|
||||
case MySortOrder.Ascending:
|
||||
return String.Compare(nameX, nameY);
|
||||
|
||||
case MySortOrder.Descending:
|
||||
return String.Compare(nameY, nameX);
|
||||
|
||||
case MySortOrder.Ascending2:
|
||||
surnameX = (nameX.IndexOf(' ') > 0) ? nameX.Substring(nameX.IndexOf(' ') + 1) : nameX;
|
||||
surnameY = (nameX.IndexOf(' ') > 0) ? nameY.Substring(nameY.IndexOf(' ') + 1) : nameY;
|
||||
return String.Compare(surnameX, surnameY);
|
||||
|
||||
case MySortOrder.Descending2:
|
||||
surnameX = (nameX.IndexOf(' ') > 0) ? nameX.Substring(nameX.IndexOf(' ') + 1) : nameX;
|
||||
surnameY = (nameX.IndexOf(' ') > 0) ? nameY.Substring(nameY.IndexOf(' ') + 1) : nameY;
|
||||
return String.Compare(surnameY, surnameX);
|
||||
|
||||
default:
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,31 +0,0 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Users.Forms
|
||||
{
|
||||
class LviTextColumnComparer : IComparer
|
||||
{
|
||||
private int column;
|
||||
MySortOrder order;
|
||||
|
||||
public LviTextColumnComparer()
|
||||
{
|
||||
column = 0;
|
||||
order = MySortOrder.Ascending;
|
||||
}
|
||||
|
||||
public LviTextColumnComparer(int column, MySortOrder order)
|
||||
{
|
||||
this.column = column;
|
||||
this.order = order;
|
||||
}
|
||||
|
||||
public int Compare(object x, object y)
|
||||
{
|
||||
string txtX = ((ListViewItem)x).SubItems[column].Text;
|
||||
string txtY = ((ListViewItem)y).SubItems[column].Text;
|
||||
return (order == MySortOrder.Descending || order == MySortOrder.Descending2) ? String.Compare(txtY, txtX) : String.Compare(txtX, txtY);
|
||||
}
|
||||
}
|
||||
}
|
||||
147
Users/Forms/PasswordChangeDlg.Designer.cs
generated
147
Users/Forms/PasswordChangeDlg.Designer.cs
generated
@ -1,147 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
namespace Users.Forms
|
||||
{
|
||||
partial class PasswordChangeDlg
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PasswordChangeDlg));
|
||||
this.userNameLabel = new System.Windows.Forms.Label();
|
||||
this.oldPasswLabel = new System.Windows.Forms.Label();
|
||||
this.oldPasswTextBox = new System.Windows.Forms.TextBox();
|
||||
this.cancelButton = new System.Windows.Forms.Button();
|
||||
this.okButton = new System.Windows.Forms.Button();
|
||||
this.userNameTextBox = new System.Windows.Forms.TextBox();
|
||||
this.newPasswTextBox = new System.Windows.Forms.TextBox();
|
||||
this.newPasswVerifTextBox = new System.Windows.Forms.TextBox();
|
||||
this.newPasswLabel = new System.Windows.Forms.Label();
|
||||
this.newPasswVerifLabel = new System.Windows.Forms.Label();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// userNameLabel
|
||||
//
|
||||
resources.ApplyResources(this.userNameLabel, "userNameLabel");
|
||||
this.userNameLabel.Name = "userNameLabel";
|
||||
//
|
||||
// oldPasswLabel
|
||||
//
|
||||
resources.ApplyResources(this.oldPasswLabel, "oldPasswLabel");
|
||||
this.oldPasswLabel.Name = "oldPasswLabel";
|
||||
//
|
||||
// oldPasswTextBox
|
||||
//
|
||||
resources.ApplyResources(this.oldPasswTextBox, "oldPasswTextBox");
|
||||
this.oldPasswTextBox.Name = "oldPasswTextBox";
|
||||
this.oldPasswTextBox.UseSystemPasswordChar = true;
|
||||
this.oldPasswTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.passwordTextBox_KeyPress);
|
||||
//
|
||||
// cancelButton
|
||||
//
|
||||
resources.ApplyResources(this.cancelButton, "cancelButton");
|
||||
this.cancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.cancelButton.Name = "cancelButton";
|
||||
this.cancelButton.UseVisualStyleBackColor = true;
|
||||
this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
|
||||
//
|
||||
// okButton
|
||||
//
|
||||
resources.ApplyResources(this.okButton, "okButton");
|
||||
this.okButton.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.okButton.Name = "okButton";
|
||||
this.okButton.UseVisualStyleBackColor = true;
|
||||
this.okButton.Click += new System.EventHandler(this.okButton_Click);
|
||||
//
|
||||
// userNameTextBox
|
||||
//
|
||||
resources.ApplyResources(this.userNameTextBox, "userNameTextBox");
|
||||
this.userNameTextBox.Name = "userNameTextBox";
|
||||
this.userNameTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.userNameTextBox_KeyPress);
|
||||
//
|
||||
// newPasswTextBox
|
||||
//
|
||||
resources.ApplyResources(this.newPasswTextBox, "newPasswTextBox");
|
||||
this.newPasswTextBox.Name = "newPasswTextBox";
|
||||
this.newPasswTextBox.UseSystemPasswordChar = true;
|
||||
this.newPasswTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.newPasswTextBox_KeyPress);
|
||||
//
|
||||
// newPasswVerifTextBox
|
||||
//
|
||||
resources.ApplyResources(this.newPasswVerifTextBox, "newPasswVerifTextBox");
|
||||
this.newPasswVerifTextBox.Name = "newPasswVerifTextBox";
|
||||
this.newPasswVerifTextBox.UseSystemPasswordChar = true;
|
||||
this.newPasswVerifTextBox.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.newPasswVerifTextBox_KeyPress);
|
||||
//
|
||||
// newPasswLabel
|
||||
//
|
||||
resources.ApplyResources(this.newPasswLabel, "newPasswLabel");
|
||||
this.newPasswLabel.Name = "newPasswLabel";
|
||||
//
|
||||
// newPasswVerifLabel
|
||||
//
|
||||
resources.ApplyResources(this.newPasswVerifLabel, "newPasswVerifLabel");
|
||||
this.newPasswVerifLabel.Name = "newPasswVerifLabel";
|
||||
//
|
||||
// PasswordChangeDlg
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.cancelButton;
|
||||
this.Controls.Add(this.newPasswVerifLabel);
|
||||
this.Controls.Add(this.newPasswLabel);
|
||||
this.Controls.Add(this.newPasswVerifTextBox);
|
||||
this.Controls.Add(this.newPasswTextBox);
|
||||
this.Controls.Add(this.userNameTextBox);
|
||||
this.Controls.Add(this.okButton);
|
||||
this.Controls.Add(this.cancelButton);
|
||||
this.Controls.Add(this.oldPasswTextBox);
|
||||
this.Controls.Add(this.oldPasswLabel);
|
||||
this.Controls.Add(this.userNameLabel);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Name = "PasswordChangeDlg";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.Load += new System.EventHandler(this.LoginDlg_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label userNameLabel;
|
||||
private System.Windows.Forms.Label oldPasswLabel;
|
||||
private System.Windows.Forms.TextBox userNameTextBox;
|
||||
private System.Windows.Forms.TextBox oldPasswTextBox;
|
||||
private System.Windows.Forms.Button cancelButton;
|
||||
private System.Windows.Forms.Button okButton;
|
||||
private System.Windows.Forms.TextBox newPasswTextBox;
|
||||
private System.Windows.Forms.TextBox newPasswVerifTextBox;
|
||||
private System.Windows.Forms.Label newPasswLabel;
|
||||
private System.Windows.Forms.Label newPasswVerifLabel;
|
||||
}
|
||||
}
|
||||
@ -1,187 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
using GemCard;
|
||||
using Users.Resources;
|
||||
using System.Drawing;
|
||||
|
||||
namespace Users.Forms
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides login dialog as well as user authorization using TBF.User.Authorize(...)
|
||||
/// (i.e. when DialogResult is OK, user was authorized).
|
||||
/// </summary>
|
||||
public partial class PasswordChangeDlg : Form
|
||||
{
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public PasswordChangeDlg()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor with a predefined user.
|
||||
/// </summary>
|
||||
public PasswordChangeDlg(string predefinedUser)
|
||||
{
|
||||
InitializeComponent();
|
||||
userNameTextBox.Text = predefinedUser;
|
||||
}
|
||||
|
||||
|
||||
private void LoginDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
Localize();
|
||||
|
||||
if (string.IsNullOrEmpty(userNameTextBox.Text))
|
||||
{
|
||||
userNameTextBox.Enabled = true;
|
||||
userNameTextBox.Select();
|
||||
}
|
||||
else
|
||||
{
|
||||
oldPasswTextBox.Select();
|
||||
}
|
||||
}
|
||||
|
||||
void Localize()
|
||||
{
|
||||
Text = Strings.Change_your_password_please;
|
||||
userNameLabel.Text = Strings.User_name;
|
||||
oldPasswLabel.Text = Strings.Old_password;
|
||||
newPasswLabel.Text = Strings.New_password;
|
||||
newPasswVerifLabel.Text = Strings.New_password_verification;
|
||||
okButton.Text = Strings.OkBtnText;
|
||||
cancelButton.Text = Strings.CancelBtnText;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Try to authorize the user when OK clicked.
|
||||
/// </summary>
|
||||
private void okButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
string userName = userNameTextBox.Text;
|
||||
string oldPassword = oldPasswTextBox.Text;
|
||||
|
||||
if (Entities.User.IsPowerUser(userName, oldPassword))
|
||||
{
|
||||
MessageBox.Show(Strings.Power_user_cannot_change_its_password, Strings.Warning, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
string explanation;
|
||||
if (newPasswTextBox.Text != newPasswVerifTextBox.Text)
|
||||
{
|
||||
MessageBox.Show(Strings.New_password_and_its_verification_are_different, Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Hand);
|
||||
DialogResult = DialogResult.None;
|
||||
return;
|
||||
}
|
||||
else if (!Entities.User.IsPasswordMeetsRequirements(newPasswTextBox.Text, out explanation))
|
||||
{
|
||||
MessageBox.Show(Strings.Password_does_not_meet_requirements + Environment.NewLine + explanation,
|
||||
Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Hand);
|
||||
DialogResult = DialogResult.None;
|
||||
return;
|
||||
}
|
||||
|
||||
Entities.AuthorizedAs authorizedAs = Entities.AuthorizedAs.RemoteUser;
|
||||
Users.Entities.User loadedUser = null;
|
||||
///
|
||||
bool oldPasswdOK = false;
|
||||
if (!oldPasswdOK)
|
||||
{
|
||||
DBSettings[] dbs = new DBSettings[] { GlobalData.RemoteUsersDB, GlobalData.LocalUsersDB };
|
||||
|
||||
foreach (var db in dbs)
|
||||
{
|
||||
try
|
||||
{
|
||||
loadedUser = Users.Entities.User.LoadUserByName(userName, db);
|
||||
if (loadedUser != null)
|
||||
{
|
||||
oldPasswdOK = (userName == loadedUser.UserName) && loadedUser.IsCorrectPassword(oldPassword);
|
||||
}
|
||||
}
|
||||
catch (Exception) { }
|
||||
|
||||
if (oldPasswdOK) break;
|
||||
|
||||
authorizedAs = Entities.AuthorizedAs.LocalUser;
|
||||
}
|
||||
}
|
||||
|
||||
if (oldPasswdOK && (UsersDB.CurrentSession != null) && (UsersDB.CurrentSession.IsOpen))
|
||||
{
|
||||
if (loadedUser.IsPasswordUsedInPast(newPasswTextBox.Text))
|
||||
{
|
||||
MessageBox.Show(Strings.Password_has_been_used_in_past, Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Hand);
|
||||
DialogResult = DialogResult.None;
|
||||
return;
|
||||
}
|
||||
|
||||
///
|
||||
/// Now the password is changed in database that was used to authorize the user
|
||||
///
|
||||
loadedUser.SetPassword(newPasswTextBox.Text);
|
||||
UsersDB.CurrentSession.SaveOrUpdate(loadedUser);
|
||||
UsersDB.CurrentSession.Flush();
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
MessageBox.Show(Strings.Invalid_username_or_password, Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Hand);
|
||||
DialogResult = DialogResult.None;
|
||||
return;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cancel clicked, do not try to authorize.
|
||||
/// </summary>
|
||||
private void cancelButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
DialogResult = DialogResult.Cancel;
|
||||
Close();
|
||||
return;
|
||||
}
|
||||
|
||||
private void userNameTextBox_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (Convert.ToInt32(e.KeyChar) == 13)
|
||||
{
|
||||
oldPasswTextBox.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
private void passwordTextBox_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (Convert.ToInt32(e.KeyChar) == 13)
|
||||
{
|
||||
newPasswTextBox.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
private void newPasswTextBox_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (Convert.ToInt32(e.KeyChar) == 13)
|
||||
{
|
||||
newPasswVerifTextBox.Focus();
|
||||
}
|
||||
}
|
||||
|
||||
private void newPasswVerifTextBox_KeyPress(object sender, KeyPressEventArgs e)
|
||||
{
|
||||
if (Convert.ToInt32(e.KeyChar) == 13)
|
||||
{
|
||||
okButton_Click(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,411 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="userNameLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="userNameLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>11, 24</value>
|
||||
</data>
|
||||
<data name="userNameLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>58, 13</value>
|
||||
</data>
|
||||
<data name="userNameLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="userNameLabel.Text" xml:space="preserve">
|
||||
<value>User name</value>
|
||||
</data>
|
||||
<data name=">>userNameLabel.Name" xml:space="preserve">
|
||||
<value>userNameLabel</value>
|
||||
</data>
|
||||
<data name=">>userNameLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>userNameLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>userNameLabel.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="oldPasswLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="oldPasswLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>11, 51</value>
|
||||
</data>
|
||||
<data name="oldPasswLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>71, 13</value>
|
||||
</data>
|
||||
<data name="oldPasswLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="oldPasswLabel.Text" xml:space="preserve">
|
||||
<value>Old password</value>
|
||||
</data>
|
||||
<data name=">>oldPasswLabel.Name" xml:space="preserve">
|
||||
<value>oldPasswLabel</value>
|
||||
</data>
|
||||
<data name=">>oldPasswLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>oldPasswLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>oldPasswLabel.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="oldPasswTextBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="oldPasswTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>150, 48</value>
|
||||
</data>
|
||||
<data name="oldPasswTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 20</value>
|
||||
</data>
|
||||
<data name="oldPasswTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name=">>oldPasswTextBox.Name" xml:space="preserve">
|
||||
<value>oldPasswTextBox</value>
|
||||
</data>
|
||||
<data name=">>oldPasswTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>oldPasswTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>oldPasswTextBox.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="cancelButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="cancelButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>336, 48</value>
|
||||
</data>
|
||||
<data name="cancelButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name="cancelButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="cancelButton.Text" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Name" xml:space="preserve">
|
||||
<value>cancelButton</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>cancelButton.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="okButton.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="okButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>336, 14</value>
|
||||
</data>
|
||||
<data name="okButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>105, 28</value>
|
||||
</data>
|
||||
<data name="okButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="okButton.Text" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name=">>okButton.Name" xml:space="preserve">
|
||||
<value>okButton</value>
|
||||
</data>
|
||||
<data name=">>okButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>okButton.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>okButton.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.Enabled" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>150, 22</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 20</value>
|
||||
</data>
|
||||
<data name="userNameTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.Name" xml:space="preserve">
|
||||
<value>userNameTextBox</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>userNameTextBox.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="newPasswTextBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="newPasswTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>150, 74</value>
|
||||
</data>
|
||||
<data name="newPasswTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 20</value>
|
||||
</data>
|
||||
<data name="newPasswTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name=">>newPasswTextBox.Name" xml:space="preserve">
|
||||
<value>newPasswTextBox</value>
|
||||
</data>
|
||||
<data name=">>newPasswTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>newPasswTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>newPasswTextBox.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name="newPasswVerifTextBox.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms">
|
||||
<value>Top, Right</value>
|
||||
</data>
|
||||
<data name="newPasswVerifTextBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>150, 100</value>
|
||||
</data>
|
||||
<data name="newPasswVerifTextBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>168, 20</value>
|
||||
</data>
|
||||
<data name="newPasswVerifTextBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name=">>newPasswVerifTextBox.Name" xml:space="preserve">
|
||||
<value>newPasswVerifTextBox</value>
|
||||
</data>
|
||||
<data name=">>newPasswVerifTextBox.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>newPasswVerifTextBox.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>newPasswVerifTextBox.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="newPasswLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="newPasswLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="newPasswLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>11, 77</value>
|
||||
</data>
|
||||
<data name="newPasswLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>77, 13</value>
|
||||
</data>
|
||||
<data name="newPasswLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="newPasswLabel.Text" xml:space="preserve">
|
||||
<value>New password</value>
|
||||
</data>
|
||||
<data name=">>newPasswLabel.Name" xml:space="preserve">
|
||||
<value>newPasswLabel</value>
|
||||
</data>
|
||||
<data name=">>newPasswLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>newPasswLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>newPasswLabel.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="newPasswVerifLabel.AutoSize" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="newPasswVerifLabel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="newPasswVerifLabel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>12, 103</value>
|
||||
</data>
|
||||
<data name="newPasswVerifLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>77, 13</value>
|
||||
</data>
|
||||
<data name="newPasswVerifLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="newPasswVerifLabel.Text" xml:space="preserve">
|
||||
<value>New password</value>
|
||||
</data>
|
||||
<data name=">>newPasswVerifLabel.Name" xml:space="preserve">
|
||||
<value>newPasswVerifLabel</value>
|
||||
</data>
|
||||
<data name=">>newPasswVerifLabel.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>newPasswVerifLabel.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>newPasswVerifLabel.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>456, 134</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
<value>CenterScreen</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>Password change</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>PasswordChangeDlg</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -1,315 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Windows.Forms;
|
||||
using NHibernate;
|
||||
using Users.Entities;
|
||||
using Users.Resources;
|
||||
|
||||
|
||||
namespace Users.Forms
|
||||
{
|
||||
public enum MySortOrder
|
||||
{
|
||||
None,
|
||||
Ascending, /// Th esame like SortOrder.Ascending
|
||||
Descending, /// The same like SortOrder.Descending
|
||||
Ascending2, /// Sorts by a surname in ascending order in case or 'Name Surname' column
|
||||
Descending2, /// Sorts by a surname in descending order in case or 'Name Surname' column
|
||||
}
|
||||
|
||||
public partial class UserManagementDlg: Form
|
||||
{
|
||||
const int UserNumberColumn = 1;
|
||||
const int NameSurnameColumn = 2;
|
||||
|
||||
|
||||
IList<Group> displayedGroups;
|
||||
public string TitleExtension;
|
||||
|
||||
|
||||
NHibernate.ISession session;
|
||||
bool showExtensions;
|
||||
IList<User> listOfUsers;
|
||||
int lastSelectedIndex;
|
||||
|
||||
MySortOrder sortOrder = MySortOrder.Ascending;
|
||||
int sortColumn = -1; /// 0-based index of column to be used for sorting
|
||||
|
||||
|
||||
public UserManagementDlg(NHibernate.ISession session, bool showLocalExtensions)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.session = session;
|
||||
this.showExtensions = showLocalExtensions;
|
||||
if (showLocalExtensions) copyFromRemoteButton.Visible = true;
|
||||
|
||||
try
|
||||
{
|
||||
IList<Group> allGroups = session.QueryOver<Group>().List();
|
||||
|
||||
///
|
||||
/// Selects groups to be displayed (so that each GID is present only once)
|
||||
///
|
||||
Group[] dspGroups = new Group[(int)Users.Entities.GID.NrOfGroups];
|
||||
foreach (var group in allGroups)
|
||||
{
|
||||
if ((group.GID >= 0) && (group.GID < Users.Entities.GID.NrOfGroups) && (dspGroups[(int)group.GID] == null))
|
||||
{
|
||||
dspGroups[(int)group.GID] = group;
|
||||
}
|
||||
}
|
||||
displayedGroups = new List<Group>();
|
||||
foreach (var group in dspGroups)
|
||||
{
|
||||
if (group != null) displayedGroups.Add(group);
|
||||
}
|
||||
|
||||
listOfUsers = session.QueryOver<User>().List();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
if (displayedGroups == null) displayedGroups = new List<Group>();
|
||||
if (listOfUsers == null) listOfUsers = new List<User>();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void UserManagementDlg_Load(object sender, EventArgs e)
|
||||
{
|
||||
/// Program version string
|
||||
Version ver = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
|
||||
string version = string.Format("{0}.{1}.{2}", ver.Major, ver.Minor, ver.Build);
|
||||
|
||||
Text = string.Format(string.IsNullOrEmpty(TitleExtension) ? "{0} ver.{1}" : "{0} ver.{1} : {2}", Strings.User_Management, version, TitleExtension);
|
||||
addButton.Text = Strings.AddBtnText;
|
||||
editButton.Text = Strings.EditBtnText;
|
||||
deleteButton.Text = Strings.RemoveBtnText;
|
||||
closeButton.Text = Strings.CloseBtnText;
|
||||
|
||||
listViewUsers.Columns.Add(Strings.User_name, 100); /// column 0
|
||||
listViewUsers.Columns.Add(Strings.User_code, 70); /// column 1: UserNumberColumn
|
||||
listViewUsers.Columns.Add(Strings.Full_name, 150); /// column 2: NameSurnameColumn
|
||||
listViewUsers.Columns.Add(Strings.Tag, 110);
|
||||
listViewUsers.Columns.Add(Strings.Groups, 370);
|
||||
|
||||
ListUsers();
|
||||
}
|
||||
|
||||
public void ListUsers()
|
||||
{
|
||||
listViewUsers.Items.Clear();
|
||||
foreach (User u in listOfUsers)
|
||||
{
|
||||
ListViewItem item = new ListViewItem(u.UserName);
|
||||
item.Tag = u;
|
||||
item.SubItems.Add(u.Number.ToString());
|
||||
item.SubItems.Add(u.FullName);
|
||||
item.SubItems.Add(string.IsNullOrEmpty(u.Tag) ? string.Empty : u.Tag);
|
||||
|
||||
/// Show groups of this user
|
||||
string grps = string.Empty;
|
||||
foreach (var group in displayedGroups)
|
||||
{
|
||||
if (u.IsMemberOf(group.GID))
|
||||
{
|
||||
if (!string.IsNullOrEmpty(grps)) grps += ", ";
|
||||
grps += group.Gid2Str();
|
||||
}
|
||||
}
|
||||
item.SubItems.Add(grps);
|
||||
|
||||
this.listViewUsers.Items.Add(item);
|
||||
}
|
||||
this.listViewUsers.Refresh();
|
||||
}
|
||||
|
||||
private void closeButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
|
||||
private void RefreshButtonStates()
|
||||
{
|
||||
editButton.Enabled = (listViewUsers.SelectedItems.Count > 0);
|
||||
deleteButton.Enabled = (listViewUsers.SelectedItems.Count > 0);
|
||||
}
|
||||
|
||||
private void listViewUsers_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
RefreshButtonStates();
|
||||
if (listViewUsers.SelectedItems.Count > 0)
|
||||
{
|
||||
lastSelectedIndex = listViewUsers.SelectedItems[0].Index;
|
||||
}
|
||||
else
|
||||
{
|
||||
lastSelectedIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void listViewUsers_ColumnClick(object sender, ColumnClickEventArgs e)
|
||||
{
|
||||
if (e.Column == sortColumn)
|
||||
{
|
||||
/// Clicked on the same column header => increment to the next applicable MySortOrder
|
||||
if (e.Column == NameSurnameColumn)
|
||||
{
|
||||
sortOrder++;
|
||||
if (sortOrder > MySortOrder.Descending2) sortOrder = MySortOrder.Ascending;
|
||||
}
|
||||
else
|
||||
{
|
||||
sortOrder = (sortOrder == MySortOrder.Ascending) ? MySortOrder.Descending : MySortOrder.Ascending;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/// Clicked on another column header => set sortOrder to MySortOrder.Ascending
|
||||
sortColumn = e.Column;
|
||||
sortOrder = MySortOrder.Ascending;
|
||||
}
|
||||
|
||||
if (sortColumn == UserNumberColumn)
|
||||
{
|
||||
listViewUsers.ListViewItemSorter = new LviIntColumnComparer(sortColumn, sortOrder);
|
||||
}
|
||||
else if (sortColumn == NameSurnameColumn)
|
||||
{
|
||||
listViewUsers.ListViewItemSorter = new LviNameSurnameColumnComparer(sortColumn, sortOrder);
|
||||
}
|
||||
else
|
||||
{
|
||||
listViewUsers.ListViewItemSorter = new LviTextColumnComparer(sortColumn, sortOrder);
|
||||
}
|
||||
|
||||
listViewUsers.SetSortIcon(sortColumn, sortOrder);
|
||||
listViewUsers.Sort();
|
||||
}
|
||||
|
||||
private void editButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewUsers.SelectedItems.Count == 1 && listViewUsers.SelectedItems[0].Tag is User)
|
||||
{
|
||||
new Forms.EditSelectedUser(session, (User)listViewUsers.SelectedItems[0].Tag, displayedGroups).ShowDialog();
|
||||
ListUsers();
|
||||
}
|
||||
}
|
||||
|
||||
private void listViewUsers_DoubleClick(object sender, EventArgs e)
|
||||
{
|
||||
editButton_Click (sender, e);
|
||||
}
|
||||
|
||||
private void addButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
User newUser = new User();
|
||||
if (new Forms.EditSelectedUser(session, newUser, displayedGroups).ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
listOfUsers.Add(newUser);
|
||||
}
|
||||
ListUsers();
|
||||
}
|
||||
|
||||
private void deleteButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (listViewUsers.SelectedItems.Count == 1 && listViewUsers.SelectedItems[0].Tag is User)
|
||||
{
|
||||
User selecteduser = session.Get<User>((listViewUsers.SelectedItems[0].Tag as User).Id);
|
||||
session.Delete(selecteduser);
|
||||
session.Flush();
|
||||
listOfUsers.RemoveAt(listViewUsers.SelectedIndices[0]);
|
||||
ListUsers();
|
||||
}
|
||||
}
|
||||
|
||||
private void copyFromRemoteButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (GlobalData.RemoteUsersDB == null || string.IsNullOrEmpty(GlobalData.RemoteUsersDB.ConnectionString) ||
|
||||
GlobalData.LocalUsersDB == null || string.IsNullOrEmpty(GlobalData.LocalUsersDB.ConnectionString))
|
||||
{
|
||||
MessageBox.Show(Strings.No_remote_database_of_users, Strings.Error, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
|
||||
return;
|
||||
}
|
||||
|
||||
if (MessageBox.Show(Strings.Are_you_sure, Strings.Warning, MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) != DialogResult.Yes)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
IList<User> remoteUsers;
|
||||
IList<Group> remoteGroups;
|
||||
ITransaction transaction = null;
|
||||
|
||||
try
|
||||
{
|
||||
///
|
||||
/// Create remote DB session and read remote users
|
||||
///
|
||||
UsersDB.DbType = GlobalData.RemoteUsersDB.DbType;
|
||||
UsersDB.ConnectionString = GlobalData.RemoteUsersDB.ConnectionString;
|
||||
ISession remoteSession = UsersDB.CreateSession();
|
||||
remoteUsers = remoteSession.QueryOver<User>().List();
|
||||
remoteGroups = remoteSession.QueryOver<Group>().List();
|
||||
|
||||
///
|
||||
/// Prepare local DB session
|
||||
///
|
||||
UsersDB.DbType = GlobalData.LocalUsersDB.DbType;
|
||||
UsersDB.ConnectionString = GlobalData.LocalUsersDB.ConnectionString;
|
||||
ISession localSession = UsersDB.CreateSession();
|
||||
transaction = localSession.BeginTransaction();
|
||||
|
||||
///
|
||||
/// Delete all local users
|
||||
///
|
||||
IList<User> users = localSession.QueryOver<User>().List();
|
||||
foreach (var user in users) localSession.Delete(user);
|
||||
IList<Group> groups = localSession.QueryOver<Group>().List();
|
||||
foreach (var group in groups) localSession.Delete(group);
|
||||
|
||||
///
|
||||
/// Save all remote users to the local DB
|
||||
///
|
||||
IList<User> newUsers = new List<User>();
|
||||
IList<Group> newGroups = new List<Group>();
|
||||
foreach (var user in remoteUsers)
|
||||
{
|
||||
User newUser = (User)user.Clone();
|
||||
newUsers.Add(newUser);
|
||||
foreach (var group in user.Groups)
|
||||
{
|
||||
Group newGroup = new Group(group.GID);
|
||||
newUser.AddGroup(newGroup);
|
||||
}
|
||||
|
||||
localSession.SaveOrUpdate(newUser);
|
||||
}
|
||||
transaction.Commit();
|
||||
localSession.Flush();
|
||||
|
||||
listOfUsers = newUsers;
|
||||
ListUsers();
|
||||
|
||||
MessageBox.Show(string.Format(Strings.N_users_copied, remoteUsers.Count),
|
||||
Strings.Confirmation,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Information);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
if (transaction != null) transaction.Rollback();
|
||||
|
||||
MessageBox.Show(Strings.Copying_remote_users_failed,
|
||||
Strings.Confirmation,
|
||||
MessageBoxButtons.OK,
|
||||
MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
148
Users/Forms/UserManagementDlg.designer.cs
generated
148
Users/Forms/UserManagementDlg.designer.cs
generated
@ -1,148 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2017 Sensus Metering Systems
|
||||
///
|
||||
namespace Users.Forms
|
||||
{
|
||||
partial class UserManagementDlg
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(UserManagementDlg));
|
||||
this.listViewUsers = new System.Windows.Forms.ListView();
|
||||
this.addButton = new System.Windows.Forms.Button();
|
||||
this.editButton = new System.Windows.Forms.Button();
|
||||
this.deleteButton = new System.Windows.Forms.Button();
|
||||
this.closeButton = new System.Windows.Forms.Button();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
|
||||
this.copyFromRemoteButton = new System.Windows.Forms.Button();
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
|
||||
this.splitContainer1.Panel1.SuspendLayout();
|
||||
this.splitContainer1.Panel2.SuspendLayout();
|
||||
this.splitContainer1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// listViewUsers
|
||||
//
|
||||
resources.ApplyResources(this.listViewUsers, "listViewUsers");
|
||||
this.listViewUsers.FullRowSelect = true;
|
||||
this.listViewUsers.GridLines = true;
|
||||
this.listViewUsers.MultiSelect = false;
|
||||
this.listViewUsers.Name = "listViewUsers";
|
||||
this.listViewUsers.UseCompatibleStateImageBehavior = false;
|
||||
this.listViewUsers.View = System.Windows.Forms.View.Details;
|
||||
this.listViewUsers.ColumnClick += new System.Windows.Forms.ColumnClickEventHandler(this.listViewUsers_ColumnClick);
|
||||
this.listViewUsers.SelectedIndexChanged += new System.EventHandler(this.listViewUsers_SelectedIndexChanged);
|
||||
this.listViewUsers.DoubleClick += new System.EventHandler(this.listViewUsers_DoubleClick);
|
||||
//
|
||||
// addButton
|
||||
//
|
||||
resources.ApplyResources(this.addButton, "addButton");
|
||||
this.addButton.Name = "addButton";
|
||||
this.addButton.UseVisualStyleBackColor = true;
|
||||
this.addButton.Click += new System.EventHandler(this.addButton_Click);
|
||||
//
|
||||
// editButton
|
||||
//
|
||||
resources.ApplyResources(this.editButton, "editButton");
|
||||
this.editButton.Name = "editButton";
|
||||
this.editButton.UseVisualStyleBackColor = true;
|
||||
this.editButton.Click += new System.EventHandler(this.editButton_Click);
|
||||
//
|
||||
// deleteButton
|
||||
//
|
||||
resources.ApplyResources(this.deleteButton, "deleteButton");
|
||||
this.deleteButton.Name = "deleteButton";
|
||||
this.deleteButton.UseVisualStyleBackColor = true;
|
||||
this.deleteButton.Click += new System.EventHandler(this.deleteButton_Click);
|
||||
//
|
||||
// closeButton
|
||||
//
|
||||
resources.ApplyResources(this.closeButton, "closeButton");
|
||||
this.closeButton.Name = "closeButton";
|
||||
this.closeButton.UseVisualStyleBackColor = true;
|
||||
this.closeButton.Click += new System.EventHandler(this.closeButton_Click);
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
resources.ApplyResources(this.statusStrip1, "statusStrip1");
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
//
|
||||
// splitContainer1
|
||||
//
|
||||
resources.ApplyResources(this.splitContainer1, "splitContainer1");
|
||||
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
|
||||
this.splitContainer1.Name = "splitContainer1";
|
||||
//
|
||||
// splitContainer1.Panel1
|
||||
//
|
||||
this.splitContainer1.Panel1.Controls.Add(this.listViewUsers);
|
||||
//
|
||||
// splitContainer1.Panel2
|
||||
//
|
||||
this.splitContainer1.Panel2.Controls.Add(this.copyFromRemoteButton);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.addButton);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.editButton);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.closeButton);
|
||||
this.splitContainer1.Panel2.Controls.Add(this.deleteButton);
|
||||
//
|
||||
// copyFromRemoteButton
|
||||
//
|
||||
resources.ApplyResources(this.copyFromRemoteButton, "copyFromRemoteButton");
|
||||
this.copyFromRemoteButton.Name = "copyFromRemoteButton";
|
||||
this.copyFromRemoteButton.UseVisualStyleBackColor = true;
|
||||
this.copyFromRemoteButton.Click += new System.EventHandler(this.copyFromRemoteButton_Click);
|
||||
//
|
||||
// UserManagementDlg
|
||||
//
|
||||
resources.ApplyResources(this, "$this");
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.splitContainer1);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Name = "UserManagementDlg";
|
||||
this.Load += new System.EventHandler(this.UserManagementDlg_Load);
|
||||
this.splitContainer1.Panel1.ResumeLayout(false);
|
||||
this.splitContainer1.Panel2.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
|
||||
this.splitContainer1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.ListView listViewUsers;
|
||||
private System.Windows.Forms.Button addButton;
|
||||
private System.Windows.Forms.Button editButton;
|
||||
private System.Windows.Forms.Button deleteButton;
|
||||
private System.Windows.Forms.Button closeButton;
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
private System.Windows.Forms.SplitContainer splitContainer1;
|
||||
private System.Windows.Forms.Button copyFromRemoteButton;
|
||||
}
|
||||
}
|
||||
@ -1,372 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="listViewUsers.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="listViewUsers.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name="listViewUsers.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>821, 502</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="listViewUsers.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>listViewUsers.Name" xml:space="preserve">
|
||||
<value>listViewUsers</value>
|
||||
</data>
|
||||
<data name=">>listViewUsers.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.ListView, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>listViewUsers.Parent" xml:space="preserve">
|
||||
<value>splitContainer1.Panel1</value>
|
||||
</data>
|
||||
<data name=">>listViewUsers.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="addButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>23, 85</value>
|
||||
</data>
|
||||
<data name="addButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>85, 40</value>
|
||||
</data>
|
||||
<data name="addButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="addButton.Text" xml:space="preserve">
|
||||
<value>Add</value>
|
||||
</data>
|
||||
<data name=">>addButton.Name" xml:space="preserve">
|
||||
<value>addButton</value>
|
||||
</data>
|
||||
<data name=">>addButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>addButton.Parent" xml:space="preserve">
|
||||
<value>splitContainer1.Panel2</value>
|
||||
</data>
|
||||
<data name=">>addButton.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="editButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>23, 130</value>
|
||||
</data>
|
||||
<data name="editButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>85, 40</value>
|
||||
</data>
|
||||
<data name="editButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="editButton.Text" xml:space="preserve">
|
||||
<value>Edit</value>
|
||||
</data>
|
||||
<data name=">>editButton.Name" xml:space="preserve">
|
||||
<value>editButton</value>
|
||||
</data>
|
||||
<data name=">>editButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>editButton.Parent" xml:space="preserve">
|
||||
<value>splitContainer1.Panel2</value>
|
||||
</data>
|
||||
<data name=">>editButton.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="deleteButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>23, 175</value>
|
||||
</data>
|
||||
<data name="deleteButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>85, 40</value>
|
||||
</data>
|
||||
<data name="deleteButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="deleteButton.Text" xml:space="preserve">
|
||||
<value>Delete</value>
|
||||
</data>
|
||||
<data name=">>deleteButton.Name" xml:space="preserve">
|
||||
<value>deleteButton</value>
|
||||
</data>
|
||||
<data name=">>deleteButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>deleteButton.Parent" xml:space="preserve">
|
||||
<value>splitContainer1.Panel2</value>
|
||||
</data>
|
||||
<data name=">>deleteButton.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="closeButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>23, 18</value>
|
||||
</data>
|
||||
<data name="closeButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>85, 40</value>
|
||||
</data>
|
||||
<data name="closeButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="closeButton.Text" xml:space="preserve">
|
||||
<value>Close</value>
|
||||
</data>
|
||||
<data name=">>closeButton.Name" xml:space="preserve">
|
||||
<value>closeButton</value>
|
||||
</data>
|
||||
<data name=">>closeButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>closeButton.Parent" xml:space="preserve">
|
||||
<value>splitContainer1.Panel2</value>
|
||||
</data>
|
||||
<data name=">>closeButton.ZOrder" xml:space="preserve">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<data name="statusStrip1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 502</value>
|
||||
</data>
|
||||
<data name="statusStrip1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>956, 22</value>
|
||||
</data>
|
||||
<data name="statusStrip1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="statusStrip1.Text" xml:space="preserve">
|
||||
<value>statusStrip1</value>
|
||||
</data>
|
||||
<data name=">>statusStrip1.Name" xml:space="preserve">
|
||||
<value>statusStrip1</value>
|
||||
</data>
|
||||
<data name=">>statusStrip1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.StatusStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>statusStrip1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>statusStrip1.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="splitContainer1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
</data>
|
||||
<data name="splitContainer1.IsSplitterFixed" type="System.Boolean, mscorlib">
|
||||
<value>True</value>
|
||||
</data>
|
||||
<data name="splitContainer1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel1.Name" xml:space="preserve">
|
||||
<value>splitContainer1.Panel1</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel1.Parent" xml:space="preserve">
|
||||
<value>splitContainer1</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="copyFromRemoteButton.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
|
||||
<value>NoControl</value>
|
||||
</data>
|
||||
<data name="copyFromRemoteButton.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>23, 243</value>
|
||||
</data>
|
||||
<data name="copyFromRemoteButton.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>85, 40</value>
|
||||
</data>
|
||||
<data name="copyFromRemoteButton.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="copyFromRemoteButton.Text" xml:space="preserve">
|
||||
<value>Copy all users from remote</value>
|
||||
</data>
|
||||
<data name="copyFromRemoteButton.Visible" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name=">>copyFromRemoteButton.Name" xml:space="preserve">
|
||||
<value>copyFromRemoteButton</value>
|
||||
</data>
|
||||
<data name=">>copyFromRemoteButton.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>copyFromRemoteButton.Parent" xml:space="preserve">
|
||||
<value>splitContainer1.Panel2</value>
|
||||
</data>
|
||||
<data name=">>copyFromRemoteButton.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel2.Name" xml:space="preserve">
|
||||
<value>splitContainer1.Panel2</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel2.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitterPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel2.Parent" xml:space="preserve">
|
||||
<value>splitContainer1</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Panel2.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="splitContainer1.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>956, 502</value>
|
||||
</data>
|
||||
<data name="splitContainer1.SplitterDistance" type="System.Int32, mscorlib">
|
||||
<value>821</value>
|
||||
</data>
|
||||
<data name="splitContainer1.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>3</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Name" xml:space="preserve">
|
||||
<value>splitContainer1</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.SplitContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.Parent" xml:space="preserve">
|
||||
<value>$this</value>
|
||||
</data>
|
||||
<data name=">>splitContainer1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
</data>
|
||||
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
|
||||
<value>956, 524</value>
|
||||
</data>
|
||||
<data name="$this.Text" xml:space="preserve">
|
||||
<value>User Management</value>
|
||||
</data>
|
||||
<data name=">>$this.Name" xml:space="preserve">
|
||||
<value>UserManagementDlg</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -1,25 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2016-2019 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
|
||||
namespace Users
|
||||
{
|
||||
public class GlobalData
|
||||
{
|
||||
public static DBSettings RemoteUsersDB = null;
|
||||
public static DBSettings LocalUsersDB = null;
|
||||
|
||||
public static Entities.User CurrentUser;
|
||||
public static Entities.AuthorizedAs AuthorizedAs;
|
||||
public static DateTime LastAuthorization = DateTime.Now;
|
||||
|
||||
public static int MinPasswdLength = 0;
|
||||
public static int PasswdExpirationPeriodDays = 0;
|
||||
|
||||
public static string GetCurrentUserName()
|
||||
{
|
||||
return (CurrentUser != null) ? CurrentUser.UserName : string.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,24 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2016-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using FluentNHibernate.Mapping;
|
||||
|
||||
namespace Users.Mappings
|
||||
{
|
||||
class GroupMap : ClassMap<Entities.Group>
|
||||
{
|
||||
/// <seealso>
|
||||
/// https://stackoverflow.com/questions/9108083/fluent-nhibernate-many-to-many-mapping-way/9125059
|
||||
/// </seealso>
|
||||
public GroupMap()
|
||||
{
|
||||
Id(x => x.Id);
|
||||
Map(x => x.GID).Column("Name");
|
||||
Map(x => x.AccessFlags);
|
||||
HasManyToMany(x => x.Users)
|
||||
.Cascade.SaveUpdate()
|
||||
.Inverse()
|
||||
.Table("UsersGroups");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,29 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2016-2020 Sensus Slovensko a.s.
|
||||
///
|
||||
using FluentNHibernate.Mapping;
|
||||
|
||||
namespace Users.Mappings
|
||||
{
|
||||
class UserMap : ClassMap<Entities.User>
|
||||
{
|
||||
public UserMap()
|
||||
{
|
||||
Id(x => x.Id);
|
||||
Map(x => x.UserName)
|
||||
.Column("Name");
|
||||
Map(x => x.Number);
|
||||
Map(x => x.Tag);
|
||||
Map(x => x.Password);
|
||||
Map(x => x.Password2);
|
||||
Map(x => x.Password3);
|
||||
Map(x => x.Password4);
|
||||
Map(x => x.FullName)
|
||||
.Column("Description");
|
||||
Map(x => x.LastPwChange);
|
||||
HasManyToMany(x => x.Groups)
|
||||
.Cascade.SaveUpdate()
|
||||
.Table("UsersGroups");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,36 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Users")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Users")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018-2019")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("f05db1fc-0a24-4319-802b-d13e9a4b7efe")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("3.1.1464.0")]
|
||||
[assembly: AssemblyFileVersion("3.1.1464.0")]
|
||||
522
Users/Resources/Strings.Designer.cs
generated
522
Users/Resources/Strings.Designer.cs
generated
@ -1,522 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Users.Resources {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Strings {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Strings() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Users.Resources.Strings", typeof(Strings).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Add.
|
||||
/// </summary>
|
||||
internal static string AddBtnText {
|
||||
get {
|
||||
return ResourceManager.GetString("AddBtnText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to administrator.
|
||||
/// </summary>
|
||||
internal static string administrator {
|
||||
get {
|
||||
return ResourceManager.GetString("administrator", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Are you sure?.
|
||||
/// </summary>
|
||||
internal static string Are_you_sure {
|
||||
get {
|
||||
return ResourceManager.GetString("Are_you_sure", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to calibration specialist.
|
||||
/// </summary>
|
||||
internal static string calibration_specialist {
|
||||
get {
|
||||
return ResourceManager.GetString("calibration_specialist", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Cancel.
|
||||
/// </summary>
|
||||
internal static string CancelBtnText {
|
||||
get {
|
||||
return ResourceManager.GetString("CancelBtnText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Change your password please.
|
||||
/// </summary>
|
||||
internal static string Change_your_password_please {
|
||||
get {
|
||||
return ResourceManager.GetString("Change_your_password_please", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Close.
|
||||
/// </summary>
|
||||
internal static string CloseBtnText {
|
||||
get {
|
||||
return ResourceManager.GetString("CloseBtnText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Confirmation.
|
||||
/// </summary>
|
||||
internal static string Confirmation {
|
||||
get {
|
||||
return ResourceManager.GetString("Confirmation", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Copying remote users failed.
|
||||
/// </summary>
|
||||
internal static string Copying_remote_users_failed {
|
||||
get {
|
||||
return ResourceManager.GetString("Copying_remote_users_failed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Description.
|
||||
/// </summary>
|
||||
internal static string DescriptionColHdr {
|
||||
get {
|
||||
return ResourceManager.GetString("DescriptionColHdr", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Edit User.
|
||||
/// </summary>
|
||||
internal static string Edit_User {
|
||||
get {
|
||||
return ResourceManager.GetString("Edit_User", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Edit.
|
||||
/// </summary>
|
||||
internal static string EditBtnText {
|
||||
get {
|
||||
return ResourceManager.GetString("EditBtnText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Error.
|
||||
/// </summary>
|
||||
internal static string Error {
|
||||
get {
|
||||
return ResourceManager.GetString("Error", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Name and Surname.
|
||||
/// </summary>
|
||||
internal static string Full_name {
|
||||
get {
|
||||
return ResourceManager.GetString("Full_name", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Groups.
|
||||
/// </summary>
|
||||
internal static string Groups {
|
||||
get {
|
||||
return ResourceManager.GetString("Groups", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to head of lab..
|
||||
/// </summary>
|
||||
internal static string head_of_lab {
|
||||
get {
|
||||
return ResourceManager.GetString("head_of_lab", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to ID.
|
||||
/// </summary>
|
||||
internal static string ID {
|
||||
get {
|
||||
return ResourceManager.GetString("ID", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to invalid.
|
||||
/// </summary>
|
||||
internal static string invalid {
|
||||
get {
|
||||
return ResourceManager.GetString("invalid", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Invalid username or password.
|
||||
/// </summary>
|
||||
internal static string Invalid_username_or_password {
|
||||
get {
|
||||
return ResourceManager.GetString("Invalid_username_or_password", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to maintenance.
|
||||
/// </summary>
|
||||
internal static string maintenance {
|
||||
get {
|
||||
return ResourceManager.GetString("maintenance", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to (max. {0} alphanumeric characters).
|
||||
/// </summary>
|
||||
internal static string max_0_alphanum_chars {
|
||||
get {
|
||||
return ResourceManager.GetString("max_0_alphanum_chars", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to metrological authority.
|
||||
/// </summary>
|
||||
internal static string metrological_authority {
|
||||
get {
|
||||
return ResourceManager.GetString("metrological_authority", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to metrologist.
|
||||
/// </summary>
|
||||
internal static string metrologist {
|
||||
get {
|
||||
return ResourceManager.GetString("metrologist", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to {0} users copied.
|
||||
/// </summary>
|
||||
internal static string N_users_copied {
|
||||
get {
|
||||
return ResourceManager.GetString("N_users_copied", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Name.
|
||||
/// </summary>
|
||||
internal static string Name {
|
||||
get {
|
||||
return ResourceManager.GetString("Name", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to New password.
|
||||
/// </summary>
|
||||
internal static string New_password {
|
||||
get {
|
||||
return ResourceManager.GetString("New_password", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to New password and it's verification are different.
|
||||
/// </summary>
|
||||
internal static string New_password_and_its_verification_are_different {
|
||||
get {
|
||||
return ResourceManager.GetString("New_password_and_its_verification_are_different", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to New password verification.
|
||||
/// </summary>
|
||||
internal static string New_password_verification {
|
||||
get {
|
||||
return ResourceManager.GetString("New_password_verification", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to No remote database of users.
|
||||
/// </summary>
|
||||
internal static string No_remote_database_of_users {
|
||||
get {
|
||||
return ResourceManager.GetString("No_remote_database_of_users", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to OK.
|
||||
/// </summary>
|
||||
internal static string OkBtnText {
|
||||
get {
|
||||
return ResourceManager.GetString("OkBtnText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Old password.
|
||||
/// </summary>
|
||||
internal static string Old_password {
|
||||
get {
|
||||
return ResourceManager.GetString("Old_password", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Password.
|
||||
/// </summary>
|
||||
internal static string Password {
|
||||
get {
|
||||
return ResourceManager.GetString("Password", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Password does not meet requirements.
|
||||
/// </summary>
|
||||
internal static string Password_does_not_meet_requirements {
|
||||
get {
|
||||
return ResourceManager.GetString("Password_does_not_meet_requirements", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Password has been used in the past.
|
||||
/// </summary>
|
||||
internal static string Password_has_been_used_in_past {
|
||||
get {
|
||||
return ResourceManager.GetString("Password_has_been_used_in_past", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Password must have at least {0} characters.
|
||||
/// </summary>
|
||||
internal static string Password_must_have_at_least_0_characters {
|
||||
get {
|
||||
return ResourceManager.GetString("Password_must_have_at_least_0_characters", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Power user cannot change it's password.
|
||||
/// </summary>
|
||||
internal static string Power_user_cannot_change_its_password {
|
||||
get {
|
||||
return ResourceManager.GetString("Power_user_cannot_change_its_password", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to production tracing administrator.
|
||||
/// </summary>
|
||||
internal static string production_tracing_administrator {
|
||||
get {
|
||||
return ResourceManager.GetString("production_tracing_administrator", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Remove.
|
||||
/// </summary>
|
||||
internal static string RemoveBtnText {
|
||||
get {
|
||||
return ResourceManager.GetString("RemoveBtnText", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Repeat password.
|
||||
/// </summary>
|
||||
internal static string Repeat_password {
|
||||
get {
|
||||
return ResourceManager.GetString("Repeat_password", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Save or update user failed.
|
||||
/// </summary>
|
||||
internal static string Save_or_update_user_failed {
|
||||
get {
|
||||
return ResourceManager.GetString("Save_or_update_user_failed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to specialist.
|
||||
/// </summary>
|
||||
internal static string specialist {
|
||||
get {
|
||||
return ResourceManager.GetString("specialist", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to NFC Tag.
|
||||
/// </summary>
|
||||
internal static string Tag {
|
||||
get {
|
||||
return ResourceManager.GetString("Tag", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This NFC tag has already been taken. Please use another one..
|
||||
/// </summary>
|
||||
internal static string Tag_taken {
|
||||
get {
|
||||
return ResourceManager.GetString("Tag_taken", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to tester.
|
||||
/// </summary>
|
||||
internal static string tester {
|
||||
get {
|
||||
return ResourceManager.GetString("tester", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User code.
|
||||
/// </summary>
|
||||
internal static string User_code {
|
||||
get {
|
||||
return ResourceManager.GetString("User_code", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User Login.
|
||||
/// </summary>
|
||||
internal static string User_Login {
|
||||
get {
|
||||
return ResourceManager.GetString("User_Login", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User Management.
|
||||
/// </summary>
|
||||
internal static string User_Management {
|
||||
get {
|
||||
return ResourceManager.GetString("User_Management", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to User name.
|
||||
/// </summary>
|
||||
internal static string User_name {
|
||||
get {
|
||||
return ResourceManager.GetString("User_name", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to This Username has already been taken. Please choose another one..
|
||||
/// </summary>
|
||||
internal static string Username_taken {
|
||||
get {
|
||||
return ResourceManager.GetString("Username_taken", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Warning.
|
||||
/// </summary>
|
||||
internal static string Warning {
|
||||
get {
|
||||
return ResourceManager.GetString("Warning", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to water meter authority.
|
||||
/// </summary>
|
||||
internal static string water_meter_authority {
|
||||
get {
|
||||
return ResourceManager.GetString("water_meter_authority", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,252 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="AddBtnText" xml:space="preserve">
|
||||
<value>Přidat</value>
|
||||
</data>
|
||||
<data name="CancelBtnText" xml:space="preserve">
|
||||
<value>Zrušit</value>
|
||||
</data>
|
||||
<data name="DescriptionColHdr" xml:space="preserve">
|
||||
<value>Popis</value>
|
||||
</data>
|
||||
<data name="EditBtnText" xml:space="preserve">
|
||||
<value>Editovat</value>
|
||||
</data>
|
||||
<data name="Edit_User" xml:space="preserve">
|
||||
<value>Editace uživatele</value>
|
||||
</data>
|
||||
<data name="Error" xml:space="preserve">
|
||||
<value>Chyba</value>
|
||||
</data>
|
||||
<data name="Full_name" xml:space="preserve">
|
||||
<value>Jméno a příjmení</value>
|
||||
</data>
|
||||
<data name="Groups" xml:space="preserve">
|
||||
<value>Skupiny</value>
|
||||
</data>
|
||||
<data name="ID" xml:space="preserve">
|
||||
<value>ID</value>
|
||||
</data>
|
||||
<data name="Invalid_username_or_password" xml:space="preserve">
|
||||
<value>Neplatné uživatelské jméno či heslo</value>
|
||||
</data>
|
||||
<data name="max_0_alphanum_chars" xml:space="preserve">
|
||||
<value>(max. {0} alfanumerických znaků)</value>
|
||||
</data>
|
||||
<data name="Name" xml:space="preserve">
|
||||
<value>Jméno</value>
|
||||
</data>
|
||||
<data name="OkBtnText" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="Password" xml:space="preserve">
|
||||
<value>Heslo</value>
|
||||
</data>
|
||||
<data name="RemoveBtnText" xml:space="preserve">
|
||||
<value>Odstranit</value>
|
||||
</data>
|
||||
<data name="Repeat_password" xml:space="preserve">
|
||||
<value>Zopakujte heslo</value>
|
||||
</data>
|
||||
<data name="Username_taken" xml:space="preserve">
|
||||
<value>Toto uživatelské jméno již bylo použito. Prosím, vyberte jiné.</value>
|
||||
</data>
|
||||
<data name="User_code" xml:space="preserve">
|
||||
<value>Kód uživatele</value>
|
||||
</data>
|
||||
<data name="User_Login" xml:space="preserve">
|
||||
<value>Uživatelský login</value>
|
||||
</data>
|
||||
<data name="User_Management" xml:space="preserve">
|
||||
<value>Správa uživatelů</value>
|
||||
</data>
|
||||
<data name="User_name" xml:space="preserve">
|
||||
<value>Uživatelské jméno</value>
|
||||
</data>
|
||||
<data name="CloseBtnText" xml:space="preserve">
|
||||
<value>Zavřít</value>
|
||||
</data>
|
||||
<data name="Confirmation" xml:space="preserve">
|
||||
<value>Potvrzení</value>
|
||||
</data>
|
||||
<data name="N_users_copied" xml:space="preserve">
|
||||
<value>Vytvořených {0} uživatelů v lokální databáze.</value>
|
||||
</data>
|
||||
<data name="Warning" xml:space="preserve">
|
||||
<value>Varování</value>
|
||||
</data>
|
||||
<data name="administrator" xml:space="preserve">
|
||||
<value>administrátor</value>
|
||||
</data>
|
||||
<data name="calibration_specialist" xml:space="preserve">
|
||||
<value>může kalibrovat</value>
|
||||
</data>
|
||||
<data name="head_of_lab" xml:space="preserve">
|
||||
<value>vedoucí</value>
|
||||
</data>
|
||||
<data name="maintenance" xml:space="preserve">
|
||||
<value>úderžbář</value>
|
||||
</data>
|
||||
<data name="metrologist" xml:space="preserve">
|
||||
<value>metrológ</value>
|
||||
</data>
|
||||
<data name="specialist" xml:space="preserve">
|
||||
<value>specialista</value>
|
||||
</data>
|
||||
<data name="tester" xml:space="preserve">
|
||||
<value>tester</value>
|
||||
</data>
|
||||
<data name="invalid" xml:space="preserve">
|
||||
<value>neplatný</value>
|
||||
</data>
|
||||
<data name="Tag_taken" xml:space="preserve">
|
||||
<value>Tento NFC tag již byl použit. Prosím, použite jiný.</value>
|
||||
</data>
|
||||
<data name="production_tracing_administrator" xml:space="preserve">
|
||||
<value>správce sledování výroby</value>
|
||||
</data>
|
||||
<data name="Change_your_password_please" xml:space="preserve">
|
||||
<value>Změňte svoje heslo prosím</value>
|
||||
</data>
|
||||
<data name="New_password" xml:space="preserve">
|
||||
<value>Nové heslo</value>
|
||||
</data>
|
||||
<data name="New_password_verification" xml:space="preserve">
|
||||
<value>Verifikace nového hesla</value>
|
||||
</data>
|
||||
<data name="Old_password" xml:space="preserve">
|
||||
<value>Staré heslo</value>
|
||||
</data>
|
||||
<data name="New_password_and_its_verification_are_different" xml:space="preserve">
|
||||
<value>Nové heslo a jeho verifikace jsou různé</value>
|
||||
</data>
|
||||
<data name="Password_does_not_meet_requirements" xml:space="preserve">
|
||||
<value>Heslo nesplňuje požadavky</value>
|
||||
</data>
|
||||
<data name="Password_has_been_used_in_past" xml:space="preserve">
|
||||
<value>Heslo už bylo v minulosti použito</value>
|
||||
</data>
|
||||
<data name="Power_user_cannot_change_its_password" xml:space="preserve">
|
||||
<value>Power uživatel nemůže změnit heslo</value>
|
||||
</data>
|
||||
<data name="Password_must_have_at_least_0_characters" xml:space="preserve">
|
||||
<value>Heslo musí mít nejméně {0} znaků</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -1,273 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="AddBtnText" xml:space="preserve">
|
||||
<value>Neu</value>
|
||||
</data>
|
||||
<data name="CancelBtnText" xml:space="preserve">
|
||||
<value>Abbrechen</value>
|
||||
</data>
|
||||
<data name="DescriptionColHdr" xml:space="preserve">
|
||||
<value>Beschreibung</value>
|
||||
</data>
|
||||
<data name="EditBtnText" xml:space="preserve">
|
||||
<value>Bearbeiten</value>
|
||||
</data>
|
||||
<data name="Edit_User" xml:space="preserve">
|
||||
<value>Benutzer einrichten</value>
|
||||
</data>
|
||||
<data name="Error" xml:space="preserve">
|
||||
<value>Fehler</value>
|
||||
</data>
|
||||
<data name="Full_name" xml:space="preserve">
|
||||
<value>Vorname und Nachname</value>
|
||||
</data>
|
||||
<data name="Groups" xml:space="preserve">
|
||||
<value>Gruppen</value>
|
||||
</data>
|
||||
<data name="ID" xml:space="preserve">
|
||||
<value>ID</value>
|
||||
</data>
|
||||
<data name="Invalid_username_or_password" xml:space="preserve">
|
||||
<value>Ungültiger Benutzername oder Passwort</value>
|
||||
</data>
|
||||
<data name="max_0_alphanum_chars" xml:space="preserve">
|
||||
<value>(maximal {0} alphanumerische Zeichen)</value>
|
||||
</data>
|
||||
<data name="Name" xml:space="preserve">
|
||||
<value>Name</value>
|
||||
</data>
|
||||
<data name="OkBtnText" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="Password" xml:space="preserve">
|
||||
<value>Passwort</value>
|
||||
</data>
|
||||
<data name="RemoveBtnText" xml:space="preserve">
|
||||
<value>Tabelle entfernen</value>
|
||||
</data>
|
||||
<data name="Repeat_password" xml:space="preserve">
|
||||
<value>Passwort wiederholen</value>
|
||||
</data>
|
||||
<data name="Username_taken" xml:space="preserve">
|
||||
<value>Benutzername ist bereits vergeben. Bitte einen anderen Namen wählen!</value>
|
||||
</data>
|
||||
<data name="User_code" xml:space="preserve">
|
||||
<value>Benutzernummer</value>
|
||||
</data>
|
||||
<data name="User_Login" xml:space="preserve">
|
||||
<value>Anmelden</value>
|
||||
</data>
|
||||
<data name="User_Management" xml:space="preserve">
|
||||
<value>Benutzerverwaltung</value>
|
||||
</data>
|
||||
<data name="User_name" xml:space="preserve">
|
||||
<value>Benutzername</value>
|
||||
</data>
|
||||
<data name="CloseBtnText" xml:space="preserve">
|
||||
<value>Beenden</value>
|
||||
</data>
|
||||
<data name="Confirmation" xml:space="preserve">
|
||||
<value>Bestätigung</value>
|
||||
</data>
|
||||
<data name="N_users_copied" xml:space="preserve">
|
||||
<value>{0} Benutzer kopiert.</value>
|
||||
</data>
|
||||
<data name="Warning" xml:space="preserve">
|
||||
<value>Warnung</value>
|
||||
</data>
|
||||
<data name="administrator" xml:space="preserve">
|
||||
<value>Administrator</value>
|
||||
</data>
|
||||
<data name="calibration_specialist" xml:space="preserve">
|
||||
<value>Eichbeamter / Techniker</value>
|
||||
</data>
|
||||
<data name="head_of_lab" xml:space="preserve">
|
||||
<value>Laborleiter</value>
|
||||
</data>
|
||||
<data name="maintenance" xml:space="preserve">
|
||||
<value>Wartungstechniker</value>
|
||||
</data>
|
||||
<data name="metrologist" xml:space="preserve">
|
||||
<value>Metrologe</value>
|
||||
</data>
|
||||
<data name="specialist" xml:space="preserve">
|
||||
<value>Prüftechniker</value>
|
||||
</data>
|
||||
<data name="tester" xml:space="preserve">
|
||||
<value>Prüfer</value>
|
||||
</data>
|
||||
<data name="No_remote_database_of_users" xml:space="preserve">
|
||||
<value>Keine Fernwartung der Benutzerdatenbank!</value>
|
||||
</data>
|
||||
<data name="Are_you_sure" xml:space="preserve">
|
||||
<value>Sind sie sicher?</value>
|
||||
</data>
|
||||
<data name="Copying_remote_users_failed" xml:space="preserve">
|
||||
<value>Kopieren der fehlerhaften Fernwartungsbenutzer!</value>
|
||||
</data>
|
||||
<data name="Save_or_update_user_failed" xml:space="preserve">
|
||||
<value>Speichern oder update der fehlerhaften Benutzer.</value>
|
||||
</data>
|
||||
<data name="invalid" xml:space="preserve">
|
||||
<value>Fehlerhaft</value>
|
||||
</data>
|
||||
<data name="Tag" xml:space="preserve">
|
||||
<value>NFC Magnetkarte</value>
|
||||
</data>
|
||||
<data name="Tag_taken" xml:space="preserve">
|
||||
<value>Dieses NFC Magnetkarte wurde bereits benutzt. Bitte eine andere benutzen!</value>
|
||||
</data>
|
||||
<data name="production_tracing_administrator" xml:space="preserve">
|
||||
<value>Produktionsergebnisse verfolgen(Administrator)</value>
|
||||
</data>
|
||||
<data name="metrological_authority" xml:space="preserve">
|
||||
<value>Metrologie</value>
|
||||
</data>
|
||||
<data name="water_meter_authority" xml:space="preserve">
|
||||
<value>Eichamt</value>
|
||||
</data>
|
||||
<data name="Change_your_password_please" xml:space="preserve">
|
||||
<value>Bitte Passwort ändern!</value>
|
||||
</data>
|
||||
<data name="New_password" xml:space="preserve">
|
||||
<value>Neues Passwort prüfen!</value>
|
||||
</data>
|
||||
<data name="New_password_verification" xml:space="preserve">
|
||||
<value>Neues Passwort prüfen!</value>
|
||||
</data>
|
||||
<data name="Old_password" xml:space="preserve">
|
||||
<value>Altes Passwort</value>
|
||||
</data>
|
||||
<data name="New_password_and_its_verification_are_different" xml:space="preserve">
|
||||
<value>Neues Passwort stimmt nicht überein!</value>
|
||||
</data>
|
||||
<data name="Password_does_not_meet_requirements" xml:space="preserve">
|
||||
<value>Passwort entspricht nicht den Vorgaben!</value>
|
||||
</data>
|
||||
<data name="Password_has_been_used_in_past" xml:space="preserve">
|
||||
<value>Passwort wurde bereits benutzt!</value>
|
||||
</data>
|
||||
<data name="Power_user_cannot_change_its_password" xml:space="preserve">
|
||||
<value>Poweruser kann nicht das Passwort ändern!</value>
|
||||
</data>
|
||||
<data name="Password_must_have_at_least_0_characters" xml:space="preserve">
|
||||
<value>Passwort muss mindestens {0} Zeichen haben!</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -1,240 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="AddBtnText" xml:space="preserve">
|
||||
<value>Ajouter</value>
|
||||
</data>
|
||||
<data name="CancelBtnText" xml:space="preserve">
|
||||
<value>Annuler exte Btn</value>
|
||||
</data>
|
||||
<data name="DescriptionColHdr" xml:space="preserve">
|
||||
<value>Description</value>
|
||||
</data>
|
||||
<data name="EditBtnText" xml:space="preserve">
|
||||
<value>Éditer</value>
|
||||
</data>
|
||||
<data name="Edit_User" xml:space="preserve">
|
||||
<value>Modifier utilisateur</value>
|
||||
</data>
|
||||
<data name="Error" xml:space="preserve">
|
||||
<value>Erreur</value>
|
||||
</data>
|
||||
<data name="Full_name" xml:space="preserve">
|
||||
<value>Nom complet</value>
|
||||
</data>
|
||||
<data name="Groups" xml:space="preserve">
|
||||
<value>Groupes</value>
|
||||
</data>
|
||||
<data name="ID" xml:space="preserve">
|
||||
<value>ID</value>
|
||||
</data>
|
||||
<data name="Invalid_username_or_password" xml:space="preserve">
|
||||
<value>Nom ou mot passe utilisateur non valide </value>
|
||||
</data>
|
||||
<data name="max_0_alphanum_chars" xml:space="preserve">
|
||||
<value>max {0} caractères alphanum</value>
|
||||
</data>
|
||||
<data name="Name" xml:space="preserve">
|
||||
<value>Prénom</value>
|
||||
</data>
|
||||
<data name="OkBtnText" xml:space="preserve">
|
||||
<value>Ok</value>
|
||||
</data>
|
||||
<data name="Password" xml:space="preserve">
|
||||
<value>Mot de passe</value>
|
||||
</data>
|
||||
<data name="RemoveBtnText" xml:space="preserve">
|
||||
<value>Supprimer</value>
|
||||
</data>
|
||||
<data name="Repeat_password" xml:space="preserve">
|
||||
<value>Répéter mot passe</value>
|
||||
</data>
|
||||
<data name="Username_taken" xml:space="preserve">
|
||||
<value>Ce nom d'utilisateur a déjà été pris. Veuillez en choisir un autre.</value>
|
||||
</data>
|
||||
<data name="User_code" xml:space="preserve">
|
||||
<value>Code utilisateur</value>
|
||||
</data>
|
||||
<data name="User_Login" xml:space="preserve">
|
||||
<value>Utilisateur en ligne</value>
|
||||
</data>
|
||||
<data name="User_Management" xml:space="preserve">
|
||||
<value>Gestion utilisateurs</value>
|
||||
</data>
|
||||
<data name="User_name" xml:space="preserve">
|
||||
<value>Nom d'utilisateur</value>
|
||||
</data>
|
||||
<data name="CloseBtnText" xml:space="preserve">
|
||||
<value>Fermer</value>
|
||||
</data>
|
||||
<data name="No_remote_database_of_users" xml:space="preserve">
|
||||
<value>Pas télécommande sur base utilisateurs</value>
|
||||
</data>
|
||||
<data name="Are_you_sure" xml:space="preserve">
|
||||
<value>Êtes-vous sûr ?</value>
|
||||
</data>
|
||||
<data name="Warning" xml:space="preserve">
|
||||
<value>Attention</value>
|
||||
</data>
|
||||
<data name="Confirmation" xml:space="preserve">
|
||||
<value>Confirmation</value>
|
||||
</data>
|
||||
<data name="N_users_copied" xml:space="preserve">
|
||||
<value>{0} utilisateurs copiés</value>
|
||||
</data>
|
||||
<data name="Copying_remote_users_failed" xml:space="preserve">
|
||||
<value>Copie utilisateurs a échoué</value>
|
||||
</data>
|
||||
<data name="Save_or_update_user_failed" xml:space="preserve">
|
||||
<value>Enregistrement ou mise à jour utilisateur a échoué</value>
|
||||
</data>
|
||||
<data name="administrator" xml:space="preserve">
|
||||
<value>Administrateur</value>
|
||||
</data>
|
||||
<data name="calibration_specialist" xml:space="preserve">
|
||||
<value>Spécialiste en calibration</value>
|
||||
</data>
|
||||
<data name="head_of_lab" xml:space="preserve">
|
||||
<value>Chef de laboratoire</value>
|
||||
</data>
|
||||
<data name="maintenance" xml:space="preserve">
|
||||
<value>Spécialiste en maintenance</value>
|
||||
</data>
|
||||
<data name="metrologist" xml:space="preserve">
|
||||
<value>Métrologue</value>
|
||||
</data>
|
||||
<data name="specialist" xml:space="preserve">
|
||||
<value>Spécialiste d'essais</value>
|
||||
</data>
|
||||
<data name="tester" xml:space="preserve">
|
||||
<value>Testeur</value>
|
||||
</data>
|
||||
<data name="invalid" xml:space="preserve">
|
||||
<value>invalide</value>
|
||||
</data>
|
||||
<data name="Tag" xml:space="preserve">
|
||||
<value>NFC tag</value>
|
||||
</data>
|
||||
<data name="Tag_taken" xml:space="preserve">
|
||||
<value>Ce tag NFC a déjà été pris. S'il vous plaît utiliser un autre.</value>
|
||||
</data>
|
||||
<data name="production_tracing_administrator" xml:space="preserve">
|
||||
<value>administrateur suivi production</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -1,141 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="administrator" xml:space="preserve">
|
||||
<value>Amministratore</value>
|
||||
</data>
|
||||
<data name="calibration_specialist" xml:space="preserve">
|
||||
<value>esperto in calibrazione</value>
|
||||
</data>
|
||||
<data name="head_of_lab" xml:space="preserve">
|
||||
<value>capo di laboratorio</value>
|
||||
</data>
|
||||
<data name="maintenance" xml:space="preserve">
|
||||
<value>esperto di manutenzione</value>
|
||||
</data>
|
||||
<data name="metrologist" xml:space="preserve">
|
||||
<value>metrologo</value>
|
||||
</data>
|
||||
<data name="specialist" xml:space="preserve">
|
||||
<value>esperto di prove</value>
|
||||
</data>
|
||||
<data name="tester" xml:space="preserve">
|
||||
<value>tester</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -1,207 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="AddBtnText" xml:space="preserve">
|
||||
<value>Dodaj</value>
|
||||
</data>
|
||||
<data name="CancelBtnText" xml:space="preserve">
|
||||
<value>Anuluj</value>
|
||||
</data>
|
||||
<data name="DescriptionColHdr" xml:space="preserve">
|
||||
<value>Opis</value>
|
||||
</data>
|
||||
<data name="EditBtnText" xml:space="preserve">
|
||||
<value>Edycja</value>
|
||||
</data>
|
||||
<data name="Edit_User" xml:space="preserve">
|
||||
<value>Edytuj użytkownika</value>
|
||||
</data>
|
||||
<data name="Error" xml:space="preserve">
|
||||
<value>Błąd</value>
|
||||
</data>
|
||||
<data name="Full_name" xml:space="preserve">
|
||||
<value>Imię i Nazwisko</value>
|
||||
</data>
|
||||
<data name="Groups" xml:space="preserve">
|
||||
<value>Grupy</value>
|
||||
</data>
|
||||
<data name="ID" xml:space="preserve">
|
||||
<value>ID</value>
|
||||
</data>
|
||||
<data name="Invalid_username_or_password" xml:space="preserve">
|
||||
<value>Nieprawidłowa nazwa użytkownika lub hasło</value>
|
||||
</data>
|
||||
<data name="max_0_alphanum_chars" xml:space="preserve">
|
||||
<value>(max. {0} znaków alfanumerycznych)</value>
|
||||
</data>
|
||||
<data name="Name" xml:space="preserve">
|
||||
<value>Nazwa</value>
|
||||
</data>
|
||||
<data name="OkBtnText" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="Password" xml:space="preserve">
|
||||
<value>Hasło</value>
|
||||
</data>
|
||||
<data name="RemoveBtnText" xml:space="preserve">
|
||||
<value>Usuń</value>
|
||||
</data>
|
||||
<data name="Repeat_password" xml:space="preserve">
|
||||
<value>Hasło 2</value>
|
||||
</data>
|
||||
<data name="Username_taken" xml:space="preserve">
|
||||
<value>Ta Nazwa użytkownika jest już zajęta. Proszę wybrać inną.</value>
|
||||
</data>
|
||||
<data name="User_code" xml:space="preserve">
|
||||
<value>Kod użytkownika</value>
|
||||
</data>
|
||||
<data name="User_Login" xml:space="preserve">
|
||||
<value>Login użytkownika</value>
|
||||
</data>
|
||||
<data name="User_Management" xml:space="preserve">
|
||||
<value>Uprawnienia użytkownika</value>
|
||||
</data>
|
||||
<data name="User_name" xml:space="preserve">
|
||||
<value>Nazwa użytkownika</value>
|
||||
</data>
|
||||
<data name="CloseBtnText" xml:space="preserve">
|
||||
<value>Zamknij</value>
|
||||
</data>
|
||||
<data name="administrator" xml:space="preserve">
|
||||
<value>Administrator</value>
|
||||
</data>
|
||||
<data name="calibration_specialist" xml:space="preserve">
|
||||
<value>Specjalista ds. kalibracji</value>
|
||||
</data>
|
||||
<data name="head_of_lab" xml:space="preserve">
|
||||
<value>Kierownik Laboratorium</value>
|
||||
</data>
|
||||
<data name="maintenance" xml:space="preserve">
|
||||
<value>Konserwator</value>
|
||||
</data>
|
||||
<data name="metrologist" xml:space="preserve">
|
||||
<value>Metrolog</value>
|
||||
</data>
|
||||
<data name="specialist" xml:space="preserve">
|
||||
<value>Specjalista ds. testów</value>
|
||||
</data>
|
||||
<data name="tester" xml:space="preserve">
|
||||
<value>Pracownik przeprowadzający testy</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -1,273 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="AddBtnText" xml:space="preserve">
|
||||
<value>Add</value>
|
||||
</data>
|
||||
<data name="CancelBtnText" xml:space="preserve">
|
||||
<value>Cancel</value>
|
||||
</data>
|
||||
<data name="DescriptionColHdr" xml:space="preserve">
|
||||
<value>Description</value>
|
||||
</data>
|
||||
<data name="EditBtnText" xml:space="preserve">
|
||||
<value>Edit</value>
|
||||
</data>
|
||||
<data name="Edit_User" xml:space="preserve">
|
||||
<value>Edit User</value>
|
||||
</data>
|
||||
<data name="Error" xml:space="preserve">
|
||||
<value>Error</value>
|
||||
</data>
|
||||
<data name="Full_name" xml:space="preserve">
|
||||
<value>Name and Surname</value>
|
||||
</data>
|
||||
<data name="Groups" xml:space="preserve">
|
||||
<value>Groups</value>
|
||||
</data>
|
||||
<data name="ID" xml:space="preserve">
|
||||
<value>ID</value>
|
||||
</data>
|
||||
<data name="Invalid_username_or_password" xml:space="preserve">
|
||||
<value>Invalid username or password</value>
|
||||
</data>
|
||||
<data name="max_0_alphanum_chars" xml:space="preserve">
|
||||
<value>(max. {0} alphanumeric characters)</value>
|
||||
</data>
|
||||
<data name="Name" xml:space="preserve">
|
||||
<value>Name</value>
|
||||
</data>
|
||||
<data name="OkBtnText" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="Password" xml:space="preserve">
|
||||
<value>Password</value>
|
||||
</data>
|
||||
<data name="RemoveBtnText" xml:space="preserve">
|
||||
<value>Remove</value>
|
||||
</data>
|
||||
<data name="Repeat_password" xml:space="preserve">
|
||||
<value>Repeat password</value>
|
||||
</data>
|
||||
<data name="Username_taken" xml:space="preserve">
|
||||
<value>This Username has already been taken. Please choose another one.</value>
|
||||
</data>
|
||||
<data name="User_code" xml:space="preserve">
|
||||
<value>User code</value>
|
||||
</data>
|
||||
<data name="User_Login" xml:space="preserve">
|
||||
<value>User Login</value>
|
||||
</data>
|
||||
<data name="User_Management" xml:space="preserve">
|
||||
<value>User Management</value>
|
||||
</data>
|
||||
<data name="User_name" xml:space="preserve">
|
||||
<value>User name</value>
|
||||
</data>
|
||||
<data name="CloseBtnText" xml:space="preserve">
|
||||
<value>Close</value>
|
||||
</data>
|
||||
<data name="No_remote_database_of_users" xml:space="preserve">
|
||||
<value>No remote database of users</value>
|
||||
</data>
|
||||
<data name="Are_you_sure" xml:space="preserve">
|
||||
<value>Are you sure?</value>
|
||||
</data>
|
||||
<data name="Warning" xml:space="preserve">
|
||||
<value>Warning</value>
|
||||
</data>
|
||||
<data name="Confirmation" xml:space="preserve">
|
||||
<value>Confirmation</value>
|
||||
</data>
|
||||
<data name="N_users_copied" xml:space="preserve">
|
||||
<value>{0} users copied</value>
|
||||
</data>
|
||||
<data name="Copying_remote_users_failed" xml:space="preserve">
|
||||
<value>Copying remote users failed</value>
|
||||
</data>
|
||||
<data name="Save_or_update_user_failed" xml:space="preserve">
|
||||
<value>Save or update user failed</value>
|
||||
</data>
|
||||
<data name="administrator" xml:space="preserve">
|
||||
<value>administrator</value>
|
||||
</data>
|
||||
<data name="calibration_specialist" xml:space="preserve">
|
||||
<value>calibration specialist</value>
|
||||
</data>
|
||||
<data name="head_of_lab" xml:space="preserve">
|
||||
<value>head of lab.</value>
|
||||
</data>
|
||||
<data name="maintenance" xml:space="preserve">
|
||||
<value>maintenance</value>
|
||||
</data>
|
||||
<data name="metrologist" xml:space="preserve">
|
||||
<value>metrologist</value>
|
||||
</data>
|
||||
<data name="specialist" xml:space="preserve">
|
||||
<value>specialist</value>
|
||||
</data>
|
||||
<data name="tester" xml:space="preserve">
|
||||
<value>tester</value>
|
||||
</data>
|
||||
<data name="invalid" xml:space="preserve">
|
||||
<value>invalid</value>
|
||||
</data>
|
||||
<data name="Tag" xml:space="preserve">
|
||||
<value>NFC Tag</value>
|
||||
</data>
|
||||
<data name="Tag_taken" xml:space="preserve">
|
||||
<value>This NFC tag has already been taken. Please use another one.</value>
|
||||
</data>
|
||||
<data name="production_tracing_administrator" xml:space="preserve">
|
||||
<value>production tracing administrator</value>
|
||||
</data>
|
||||
<data name="metrological_authority" xml:space="preserve">
|
||||
<value>metrological authority</value>
|
||||
</data>
|
||||
<data name="water_meter_authority" xml:space="preserve">
|
||||
<value>water meter authority</value>
|
||||
</data>
|
||||
<data name="Change_your_password_please" xml:space="preserve">
|
||||
<value>Change your password please</value>
|
||||
</data>
|
||||
<data name="New_password" xml:space="preserve">
|
||||
<value>New password</value>
|
||||
</data>
|
||||
<data name="New_password_verification" xml:space="preserve">
|
||||
<value>New password verification</value>
|
||||
</data>
|
||||
<data name="Old_password" xml:space="preserve">
|
||||
<value>Old password</value>
|
||||
</data>
|
||||
<data name="New_password_and_its_verification_are_different" xml:space="preserve">
|
||||
<value>New password and it's verification are different</value>
|
||||
</data>
|
||||
<data name="Password_does_not_meet_requirements" xml:space="preserve">
|
||||
<value>Password does not meet requirements</value>
|
||||
</data>
|
||||
<data name="Password_has_been_used_in_past" xml:space="preserve">
|
||||
<value>Password has been used in the past</value>
|
||||
</data>
|
||||
<data name="Power_user_cannot_change_its_password" xml:space="preserve">
|
||||
<value>Power user cannot change it's password</value>
|
||||
</data>
|
||||
<data name="Password_must_have_at_least_0_characters" xml:space="preserve">
|
||||
<value>Password must have at least {0} characters</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -1,207 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="AddBtnText" xml:space="preserve">
|
||||
<value>Добавить</value>
|
||||
</data>
|
||||
<data name="CancelBtnText" xml:space="preserve">
|
||||
<value>Отмена</value>
|
||||
</data>
|
||||
<data name="DescriptionColHdr" xml:space="preserve">
|
||||
<value>Описание</value>
|
||||
</data>
|
||||
<data name="EditBtnText" xml:space="preserve">
|
||||
<value>Редактировать</value>
|
||||
</data>
|
||||
<data name="Edit_User" xml:space="preserve">
|
||||
<value>Редактировать пользователя</value>
|
||||
</data>
|
||||
<data name="Error" xml:space="preserve">
|
||||
<value>Ошибка</value>
|
||||
</data>
|
||||
<data name="Full_name" xml:space="preserve">
|
||||
<value>Имя и фамилия</value>
|
||||
</data>
|
||||
<data name="Groups" xml:space="preserve">
|
||||
<value>Группы</value>
|
||||
</data>
|
||||
<data name="ID" xml:space="preserve">
|
||||
<value>ID</value>
|
||||
</data>
|
||||
<data name="Invalid_username_or_password" xml:space="preserve">
|
||||
<value>Неправильное имя пользователя или пароль</value>
|
||||
</data>
|
||||
<data name="max_0_alphanum_chars" xml:space="preserve">
|
||||
<value>(макс. {0} вуквенно-цифровых символов)</value>
|
||||
</data>
|
||||
<data name="Name" xml:space="preserve">
|
||||
<value>Имя</value>
|
||||
</data>
|
||||
<data name="OkBtnText" xml:space="preserve">
|
||||
<value>OK</value>
|
||||
</data>
|
||||
<data name="Password" xml:space="preserve">
|
||||
<value>Пароль</value>
|
||||
</data>
|
||||
<data name="RemoveBtnText" xml:space="preserve">
|
||||
<value>Удалить</value>
|
||||
</data>
|
||||
<data name="Repeat_password" xml:space="preserve">
|
||||
<value>Пароль 2</value>
|
||||
</data>
|
||||
<data name="Username_taken" xml:space="preserve">
|
||||
<value>Это Имя пользователя уже принято. Пожалуйста, выберите другое.</value>
|
||||
</data>
|
||||
<data name="User_code" xml:space="preserve">
|
||||
<value>Код пользователя</value>
|
||||
</data>
|
||||
<data name="User_Login" xml:space="preserve">
|
||||
<value>Логин пользователя</value>
|
||||
</data>
|
||||
<data name="User_Management" xml:space="preserve">
|
||||
<value>Управление пользователями</value>
|
||||
</data>
|
||||
<data name="User_name" xml:space="preserve">
|
||||
<value>Имя пользователя</value>
|
||||
</data>
|
||||
<data name="CloseBtnText" xml:space="preserve">
|
||||
<value>Закрыть</value>
|
||||
</data>
|
||||
<data name="administrator" xml:space="preserve">
|
||||
<value>Администратор</value>
|
||||
</data>
|
||||
<data name="calibration_specialist" xml:space="preserve">
|
||||
<value>Специалист по калибровке</value>
|
||||
</data>
|
||||
<data name="head_of_lab" xml:space="preserve">
|
||||
<value>Руководитель лаборатории</value>
|
||||
</data>
|
||||
<data name="maintenance" xml:space="preserve">
|
||||
<value>Специалист по техобслуживанию</value>
|
||||
</data>
|
||||
<data name="metrologist" xml:space="preserve">
|
||||
<value>Метролог</value>
|
||||
</data>
|
||||
<data name="specialist" xml:space="preserve">
|
||||
<value>Специалист по тестированию</value>
|
||||
</data>
|
||||
<data name="tester" xml:space="preserve">
|
||||
<value>Контролер</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -1,207 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="AddBtnText" xml:space="preserve">
|
||||
<value>添加 Add</value>
|
||||
</data>
|
||||
<data name="CancelBtnText" xml:space="preserve">
|
||||
<value>取消 Cancel</value>
|
||||
</data>
|
||||
<data name="DescriptionColHdr" xml:space="preserve">
|
||||
<value>描述</value>
|
||||
</data>
|
||||
<data name="EditBtnText" xml:space="preserve">
|
||||
<value>编辑 Edit</value>
|
||||
</data>
|
||||
<data name="Edit_User" xml:space="preserve">
|
||||
<value>编辑用户</value>
|
||||
</data>
|
||||
<data name="Error" xml:space="preserve">
|
||||
<value>错误 Error</value>
|
||||
</data>
|
||||
<data name="Full_name" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="Groups" xml:space="preserve">
|
||||
<value>组别</value>
|
||||
</data>
|
||||
<data name="ID" xml:space="preserve">
|
||||
<value>ID</value>
|
||||
</data>
|
||||
<data name="Invalid_username_or_password" xml:space="preserve">
|
||||
<value>无效的用户名或密码</value>
|
||||
</data>
|
||||
<data name="max_0_alphanum_chars" xml:space="preserve">
|
||||
<value>(最大 {0} 字母数字字符)</value>
|
||||
</data>
|
||||
<data name="Name" xml:space="preserve">
|
||||
<value>名称</value>
|
||||
</data>
|
||||
<data name="OkBtnText" xml:space="preserve">
|
||||
<value>好 OK</value>
|
||||
</data>
|
||||
<data name="Password" xml:space="preserve">
|
||||
<value>密码</value>
|
||||
</data>
|
||||
<data name="RemoveBtnText" xml:space="preserve">
|
||||
<value>删除 Remove</value>
|
||||
</data>
|
||||
<data name="Repeat_password" xml:space="preserve">
|
||||
<value>密码2</value>
|
||||
</data>
|
||||
<data name="Username_taken" xml:space="preserve">
|
||||
<value>此用户名已被占用。请选择另外一个。</value>
|
||||
</data>
|
||||
<data name="User_code" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="User_Login" xml:space="preserve">
|
||||
<value>用户登录</value>
|
||||
</data>
|
||||
<data name="User_Management" xml:space="preserve">
|
||||
<value>用户管理</value>
|
||||
</data>
|
||||
<data name="User_name" xml:space="preserve">
|
||||
<value>用户名</value>
|
||||
</data>
|
||||
<data name="CloseBtnText" xml:space="preserve">
|
||||
<value>关闭 Close</value>
|
||||
</data>
|
||||
<data name="administrator" xml:space="preserve">
|
||||
<value>管理员</value>
|
||||
</data>
|
||||
<data name="calibration_specialist" xml:space="preserve">
|
||||
<value>校准专员</value>
|
||||
</data>
|
||||
<data name="head_of_lab" xml:space="preserve">
|
||||
<value>实验室负责人</value>
|
||||
</data>
|
||||
<data name="maintenance" xml:space="preserve">
|
||||
<value>维护专员</value>
|
||||
</data>
|
||||
<data name="metrologist" xml:space="preserve">
|
||||
<value>计量者</value>
|
||||
</data>
|
||||
<data name="specialist" xml:space="preserve">
|
||||
<value>测试专员</value>
|
||||
</data>
|
||||
<data name="tester" xml:space="preserve">
|
||||
<value>测试仪</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -1,146 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{6E5CB0E9-E1B6-4E5D-AC6E-B1049E180F2B}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Users</RootNamespace>
|
||||
<AssemblyName>Users</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="FluentNHibernate">
|
||||
<HintPath>..\packages\FluentNHibernate.2.0.3.0\lib\net40\FluentNHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Iesi.Collections">
|
||||
<HintPath>..\packages\Iesi.Collections.4.0.0.4000\lib\net40\Iesi.Collections.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net">
|
||||
<HintPath>..\packages\log4net.2.0.2\lib\net40-full\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MySql.Data">
|
||||
<HintPath>..\packages\MySql.Data.6.6.5\lib\net40\MySql.Data.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NHibernate">
|
||||
<HintPath>..\packages\NHibernate.4.0.4.4000\lib\net40\NHibernate.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DBSettings.cs" />
|
||||
<Compile Include="Forms\ListViewExtensions.cs" />
|
||||
<Compile Include="Forms\LviNameSurnameColumnComparer.cs" />
|
||||
<Compile Include="Forms\LviIntColumnComparer.cs" />
|
||||
<Compile Include="Forms\LviTextColumnComparer.cs" />
|
||||
<Compile Include="Forms\PasswordChangeDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\PasswordChangeDlg.designer.cs">
|
||||
<DependentUpon>PasswordChangeDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="GlobalData.cs" />
|
||||
<Compile Include="UsersDB.cs" />
|
||||
<Compile Include="Entities\Enums.cs" />
|
||||
<Compile Include="Entities\Group.cs" />
|
||||
<Compile Include="Entities\User.cs" />
|
||||
<Compile Include="Forms\EditSelectedUser.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\EditSelectedUser.designer.cs">
|
||||
<DependentUpon>EditSelectedUser.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\UserManagementDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\UserManagementDlg.designer.cs">
|
||||
<DependentUpon>UserManagementDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Forms\LoginDlg.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Forms\LoginDlg.designer.cs">
|
||||
<DependentUpon>LoginDlg.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Mappings\GroupMap.cs" />
|
||||
<Compile Include="Mappings\UserMap.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Resources\Strings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Strings.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\GemCard\GemCard.csproj">
|
||||
<Project>{8B10D15A-39DE-4B56-8DD1-710C1EB3A697}</Project>
|
||||
<Name>GemCard</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Forms\EditSelectedUser.resx">
|
||||
<DependentUpon>EditSelectedUser.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\PasswordChangeDlg.resx">
|
||||
<DependentUpon>PasswordChangeDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\UserManagementDlg.resx">
|
||||
<DependentUpon>UserManagementDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Forms\LoginDlg.resx">
|
||||
<DependentUpon>LoginDlg.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Strings.cs.resx" />
|
||||
<EmbeddedResource Include="Resources\Strings.de.resx" />
|
||||
<EmbeddedResource Include="Resources\Strings.fr.resx" />
|
||||
<EmbeddedResource Include="Resources\Strings.it.resx" />
|
||||
<EmbeddedResource Include="Resources\Strings.pl.resx" />
|
||||
<EmbeddedResource Include="Resources\Strings.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Strings.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Resources\Strings.ru.resx" />
|
||||
<EmbeddedResource Include="Resources\Strings.zh-CN.resx" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
154
Users/UsersDB.cs
154
Users/UsersDB.cs
@ -1,154 +0,0 @@
|
||||
///
|
||||
/// Copyright (c) 2016-2018 Sensus Slovensko a.s.
|
||||
///
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using FluentNHibernate.Cfg;
|
||||
using FluentNHibernate.Cfg.Db;
|
||||
using log4net;
|
||||
using NHibernate;
|
||||
using NHibernate.Cfg;
|
||||
using NHibernate.Tool.hbm2ddl;
|
||||
using Users.Entities;
|
||||
|
||||
namespace Users
|
||||
{
|
||||
public static class UsersDB
|
||||
{
|
||||
static readonly ILog log = LogManager.GetLogger(typeof(UsersDB));
|
||||
|
||||
/// <summary> Session factory for all regular sessions, not for CreateEmptyResultsDB(). </summary>
|
||||
public static ISessionFactory SessionFactory;
|
||||
public static ISession CurrentSession;
|
||||
|
||||
/// <summary> Connection string for all sessions </summary>
|
||||
private static string connectionString;
|
||||
///
|
||||
public static string ConnectionString
|
||||
{
|
||||
get { return connectionString; }
|
||||
set { connectionString = value; SessionFactory = null; }
|
||||
}
|
||||
|
||||
/// <summary> Database type (MySQL or SQLite) for all sessions </summary>
|
||||
private static DBType dbType;
|
||||
///
|
||||
public static DBType DbType
|
||||
{
|
||||
get { return dbType; }
|
||||
set { dbType = value; SessionFactory = null; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// NHibernate session factory (to create the database session 'SessionFactory')
|
||||
/// </summary>
|
||||
/// <returns>A database session</returns>
|
||||
static ISessionFactory CreateSessionFactory()
|
||||
{
|
||||
return CreateSessionFactory(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// NHibernate session factory (to create the database session 'SessionFactory')
|
||||
/// </summary>
|
||||
/// <param name="createDB">true = Create a new DB, false = Regular DB</param>
|
||||
/// <returns>A database session</returns>
|
||||
public static ISessionFactory CreateSessionFactory(bool createDB)
|
||||
{
|
||||
FluentConfiguration cfg = Fluently.Configure();
|
||||
|
||||
switch (dbType)
|
||||
{
|
||||
default:
|
||||
case DBType.SQLite:
|
||||
cfg = cfg.Database(SQLiteConfiguration.Standard.UsingFile(connectionString));
|
||||
break;
|
||||
case DBType.MySql:
|
||||
cfg = cfg.Database(MySQLConfiguration.Standard.ConnectionString(connectionString));
|
||||
break;
|
||||
}
|
||||
|
||||
cfg = cfg.Mappings(m => m.FluentMappings.AddFromAssemblyOf<Entities.User>());
|
||||
|
||||
if (createDB)
|
||||
{
|
||||
return cfg.ExposeConfiguration(BuildSchemaCreate).BuildSessionFactory();
|
||||
}
|
||||
else
|
||||
{
|
||||
return cfg.ExposeConfiguration(BuildSchema).BuildSessionFactory();
|
||||
}
|
||||
}
|
||||
|
||||
static void BuildSchema(Configuration config)
|
||||
{
|
||||
/// This NHibernate tool takes a configuration with mapping info and exports a database schema
|
||||
new SchemaExport(config).SetOutputFile("db_schema");
|
||||
}
|
||||
|
||||
static void BuildSchemaCreate(Configuration config)
|
||||
{
|
||||
/// This NHibernate tool takes a configuration with mapping info and exports a database schema
|
||||
new SchemaExport(config).Create(true, true);
|
||||
}
|
||||
|
||||
/// Create a NHibernate session for the given database
|
||||
public static ISession CreateSession()
|
||||
{
|
||||
if (string.IsNullOrEmpty(connectionString))
|
||||
{
|
||||
throw new Exception("Connection string was not specified");
|
||||
}
|
||||
|
||||
if (SessionFactory == null) SessionFactory = CreateSessionFactory();
|
||||
|
||||
CurrentSession = SessionFactory.OpenSession();
|
||||
return CurrentSession;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create an empty users database.
|
||||
/// Database contains only the user 'admin' and the control board component 'CB'.
|
||||
/// </summary>
|
||||
/// <param name="dbType">DBType.SQLite or DBType.MySql</param>
|
||||
/// <param name="connectionString">Connection string</param>
|
||||
/// <returns>true=success, false=error</returns>
|
||||
public static bool CreateEmptyDB()
|
||||
{
|
||||
ISessionFactory sessionFactory = CreateSessionFactory(true);
|
||||
if (sessionFactory == null) return false;
|
||||
|
||||
/// Populate the database
|
||||
using (var session = sessionFactory.OpenSession())
|
||||
{
|
||||
using (var transaction = session.BeginTransaction())
|
||||
{
|
||||
transaction.Commit();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Shared data
|
||||
/// </summary>
|
||||
public static IList<Entities.User> Users;
|
||||
public static IList<Entities.Group> Groups;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Loads shared data from the database
|
||||
/// </summary>
|
||||
/// <exception>Throws NHibernate exceptions</exception>
|
||||
public static void LoadSharedData()
|
||||
{
|
||||
ISession session = UsersDB.CreateSession();
|
||||
|
||||
Users = session.QueryOver<Entities.User>().List();
|
||||
Groups = session.QueryOver<Entities.Group>().List();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -16,8 +16,6 @@ rmdir /s /q Encrypt\bin
|
||||
rmdir /s /q Encrypt\obj
|
||||
rmdir /s /q EventViewer\bin
|
||||
rmdir /s /q EventViewer\obj
|
||||
rmdir /s /q Events\bin
|
||||
rmdir /s /q Events\obj
|
||||
rmdir /s /q FeatureVectorCalculator\bin
|
||||
rmdir /s /q FeatureVectorCalculator\obj
|
||||
rmdir /s /q GemCard\bin
|
||||
@ -60,8 +58,6 @@ rmdir /s /q ToFirstMonitor\bin
|
||||
rmdir /s /q ToFirstMonitor\obj
|
||||
rmdir /s /q ToSecondMonitor\bin
|
||||
rmdir /s /q ToSecondMonitor\obj
|
||||
rmdir /s /q Users\bin
|
||||
rmdir /s /q Users\obj
|
||||
rmdir /s /q UserManagement\bin
|
||||
rmdir /s /q UserManagement\obj
|
||||
rmdir /s /q WorkflowConfigurator\bin
|
||||
|
||||
Loading…
Reference in New Issue
Block a user