small code refactoring
This commit is contained in:
@@ -1,36 +1,32 @@
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using Pilz.Plugins;
|
||||
using System.Configuration;
|
||||
using Z.Reflection.Extensions;
|
||||
using Pilz.Plugins;
|
||||
using System.IO;
|
||||
|
||||
namespace Pilz.Updating.UpdateInstaller
|
||||
namespace Pilz.Updating.UpdateInstaller;
|
||||
|
||||
internal static class General
|
||||
{
|
||||
internal static class General
|
||||
private static string p = null;
|
||||
|
||||
public static string MyAppPath
|
||||
{
|
||||
private static string p = null;
|
||||
|
||||
public static string MyAppPath
|
||||
get
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrEmpty(p))
|
||||
p = Path.GetDirectoryName(IO.Extensions.GetExecutablePath());
|
||||
return p;
|
||||
}
|
||||
if (string.IsNullOrEmpty(p))
|
||||
p = Path.GetDirectoryName(IO.Extensions.GetExecutablePath());
|
||||
return p;
|
||||
}
|
||||
}
|
||||
|
||||
public static void LoadAddons(Lib.UpdateInstaller installer)
|
||||
public static void LoadAddons(Lib.UpdateInstaller installer)
|
||||
{
|
||||
var pluginsPath = Path.Combine(MyAppPath, "AddOns");
|
||||
if (Directory.Exists(pluginsPath))
|
||||
{
|
||||
var pluginsPath = Path.Combine(MyAppPath, "AddOns");
|
||||
if (Directory.Exists(pluginsPath))
|
||||
foreach (var subdir in Directory.GetDirectories(pluginsPath, string.Empty, SearchOption.TopDirectoryOnly))
|
||||
{
|
||||
foreach (var subdir in Directory.GetDirectories(pluginsPath, string.Empty, SearchOption.TopDirectoryOnly))
|
||||
{
|
||||
var pluginPath = Path.Combine(subdir, Path.GetFileName(subdir) + ".dll");
|
||||
if (File.Exists(pluginPath))
|
||||
PluginManager.Instance.LoadPlugin(pluginPath, installer);
|
||||
}
|
||||
var pluginPath = Path.Combine(subdir, Path.GetFileName(subdir) + ".dll");
|
||||
if (File.Exists(pluginPath))
|
||||
PluginManager.Instance.LoadPlugin(pluginPath, installer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,149 +1,147 @@
|
||||
using System;
|
||||
using Pilz.Updating.UpdateInstaller.Lib;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using Telerik.WinControls;
|
||||
using Telerik.WinControls.Themes;
|
||||
using Pilz.Updating.UpdateInstaller.Lib;
|
||||
|
||||
namespace Pilz.Updating.UpdateInstaller
|
||||
namespace Pilz.Updating.UpdateInstaller;
|
||||
|
||||
public partial class Main
|
||||
{
|
||||
public partial class Main
|
||||
// C o n s t r u c t o r s
|
||||
|
||||
public Main()
|
||||
{
|
||||
// C o n s t r u c t o r s
|
||||
// G u i
|
||||
this.Shown += Main_Shown;
|
||||
this.FormClosed += Main_FormClosed;
|
||||
this.FormClosing += Main_FormClosing;
|
||||
|
||||
public Main()
|
||||
// Get arguments
|
||||
var args = Environment.GetCommandLineArgs().Skip(1).ToArray();
|
||||
if (args.Length != 0)
|
||||
{
|
||||
// G u i
|
||||
this.Shown += Main_Shown;
|
||||
this.FormClosed += Main_FormClosed;
|
||||
this.FormClosing += Main_FormClosing;
|
||||
// Load config
|
||||
installer = new Lib.UpdateInstaller(UpdateInstallerConfig.Parse(args[0]));
|
||||
General.LoadAddons(installer);
|
||||
|
||||
// Get arguments
|
||||
var args = My.MyProject.Application.CommandLineArgs.ToArray();
|
||||
if (args.Any())
|
||||
{
|
||||
// Load config
|
||||
installer = new Lib.UpdateInstaller(UpdateInstallerConfig.Parse(args[0]));
|
||||
General.LoadAddons(installer);
|
||||
// Init Form
|
||||
InitializeComponent();
|
||||
|
||||
// Init Form
|
||||
InitializeComponent();
|
||||
// Init Style
|
||||
RadThemeComponentBase themeToUse = installer.Configuration.UIDarkMode ? new FluentDarkTheme() : new FluentTheme();
|
||||
ThemeResolutionService.ApplicationThemeName = themeToUse.ThemeName;
|
||||
|
||||
// Init Style
|
||||
RadThemeComponentBase themeToUse = installer.Configuration.UIDarkMode ? new FluentDarkTheme() : new FluentTheme();
|
||||
ThemeResolutionService.ApplicationThemeName = themeToUse.ThemeName;
|
||||
// Init Application Header Text
|
||||
string header;
|
||||
if (!string.IsNullOrEmpty(installer.Configuration.ApplicationName))
|
||||
header = string.Format(My.Resources.UpdateInstallerGuiLangRes.String_UpdatingApplicationX, installer.Configuration.ApplicationName);
|
||||
else
|
||||
header = My.Resources.UpdateInstallerGuiLangRes.String_UpdateIsRunning;
|
||||
|
||||
// Init Application Header Text
|
||||
string header;
|
||||
if (!string.IsNullOrEmpty(installer.Configuration.ApplicationName))
|
||||
header = string.Format(My.Resources.UpdateInstallerGuiLangRes.String_UpdatingApplicationX, installer.Configuration.ApplicationName);
|
||||
else
|
||||
header = My.Resources.UpdateInstallerGuiLangRes.String_UpdateIsRunning;
|
||||
|
||||
radLabel_Header.Text = $"<html><span style=\"font-size: 18pt; color: #b7472a\"><b>{header}</b></span></html>";
|
||||
}
|
||||
|
||||
if (installer is null)
|
||||
Environment.Exit(0);
|
||||
radLabel_Header.Text = $"<html><span style=\"font-size: 18pt; color: #b7472a\"><b>{header}</b></span></html>";
|
||||
}
|
||||
|
||||
// F i e l d s
|
||||
if (installer is null)
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
private bool allowClose = false;
|
||||
private readonly Lib.UpdateInstaller installer;
|
||||
// F i e l d s
|
||||
|
||||
// F e a t u r e s
|
||||
private bool allowClose = false;
|
||||
private readonly Lib.UpdateInstaller installer;
|
||||
|
||||
private void SetStatus(UpdateInstallerStatus newStatus)
|
||||
// F e a t u r e s
|
||||
|
||||
private void SetStatus(UpdateInstallerStatus newStatus)
|
||||
{
|
||||
string newStatusText = string.Empty;
|
||||
Image newStatusImage = null;
|
||||
|
||||
switch (newStatus)
|
||||
{
|
||||
string newStatusText = string.Empty;
|
||||
Image newStatusImage = null;
|
||||
|
||||
switch (newStatus)
|
||||
{
|
||||
case UpdateInstallerStatus.CopyingFiles:
|
||||
newStatusText = My.Resources.UpdateInstallerGuiLangRes.Status_CopyingFiles;
|
||||
break;
|
||||
case UpdateInstallerStatus.Done:
|
||||
newStatusText = My.Resources.UpdateInstallerGuiLangRes.Status_Done;
|
||||
break;
|
||||
case UpdateInstallerStatus.Extracting:
|
||||
newStatusText = My.Resources.UpdateInstallerGuiLangRes.Status_Extracting;
|
||||
break;
|
||||
case UpdateInstallerStatus.RemovingFiles:
|
||||
newStatusText = My.Resources.UpdateInstallerGuiLangRes.Status_RemovingFiles;
|
||||
break;
|
||||
case UpdateInstallerStatus.Waiting:
|
||||
newStatusText = My.Resources.UpdateInstallerGuiLangRes.Status_Waiting;
|
||||
break;
|
||||
}
|
||||
|
||||
switch (newStatus)
|
||||
{
|
||||
case UpdateInstallerStatus.CopyingFiles:
|
||||
newStatusImage = MyIcons.icons8_copy_16px;
|
||||
break;
|
||||
case UpdateInstallerStatus.Extracting:
|
||||
newStatusImage = MyIcons.icons8_open_archive_16px;
|
||||
break;
|
||||
case UpdateInstallerStatus.RemovingFiles:
|
||||
newStatusImage = MyIcons.icons8_recycle_bin_16px;
|
||||
break;
|
||||
case UpdateInstallerStatus.Waiting:
|
||||
newStatusImage = MyIcons.icons8_sand_timer_16px;
|
||||
break;
|
||||
case UpdateInstallerStatus.Done:
|
||||
newStatusImage = MyIcons.icons8_checkmark_16px;
|
||||
break;
|
||||
}
|
||||
|
||||
radLabel_Status.Text = newStatusText;
|
||||
radLabel_Status.Image = newStatusImage;
|
||||
|
||||
//if (newStatus == UpdateInstallerStatus.Done)
|
||||
//{
|
||||
// allowClose = true;
|
||||
// Close();
|
||||
//}
|
||||
case UpdateInstallerStatus.CopyingFiles:
|
||||
newStatusText = My.Resources.UpdateInstallerGuiLangRes.Status_CopyingFiles;
|
||||
break;
|
||||
case UpdateInstallerStatus.Done:
|
||||
newStatusText = My.Resources.UpdateInstallerGuiLangRes.Status_Done;
|
||||
break;
|
||||
case UpdateInstallerStatus.Extracting:
|
||||
newStatusText = My.Resources.UpdateInstallerGuiLangRes.Status_Extracting;
|
||||
break;
|
||||
case UpdateInstallerStatus.RemovingFiles:
|
||||
newStatusText = My.Resources.UpdateInstallerGuiLangRes.Status_RemovingFiles;
|
||||
break;
|
||||
case UpdateInstallerStatus.Waiting:
|
||||
newStatusText = My.Resources.UpdateInstallerGuiLangRes.Status_Waiting;
|
||||
break;
|
||||
}
|
||||
|
||||
private async Task WaitforHostApp()
|
||||
switch (newStatus)
|
||||
{
|
||||
SetStatus(UpdateInstallerStatus.Waiting);
|
||||
await Task.Run(() => installer.WaitForHostApplication());
|
||||
case UpdateInstallerStatus.CopyingFiles:
|
||||
newStatusImage = MyIcons.icons8_copy_16px;
|
||||
break;
|
||||
case UpdateInstallerStatus.Extracting:
|
||||
newStatusImage = MyIcons.icons8_open_archive_16px;
|
||||
break;
|
||||
case UpdateInstallerStatus.RemovingFiles:
|
||||
newStatusImage = MyIcons.icons8_recycle_bin_16px;
|
||||
break;
|
||||
case UpdateInstallerStatus.Waiting:
|
||||
newStatusImage = MyIcons.icons8_sand_timer_16px;
|
||||
break;
|
||||
case UpdateInstallerStatus.Done:
|
||||
newStatusImage = MyIcons.icons8_checkmark_16px;
|
||||
break;
|
||||
}
|
||||
|
||||
private async void ExecuteUpdate()
|
||||
{
|
||||
await Task.Run(() => installer.InstallUpdate());
|
||||
allowClose = true;
|
||||
Close();
|
||||
}
|
||||
radLabel_Status.Text = newStatusText;
|
||||
radLabel_Status.Image = newStatusImage;
|
||||
|
||||
private async void Main_Shown(object sender, EventArgs e)
|
||||
{
|
||||
radWaitingBar1.StartWaiting();
|
||||
await WaitforHostApp();
|
||||
ExecuteUpdate();
|
||||
}
|
||||
//if (newStatus == UpdateInstallerStatus.Done)
|
||||
//{
|
||||
// allowClose = true;
|
||||
// Close();
|
||||
//}
|
||||
}
|
||||
|
||||
private void Main_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
installer.StartHostApplication();
|
||||
}
|
||||
private async Task WaitforHostApp()
|
||||
{
|
||||
SetStatus(UpdateInstallerStatus.Waiting);
|
||||
await Task.Run(() => installer.WaitForHostApplication());
|
||||
}
|
||||
|
||||
private void Main_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
radWaitingBar1.StopWaiting();
|
||||
e.Cancel = !allowClose;
|
||||
}
|
||||
private async void ExecuteUpdate()
|
||||
{
|
||||
await Task.Run(() => installer.InstallUpdate());
|
||||
allowClose = true;
|
||||
Close();
|
||||
}
|
||||
|
||||
private void Installer_StatusChanges(object sender, UpdateInstallerStatusChangedEventArgs e)
|
||||
{
|
||||
base.Invoke(new Action(() => SetStatus(e.NewStatus)));
|
||||
}
|
||||
private async void Main_Shown(object sender, EventArgs e)
|
||||
{
|
||||
radWaitingBar1.StartWaiting();
|
||||
await WaitforHostApp();
|
||||
ExecuteUpdate();
|
||||
}
|
||||
|
||||
private void Main_FormClosed(object sender, FormClosedEventArgs e)
|
||||
{
|
||||
installer.StartHostApplication();
|
||||
}
|
||||
|
||||
private void Main_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
radWaitingBar1.StopWaiting();
|
||||
e.Cancel = !allowClose;
|
||||
}
|
||||
|
||||
private void Installer_StatusChanges(object sender, UpdateInstallerStatusChangedEventArgs e)
|
||||
{
|
||||
base.Invoke(new Action(() => SetStatus(e.NewStatus)));
|
||||
}
|
||||
}
|
||||
@@ -1,38 +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>
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Pilz.Updating.UpdateInstaller.My
|
||||
{
|
||||
|
||||
// HINWEIS: Diese Datei wird automatisch generiert und darf nicht direkt bearbeitet werden. Wenn Sie Änderungen vornehmen möchten
|
||||
// oder in dieser Datei Buildfehler auftreten, wechseln Sie zum Projekt-Designer.
|
||||
// (Wechseln Sie dazu zu den Projekteigenschaften, oder doppelklicken Sie auf den Knoten "Mein Projekt" im
|
||||
// Projektmappen-Explorer). Nehmen Sie auf der Registerkarte "Anwendung" entsprechende Änderungen vor.
|
||||
//
|
||||
internal partial class MyApplication
|
||||
{
|
||||
[DebuggerStepThrough()]
|
||||
public MyApplication() : base(Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||
{
|
||||
IsSingleInstance = false;
|
||||
EnableVisualStyles = true;
|
||||
SaveMySettingsOnExit = true;
|
||||
ShutdownStyle = Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterAllFormsClose;
|
||||
}
|
||||
|
||||
[DebuggerStepThrough()]
|
||||
protected override void OnCreateMainForm()
|
||||
{
|
||||
MainForm = MyProject.Forms.Main;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<MySubMain>true</MySubMain>
|
||||
<MainForm>Main</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>1</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
@@ -1,35 +0,0 @@
|
||||
using global::System;
|
||||
using global::System.ComponentModel;
|
||||
using global::System.Diagnostics;
|
||||
|
||||
namespace Pilz.Updating.UpdateInstaller.My
|
||||
{
|
||||
internal static partial class MyProject
|
||||
{
|
||||
internal partial class MyForms
|
||||
{
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public Main m_Main;
|
||||
|
||||
public Main Main
|
||||
{
|
||||
[DebuggerHidden]
|
||||
get
|
||||
{
|
||||
m_Main = MyForms.Create__Instance__(m_Main);
|
||||
return m_Main;
|
||||
}
|
||||
|
||||
[DebuggerHidden]
|
||||
set
|
||||
{
|
||||
if (value == m_Main)
|
||||
return;
|
||||
if (value is object)
|
||||
throw new ArgumentException("Property can only be set to Nothing");
|
||||
Dispose__Instance__(ref m_Main);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,305 +0,0 @@
|
||||
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Diagnostics;
|
||||
using System.Windows.Forms;
|
||||
using Microsoft.VisualBasic;
|
||||
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia */
|
||||
/* TODO ERROR: Skipped DefineDirectiveTrivia *//* TODO ERROR: Skipped DefineDirectiveTrivia *//* TODO ERROR: Skipped DefineDirectiveTrivia *//* TODO ERROR: Skipped DefineDirectiveTrivia *//* TODO ERROR: Skipped DefineDirectiveTrivia */
|
||||
/* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia */
|
||||
namespace Pilz.Updating.UpdateInstaller.My
|
||||
{
|
||||
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia */
|
||||
[System.CodeDom.Compiler.GeneratedCode("MyTemplate", "11.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia */
|
||||
internal partial class MyApplication : Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase
|
||||
{
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia */
|
||||
[STAThread()]
|
||||
[DebuggerHidden()]
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static void Main(string[] Args)
|
||||
{
|
||||
try
|
||||
{
|
||||
Application.SetCompatibleTextRenderingDefault(UseCompatibleTextRendering);
|
||||
}
|
||||
finally
|
||||
{
|
||||
}
|
||||
|
||||
MyProject.Application.Run(Args);
|
||||
}
|
||||
/* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
/* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
}
|
||||
|
||||
/* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia */
|
||||
[System.CodeDom.Compiler.GeneratedCode("MyTemplate", "11.0.0.0")]
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia */
|
||||
internal partial class MyComputer : Microsoft.VisualBasic.Devices.Computer
|
||||
{
|
||||
/* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
[DebuggerHidden()]
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public MyComputer() : base()
|
||||
{
|
||||
}
|
||||
}
|
||||
/* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
[HideModuleName()]
|
||||
[System.CodeDom.Compiler.GeneratedCode("MyTemplate", "11.0.0.0")]
|
||||
internal static partial class MyProject
|
||||
{
|
||||
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia */
|
||||
[System.ComponentModel.Design.HelpKeyword("My.Computer")]
|
||||
internal static MyComputer Computer
|
||||
{
|
||||
[DebuggerHidden()]
|
||||
get
|
||||
{
|
||||
return m_ComputerObjectProvider.GetInstance;
|
||||
}
|
||||
}
|
||||
|
||||
private readonly static ThreadSafeObjectProvider<MyComputer> m_ComputerObjectProvider = new ThreadSafeObjectProvider<MyComputer>();
|
||||
/* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia */
|
||||
[System.ComponentModel.Design.HelpKeyword("My.Application")]
|
||||
internal static MyApplication Application
|
||||
{
|
||||
[DebuggerHidden()]
|
||||
get
|
||||
{
|
||||
return m_AppObjectProvider.GetInstance;
|
||||
}
|
||||
}
|
||||
|
||||
private readonly static ThreadSafeObjectProvider<MyApplication> m_AppObjectProvider = new ThreadSafeObjectProvider<MyApplication>();
|
||||
/* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia */
|
||||
[System.ComponentModel.Design.HelpKeyword("My.User")]
|
||||
internal static Microsoft.VisualBasic.ApplicationServices.User User
|
||||
{
|
||||
[DebuggerHidden()]
|
||||
get
|
||||
{
|
||||
return m_UserObjectProvider.GetInstance;
|
||||
}
|
||||
}
|
||||
|
||||
private readonly static ThreadSafeObjectProvider<Microsoft.VisualBasic.ApplicationServices.User> m_UserObjectProvider = new ThreadSafeObjectProvider<Microsoft.VisualBasic.ApplicationServices.User>();
|
||||
/* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia */
|
||||
/* TODO ERROR: Skipped DefineDirectiveTrivia */
|
||||
[System.ComponentModel.Design.HelpKeyword("My.Forms")]
|
||||
internal static MyForms Forms
|
||||
{
|
||||
[DebuggerHidden()]
|
||||
get
|
||||
{
|
||||
return m_MyFormsObjectProvider.GetInstance;
|
||||
}
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[MyGroupCollection("System.Windows.Forms.Form", "Create__Instance__", "Dispose__Instance__", "My.MyProject.Forms")]
|
||||
internal sealed partial class MyForms
|
||||
{
|
||||
[DebuggerHidden()]
|
||||
private static T Create__Instance__<T>(T Instance) where T : Form, new()
|
||||
{
|
||||
if (Instance is null || Instance.IsDisposed)
|
||||
{
|
||||
if (m_FormBeingCreated is object)
|
||||
{
|
||||
if (m_FormBeingCreated.ContainsKey(typeof(T)) == true)
|
||||
{
|
||||
throw new InvalidOperationException(Microsoft.VisualBasic.CompilerServices.Utils.GetResourceString("WinForms_RecursiveFormCreate"));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_FormBeingCreated = new Hashtable();
|
||||
}
|
||||
|
||||
m_FormBeingCreated.Add(typeof(T), null);
|
||||
try
|
||||
{
|
||||
return new T();
|
||||
}
|
||||
catch (System.Reflection.TargetInvocationException ex) when (ex.InnerException is object)
|
||||
{
|
||||
string BetterMessage = Microsoft.VisualBasic.CompilerServices.Utils.GetResourceString("WinForms_SeeInnerException", ex.InnerException.Message);
|
||||
throw new InvalidOperationException(BetterMessage, ex.InnerException);
|
||||
}
|
||||
finally
|
||||
{
|
||||
m_FormBeingCreated.Remove(typeof(T));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return Instance;
|
||||
}
|
||||
}
|
||||
|
||||
[DebuggerHidden()]
|
||||
private void Dispose__Instance__<T>(ref T instance) where T : Form
|
||||
{
|
||||
instance.Dispose();
|
||||
instance = null;
|
||||
}
|
||||
|
||||
[DebuggerHidden()]
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public MyForms() : base()
|
||||
{
|
||||
}
|
||||
|
||||
[ThreadStatic()]
|
||||
private static Hashtable m_FormBeingCreated;
|
||||
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public override bool Equals(object o)
|
||||
{
|
||||
return base.Equals(o);
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
internal new Type GetType()
|
||||
{
|
||||
return typeof(MyForms);
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public override string ToString()
|
||||
{
|
||||
return base.ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private static ThreadSafeObjectProvider<MyForms> m_MyFormsObjectProvider = new ThreadSafeObjectProvider<MyForms>();
|
||||
|
||||
/* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia */
|
||||
[System.ComponentModel.Design.HelpKeyword("My.WebServices")]
|
||||
internal static MyWebServices WebServices
|
||||
{
|
||||
[DebuggerHidden()]
|
||||
get
|
||||
{
|
||||
return m_MyWebServicesObjectProvider.GetInstance;
|
||||
}
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[MyGroupCollection("System.Web.Services.Protocols.SoapHttpClientProtocol", "Create__Instance__", "Dispose__Instance__", "")]
|
||||
internal sealed class MyWebServices
|
||||
{
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[DebuggerHidden()]
|
||||
public override bool Equals(object o)
|
||||
{
|
||||
return base.Equals(o);
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[DebuggerHidden()]
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[DebuggerHidden()]
|
||||
internal new Type GetType()
|
||||
{
|
||||
return typeof(MyWebServices);
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[DebuggerHidden()]
|
||||
public override string ToString()
|
||||
{
|
||||
return base.ToString();
|
||||
}
|
||||
|
||||
[DebuggerHidden()]
|
||||
private static T Create__Instance__<T>(T instance) where T : new()
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
return new T();
|
||||
}
|
||||
else
|
||||
{
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
[DebuggerHidden()]
|
||||
private void Dispose__Instance__<T>(ref T instance)
|
||||
{
|
||||
instance = default;
|
||||
}
|
||||
|
||||
[DebuggerHidden()]
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public MyWebServices() : base()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private readonly static ThreadSafeObjectProvider<MyWebServices> m_MyWebServicesObjectProvider = new ThreadSafeObjectProvider<MyWebServices>();
|
||||
/* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Runtime.InteropServices.ComVisible(false)]
|
||||
internal sealed class ThreadSafeObjectProvider<T> where T : new()
|
||||
{
|
||||
internal T GetInstance
|
||||
{
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElseDirectiveTrivia */
|
||||
[DebuggerHidden()]
|
||||
get
|
||||
{
|
||||
if (m_ThreadStaticValue == null)
|
||||
m_ThreadStaticValue = new T();
|
||||
return m_ThreadStaticValue;
|
||||
}
|
||||
/* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
}
|
||||
|
||||
[DebuggerHidden()]
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public ThreadSafeObjectProvider() : base()
|
||||
{
|
||||
}
|
||||
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElseDirectiveTrivia */
|
||||
[System.Runtime.CompilerServices.CompilerGenerated()]
|
||||
[ThreadStatic()]
|
||||
private static T m_ThreadStaticValue;
|
||||
/* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
}
|
||||
}
|
||||
}
|
||||
/* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
@@ -1,253 +0,0 @@
|
||||
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
// See Compiler::LoadXmlSolutionExtension
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Xml.Linq;
|
||||
using Microsoft.VisualBasic;
|
||||
using Microsoft.VisualBasic.CompilerServices;
|
||||
|
||||
namespace Pilz.Updating.UpdateInstaller.My
|
||||
{
|
||||
[Embedded()]
|
||||
[DebuggerNonUserCode()]
|
||||
[System.Runtime.CompilerServices.CompilerGenerated()]
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
internal sealed class InternalXmlHelper
|
||||
{
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
private InternalXmlHelper()
|
||||
{
|
||||
}
|
||||
|
||||
public static string get_Value(IEnumerable<XElement> source)
|
||||
{
|
||||
foreach (XElement item in source)
|
||||
return item.Value;
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void set_Value(IEnumerable<XElement> source, string value)
|
||||
{
|
||||
foreach (XElement item in source)
|
||||
{
|
||||
item.Value = value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public static string get_AttributeValue(IEnumerable<XElement> source, XName name)
|
||||
{
|
||||
foreach (XElement item in source)
|
||||
return Conversions.ToString(item.Attribute(name));
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void set_AttributeValue(IEnumerable<XElement> source, XName name, string value)
|
||||
{
|
||||
foreach (XElement item in source)
|
||||
{
|
||||
item.SetAttributeValue(name, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public static string get_AttributeValue(XElement source, XName name)
|
||||
{
|
||||
return Conversions.ToString(source.Attribute(name));
|
||||
}
|
||||
|
||||
public static void set_AttributeValue(XElement source, XName name, string value)
|
||||
{
|
||||
source.SetAttributeValue(name, value);
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public static XAttribute CreateAttribute(XName name, object value)
|
||||
{
|
||||
if (value is null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return new XAttribute(name, value);
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public static XAttribute CreateNamespaceAttribute(XName name, XNamespace ns)
|
||||
{
|
||||
var a = new XAttribute(name, ns.NamespaceName);
|
||||
a.AddAnnotation(ns);
|
||||
return a;
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public static object RemoveNamespaceAttributes(string[] inScopePrefixes, XNamespace[] inScopeNs, List<XAttribute> attributes, object obj)
|
||||
{
|
||||
if (obj is object)
|
||||
{
|
||||
XElement elem = obj as XElement;
|
||||
if (elem is object)
|
||||
{
|
||||
return RemoveNamespaceAttributes(inScopePrefixes, inScopeNs, attributes, elem);
|
||||
}
|
||||
else
|
||||
{
|
||||
IEnumerable elems = obj as IEnumerable;
|
||||
if (elems is object)
|
||||
{
|
||||
return RemoveNamespaceAttributes(inScopePrefixes, inScopeNs, attributes, elems);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public static IEnumerable RemoveNamespaceAttributes(string[] inScopePrefixes, XNamespace[] inScopeNs, List<XAttribute> attributes, IEnumerable obj)
|
||||
{
|
||||
if (obj is object)
|
||||
{
|
||||
IEnumerable<XElement> elems = obj as IEnumerable<XElement>;
|
||||
if (elems is object)
|
||||
{
|
||||
return elems.Select(new RemoveNamespaceAttributesClosure(inScopePrefixes, inScopeNs, attributes).ProcessXElement);
|
||||
}
|
||||
else
|
||||
{
|
||||
return obj.Cast<object>().Select(new RemoveNamespaceAttributesClosure(inScopePrefixes, inScopeNs, attributes).ProcessObject);
|
||||
}
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
|
||||
[DebuggerNonUserCode()]
|
||||
[System.Runtime.CompilerServices.CompilerGenerated()]
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
private sealed class RemoveNamespaceAttributesClosure
|
||||
{
|
||||
private readonly string[] m_inScopePrefixes;
|
||||
private readonly XNamespace[] m_inScopeNs;
|
||||
private readonly List<XAttribute> m_attributes;
|
||||
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
internal RemoveNamespaceAttributesClosure(string[] inScopePrefixes, XNamespace[] inScopeNs, List<XAttribute> attributes)
|
||||
{
|
||||
m_inScopePrefixes = inScopePrefixes;
|
||||
m_inScopeNs = inScopeNs;
|
||||
m_attributes = attributes;
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
internal XElement ProcessXElement(XElement elem)
|
||||
{
|
||||
return RemoveNamespaceAttributes(m_inScopePrefixes, m_inScopeNs, m_attributes, elem);
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
internal object ProcessObject(object obj)
|
||||
{
|
||||
XElement elem = obj as XElement;
|
||||
if (elem is object)
|
||||
{
|
||||
return RemoveNamespaceAttributes(m_inScopePrefixes, m_inScopeNs, m_attributes, elem);
|
||||
}
|
||||
else
|
||||
{
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public static XElement RemoveNamespaceAttributes(string[] inScopePrefixes, XNamespace[] inScopeNs, List<XAttribute> attributes, XElement e)
|
||||
{
|
||||
if (e is object)
|
||||
{
|
||||
var a = e.FirstAttribute;
|
||||
while (a is object)
|
||||
{
|
||||
var nextA = a.NextAttribute;
|
||||
if (a.IsNamespaceDeclaration)
|
||||
{
|
||||
var ns = a.Annotation<XNamespace>();
|
||||
string prefix = a.Name.LocalName;
|
||||
if (ns is object)
|
||||
{
|
||||
if (inScopePrefixes is object && inScopeNs is object)
|
||||
{
|
||||
int lastIndex = inScopePrefixes.Length - 1;
|
||||
for (int i = 0, loopTo = lastIndex; i <= loopTo; i++)
|
||||
{
|
||||
string currentInScopePrefix = inScopePrefixes[i];
|
||||
var currentInScopeNs = inScopeNs[i];
|
||||
if (prefix.Equals(currentInScopePrefix))
|
||||
{
|
||||
if (ns == currentInScopeNs)
|
||||
{
|
||||
// prefix and namespace match. Remove the unneeded ns attribute
|
||||
a.Remove();
|
||||
}
|
||||
|
||||
// prefix is in scope but refers to something else. Leave the ns attribute.
|
||||
a = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (a is object)
|
||||
{
|
||||
// Prefix is not in scope
|
||||
// Now check whether it's going to be in scope because it is in the attributes list
|
||||
|
||||
if (attributes is object)
|
||||
{
|
||||
int lastIndex = attributes.Count - 1;
|
||||
for (int i = 0, loopTo1 = lastIndex; i <= loopTo1; i++)
|
||||
{
|
||||
var currentA = attributes[i];
|
||||
string currentInScopePrefix = currentA.Name.LocalName;
|
||||
var currentInScopeNs = currentA.Annotation<XNamespace>();
|
||||
if (currentInScopeNs is object)
|
||||
{
|
||||
if (prefix.Equals(currentInScopePrefix))
|
||||
{
|
||||
if (ns == currentInScopeNs)
|
||||
{
|
||||
// prefix and namespace match. Remove the unneeded ns attribute
|
||||
a.Remove();
|
||||
}
|
||||
|
||||
// prefix is in scope but refers to something else. Leave the ns attribute.
|
||||
a = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (a is object)
|
||||
{
|
||||
// Prefix is definitely not in scope
|
||||
a.Remove();
|
||||
// namespace is not defined either. Add this attributes list
|
||||
attributes.Add(a);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
a = nextA;
|
||||
}
|
||||
}
|
||||
|
||||
return e;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
|
||||
|
||||
using System;
|
||||
|
||||
namespace Microsoft.VisualBasic
|
||||
{
|
||||
[Embedded()]
|
||||
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Module | AttributeTargets.Assembly, Inherited = false)]
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
[System.Runtime.CompilerServices.CompilerGenerated()]
|
||||
internal sealed class Embedded : Attribute
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -1,120 +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>
|
||||
</root>
|
||||
@@ -19,7 +19,7 @@ namespace Pilz.Updating.UpdateInstaller {
|
||||
// -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", "16.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class MyIcons {
|
||||
|
||||
@@ -1,60 +1,27 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>Pilz.Updating.UpdateInstaller.My.MyApplication</StartupObject>
|
||||
<RootNamespace>Pilz.Updating.UpdateInstaller</RootNamespace>
|
||||
<MyType>WindowsForms</MyType>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<TargetFrameworks>net8.0-windows</TargetFrameworks>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<DefaultItemExcludes>$(DefaultItemExcludes);$(ProjectDir)**\*.vb</DefaultItemExcludes>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<AssemblyTitle>Pilz.Updating.UpdateInstaller</AssemblyTitle>
|
||||
<Company>Pilzinsel64</Company>
|
||||
<Product>Pilz.Updating.UpdateInstaller</Product>
|
||||
<Copyright>Copyright © Pilzinsel64 2019 - 2020</Copyright>
|
||||
<DocumentationFile>Pilz.Updating.UpdateInstaller.xml</DocumentationFile>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,CS1591</NoWarn>
|
||||
<ExtrasEnableWinFormsProjectSetup>true</ExtrasEnableWinFormsProjectSetup>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DefineDebug>true</DefineDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DefineDebug>false</DefineDebug>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>icons8_software_installer.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'RelMono|AnyCPU'">
|
||||
<Optimize>true</Optimize>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<DefineConstants>TRACE;RelMono</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.VisualBasic" Version="10.3.0" />
|
||||
<PackageReference Include="Pilz.IO" Version="2.0.0" />
|
||||
<PackageReference Include="Pilz.Plugins" Version="2.0.0" />
|
||||
<PackageReference Include="Pilz.Plugins" Version="2.1.9" />
|
||||
<PackageReference Include="System.IO.Compression" Version="4.3.0" />
|
||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||
<PackageReference Include="UI.for.WinForms.AllControls.Net60">
|
||||
<Version>2023.1.117</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
@@ -76,10 +43,6 @@
|
||||
<DependentUpon>Main.cs</DependentUpon>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="My Project\Application.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="MyIcons.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
@@ -132,10 +95,6 @@
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>Pilz.Updating.UpdateInstaller.My</CustomToolNamespace>
|
||||
@@ -152,11 +111,8 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="UI.for.WinForms.Common" Version="2024.2.514" />
|
||||
<PackageReference Include="UI.for.WinForms.Themes" Version="2024.2.514" />
|
||||
<PackageReference Include="Z.ExtensionMethods.WithNamespace" Version="2.1.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Remove="obj\RelMono\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs" />
|
||||
<Compile Remove="obj\RelMono\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs" />
|
||||
<Compile Remove="obj\RelMono\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
14
Pilz.Updating.UpdateInstaller/Program.cs
Normal file
14
Pilz.Updating.UpdateInstaller/Program.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Pilz.Updating.UpdateInstaller;
|
||||
|
||||
internal static class Program
|
||||
{
|
||||
internal static void Main(string[] args)
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);
|
||||
Application.Run(new Main());
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using global::System;
|
||||
using global::System.Reflection;
|
||||
using global::System.Runtime.InteropServices;
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Pilz.Updating.UpdateInstaller.My.Resources {
|
||||
// -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", "16.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Pilz.Updating.UpdateInstaller.My.Resources {
|
||||
// -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", "16.0.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class UpdateInstallerGuiLangRes {
|
||||
|
||||
Reference in New Issue
Block a user