rework client and remove separated update installer (gui not finished yet)
This commit is contained in:
90
Pilz.Updating.Client.GUI/LangRes.Designer.cs
generated
90
Pilz.Updating.Client.GUI/LangRes.Designer.cs
generated
@@ -1,90 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Pilz.Updating.Client.GUI {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
/// </summary>
|
||||
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class LangRes {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal LangRes() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||
/// </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("Pilz.Updating.Client.GUI.LangRes", typeof(LangRes).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die <html><a href="{0}">Open link to notes in browser!</a></html> ähnelt.
|
||||
/// </summary>
|
||||
internal static string NotesLinkToExternal {
|
||||
get {
|
||||
return ResourceManager.GetString("NotesLinkToExternal", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die No release notes not available or not provided. ähnelt.
|
||||
/// </summary>
|
||||
internal static string NotesNotAvailable {
|
||||
get {
|
||||
return ResourceManager.GetString("NotesNotAvailable", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Updates available ähnelt.
|
||||
/// </summary>
|
||||
internal static string Title_UpdatesAvailable {
|
||||
get {
|
||||
return ResourceManager.GetString("Title_UpdatesAvailable", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,129 +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="NotesLinkToExternal" xml:space="preserve">
|
||||
<value><html><a href="{0}">Open link to notes in browser!</a></html></value>
|
||||
</data>
|
||||
<data name="NotesNotAvailable" xml:space="preserve">
|
||||
<value>No release notes not available or not provided.</value>
|
||||
</data>
|
||||
<data name="Title_UpdatesAvailable" xml:space="preserve">
|
||||
<value>Updates available</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -11,10 +11,14 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="LangRes.Designer.cs">
|
||||
<Compile Update="LangRes\GeneralLangRes.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>LangRes.resx</DependentUpon>
|
||||
<DependentUpon>GeneralLangRes.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="UpdateWindow.cs" />
|
||||
<Compile Update="UpdateWindow.Designer.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="SimpleActionDialog.Designer.cs">
|
||||
<DependentUpon>SimpleActionDialog.cs</DependentUpon>
|
||||
@@ -22,12 +26,22 @@
|
||||
<Compile Update="SimpleActionDialog.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="LangRes\UpdateInstallerLangRes.de.Designer.cs">
|
||||
<DependentUpon>UpdateInstallerLangRes.de.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
</Compile>
|
||||
<Compile Update="LangRes\UpdateInstallerLangRes.Designer.cs">
|
||||
<DependentUpon>UpdateInstallerLangRes.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
</Compile>
|
||||
<Compile Update="UpdatesAvailableDialog.cs" />
|
||||
<Compile Update="UpdatesAvailableDialog.Designer.cs">
|
||||
<DependentUpon>UpdatesAvailableDialog.cs</DependentUpon>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="UpdatingClientGuiLangRes.Designer.cs">
|
||||
<Compile Update="LangRes\UpdatingClientGuiLangRes.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>UpdatingClientGuiLangRes.resx</DependentUpon>
|
||||
@@ -35,9 +49,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="LangRes.resx">
|
||||
<EmbeddedResource Update="LangRes\GeneralLangRes.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>LangRes.Designer.cs</LastGenOutput>
|
||||
<LastGenOutput>GeneralLangRes.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="SimpleActionDialog.de.resx">
|
||||
<DependentUpon>SimpleActionDialog.cs</DependentUpon>
|
||||
@@ -45,17 +59,27 @@
|
||||
<EmbeddedResource Update="SimpleActionDialog.resx">
|
||||
<DependentUpon>SimpleActionDialog.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="LangRes\UpdateInstallerLangRes.de.resx">
|
||||
<CustomToolNamespace>Pilz.Updating.UpdateInstaller.My.Resources</CustomToolNamespace>
|
||||
<LastGenOutput>UpdateInstallerLangRes.de.Designer.cs</LastGenOutput>
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="LangRes\UpdateInstallerLangRes.resx">
|
||||
<CustomToolNamespace>Pilz.Updating.UpdateInstaller.My.Resources</CustomToolNamespace>
|
||||
<LastGenOutput>UpdateInstallerLangRes.Designer.cs</LastGenOutput>
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="UpdatesAvailableDialog.de.resx">
|
||||
<DependentUpon>UpdatesAvailableDialog.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="UpdatesAvailableDialog.resx">
|
||||
<DependentUpon>UpdatesAvailableDialog.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="UpdatingClientGuiLangRes.de.resx">
|
||||
<EmbeddedResource Update="LangRes\UpdatingClientGuiLangRes.de.resx">
|
||||
<Generator></Generator>
|
||||
<CustomToolNamespace>Pilz.Updating.Client.GUI</CustomToolNamespace>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="UpdatingClientGuiLangRes.resx">
|
||||
<EmbeddedResource Update="LangRes\UpdatingClientGuiLangRes.resx">
|
||||
<CustomToolNamespace>Pilz.Updating.Client.GUI</CustomToolNamespace>
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>UpdatingClientGuiLangRes.Designer.cs</LastGenOutput>
|
||||
@@ -65,7 +89,6 @@
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Pilz.Updating.Client\Pilz.Updating.Client.csproj" />
|
||||
<ProjectReference Include="..\Pilz.Updating.GUIBase\Pilz.Updating.GUIBase.csproj" />
|
||||
<ProjectReference Include="..\Pilz.Updating.UpdateInstaller.Lib\Pilz.Updating.UpdateInstaller.Lib.csproj" />
|
||||
<ProjectReference Include="..\Pilz.Updating\Pilz.Updating.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using System.Diagnostics;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace Pilz.Updating.Client.GUI
|
||||
namespace Pilz.Updating.Client.Gui
|
||||
{
|
||||
[Microsoft.VisualBasic.CompilerServices.DesignerGenerated()]
|
||||
public partial class SimpleActionDialog : Telerik.WinControls.UI.RadForm
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Pilz.Updating.Client.GUI;
|
||||
namespace Pilz.Updating.Client.Gui;
|
||||
|
||||
public partial class SimpleActionDialog
|
||||
{
|
||||
|
||||
@@ -1,18 +1,19 @@
|
||||
using Microsoft.VisualBasic.CompilerServices;
|
||||
using Pilz.UI;
|
||||
using Pilz.UI;
|
||||
using Pilz.UI.Telerik.Dialogs;
|
||||
using Pilz.Updating.Client.Gui.LangRes;
|
||||
using Pilz.Updating.Client.GUI;
|
||||
using Pilz.Updating.GUIBase;
|
||||
using System.ComponentModel;
|
||||
using Telerik.WinControls;
|
||||
|
||||
namespace Pilz.Updating.Client.GUI;
|
||||
namespace Pilz.Updating.Client.Gui;
|
||||
|
||||
public class UpdateClientGUI
|
||||
public class UpdateClientGui
|
||||
{
|
||||
// F i e l d s
|
||||
|
||||
private Form parentForm;
|
||||
private SimpleActionDialog curProgressDialog;
|
||||
private UpdateWindow curProgressDialog;
|
||||
private readonly UpdateClient updateClient;
|
||||
|
||||
// P r o p e r t i e s
|
||||
@@ -23,23 +24,15 @@ public class UpdateClientGUI
|
||||
|
||||
// C o n s t r u c t o r s
|
||||
|
||||
public UpdateClientGUI(UpdateClient updateClient)
|
||||
public UpdateClientGui(UpdateClient updateClient)
|
||||
{
|
||||
this.updateClient = updateClient;
|
||||
updateClient.UpdateStatusChanged += MyUpdateClient_UpdateStatusChanged;
|
||||
updateClient.DownloadingUpdate += MyUpdateClient_DownloadingUpdate;
|
||||
updateClient.InstallingUpdate += MyUpdateClient_InstallingUpdate;
|
||||
updateClient.UpdateInstallerStarted += MyUpdateClient_FinishWork;
|
||||
updateClient.NoUpdatesFound += MyUpdateClient_NoUpdatesFound;
|
||||
updateClient.OnStatusChanged += UpdateClient_OnStatusChanged;
|
||||
}
|
||||
|
||||
~UpdateClientGUI()
|
||||
~UpdateClientGui()
|
||||
{
|
||||
updateClient.UpdateStatusChanged -= MyUpdateClient_UpdateStatusChanged;
|
||||
updateClient.DownloadingUpdate -= MyUpdateClient_DownloadingUpdate;
|
||||
updateClient.InstallingUpdate -= MyUpdateClient_InstallingUpdate;
|
||||
updateClient.UpdateInstallerStarted -= MyUpdateClient_FinishWork;
|
||||
updateClient.NoUpdatesFound -= MyUpdateClient_NoUpdatesFound;
|
||||
updateClient.OnStatusChanged -= UpdateClient_OnStatusChanged;
|
||||
}
|
||||
|
||||
// F e a t u r e s
|
||||
@@ -52,33 +45,81 @@ public class UpdateClientGUI
|
||||
|
||||
private void EndUpdating()
|
||||
{
|
||||
curProgressDialog?.Invoke(new Action(() => curProgressDialog.Close()));
|
||||
curProgressDialog?.Invoke(curProgressDialog.Close);
|
||||
}
|
||||
|
||||
private void MyUpdateClient_UpdateStatusChanged(UpdateStatus newStatus)
|
||||
// E v e n t s
|
||||
|
||||
private void UpdateClient_OnStatusChanged(object sender, UpdateStatusEventArgs e)
|
||||
{
|
||||
bool useGui = false;
|
||||
if (!(newStatus == UpdateStatus.Searching && UseHiddenSearch))
|
||||
void setStatus()
|
||||
{
|
||||
if (e.Event == UpdateStatusEvent.PreEvent)
|
||||
SetStatus(e.Status);
|
||||
}
|
||||
|
||||
switch (e.Status)
|
||||
{
|
||||
case UpdateStatus.Downloading:
|
||||
setStatus();
|
||||
if (e.Event == UpdateStatusEvent.PostEvent)
|
||||
{
|
||||
if (e.Client.UpdatePackageInfo == null && !UseHiddenSearch)
|
||||
RadMessageBox.Show(UpdatingClientGuiLangRes.MsgBox_NoUpdatesFound, UpdatingClientGuiLangRes.MsgBox_NoUpdatesFound_Titel, MessageBoxButtons.OK, RadMessageIcon.Info);
|
||||
|
||||
if (e.Client.UpdatePackageInfo != null && !ShowUpdatesAvailable(e.Client.UpdatePackageInfo))
|
||||
e.Cancel = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
switch (e.Status)
|
||||
{
|
||||
case UpdateStatus.Downloading:
|
||||
case UpdateStatus.Extracting:
|
||||
case UpdateStatus.Copying:
|
||||
case UpdateStatus.Cleanup:
|
||||
case UpdateStatus.Waiting:
|
||||
setStatus();
|
||||
break;
|
||||
}
|
||||
|
||||
switch (e.Status)
|
||||
{
|
||||
case UpdateStatus.Done:
|
||||
case UpdateStatus.Failed:
|
||||
case UpdateStatus.Canceled:
|
||||
EndUpdating();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetStatus(UpdateStatus status)
|
||||
{
|
||||
var useGui = false;
|
||||
|
||||
if (!(status == UpdateStatus.Searching && UseHiddenSearch))
|
||||
{
|
||||
useGui = true;
|
||||
}
|
||||
|
||||
if (useGui && curProgressDialog is null)
|
||||
{
|
||||
parentForm.Invoke(new Action(() =>
|
||||
parentForm.Invoke(() =>
|
||||
{
|
||||
curProgressDialog = new SimpleActionDialog();
|
||||
curProgressDialog.SetCurrentState(UpdateStatus.Waiting);
|
||||
curProgressDialog = new UpdateWindow();
|
||||
curProgressDialog.SetStatus(UpdateStatus.Waiting);
|
||||
curProgressDialog.Show(parentForm);
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
curProgressDialog?.Invoke(new Action(() => curProgressDialog.SetCurrentState(newStatus)));
|
||||
curProgressDialog?.Invoke(() => curProgressDialog.SetStatus(status));
|
||||
}
|
||||
|
||||
private void MyUpdateClient_DownloadingUpdate(UpdatePackageInfo pkg, CancelEventArgs e)
|
||||
private bool ShowUpdatesAvailable(UpdatePackageInfo pkg)
|
||||
{
|
||||
var dres = default(DialogResult);
|
||||
bool cancel;
|
||||
|
||||
// Hide progress dialog
|
||||
curProgressDialog?.Invoke(new Action(curProgressDialog.Hide));
|
||||
@@ -97,38 +138,22 @@ public class UpdateClientGUI
|
||||
pkg.Notes,
|
||||
updateClient.InstallAsAdmin);
|
||||
var symbol = GlobalSymbolFactory.Instance.GetImage(GlobalSymbols.software_installer, UI.Telerik.SvgImageSize.Small).ToIcon();
|
||||
dres = RadDialogBase.ShowDialog(dialog, parentForm, LangRes.Title_UpdatesAvailable, symbol).Result;
|
||||
dres = RadDialogBase.ShowDialog(dialog, parentForm, GeneralLangRes.Title_UpdatesAvailable, symbol).Result;
|
||||
});
|
||||
|
||||
if (dres != DialogResult.OK)
|
||||
{
|
||||
// Finish updating
|
||||
e.Cancel = true;
|
||||
// Cancel
|
||||
cancel = true;
|
||||
EndUpdating();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Cancel
|
||||
e.Cancel = false;
|
||||
// Continue
|
||||
cancel = false;
|
||||
curProgressDialog?.Invoke(new Action(curProgressDialog.Show));
|
||||
}
|
||||
}
|
||||
|
||||
private void MyUpdateClient_InstallingUpdate(UpdatePackageInfo pkg, CancelEventArgs e)
|
||||
{
|
||||
e.Cancel = false;
|
||||
}
|
||||
|
||||
private void MyUpdateClient_FinishWork()
|
||||
{
|
||||
EndUpdating();
|
||||
}
|
||||
|
||||
private void MyUpdateClient_NoUpdatesFound()
|
||||
{
|
||||
EndUpdating();
|
||||
|
||||
if (!UseHiddenSearch)
|
||||
RadMessageBox.Show(UpdatingClientGuiLangRes.MsgBox_NoUpdatesFound, UpdatingClientGuiLangRes.MsgBox_NoUpdatesFound_Titel, MessageBoxButtons.OK, RadMessageIcon.Info);
|
||||
return cancel;
|
||||
}
|
||||
}
|
||||
@@ -1,126 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Dieser Code wurde von einem Tool generiert.
|
||||
// Laufzeitversion:4.0.30319.42000
|
||||
//
|
||||
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
// der Code erneut generiert wird.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Pilz.Updating.Client.GUI {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
|
||||
/// </summary>
|
||||
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
|
||||
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
|
||||
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
|
||||
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class UpdatingClientGuiLangRes {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal UpdatingClientGuiLangRes() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
|
||||
/// </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("Pilz.Updating.Client.GUI.UpdatingClientGuiLangRes", typeof(UpdatingClientGuiLangRes).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
|
||||
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die No updates found! You are using the latest version. ähnelt.
|
||||
/// </summary>
|
||||
internal static string MsgBox_NoUpdatesFound {
|
||||
get {
|
||||
return ResourceManager.GetString("MsgBox_NoUpdatesFound", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die No Updates found ähnelt.
|
||||
/// </summary>
|
||||
internal static string MsgBox_NoUpdatesFound_Titel {
|
||||
get {
|
||||
return ResourceManager.GetString("MsgBox_NoUpdatesFound_Titel", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Downloading Update Installer ... ähnelt.
|
||||
/// </summary>
|
||||
internal static string SimpleActions_DownloadingInstaller {
|
||||
get {
|
||||
return ResourceManager.GetString("SimpleActions_DownloadingInstaller", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Downloading Update Package ... ähnelt.
|
||||
/// </summary>
|
||||
internal static string SimpleActions_DownloadingPackage {
|
||||
get {
|
||||
return ResourceManager.GetString("SimpleActions_DownloadingPackage", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Searching for Updates ... ähnelt.
|
||||
/// </summary>
|
||||
internal static string SimpleActions_Searching {
|
||||
get {
|
||||
return ResourceManager.GetString("SimpleActions_Searching", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Starting Installer ... ähnelt.
|
||||
/// </summary>
|
||||
internal static string SimpleActions_StartingInstaller {
|
||||
get {
|
||||
return ResourceManager.GetString("SimpleActions_StartingInstaller", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sucht eine lokalisierte Zeichenfolge, die Waiting ... ähnelt.
|
||||
/// </summary>
|
||||
internal static string SimpleActions_Waiting {
|
||||
get {
|
||||
return ResourceManager.GetString("SimpleActions_Waiting", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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="MsgBox_NoUpdatesFound" xml:space="preserve">
|
||||
<value>Es wurden keine Aktuallisierungen gefunden. Du verwendest die aktuellste Version.</value>
|
||||
</data>
|
||||
<data name="MsgBox_NoUpdatesFound_Titel" xml:space="preserve">
|
||||
<value>Keine Aktuallisierung gefunden</value>
|
||||
</data>
|
||||
<data name="SimpleActions_DownloadingInstaller" xml:space="preserve">
|
||||
<value>Update-Installer wird heruntergeladen ...</value>
|
||||
</data>
|
||||
<data name="SimpleActions_DownloadingPackage" xml:space="preserve">
|
||||
<value>Aktuallisierungspaket wird heruntergeladen ...</value>
|
||||
</data>
|
||||
<data name="SimpleActions_Searching" xml:space="preserve">
|
||||
<value>Nach Updates suchen ...</value>
|
||||
</data>
|
||||
<data name="SimpleActions_StartingInstaller" xml:space="preserve">
|
||||
<value>Starte Installer ...</value>
|
||||
</data>
|
||||
<data name="SimpleActions_Waiting" xml:space="preserve">
|
||||
<value>Warten ...</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="MsgBox_NoUpdatesFound" xml:space="preserve">
|
||||
<value>No updates found! You are using the latest version.</value>
|
||||
</data>
|
||||
<data name="MsgBox_NoUpdatesFound_Titel" xml:space="preserve">
|
||||
<value>No Updates found</value>
|
||||
</data>
|
||||
<data name="SimpleActions_DownloadingInstaller" xml:space="preserve">
|
||||
<value>Downloading Update Installer ...</value>
|
||||
</data>
|
||||
<data name="SimpleActions_DownloadingPackage" xml:space="preserve">
|
||||
<value>Downloading Update Package ...</value>
|
||||
</data>
|
||||
<data name="SimpleActions_Searching" xml:space="preserve">
|
||||
<value>Searching for Updates ...</value>
|
||||
</data>
|
||||
<data name="SimpleActions_StartingInstaller" xml:space="preserve">
|
||||
<value>Starting Installer ...</value>
|
||||
</data>
|
||||
<data name="SimpleActions_Waiting" xml:space="preserve">
|
||||
<value>Waiting ...</value>
|
||||
</data>
|
||||
</root>
|
||||
Reference in New Issue
Block a user