new Branch
This commit is contained in:
parent
b8f7c7bf6e
commit
3e51b35c67
@ -34,8 +34,12 @@ namespace ZKuP
|
||||
|
||||
private void btnSave_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var match = Regex.Match(cbCOMList.SelectedValue.ToString(), @"COM\d+(?=\))");
|
||||
Settings.WriteSetting("COMPort", match.Value);
|
||||
if (cbCOMList.SelectedValue != null)
|
||||
{
|
||||
var match = Regex.Match(cbCOMList.SelectedValue.ToString(), @"COM\d+(?=\))");
|
||||
Settings.WriteSetting("COMPort", match.Value);
|
||||
}
|
||||
else Settings.WriteSetting("COMPort", "");
|
||||
|
||||
this.Close();
|
||||
}
|
||||
|
||||
@ -1619,6 +1619,7 @@ namespace ZKuP
|
||||
new MySqlParameter("@id", id)
|
||||
});
|
||||
}
|
||||
else (sender as TextBox).Text = oldValue;
|
||||
}
|
||||
|
||||
foreach (var textBox in textBoxes)
|
||||
|
||||
@ -29,12 +29,27 @@
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
|
||||
<xs:documentation>Obsolete, use UnmanagedWinX86Assemblies instead</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="UnmanagedWinX86Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged X86 (32 bit) assembly names to include, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
|
||||
<xs:documentation>Obsolete, use UnmanagedWinX64Assemblies instead.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="UnmanagedWinX64Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged X64 (64 bit) assembly names to include, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="UnmanagedWinArm64Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged Arm64 (64 bit) assembly names to include, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
|
||||
@ -73,6 +88,11 @@
|
||||
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="DisableEventSubscription" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The attach method no longer subscribes to the `AppDomain.AssemblyResolve` (.NET 4.x) and `AssemblyLoadContext.Resolving` (.NET 6.0+) events.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
|
||||
@ -105,12 +125,27 @@
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
|
||||
<xs:documentation>Obsolete, use UnmanagedWinX86Assemblies instead</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="UnmanagedWinX86Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged X86 (32 bit) assembly names to include, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
|
||||
<xs:documentation>Obsolete, use UnmanagedWinX64Assemblies instead</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="UnmanagedWinX64Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged X64 (64 bit) assembly names to include, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="UnmanagedWinArm64Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged Arm64 (64 bit) assembly names to include, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="PreloadOrder" type="xs:string">
|
||||
|
||||
@ -43,7 +43,7 @@ namespace ZKuP
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
public const string Version = "5.1.0.1";
|
||||
public const string Version = "5.1.0.2";
|
||||
public static Roles LoggedInRole { get; private set; } = Roles.None;
|
||||
|
||||
|
||||
@ -381,7 +381,7 @@ namespace ZKuP
|
||||
await Dispatcher.BeginInvoke(new Action(() => pgLoad.Value = 15));
|
||||
|
||||
auth = await SQL.ReadSingleValueAsync($"SELECT EXISTS(SELECT * FROM {MainWindow.table}.users WHERE `Username` = '{Environment.UserName}')");
|
||||
await Dispatcher.BeginInvoke(new Action(() => SQL.WriteSQL($"REPLACE INTO {MainWindow.table}.apptracker (Username, Version, LastLogin) VALUES ('{Environment.UserName}', '{Version}', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}')")));
|
||||
await Dispatcher.BeginInvoke(new Action(() => SQL.WriteSQL($"REPLACE INTO {MainWindow.table}.apptracker (Username, Version, LastLogin, Online) VALUES ('{Environment.UserName}', '{Version}', '{DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")}', 1)")));
|
||||
|
||||
await Dispatcher.BeginInvoke(new Action(() => pgLoad.Value = 20));
|
||||
|
||||
@ -2531,7 +2531,7 @@ namespace ZKuP
|
||||
|
||||
|
||||
|
||||
private void Window_Closing(object sender, CancelEventArgs e)
|
||||
private async void Window_Closing(object sender, CancelEventArgs e)
|
||||
{
|
||||
if (Main.Visibility == Visibility.Visible)
|
||||
{
|
||||
@ -2545,6 +2545,7 @@ namespace ZKuP
|
||||
Settings.WriteSetting("WindowState", this.WindowState);
|
||||
|
||||
Settings.Save();
|
||||
await SQL.WriteSQL($"UPDATE {MainWindow.table}.apptracker SET Online = 0 WHERE Username = '{Environment.UserName}'");
|
||||
//Properties.Settings.Default.Save();
|
||||
}
|
||||
}
|
||||
|
||||
38
ZKuP/SQL.cs
38
ZKuP/SQL.cs
@ -259,6 +259,7 @@ namespace ZKuP
|
||||
|
||||
if (signature != null && signature.Length > 0)
|
||||
cmd.Parameters.Add("@signature", MySqlDbType.LongBlob).Value = signature;
|
||||
else cmd.Parameters.Add("@signature", MySqlDbType.LongBlob).Value = new byte[1];
|
||||
|
||||
await SQL.WriteSQL(cmd);
|
||||
}
|
||||
@ -699,7 +700,7 @@ namespace ZKuP
|
||||
while (reader.Read())
|
||||
{
|
||||
if (!reader.IsDBNull(ColumnID))
|
||||
queryResult.Add(reader.GetString(ColumnID));
|
||||
queryResult.Add(reader.GetValue(ColumnID).ToString());
|
||||
else
|
||||
queryResult.Add("");
|
||||
}
|
||||
@ -737,7 +738,7 @@ namespace ZKuP
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
queryResult.Add(reader.GetDateTime(ColumnID).ToString("yyyy-MM-dd HH:mm:ss") + ";" + reader.GetString(ColumnID + 1));
|
||||
queryResult.Add(reader.GetDateTime(ColumnID).ToString("yyyy-MM-dd HH:mm:ss") + ";" + reader.GetValue(ColumnID + 1).ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -775,7 +776,7 @@ namespace ZKuP
|
||||
while (reader.Read())
|
||||
{
|
||||
if (!reader.IsDBNull(ColumnID) && !reader.IsDBNull(ColumnID + 1))
|
||||
queryResult.Add(reader.GetString(ColumnID) + $"{Seperator}" + reader.GetString(ColumnID + 1));
|
||||
queryResult.Add(reader.GetValue(ColumnID).ToString() + $"{Seperator}" + reader.GetValue(ColumnID + 1).ToString());
|
||||
else
|
||||
queryResult.Add("");
|
||||
}
|
||||
@ -818,25 +819,25 @@ namespace ZKuP
|
||||
switch(ColumnCount)
|
||||
{
|
||||
case 1:
|
||||
queryResult.Add(reader.GetString(ColumnOne));
|
||||
queryResult.Add(reader.GetValue(ColumnOne).ToString());
|
||||
break;
|
||||
case 2:
|
||||
queryResult.Add(reader.GetString(ColumnOne) + $"{SeperatorOne}" + reader.GetString(ColumnTwo));
|
||||
queryResult.Add(reader.GetValue(ColumnOne).ToString() + $"{SeperatorOne}" + reader.GetValue(ColumnTwo).ToString());
|
||||
break;
|
||||
case 3:
|
||||
queryResult.Add(reader.GetString(ColumnOne) + $"{SeperatorOne}" + reader.GetString(ColumnTwo) + $"{SeperatorTwo}" + reader.GetString(ColumnThree));
|
||||
queryResult.Add(reader.GetValue(ColumnOne).ToString() + $"{SeperatorOne}" + reader.GetValue(ColumnTwo).ToString() + $"{SeperatorTwo}" + reader.GetValue(ColumnThree).ToString());
|
||||
break;
|
||||
case 4:
|
||||
queryResult.Add(reader.GetString(ColumnOne) + $"{SeperatorOne}" + reader.GetString(ColumnTwo) + $"{SeperatorTwo}" + reader.GetString(ColumnThree) + $"{SeperatorThree}" + reader.GetString(ColumnFour));
|
||||
queryResult.Add(reader.GetValue(ColumnOne).ToString() + $"{SeperatorOne}" + reader.GetValue(ColumnTwo).ToString() + $"{SeperatorTwo}" + reader.GetValue(ColumnThree).ToString() + $"{SeperatorThree}" + reader.GetValue(ColumnFour).ToString());
|
||||
break;
|
||||
case 5:
|
||||
queryResult.Add(reader.GetString(ColumnOne) + $"{SeperatorOne}" + reader.GetString(ColumnTwo) + $"{SeperatorTwo}" + reader.GetString(ColumnThree) + $"{SeperatorThree}" + reader.GetString(ColumnFour) + $"{SeperatorFour}" + reader.GetString(ColumnFive));
|
||||
queryResult.Add(reader.GetValue(ColumnOne).ToString() + $"{SeperatorOne}" + reader.GetValue(ColumnTwo).ToString() + $"{SeperatorTwo}" + reader.GetValue(ColumnThree).ToString() + $"{SeperatorThree}" + reader.GetValue(ColumnFour).ToString() + $"{SeperatorFour}" + reader.GetValue(ColumnFive).ToString());
|
||||
break;
|
||||
case 6:
|
||||
queryResult.Add(reader.GetString(ColumnOne) + $"{SeperatorOne}" + reader.GetString(ColumnTwo) + $"{SeperatorTwo}" + reader.GetString(ColumnThree) + $"{SeperatorThree}" + reader.GetString(ColumnFour) + $"{SeperatorFour}" + reader.GetString(ColumnFive) + $"{SeperatorFive}" + reader.GetString(ColumnSix));
|
||||
queryResult.Add(reader.GetValue(ColumnOne).ToString() + $"{SeperatorOne}" + reader.GetValue(ColumnTwo).ToString() + $"{SeperatorTwo}" + reader.GetValue(ColumnThree).ToString() + $"{SeperatorThree}" + reader.GetValue(ColumnFour).ToString() + $"{SeperatorFour}" + reader.GetValue(ColumnFive).ToString() + $"{SeperatorFive}" + reader.GetValue(ColumnSix).ToString());
|
||||
break;
|
||||
default:
|
||||
queryResult.Add(reader.GetString(ColumnOne));
|
||||
queryResult.Add(reader.GetValue(ColumnOne).ToString());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -873,14 +874,14 @@ namespace ZKuP
|
||||
if (FirstColumn == 0 && SecondColumn == 0)
|
||||
{
|
||||
if (!queryResult.ContainsKey(0))
|
||||
queryResult.Add(0, reader.GetString(SecondColumn));
|
||||
queryResult.Add(0, reader.GetValue(SecondColumn).ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
var x = reader.GetInt32(FirstColumn);
|
||||
|
||||
if (!queryResult.ContainsKey(x))
|
||||
queryResult.Add(x, reader.GetString(SecondColumn));
|
||||
queryResult.Add(x, reader.GetValue(SecondColumn).ToString());
|
||||
}
|
||||
|
||||
}
|
||||
@ -915,13 +916,13 @@ namespace ZKuP
|
||||
while (reader.Read())
|
||||
{
|
||||
if (!reader.IsDBNull(FirstColumn) && !reader.IsDBNull(SecondColumn))
|
||||
if (!queryResult.ContainsKey(reader.GetString(FirstColumn)))
|
||||
queryResult.Add(reader.GetString(FirstColumn), reader.GetString(SecondColumn));
|
||||
if (!queryResult.ContainsKey(reader.GetValue(FirstColumn).ToString()))
|
||||
queryResult.Add(reader.GetValue(FirstColumn).ToString(), reader.GetValue(SecondColumn).ToString());
|
||||
else if (reader.IsDBNull(FirstColumn) && !reader.IsDBNull(SecondColumn))
|
||||
continue;// queryResult.Add("", reader.GetString(SecondColumn));
|
||||
else if (!reader.IsDBNull(FirstColumn) && reader.IsDBNull(SecondColumn))
|
||||
if (!queryResult.ContainsKey(reader.GetString(FirstColumn)))
|
||||
queryResult.Add(reader.GetString(FirstColumn), "");
|
||||
if (!queryResult.ContainsKey(reader.GetValue(FirstColumn).ToString()))
|
||||
queryResult.Add(reader.GetValue(FirstColumn).ToString(), "");
|
||||
|
||||
}
|
||||
}
|
||||
@ -958,8 +959,9 @@ namespace ZKuP
|
||||
|
||||
|
||||
|
||||
await conn.OpenAsync();
|
||||
var result = await cmd.ExecuteScalarAsync();
|
||||
conn.Open();
|
||||
var result = cmd.ExecuteScalar();
|
||||
conn.Close();
|
||||
return result != null;
|
||||
|
||||
|
||||
|
||||
@ -70,6 +70,7 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<NoWarn>4014,1998,0108</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
@ -609,14 +610,14 @@
|
||||
<Resource Include="Resources\Sun.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="BouncyCastle">
|
||||
<Version>1.8.9</Version>
|
||||
<PackageReference Include="BouncyCastle.Cryptography">
|
||||
<Version>2.6.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="ColorHelper">
|
||||
<Version>1.8.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Costura.Fody">
|
||||
<Version>5.2.0</Version>
|
||||
<Version>6.0.0</Version>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
@ -624,25 +625,25 @@
|
||||
<Version>2.0.2</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Google.Protobuf">
|
||||
<Version>3.17.3</Version>
|
||||
<Version>3.31.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="K4os.Compression.LZ4.Streams">
|
||||
<Version>1.2.6</Version>
|
||||
<Version>1.3.8</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MahApps.Metro">
|
||||
<Version>2.4.7</Version>
|
||||
<Version>2.4.10</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NETCore.Platforms">
|
||||
<Version>5.0.2</Version>
|
||||
<Version>7.0.4</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Office.Interop.Word">
|
||||
<Version>15.0.4797.1003</Version>
|
||||
<Version>15.0.4797.1004</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications">
|
||||
<Version>7.1.2</Version>
|
||||
<Version>7.1.3</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="MySql.Data">
|
||||
<Version>8.0.25</Version>
|
||||
<Version>9.4.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="NETStandard.Library">
|
||||
<Version>2.0.3</Version>
|
||||
@ -651,7 +652,7 @@
|
||||
<Version>13.0.3</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="SSH.NET">
|
||||
<Version>2020.0.1</Version>
|
||||
<Version>2025.0.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Collections">
|
||||
<Version>4.3.0</Version>
|
||||
@ -663,7 +664,7 @@
|
||||
<Version>4.3.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Diagnostics.DiagnosticSource">
|
||||
<Version>5.0.1</Version>
|
||||
<Version>9.0.7</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Diagnostics.Tools">
|
||||
<Version>4.3.0</Version>
|
||||
@ -738,7 +739,7 @@
|
||||
<Version>4.3.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.ValueTuple">
|
||||
<Version>4.5.0</Version>
|
||||
<Version>4.6.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Xml.ReaderWriter">
|
||||
<Version>4.3.1</Version>
|
||||
@ -747,10 +748,10 @@
|
||||
<Version>4.3.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="WpfScreenHelper">
|
||||
<Version>1.1.0</Version>
|
||||
<Version>2.1.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="XamlAnimatedGif">
|
||||
<Version>2.3.0</Version>
|
||||
<Version>2.3.1</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user