add project
This commit is contained in:
63
.gitattributes
vendored
Normal file
63
.gitattributes
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
###############################################################################
|
||||
# Set default behavior to automatically normalize line endings.
|
||||
###############################################################################
|
||||
* text=auto
|
||||
|
||||
###############################################################################
|
||||
# Set default behavior for command prompt diff.
|
||||
#
|
||||
# This is need for earlier builds of msysgit that does not have it on by
|
||||
# default for csharp files.
|
||||
# Note: This is only used by command line
|
||||
###############################################################################
|
||||
#*.cs diff=csharp
|
||||
|
||||
###############################################################################
|
||||
# Set the merge driver for project and solution files
|
||||
#
|
||||
# Merging from the command prompt will add diff markers to the files if there
|
||||
# are conflicts (Merging from VS is not affected by the settings below, in VS
|
||||
# the diff markers are never inserted). Diff markers may cause the following
|
||||
# file extensions to fail to load in VS. An alternative would be to treat
|
||||
# these files as binary and thus will always conflict and require user
|
||||
# intervention with every merge. To do so, just uncomment the entries below
|
||||
###############################################################################
|
||||
#*.sln merge=binary
|
||||
#*.csproj merge=binary
|
||||
#*.vbproj merge=binary
|
||||
#*.vcxproj merge=binary
|
||||
#*.vcproj merge=binary
|
||||
#*.dbproj merge=binary
|
||||
#*.fsproj merge=binary
|
||||
#*.lsproj merge=binary
|
||||
#*.wixproj merge=binary
|
||||
#*.modelproj merge=binary
|
||||
#*.sqlproj merge=binary
|
||||
#*.wwaproj merge=binary
|
||||
|
||||
###############################################################################
|
||||
# behavior for image files
|
||||
#
|
||||
# image files are treated as binary by default.
|
||||
###############################################################################
|
||||
#*.jpg binary
|
||||
#*.png binary
|
||||
#*.gif binary
|
||||
|
||||
###############################################################################
|
||||
# diff behavior for common document formats
|
||||
#
|
||||
# Convert binary document formats to text before diffing them. This feature
|
||||
# is only available from the command line. Turn it on by uncommenting the
|
||||
# entries below.
|
||||
###############################################################################
|
||||
#*.doc diff=astextplain
|
||||
#*.DOC diff=astextplain
|
||||
#*.docx diff=astextplain
|
||||
#*.DOCX diff=astextplain
|
||||
#*.dot diff=astextplain
|
||||
#*.DOT diff=astextplain
|
||||
#*.pdf diff=astextplain
|
||||
#*.PDF diff=astextplain
|
||||
#*.rtf diff=astextplain
|
||||
#*.RTF diff=astextplain
|
||||
262
.gitignore
vendored
Normal file
262
.gitignore
vendored
Normal file
@@ -0,0 +1,262 @@
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
|
||||
# User-specific files
|
||||
*.suo
|
||||
*.user
|
||||
*.userosscache
|
||||
*.sln.docstates
|
||||
|
||||
# User-specific files (MonoDevelop/Xamarin Studio)
|
||||
*.userprefs
|
||||
|
||||
# Build results
|
||||
[Dd]ebug/
|
||||
[Dd]ebugPublic/
|
||||
[Rr]elease/
|
||||
[Rr]eleases/
|
||||
x64/
|
||||
x86/
|
||||
bld/
|
||||
[Bb]in/
|
||||
[Oo]bj/
|
||||
[Ll]og/
|
||||
|
||||
# Visual Studio 2015 cache/options directory
|
||||
.vs/
|
||||
# Uncomment if you have tasks that create the project's static files in wwwroot
|
||||
#wwwroot/
|
||||
|
||||
# MSTest test Results
|
||||
[Tt]est[Rr]esult*/
|
||||
[Bb]uild[Ll]og.*
|
||||
|
||||
# NUNIT
|
||||
*.VisualState.xml
|
||||
TestResult.xml
|
||||
|
||||
# Build Results of an ATL Project
|
||||
[Dd]ebugPS/
|
||||
[Rr]eleasePS/
|
||||
dlldata.c
|
||||
|
||||
# DNX
|
||||
project.lock.json
|
||||
project.fragment.lock.json
|
||||
artifacts/
|
||||
|
||||
*_i.c
|
||||
*_p.c
|
||||
*_i.h
|
||||
*.ilk
|
||||
*.meta
|
||||
*.obj
|
||||
*.pch
|
||||
*.pdb
|
||||
*.pgc
|
||||
*.pgd
|
||||
*.rsp
|
||||
*.sbr
|
||||
*.tlb
|
||||
*.tli
|
||||
*.tlh
|
||||
*.tmp
|
||||
*.tmp_proj
|
||||
*.log
|
||||
*.vspscc
|
||||
*.vssscc
|
||||
.builds
|
||||
*.pidb
|
||||
*.svclog
|
||||
*.scc
|
||||
|
||||
# Chutzpah Test files
|
||||
_Chutzpah*
|
||||
|
||||
# Visual C++ cache files
|
||||
ipch/
|
||||
*.aps
|
||||
*.ncb
|
||||
*.opendb
|
||||
*.opensdf
|
||||
*.sdf
|
||||
*.cachefile
|
||||
*.VC.db
|
||||
*.VC.VC.opendb
|
||||
|
||||
# Visual Studio profiler
|
||||
*.psess
|
||||
*.vsp
|
||||
*.vspx
|
||||
*.sap
|
||||
|
||||
# TFS 2012 Local Workspace
|
||||
$tf/
|
||||
|
||||
# Guidance Automation Toolkit
|
||||
*.gpState
|
||||
|
||||
# ReSharper is a .NET coding add-in
|
||||
_ReSharper*/
|
||||
*.[Rr]e[Ss]harper
|
||||
*.DotSettings.user
|
||||
|
||||
# JustCode is a .NET coding add-in
|
||||
.JustCode
|
||||
|
||||
# TeamCity is a build add-in
|
||||
_TeamCity*
|
||||
|
||||
# DotCover is a Code Coverage Tool
|
||||
*.dotCover
|
||||
|
||||
# NCrunch
|
||||
_NCrunch_*
|
||||
.*crunch*.local.xml
|
||||
nCrunchTemp_*
|
||||
|
||||
# MightyMoose
|
||||
*.mm.*
|
||||
AutoTest.Net/
|
||||
|
||||
# Web workbench (sass)
|
||||
.sass-cache/
|
||||
|
||||
# Installshield output folder
|
||||
[Ee]xpress/
|
||||
|
||||
# DocProject is a documentation generator add-in
|
||||
DocProject/buildhelp/
|
||||
DocProject/Help/*.HxT
|
||||
DocProject/Help/*.HxC
|
||||
DocProject/Help/*.hhc
|
||||
DocProject/Help/*.hhk
|
||||
DocProject/Help/*.hhp
|
||||
DocProject/Help/Html2
|
||||
DocProject/Help/html
|
||||
|
||||
# Click-Once directory
|
||||
publish/
|
||||
|
||||
# Publish Web Output
|
||||
*.[Pp]ublish.xml
|
||||
*.azurePubxml
|
||||
# TODO: Comment the next line if you want to checkin your web deploy settings
|
||||
# but database connection strings (with potential passwords) will be unencrypted
|
||||
#*.pubxml
|
||||
*.publishproj
|
||||
|
||||
# Microsoft Azure Web App publish settings. Comment the next line if you want to
|
||||
# checkin your Azure Web App publish settings, but sensitive information contained
|
||||
# in these scripts will be unencrypted
|
||||
PublishScripts/
|
||||
|
||||
# NuGet Packages
|
||||
*.nupkg
|
||||
# The packages folder can be ignored because of Package Restore
|
||||
**/packages/*
|
||||
# except build/, which is used as an MSBuild target.
|
||||
!**/packages/build/
|
||||
# Uncomment if necessary however generally it will be regenerated when needed
|
||||
#!**/packages/repositories.config
|
||||
# NuGet v3's project.json files produces more ignoreable files
|
||||
*.nuget.props
|
||||
*.nuget.targets
|
||||
|
||||
# Microsoft Azure Build Output
|
||||
csx/
|
||||
*.build.csdef
|
||||
|
||||
# Microsoft Azure Emulator
|
||||
ecf/
|
||||
rcf/
|
||||
|
||||
# Windows Store app package directories and files
|
||||
AppPackages/
|
||||
BundleArtifacts/
|
||||
Package.StoreAssociation.xml
|
||||
_pkginfo.txt
|
||||
|
||||
# Visual Studio cache files
|
||||
# files ending in .cache can be ignored
|
||||
*.[Cc]ache
|
||||
# but keep track of directories ending in .cache
|
||||
!*.[Cc]ache/
|
||||
|
||||
# Others
|
||||
ClientBin/
|
||||
~$*
|
||||
*~
|
||||
*.dbmdl
|
||||
*.dbproj.schemaview
|
||||
*.jfm
|
||||
*.pfx
|
||||
*.publishsettings
|
||||
node_modules/
|
||||
orleans.codegen.cs
|
||||
|
||||
# Since there are multiple workflows, uncomment next line to ignore bower_components
|
||||
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
|
||||
#bower_components/
|
||||
|
||||
# RIA/Silverlight projects
|
||||
Generated_Code/
|
||||
|
||||
# Backup & report files from converting an old project file
|
||||
# to a newer Visual Studio version. Backup files are not needed,
|
||||
# because we have git ;-)
|
||||
_UpgradeReport_Files/
|
||||
Backup*/
|
||||
UpgradeLog*.XML
|
||||
UpgradeLog*.htm
|
||||
|
||||
# SQL Server files
|
||||
*.mdf
|
||||
*.ldf
|
||||
|
||||
# Business Intelligence projects
|
||||
*.rdl.data
|
||||
*.bim.layout
|
||||
*.bim_*.settings
|
||||
|
||||
# Microsoft Fakes
|
||||
FakesAssemblies/
|
||||
|
||||
# GhostDoc plugin setting file
|
||||
*.GhostDoc.xml
|
||||
|
||||
# Node.js Tools for Visual Studio
|
||||
.ntvs_analysis.dat
|
||||
|
||||
# Visual Studio 6 build log
|
||||
*.plg
|
||||
|
||||
# Visual Studio 6 workspace options file
|
||||
*.opt
|
||||
|
||||
# Visual Studio LightSwitch build output
|
||||
**/*.HTMLClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/GeneratedArtifacts
|
||||
**/*.DesktopClient/ModelManifest.xml
|
||||
**/*.Server/GeneratedArtifacts
|
||||
**/*.Server/ModelManifest.xml
|
||||
_Pvt_Extensions
|
||||
|
||||
# Paket dependency manager
|
||||
.paket/paket.exe
|
||||
paket-files/
|
||||
|
||||
# FAKE - F# Make
|
||||
.fake/
|
||||
|
||||
# JetBrains Rider
|
||||
.idea/
|
||||
*.sln.iml
|
||||
|
||||
# CodeRush
|
||||
.cr/
|
||||
|
||||
# Python Tools for Visual Studio (PTVS)
|
||||
__pycache__/
|
||||
*.pyc
|
||||
/*/*.xml
|
||||
31
SM64 ROM Manager Administration.sln
Normal file
31
SM64 ROM Manager Administration.sln
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.32002.261
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SM64 ROM Manager.ProgressUpdater", "SM64 ROM Manager.ProgressUpdater\SM64 ROM Manager.ProgressUpdater.csproj", "{E2B5326E-FF5F-4521-BD8A-0A8DA5A6671E}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SM64 ROM Manager.UpdateInstallerAddOn", "SM64 ROM Manager.UpdateInstallerAddOn\SM64 ROM Manager.UpdateInstallerAddOn.csproj", "{C702C309-65C1-4FE4-B468-035ADC31FDEF}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E2B5326E-FF5F-4521-BD8A-0A8DA5A6671E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E2B5326E-FF5F-4521-BD8A-0A8DA5A6671E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E2B5326E-FF5F-4521-BD8A-0A8DA5A6671E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E2B5326E-FF5F-4521-BD8A-0A8DA5A6671E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C702C309-65C1-4FE4-B468-035ADC31FDEF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C702C309-65C1-4FE4-B468-035ADC31FDEF}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C702C309-65C1-4FE4-B468-035ADC31FDEF}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{C702C309-65C1-4FE4-B468-035ADC31FDEF}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {AF03A286-A955-4C29-8BFB-E6B2BCF65327}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
BIN
SM64 ROM Manager.ProgressUpdater/1443729764_forest_mushroom.ico
Normal file
BIN
SM64 ROM Manager.ProgressUpdater/1443729764_forest_mushroom.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 108 KiB |
38
SM64 ROM Manager.ProgressUpdater/App.config
Normal file
38
SM64 ROM Manager.ProgressUpdater/App.config
Normal file
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Interactive.Async" publicKeyToken="94bc3704cddfc263" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.2.5.0" newVersion="1.2.5.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Linq.Async" publicKeyToken="94bc3704cddfc263" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
158
SM64 ROM Manager.ProgressUpdater/DiscordMgr.cs
Normal file
158
SM64 ROM Manager.ProgressUpdater/DiscordMgr.cs
Normal file
@@ -0,0 +1,158 @@
|
||||
using Discord;
|
||||
using Discord.Rest;
|
||||
using Discord.WebSocket;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Microsoft.VisualBasic.CompilerServices.LikeOperator;
|
||||
|
||||
namespace SM64_ROM_Manager.ProgressUpdater
|
||||
{
|
||||
public class DiscordMgr
|
||||
{
|
||||
public delegate void LoggedMsgEventHandler(object sender, string logmsg, bool isError);
|
||||
|
||||
public event EventHandler GotReady;
|
||||
public event EventHandler HasDisconnected;
|
||||
public event LoggedMsgEventHandler LoggedMsg;
|
||||
|
||||
private Settings settings;
|
||||
private string ParamCounterName { get => settings.DiscordMsgParamCounter + "="; }
|
||||
public DiscordSocketClient Client { get; private set; }
|
||||
public bool IsReady { get; private set; } = false;
|
||||
|
||||
public DiscordMgr(Settings settings)
|
||||
{
|
||||
SetSettings(settings);
|
||||
}
|
||||
|
||||
public void SetSettings(Settings settings)
|
||||
{
|
||||
this.settings = settings;
|
||||
}
|
||||
|
||||
public async void Start()
|
||||
{
|
||||
if (settings.DiscordUploadEnabled && !string.IsNullOrEmpty(settings.DiscordBotToken))
|
||||
{
|
||||
var socketConfig = new DiscordSocketConfig();
|
||||
socketConfig.RestClientProvider = Discord.Net.Rest.DefaultRestClientProvider.Create(useProxy: true);
|
||||
socketConfig.WebSocketProvider = Discord.Net.WebSockets.DefaultWebSocketProvider.Create(System.Net.WebRequest.DefaultWebProxy);
|
||||
|
||||
Client = new DiscordSocketClient(socketConfig);
|
||||
|
||||
Client.Log += Client_Log;
|
||||
Client.Ready += Client_Ready;
|
||||
Client.Disconnected += Client_Disconnected;
|
||||
|
||||
await Client.LoginAsync(TokenType.Bot, settings.DiscordBotToken);
|
||||
await Client.StartAsync();
|
||||
}
|
||||
else
|
||||
LoggedMsg?.Invoke(this, "Disabled or Token invalid", true);
|
||||
}
|
||||
|
||||
public async void Stop()
|
||||
{
|
||||
await Client.StopAsync();
|
||||
await Client.LogoutAsync();
|
||||
}
|
||||
|
||||
private Task Client_Disconnected(Exception exception)
|
||||
{
|
||||
Task.Run(() => HasDisconnected?.Invoke(this, new EventArgs()));
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private Task Client_Ready()
|
||||
{
|
||||
Task.Run(() =>
|
||||
{
|
||||
Task.Delay(10);
|
||||
IsReady = true;
|
||||
GotReady?.Invoke(this, new EventArgs());
|
||||
});
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
private Task Client_Log(LogMessage msg)
|
||||
{
|
||||
Task.Run(() => LoggedMsg?.Invoke(this, msg.Message, msg.Exception is object));
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
public async void SetOnline()
|
||||
{
|
||||
await Client.SetStatusAsync(UserStatus.Online);
|
||||
}
|
||||
|
||||
public async Task SendMessage()
|
||||
{
|
||||
var newVersion = new Version(settings.Version);
|
||||
var guild = Client.GetGuild(settings.DiscordGuildID);
|
||||
if (guild is object)
|
||||
{
|
||||
var channel = guild.GetTextChannel(settings.DiscordChannelID);
|
||||
if (channel is object)
|
||||
{
|
||||
int newCounter = -1;
|
||||
RestUserMessage msgToDelete = null;
|
||||
|
||||
// Delete last messages
|
||||
var lastMsgs = await channel.GetMessagesAsync(10).ToArrayAsync();
|
||||
foreach (var msgs in lastMsgs)
|
||||
{
|
||||
foreach (var msg in msgs)
|
||||
{
|
||||
if (newCounter == -1 && msg is RestUserMessage)
|
||||
{
|
||||
var umsg = (RestUserMessage)msg;
|
||||
bool deleteMsg = false;
|
||||
|
||||
bool checkMsgString(string strMsg) =>
|
||||
LikeString(strMsg, string.Format(settings.DiscordMsgBaseURL, newVersion.Major, newVersion.Minor, newVersion.Build, newVersion.Revision, "*"), Microsoft.VisualBasic.CompareMethod.Text);
|
||||
int getNewCounter(string strUrl) =>
|
||||
Convert.ToInt32(strUrl.Substring(strUrl.IndexOf(ParamCounterName) + ParamCounterName.Length));
|
||||
|
||||
foreach (var embed in umsg.Embeds)
|
||||
{
|
||||
if (!deleteMsg && !string.IsNullOrEmpty(embed.Image?.Url) && checkMsgString(embed.Image?.Url))
|
||||
{
|
||||
deleteMsg = true;
|
||||
newCounter = getNewCounter(embed.Image?.Url);
|
||||
}
|
||||
}
|
||||
|
||||
if (!deleteMsg && !string.IsNullOrEmpty(umsg.Content) && checkMsgString(umsg.Content))
|
||||
{
|
||||
deleteMsg = true;
|
||||
newCounter = getNewCounter(umsg.Content);
|
||||
}
|
||||
|
||||
if (deleteMsg)
|
||||
msgToDelete = umsg;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Set new counter
|
||||
newCounter += 1;
|
||||
|
||||
// Build embed
|
||||
var embedBuilder = new EmbedBuilder();
|
||||
embedBuilder.ImageUrl = string.Format(settings.DiscordMsgBaseURL, newVersion.Major, newVersion.Minor, newVersion.Build, newVersion.Revision, newCounter);
|
||||
var newEmbed = embedBuilder.Build();
|
||||
|
||||
// Send Message
|
||||
await channel.SendMessageAsync(embed: newEmbed);
|
||||
|
||||
// Delete old message
|
||||
if (msgToDelete is object)
|
||||
await msgToDelete.DeleteAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
254
SM64 ROM Manager.ProgressUpdater/DiscordSettingsDialog.Designer.cs
generated
Normal file
254
SM64 ROM Manager.ProgressUpdater/DiscordSettingsDialog.Designer.cs
generated
Normal file
@@ -0,0 +1,254 @@
|
||||
namespace SM64_ROM_Manager.ProgressUpdater
|
||||
{
|
||||
partial class DiscordSettingsDialog
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DiscordSettingsDialog));
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.labelX3 = new DevComponents.DotNetBar.LabelX();
|
||||
this.TextBoxX_UrlExtraCounterParam = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.labelX2 = new DevComponents.DotNetBar.LabelX();
|
||||
this.TextBoxX_ImgBaseURL = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.LabelX1 = new DevComponents.DotNetBar.LabelX();
|
||||
this.TextBoxX_BotToken = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.AdvTree1 = new DevComponents.AdvTree.AdvTree();
|
||||
this.nodeConnector1 = new DevComponents.AdvTree.NodeConnector();
|
||||
this.elementStyle1 = new DevComponents.DotNetBar.ElementStyle();
|
||||
this.buttonX1 = new DevComponents.DotNetBar.ButtonX();
|
||||
this.CheckBoxX_EnableDiscordUpload = new DevComponents.DotNetBar.Controls.CheckBoxX();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.AdvTree1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.panel1.Controls.Add(this.CheckBoxX_EnableDiscordUpload);
|
||||
this.panel1.Controls.Add(this.labelX3);
|
||||
this.panel1.Controls.Add(this.TextBoxX_UrlExtraCounterParam);
|
||||
this.panel1.Controls.Add(this.labelX2);
|
||||
this.panel1.Controls.Add(this.TextBoxX_ImgBaseURL);
|
||||
this.panel1.Controls.Add(this.LabelX1);
|
||||
this.panel1.Controls.Add(this.TextBoxX_BotToken);
|
||||
this.panel1.Controls.Add(this.AdvTree1);
|
||||
this.panel1.Controls.Add(this.buttonX1);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(394, 194);
|
||||
this.panel1.TabIndex = 0;
|
||||
//
|
||||
// labelX3
|
||||
//
|
||||
this.labelX3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
//
|
||||
//
|
||||
//
|
||||
this.labelX3.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.labelX3.Location = new System.Drawing.Point(3, 142);
|
||||
this.labelX3.Name = "labelX3";
|
||||
this.labelX3.Size = new System.Drawing.Size(194, 23);
|
||||
this.labelX3.TabIndex = 5;
|
||||
this.labelX3.Text = "URL extra counter param name:";
|
||||
//
|
||||
// TextBoxX_UrlExtraCounterParam
|
||||
//
|
||||
this.TextBoxX_UrlExtraCounterParam.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TextBoxX_UrlExtraCounterParam.BackColor = System.Drawing.Color.White;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.TextBoxX_UrlExtraCounterParam.Border.Class = "TextBoxBorder";
|
||||
this.TextBoxX_UrlExtraCounterParam.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.TextBoxX_UrlExtraCounterParam.DisabledBackColor = System.Drawing.Color.White;
|
||||
this.TextBoxX_UrlExtraCounterParam.ForeColor = System.Drawing.Color.Black;
|
||||
this.TextBoxX_UrlExtraCounterParam.Location = new System.Drawing.Point(3, 171);
|
||||
this.TextBoxX_UrlExtraCounterParam.Name = "TextBoxX_UrlExtraCounterParam";
|
||||
this.TextBoxX_UrlExtraCounterParam.PreventEnterBeep = true;
|
||||
this.TextBoxX_UrlExtraCounterParam.Size = new System.Drawing.Size(194, 20);
|
||||
this.TextBoxX_UrlExtraCounterParam.TabIndex = 6;
|
||||
this.TextBoxX_UrlExtraCounterParam.TextChanged += new System.EventHandler(this.TextBoxX_UrlExtraCounterParam_TextChanged);
|
||||
//
|
||||
// labelX2
|
||||
//
|
||||
this.labelX2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
//
|
||||
//
|
||||
//
|
||||
this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.labelX2.Location = new System.Drawing.Point(3, 87);
|
||||
this.labelX2.Name = "labelX2";
|
||||
this.labelX2.Size = new System.Drawing.Size(194, 23);
|
||||
this.labelX2.TabIndex = 5;
|
||||
this.labelX2.Text = "Image Base URL:";
|
||||
//
|
||||
// TextBoxX_ImgBaseURL
|
||||
//
|
||||
this.TextBoxX_ImgBaseURL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TextBoxX_ImgBaseURL.BackColor = System.Drawing.Color.White;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.TextBoxX_ImgBaseURL.Border.Class = "TextBoxBorder";
|
||||
this.TextBoxX_ImgBaseURL.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.TextBoxX_ImgBaseURL.DisabledBackColor = System.Drawing.Color.White;
|
||||
this.TextBoxX_ImgBaseURL.ForeColor = System.Drawing.Color.Black;
|
||||
this.TextBoxX_ImgBaseURL.Location = new System.Drawing.Point(3, 116);
|
||||
this.TextBoxX_ImgBaseURL.Name = "TextBoxX_ImgBaseURL";
|
||||
this.TextBoxX_ImgBaseURL.PreventEnterBeep = true;
|
||||
this.TextBoxX_ImgBaseURL.Size = new System.Drawing.Size(194, 20);
|
||||
this.TextBoxX_ImgBaseURL.TabIndex = 6;
|
||||
this.TextBoxX_ImgBaseURL.TextChanged += new System.EventHandler(this.TextBoxX_ImgBaseURL_TextChanged);
|
||||
//
|
||||
// LabelX1
|
||||
//
|
||||
this.LabelX1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
//
|
||||
//
|
||||
//
|
||||
this.LabelX1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.LabelX1.Location = new System.Drawing.Point(3, 32);
|
||||
this.LabelX1.Name = "LabelX1";
|
||||
this.LabelX1.Size = new System.Drawing.Size(194, 23);
|
||||
this.LabelX1.TabIndex = 5;
|
||||
this.LabelX1.Text = "Discord Bot Token:";
|
||||
//
|
||||
// TextBoxX_BotToken
|
||||
//
|
||||
this.TextBoxX_BotToken.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TextBoxX_BotToken.BackColor = System.Drawing.Color.White;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.TextBoxX_BotToken.Border.Class = "TextBoxBorder";
|
||||
this.TextBoxX_BotToken.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.TextBoxX_BotToken.DisabledBackColor = System.Drawing.Color.White;
|
||||
this.TextBoxX_BotToken.ForeColor = System.Drawing.Color.Black;
|
||||
this.TextBoxX_BotToken.Location = new System.Drawing.Point(3, 61);
|
||||
this.TextBoxX_BotToken.Name = "TextBoxX_BotToken";
|
||||
this.TextBoxX_BotToken.PreventEnterBeep = true;
|
||||
this.TextBoxX_BotToken.Size = new System.Drawing.Size(194, 20);
|
||||
this.TextBoxX_BotToken.TabIndex = 6;
|
||||
this.TextBoxX_BotToken.TextChanged += new System.EventHandler(this.TextBoxX_BotToken_TextChanged);
|
||||
//
|
||||
// AdvTree1
|
||||
//
|
||||
this.AdvTree1.AccessibleRole = System.Windows.Forms.AccessibleRole.Outline;
|
||||
this.AdvTree1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.AdvTree1.BackColor = System.Drawing.SystemColors.Window;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.AdvTree1.BackgroundStyle.Class = "TreeBorderKey";
|
||||
this.AdvTree1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.AdvTree1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
|
||||
this.AdvTree1.Location = new System.Drawing.Point(203, 32);
|
||||
this.AdvTree1.Name = "AdvTree1";
|
||||
this.AdvTree1.NodesConnector = this.nodeConnector1;
|
||||
this.AdvTree1.NodeStyle = this.elementStyle1;
|
||||
this.AdvTree1.PathSeparator = ";";
|
||||
this.AdvTree1.Size = new System.Drawing.Size(188, 159);
|
||||
this.AdvTree1.Styles.Add(this.elementStyle1);
|
||||
this.AdvTree1.TabIndex = 1;
|
||||
this.AdvTree1.Text = "advTree1";
|
||||
this.AdvTree1.AfterNodeSelect += new DevComponents.AdvTree.AdvTreeNodeEventHandler(this.AdvTree1_AfterNodeSelect);
|
||||
//
|
||||
// nodeConnector1
|
||||
//
|
||||
this.nodeConnector1.LineColor = System.Drawing.SystemColors.ControlText;
|
||||
//
|
||||
// elementStyle1
|
||||
//
|
||||
this.elementStyle1.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.elementStyle1.Name = "elementStyle1";
|
||||
this.elementStyle1.TextColor = System.Drawing.SystemColors.ControlText;
|
||||
//
|
||||
// buttonX1
|
||||
//
|
||||
this.buttonX1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.buttonX1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonX1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.buttonX1.Location = new System.Drawing.Point(203, 3);
|
||||
this.buttonX1.Name = "buttonX1";
|
||||
this.buttonX1.Size = new System.Drawing.Size(188, 23);
|
||||
this.buttonX1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.buttonX1.TabIndex = 0;
|
||||
this.buttonX1.Text = "Load Servers and Channels";
|
||||
this.buttonX1.Click += new System.EventHandler(this.ButtonX1_Click);
|
||||
//
|
||||
// CheckBoxX_EnableDiscordUpload
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.CheckBoxX_EnableDiscordUpload.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.CheckBoxX_EnableDiscordUpload.Location = new System.Drawing.Point(3, 3);
|
||||
this.CheckBoxX_EnableDiscordUpload.Name = "CheckBoxX_EnableDiscordUpload";
|
||||
this.CheckBoxX_EnableDiscordUpload.Size = new System.Drawing.Size(194, 23);
|
||||
this.CheckBoxX_EnableDiscordUpload.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.CheckBoxX_EnableDiscordUpload.TabIndex = 7;
|
||||
this.CheckBoxX_EnableDiscordUpload.Text = "Enable Discord Upload";
|
||||
this.CheckBoxX_EnableDiscordUpload.CheckedChanged += new System.EventHandler(this.CheckBoxX_EnableDiscordUpload_CheckedChanged);
|
||||
//
|
||||
// DiscordSettingsDialog
|
||||
//
|
||||
this.ClientSize = new System.Drawing.Size(394, 194);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "DiscordSettingsDialog";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Discord Settings";
|
||||
this.panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.AdvTree1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private DevComponents.DotNetBar.ButtonX buttonX1;
|
||||
private DevComponents.AdvTree.AdvTree AdvTree1;
|
||||
private DevComponents.AdvTree.NodeConnector nodeConnector1;
|
||||
private DevComponents.DotNetBar.ElementStyle elementStyle1;
|
||||
private DevComponents.DotNetBar.LabelX labelX3;
|
||||
private DevComponents.DotNetBar.Controls.TextBoxX TextBoxX_UrlExtraCounterParam;
|
||||
private DevComponents.DotNetBar.LabelX labelX2;
|
||||
private DevComponents.DotNetBar.Controls.TextBoxX TextBoxX_ImgBaseURL;
|
||||
private DevComponents.DotNetBar.LabelX LabelX1;
|
||||
private DevComponents.DotNetBar.Controls.TextBoxX TextBoxX_BotToken;
|
||||
private DevComponents.DotNetBar.Controls.CheckBoxX CheckBoxX_EnableDiscordUpload;
|
||||
}
|
||||
}
|
||||
106
SM64 ROM Manager.ProgressUpdater/DiscordSettingsDialog.cs
Normal file
106
SM64 ROM Manager.ProgressUpdater/DiscordSettingsDialog.cs
Normal file
@@ -0,0 +1,106 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using DevComponents.AdvTree;
|
||||
using DevComponents.DotNetBar;
|
||||
|
||||
namespace SM64_ROM_Manager.ProgressUpdater
|
||||
{
|
||||
public partial class DiscordSettingsDialog : OfficeForm
|
||||
{
|
||||
private readonly Settings settings;
|
||||
|
||||
public DiscordSettingsDialog(Settings settings)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.settings = settings;
|
||||
TextBoxX_BotToken.Text = settings.DiscordBotToken;
|
||||
TextBoxX_ImgBaseURL.Text = settings.DiscordMsgBaseURL;
|
||||
TextBoxX_UrlExtraCounterParam.Text = settings.DiscordMsgParamCounter;
|
||||
CheckBoxX_EnableDiscordUpload.Checked = settings.DiscordUploadEnabled;
|
||||
}
|
||||
|
||||
private void TextBoxX_BotToken_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
settings.DiscordBotToken = TextBoxX_BotToken.Text.Trim();
|
||||
}
|
||||
|
||||
private void TextBoxX_ImgBaseURL_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
settings.DiscordMsgBaseURL = TextBoxX_ImgBaseURL.Text.Trim();
|
||||
}
|
||||
|
||||
private void TextBoxX_UrlExtraCounterParam_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
settings.DiscordMsgParamCounter = TextBoxX_UrlExtraCounterParam.Text.Trim();
|
||||
}
|
||||
|
||||
private void ButtonX1_Click(object sender, EventArgs e)
|
||||
{
|
||||
var dmgr = new DiscordMgr(settings);
|
||||
bool hasError = false;
|
||||
dmgr.LoggedMsg += (ssender, msg, isError) => { if (hasError) hasError = true; };
|
||||
dmgr.Start();
|
||||
|
||||
while (!dmgr.IsReady && !hasError)
|
||||
{
|
||||
Application.DoEvents();
|
||||
}
|
||||
|
||||
if (hasError)
|
||||
{
|
||||
MessageBox.Show("Entwender deaktiviert oder Token ist falsch.", string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
else
|
||||
{
|
||||
AdvTree1.BeginUpdate();
|
||||
AdvTree1.Nodes.Clear();
|
||||
|
||||
foreach (var guild in dmgr.Client.Guilds)
|
||||
{
|
||||
var nGuild = new Node()
|
||||
{
|
||||
Name = "g" + guild.Id,
|
||||
Text = guild.Name,
|
||||
Tag = guild.Id
|
||||
};
|
||||
|
||||
foreach (var channel in guild.TextChannels)
|
||||
{
|
||||
var nChannel = new Node()
|
||||
{
|
||||
Name = "c" + channel.Id,
|
||||
Text = "#" + channel.Name,
|
||||
Tag = channel.Id
|
||||
};
|
||||
|
||||
nGuild.Nodes.Add(nChannel);
|
||||
}
|
||||
|
||||
AdvTree1.Nodes.Add(nGuild);
|
||||
}
|
||||
|
||||
AdvTree1.EndUpdate();
|
||||
dmgr.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
private void AdvTree1_AfterNodeSelect(object sender, DevComponents.AdvTree.AdvTreeNodeEventArgs e)
|
||||
{
|
||||
if (e.Node.Name.StartsWith("c"))
|
||||
{
|
||||
settings.DiscordChannelID = (ulong)e.Node.Tag;
|
||||
settings.DiscordGuildID = (ulong)e.Node.Parent.Tag;
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckBoxX_EnableDiscordUpload_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
settings.DiscordUploadEnabled = CheckBoxX_EnableDiscordUpload.Checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
1978
SM64 ROM Manager.ProgressUpdater/DiscordSettingsDialog.resx
Normal file
1978
SM64 ROM Manager.ProgressUpdater/DiscordSettingsDialog.resx
Normal file
File diff suppressed because it is too large
Load Diff
288
SM64 ROM Manager.ProgressUpdater/Form1.Designer.cs
generated
Normal file
288
SM64 ROM Manager.ProgressUpdater/Form1.Designer.cs
generated
Normal file
@@ -0,0 +1,288 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Windows.Forms;
|
||||
using Microsoft.VisualBasic.CompilerServices;
|
||||
|
||||
namespace SM64_ROM_Manager.ProgressUpdater
|
||||
{
|
||||
[DesignerGenerated()]
|
||||
public partial class Form1 : DevComponents.DotNetBar.OfficeForm
|
||||
{
|
||||
|
||||
// Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||
[DebuggerNonUserCode()]
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (disposing && components is object)
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
}
|
||||
|
||||
// Wird vom Windows Form-Designer benötigt.
|
||||
private System.ComponentModel.IContainer components;
|
||||
|
||||
// Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||
// Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||
// Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||
[DebuggerStepThrough()]
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
|
||||
this.Panel1 = new System.Windows.Forms.Panel();
|
||||
this.ButtonX_PasteClipboard = new DevComponents.DotNetBar.ButtonX();
|
||||
this.PictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.Panel2 = new System.Windows.Forms.Panel();
|
||||
this.ComboBoxEx_Version = new DevComponents.DotNetBar.Controls.ComboBoxEx();
|
||||
this.ButtonX_SetupWebDav = new DevComponents.DotNetBar.ButtonX();
|
||||
this.circularProgress1 = new DevComponents.DotNetBar.Controls.CircularProgress();
|
||||
this.ButtonX_DiscordSetup = new DevComponents.DotNetBar.ButtonX();
|
||||
this.ButtonX_Upload = new DevComponents.DotNetBar.ButtonX();
|
||||
this.LabelX6 = new DevComponents.DotNetBar.LabelX();
|
||||
this.StyleManager1 = new DevComponents.DotNetBar.StyleManager(this.components);
|
||||
this.ButtonX_PasteDocument = new DevComponents.DotNetBar.ButtonX();
|
||||
this.buttonX1 = new DevComponents.DotNetBar.ButtonX();
|
||||
this.Panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).BeginInit();
|
||||
this.Panel2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// Panel1
|
||||
//
|
||||
this.Panel1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.Panel1.Controls.Add(this.buttonX1);
|
||||
this.Panel1.Controls.Add(this.ButtonX_PasteDocument);
|
||||
this.Panel1.Controls.Add(this.ButtonX_PasteClipboard);
|
||||
this.Panel1.Controls.Add(this.PictureBox1);
|
||||
this.Panel1.Controls.Add(this.Panel2);
|
||||
this.Panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.Panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.Panel1.Name = "Panel1";
|
||||
this.Panel1.Size = new System.Drawing.Size(694, 508);
|
||||
this.Panel1.TabIndex = 0;
|
||||
//
|
||||
// ButtonX_PasteClipboard
|
||||
//
|
||||
this.ButtonX_PasteClipboard.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.ButtonX_PasteClipboard.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ButtonX_PasteClipboard.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.ButtonX_PasteClipboard.Location = new System.Drawing.Point(562, 3);
|
||||
this.ButtonX_PasteClipboard.Name = "ButtonX_PasteClipboard";
|
||||
this.ButtonX_PasteClipboard.Size = new System.Drawing.Size(129, 23);
|
||||
this.ButtonX_PasteClipboard.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.ButtonX_PasteClipboard.TabIndex = 0;
|
||||
this.ButtonX_PasteClipboard.Text = "Paste from Clipboard";
|
||||
this.ButtonX_PasteClipboard.Click += new System.EventHandler(this.ButtonX1_Click);
|
||||
//
|
||||
// PictureBox1
|
||||
//
|
||||
this.PictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.PictureBox1.Location = new System.Drawing.Point(200, 0);
|
||||
this.PictureBox1.Name = "PictureBox1";
|
||||
this.PictureBox1.Size = new System.Drawing.Size(494, 508);
|
||||
this.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
|
||||
this.PictureBox1.TabIndex = 0;
|
||||
this.PictureBox1.TabStop = false;
|
||||
//
|
||||
// Panel2
|
||||
//
|
||||
this.Panel2.Controls.Add(this.ComboBoxEx_Version);
|
||||
this.Panel2.Controls.Add(this.ButtonX_SetupWebDav);
|
||||
this.Panel2.Controls.Add(this.circularProgress1);
|
||||
this.Panel2.Controls.Add(this.ButtonX_DiscordSetup);
|
||||
this.Panel2.Controls.Add(this.ButtonX_Upload);
|
||||
this.Panel2.Controls.Add(this.LabelX6);
|
||||
this.Panel2.Dock = System.Windows.Forms.DockStyle.Left;
|
||||
this.Panel2.Location = new System.Drawing.Point(0, 0);
|
||||
this.Panel2.Name = "Panel2";
|
||||
this.Panel2.Size = new System.Drawing.Size(200, 508);
|
||||
this.Panel2.TabIndex = 1;
|
||||
//
|
||||
// ComboBoxEx_Version
|
||||
//
|
||||
this.ComboBoxEx_Version.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ComboBoxEx_Version.DisplayMember = "Text";
|
||||
this.ComboBoxEx_Version.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
|
||||
this.ComboBoxEx_Version.ForeColor = System.Drawing.Color.Black;
|
||||
this.ComboBoxEx_Version.FormattingEnabled = true;
|
||||
this.ComboBoxEx_Version.ItemHeight = 14;
|
||||
this.ComboBoxEx_Version.Location = new System.Drawing.Point(4, 91);
|
||||
this.ComboBoxEx_Version.Name = "ComboBoxEx_Version";
|
||||
this.ComboBoxEx_Version.Size = new System.Drawing.Size(193, 20);
|
||||
this.ComboBoxEx_Version.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.ComboBoxEx_Version.TabIndex = 15;
|
||||
this.ComboBoxEx_Version.WatermarkText = "e.g. 1.2.0.0";
|
||||
this.ComboBoxEx_Version.TextChanged += new System.EventHandler(this.TextBoxX_Version_TextChanged);
|
||||
//
|
||||
// ButtonX_SetupWebDav
|
||||
//
|
||||
this.ButtonX_SetupWebDav.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.ButtonX_SetupWebDav.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ButtonX_SetupWebDav.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.ButtonX_SetupWebDav.Location = new System.Drawing.Point(3, 3);
|
||||
this.ButtonX_SetupWebDav.Name = "ButtonX_SetupWebDav";
|
||||
this.ButtonX_SetupWebDav.Size = new System.Drawing.Size(194, 23);
|
||||
this.ButtonX_SetupWebDav.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.ButtonX_SetupWebDav.TabIndex = 14;
|
||||
this.ButtonX_SetupWebDav.Text = "Setup WebDav Client";
|
||||
this.ButtonX_SetupWebDav.Click += new System.EventHandler(this.ButtonX_SetupWebDav_Click);
|
||||
//
|
||||
// circularProgress1
|
||||
//
|
||||
this.circularProgress1.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.circularProgress1.BackColor = System.Drawing.Color.Transparent;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.circularProgress1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.circularProgress1.Location = new System.Drawing.Point(63, 217);
|
||||
this.circularProgress1.Name = "circularProgress1";
|
||||
this.circularProgress1.ProgressBarType = DevComponents.DotNetBar.eCircularProgressType.Dot;
|
||||
this.circularProgress1.SetVisibleStateOnStart = true;
|
||||
this.circularProgress1.SetVisibleStateOnStop = true;
|
||||
this.circularProgress1.Size = new System.Drawing.Size(75, 75);
|
||||
this.circularProgress1.Style = DevComponents.DotNetBar.eDotNetBarStyle.OfficeXP;
|
||||
this.circularProgress1.TabIndex = 13;
|
||||
//
|
||||
// ButtonX_DiscordSetup
|
||||
//
|
||||
this.ButtonX_DiscordSetup.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.ButtonX_DiscordSetup.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ButtonX_DiscordSetup.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.ButtonX_DiscordSetup.Location = new System.Drawing.Point(3, 32);
|
||||
this.ButtonX_DiscordSetup.Name = "ButtonX_DiscordSetup";
|
||||
this.ButtonX_DiscordSetup.Size = new System.Drawing.Size(194, 23);
|
||||
this.ButtonX_DiscordSetup.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.ButtonX_DiscordSetup.TabIndex = 12;
|
||||
this.ButtonX_DiscordSetup.Text = "Setup Discord Bot";
|
||||
this.ButtonX_DiscordSetup.Click += new System.EventHandler(this.ButtonX_DiscordSetup_Click);
|
||||
//
|
||||
// ButtonX_Upload
|
||||
//
|
||||
this.ButtonX_Upload.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.ButtonX_Upload.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ButtonX_Upload.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.ButtonX_Upload.Location = new System.Drawing.Point(3, 465);
|
||||
this.ButtonX_Upload.Name = "ButtonX_Upload";
|
||||
this.ButtonX_Upload.Size = new System.Drawing.Size(194, 40);
|
||||
this.ButtonX_Upload.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.ButtonX_Upload.TabIndex = 10;
|
||||
this.ButtonX_Upload.Text = "Upload";
|
||||
this.ButtonX_Upload.Click += new System.EventHandler(this.ButtonX_Upload_Click);
|
||||
//
|
||||
// LabelX6
|
||||
//
|
||||
this.LabelX6.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
//
|
||||
//
|
||||
//
|
||||
this.LabelX6.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.LabelX6.Location = new System.Drawing.Point(3, 61);
|
||||
this.LabelX6.Name = "LabelX6";
|
||||
this.LabelX6.Size = new System.Drawing.Size(194, 23);
|
||||
this.LabelX6.TabIndex = 1;
|
||||
this.LabelX6.Text = "Version:";
|
||||
//
|
||||
// StyleManager1
|
||||
//
|
||||
this.StyleManager1.ManagerStyle = DevComponents.DotNetBar.eStyle.Office2016;
|
||||
this.StyleManager1.MetroColorParameters = new DevComponents.DotNetBar.Metro.ColorTables.MetroColorGeneratorParameters(System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))), System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(57)))), ((int)(((byte)(123))))));
|
||||
//
|
||||
// ButtonX_PasteDocument
|
||||
//
|
||||
this.ButtonX_PasteDocument.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.ButtonX_PasteDocument.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.ButtonX_PasteDocument.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.ButtonX_PasteDocument.Location = new System.Drawing.Point(427, 3);
|
||||
this.ButtonX_PasteDocument.Name = "ButtonX_PasteDocument";
|
||||
this.ButtonX_PasteDocument.Size = new System.Drawing.Size(129, 23);
|
||||
this.ButtonX_PasteDocument.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.ButtonX_PasteDocument.TabIndex = 0;
|
||||
this.ButtonX_PasteDocument.Text = "Paste from Document";
|
||||
this.ButtonX_PasteDocument.Click += new System.EventHandler(this.ButtonX_PasteDocument_Click);
|
||||
//
|
||||
// buttonX1
|
||||
//
|
||||
this.buttonX1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.buttonX1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.buttonX1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.buttonX1.Location = new System.Drawing.Point(562, 32);
|
||||
this.buttonX1.Name = "buttonX1";
|
||||
this.buttonX1.Size = new System.Drawing.Size(129, 23);
|
||||
this.buttonX1.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.buttonX1.TabIndex = 1;
|
||||
this.buttonX1.Text = "Invert Image";
|
||||
this.buttonX1.Click += new System.EventHandler(this.buttonX1_Click_1);
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AcceptButton = this.ButtonX_Upload;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(694, 508);
|
||||
this.Controls.Add(this.Panel1);
|
||||
this.ForeColor = System.Drawing.Color.Black;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "Form1";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "SM64RM Progress Updater";
|
||||
this.Panel1.ResumeLayout(false);
|
||||
((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).EndInit();
|
||||
this.Panel2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
private Panel Panel1;
|
||||
|
||||
|
||||
private DevComponents.DotNetBar.StyleManager StyleManager1;
|
||||
|
||||
|
||||
private PictureBox PictureBox1;
|
||||
|
||||
|
||||
private Panel Panel2;
|
||||
|
||||
|
||||
private DevComponents.DotNetBar.ButtonX ButtonX_Upload;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private DevComponents.DotNetBar.ButtonX ButtonX_PasteClipboard;
|
||||
|
||||
|
||||
|
||||
private DevComponents.DotNetBar.LabelX LabelX6;
|
||||
private DevComponents.DotNetBar.ButtonX ButtonX_DiscordSetup;
|
||||
private DevComponents.DotNetBar.Controls.CircularProgress circularProgress1;
|
||||
private DevComponents.DotNetBar.ButtonX ButtonX_SetupWebDav;
|
||||
private DevComponents.DotNetBar.Controls.ComboBoxEx ComboBoxEx_Version;
|
||||
private DevComponents.DotNetBar.ButtonX ButtonX_PasteDocument;
|
||||
private DevComponents.DotNetBar.ButtonX buttonX1;
|
||||
}
|
||||
}
|
||||
211
SM64 ROM Manager.ProgressUpdater/Form1.cs
Normal file
211
SM64 ROM Manager.ProgressUpdater/Form1.cs
Normal file
@@ -0,0 +1,211 @@
|
||||
using System;
|
||||
using global::System.IO;
|
||||
using global::System.Net;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using global::DevComponents.DotNetBar;
|
||||
using global::Newtonsoft.Json.Linq;
|
||||
using global::WebDav;
|
||||
using System.Drawing;
|
||||
|
||||
namespace SM64_ROM_Manager.ProgressUpdater
|
||||
{
|
||||
public partial class Form1
|
||||
{
|
||||
// C o n s t a n t s
|
||||
|
||||
private const string TEMP_DIR_FOLDER_NAME = "SM64RM Progress Updater";
|
||||
private const string TEMP_CONF_FILE_NAME = "config.dat";
|
||||
|
||||
// F i e l d s
|
||||
|
||||
private readonly drsPwEnc.drsPwEnc crypter = new drsPwEnc.drsPwEnc();
|
||||
private Settings settings = new Settings();
|
||||
private WebDavMgr wdmgr = null;
|
||||
private DiscordMgr dmgr = null;
|
||||
private string upcommingVersions = string.Empty;
|
||||
|
||||
// C o n s t r u c t o r
|
||||
|
||||
public Form1()
|
||||
{
|
||||
this.Load += Form1_Load;
|
||||
this.FormClosing += Form1_FormClosing;
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
// F e a t u r e s
|
||||
|
||||
private void PasteFromClipboard()
|
||||
{
|
||||
if (Clipboard.ContainsImage())
|
||||
{
|
||||
PictureBox1.Image = Clipboard.GetImage();
|
||||
}
|
||||
}
|
||||
|
||||
private DirectoryInfo GetTempDirPath()
|
||||
{
|
||||
return new DirectoryInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), TEMP_DIR_FOLDER_NAME));
|
||||
}
|
||||
|
||||
private void LoadTextBoxes()
|
||||
{
|
||||
ComboBoxEx_Version.Text = settings.Version;
|
||||
}
|
||||
|
||||
private void SaveConfig()
|
||||
{
|
||||
var obj = JObject.FromObject(settings);
|
||||
var dir = GetTempDirPath();
|
||||
string confFile = Path.Combine(dir.FullName, TEMP_CONF_FILE_NAME);
|
||||
|
||||
if (!dir.Exists)
|
||||
{
|
||||
dir.Create();
|
||||
}
|
||||
|
||||
string raw = crypter.EncryptData(obj.ToString());
|
||||
File.WriteAllText(confFile, raw);
|
||||
}
|
||||
|
||||
private void LoadConfig()
|
||||
{
|
||||
var dir = GetTempDirPath();
|
||||
string confFile = Path.Combine(dir.FullName, TEMP_CONF_FILE_NAME);
|
||||
if (File.Exists(confFile))
|
||||
{
|
||||
string raw = File.ReadAllText(confFile);
|
||||
var obj = JObject.Parse(crypter.DecryptData(raw));
|
||||
settings = obj.ToObject<Settings>();
|
||||
LoadTextBoxes();
|
||||
LoadWebDavMgr();
|
||||
LoadDiscordMgr();
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadDiscordMgr()
|
||||
{
|
||||
if (dmgr is object && dmgr.IsReady)
|
||||
dmgr.Stop();
|
||||
dmgr = new DiscordMgr(settings);
|
||||
dmgr.GotReady += (_, __) => ButtonX_DiscordSetup.Enabled = true;
|
||||
dmgr.Start();
|
||||
}
|
||||
|
||||
private Task LoadWebDavMgr()
|
||||
{
|
||||
ButtonX_Upload.Enabled = false;
|
||||
return Task.Run(() =>
|
||||
{
|
||||
wdmgr = new WebDavMgr(settings);
|
||||
if (wdmgr.Connect())
|
||||
{
|
||||
Invoke(new Action(() => ButtonX_Upload.Enabled = true));
|
||||
LoadUsedVersions();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private async void LoadUsedVersions()
|
||||
{
|
||||
Invoke(new Action(() => ComboBoxEx_Version.Items.Clear()));
|
||||
|
||||
foreach (var version in await wdmgr.GetUsedVersions())
|
||||
Invoke(new Action(() => ComboBoxEx_Version.Items.Add(version)));
|
||||
}
|
||||
|
||||
private void InvertImage()
|
||||
{
|
||||
Bitmap pic = new Bitmap(PictureBox1.Image);
|
||||
|
||||
for (int y = 0; y < pic.Height; y++)
|
||||
{
|
||||
for (int x = 0; x < pic.Width; x++)
|
||||
{
|
||||
Color inv = pic.GetPixel(x, y);
|
||||
inv = Color.FromArgb(255, 255 - inv.R, 255 - inv.G, 255 - inv.B);
|
||||
pic.SetPixel(x, y, inv);
|
||||
}
|
||||
}
|
||||
|
||||
PictureBox1.Image = pic;
|
||||
}
|
||||
|
||||
// G u i
|
||||
|
||||
private void ButtonX1_Click(object sender, EventArgs e)
|
||||
{
|
||||
PasteFromClipboard();
|
||||
}
|
||||
|
||||
private async void ButtonX_Upload_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (settings.DiscordUploadEnabled && !dmgr.IsReady)
|
||||
{
|
||||
ToastNotification.Show(this, "Discord ist noch nicht bereit!", eToastGlowColor.Orange, eToastPosition.BottomCenter);
|
||||
}
|
||||
else
|
||||
{
|
||||
Enabled = false;
|
||||
circularProgress1.Start();
|
||||
if (await wdmgr.UploadImage(PictureBox1.Image))
|
||||
{
|
||||
if (dmgr is object && dmgr.IsReady)
|
||||
await dmgr.SendMessage();
|
||||
ToastNotification.Show(this, "Erfolgreich hochgeladen!", eToastGlowColor.Green, eToastPosition.BottomCenter);
|
||||
}
|
||||
else
|
||||
{
|
||||
ToastNotification.Show(this, "Fehler beim Hochladen!", eToastGlowColor.Orange, eToastPosition.BottomCenter);
|
||||
}
|
||||
circularProgress1.Stop();
|
||||
Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
LoadConfig();
|
||||
PasteFromClipboard();
|
||||
}
|
||||
|
||||
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (dmgr is object && dmgr.IsReady)
|
||||
dmgr.Stop();
|
||||
SaveConfig();
|
||||
}
|
||||
|
||||
private void TextBoxX_Version_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
settings.Version = ComboBoxEx_Version.Text.Trim();
|
||||
}
|
||||
|
||||
private void ButtonX_DiscordSetup_Click(object sender, EventArgs e)
|
||||
{
|
||||
var frm = new DiscordSettingsDialog(settings);
|
||||
frm.ShowDialog();
|
||||
LoadDiscordMgr();
|
||||
}
|
||||
|
||||
private void ButtonX_SetupWebDav_Click(object sender, EventArgs e)
|
||||
{
|
||||
var frm = new WebDavSettingsDialog(settings);
|
||||
frm.ShowDialog();
|
||||
LoadWebDavMgr();
|
||||
}
|
||||
|
||||
private void ButtonX_PasteDocument_Click(object sender, EventArgs e)
|
||||
{
|
||||
var frm = new PasteFromDocument(settings);
|
||||
if (frm.ShowDialog(this) == DialogResult.OK)
|
||||
PictureBox1.Image = frm.DocumentImage;
|
||||
}
|
||||
|
||||
private void buttonX1_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
InvertImage();
|
||||
}
|
||||
}
|
||||
}
|
||||
1981
SM64 ROM Manager.ProgressUpdater/Form1.resx
Normal file
1981
SM64 ROM Manager.ProgressUpdater/Form1.resx
Normal file
File diff suppressed because it is too large
Load Diff
87
SM64 ROM Manager.ProgressUpdater/MarkdownHelper.cs
Normal file
87
SM64 ROM Manager.ProgressUpdater/MarkdownHelper.cs
Normal file
@@ -0,0 +1,87 @@
|
||||
using Markdig;
|
||||
using Markdig.Syntax;
|
||||
using Markdig.Syntax.Inlines;
|
||||
using static Microsoft.VisualBasic.CompilerServices.LikeOperator;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.VisualBasic;
|
||||
|
||||
namespace SM64_ROM_Manager.ProgressUpdater
|
||||
{
|
||||
class MarkdownHelper
|
||||
{
|
||||
public static MarkdownDocument GetDocument(string md)
|
||||
{
|
||||
return Markdown.Parse(md);
|
||||
}
|
||||
|
||||
public static string GetPart(string md, Block startBlock, Block endBlock)
|
||||
{
|
||||
var mdNew = md;
|
||||
|
||||
if (endBlock.Span.End + 1 < mdNew.Length)
|
||||
mdNew = mdNew.Remove(endBlock.Span.End + 1);
|
||||
|
||||
if (startBlock.Span.Start > 0)
|
||||
mdNew = mdNew.Substring(startBlock.Span.Start);
|
||||
|
||||
return mdNew;
|
||||
}
|
||||
|
||||
public static Image GetAsImage(string md)
|
||||
{
|
||||
var html = Markdown.ToHtml(md);
|
||||
var img = TheArtOfDev.HtmlRenderer.WinForms.HtmlRender.RenderToImage(html, 500);
|
||||
return img;
|
||||
}
|
||||
|
||||
public static IReadOnlyDictionary<string, string> SplitToVersions(string md)
|
||||
{
|
||||
var versions = new Dictionary<string, string>();
|
||||
var mdDoc = Markdown.Parse(md);
|
||||
|
||||
var currentVersionText = string.Empty;
|
||||
Block startBlock = null;
|
||||
Block endBlock = null;
|
||||
|
||||
void addDocument()
|
||||
{
|
||||
if (startBlock is object && endBlock is object)
|
||||
{
|
||||
var mdNew = GetPart(md, startBlock, endBlock);
|
||||
versions.Add(currentVersionText, mdNew);
|
||||
startBlock = endBlock = null;
|
||||
currentVersionText = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
foreach (var block in mdDoc)
|
||||
{
|
||||
if (block is HeadingBlock)
|
||||
{
|
||||
var hblock = (HeadingBlock)block;
|
||||
var content = (hblock.Inline.FirstOrDefault() as LiteralInline).Content.ToString();
|
||||
|
||||
if (!string.IsNullOrEmpty(content) && LikeString(content, "Version *", CompareMethod.Text))
|
||||
{
|
||||
addDocument();
|
||||
startBlock = hblock;
|
||||
currentVersionText = content;
|
||||
}
|
||||
}
|
||||
else if (block is ThematicBreakBlock)
|
||||
addDocument();
|
||||
|
||||
endBlock = block;
|
||||
}
|
||||
|
||||
addDocument();
|
||||
|
||||
return versions;
|
||||
}
|
||||
}
|
||||
}
|
||||
38
SM64 ROM Manager.ProgressUpdater/My Project/Application.Designer.cs
generated
Normal file
38
SM64 ROM Manager.ProgressUpdater/My Project/Application.Designer.cs
generated
Normal file
@@ -0,0 +1,38 @@
|
||||
// ------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace SM64_ROM_Manager.ProgressUpdater.My
|
||||
{
|
||||
|
||||
// NOTE: This file is auto-generated; do not modify it directly. To make changes,
|
||||
// or if you encounter build errors in this file, go to the Project Designer
|
||||
// (go to Project Properties or double-click the My Project node in
|
||||
// Solution Explorer), and make changes on the Application tab.
|
||||
//
|
||||
internal partial class MyApplication
|
||||
{
|
||||
[DebuggerStepThrough()]
|
||||
public MyApplication() : base(Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||
{
|
||||
IsSingleInstance = false;
|
||||
EnableVisualStyles = true;
|
||||
SaveMySettingsOnExit = true;
|
||||
ShutdownStyle = Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses;
|
||||
}
|
||||
|
||||
[DebuggerStepThrough()]
|
||||
protected override void OnCreateMainForm()
|
||||
{
|
||||
MainForm = MyProject.Forms.Form1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<?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>Form1</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<ApplicationType>0</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
35
SM64 ROM Manager.ProgressUpdater/My Project/MyNamespace.Dynamic.Designer.cs
generated
Normal file
35
SM64 ROM Manager.ProgressUpdater/My Project/MyNamespace.Dynamic.Designer.cs
generated
Normal file
@@ -0,0 +1,35 @@
|
||||
using global::System;
|
||||
using global::System.ComponentModel;
|
||||
using global::System.Diagnostics;
|
||||
|
||||
namespace SM64_ROM_Manager.ProgressUpdater.My
|
||||
{
|
||||
internal static partial class MyProject
|
||||
{
|
||||
internal partial class MyForms
|
||||
{
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
public Form1 m_Form1;
|
||||
|
||||
public Form1 Form1
|
||||
{
|
||||
[DebuggerHidden]
|
||||
get
|
||||
{
|
||||
m_Form1 = MyForms.Create__Instance__(m_Form1);
|
||||
return m_Form1;
|
||||
}
|
||||
|
||||
[DebuggerHidden]
|
||||
set
|
||||
{
|
||||
if (value == m_Form1)
|
||||
return;
|
||||
if (value is object)
|
||||
throw new ArgumentException("Property can only be set to Nothing");
|
||||
Dispose__Instance__(ref m_Form1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
305
SM64 ROM Manager.ProgressUpdater/My Project/MyNamespace.Static.1.Designer.cs
generated
Normal file
305
SM64 ROM Manager.ProgressUpdater/My Project/MyNamespace.Static.1.Designer.cs
generated
Normal file
@@ -0,0 +1,305 @@
|
||||
// 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 SM64_ROM_Manager.ProgressUpdater.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 */
|
||||
253
SM64 ROM Manager.ProgressUpdater/My Project/MyNamespace.Static.2.Designer.cs
generated
Normal file
253
SM64 ROM Manager.ProgressUpdater/My Project/MyNamespace.Static.2.Designer.cs
generated
Normal file
@@ -0,0 +1,253 @@
|
||||
// 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 SM64_ROM_Manager.ProgressUpdater.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
14
SM64 ROM Manager.ProgressUpdater/My Project/MyNamespace.Static.3.Designer.cs
generated
Normal file
14
SM64 ROM Manager.ProgressUpdater/My Project/MyNamespace.Static.3.Designer.cs
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
// 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
|
||||
{
|
||||
}
|
||||
}
|
||||
117
SM64 ROM Manager.ProgressUpdater/My Project/Resources.resx
Normal file
117
SM64 ROM Manager.ProgressUpdater/My Project/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?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.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: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" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
208
SM64 ROM Manager.ProgressUpdater/PasteFromDocument.Designer.cs
generated
Normal file
208
SM64 ROM Manager.ProgressUpdater/PasteFromDocument.Designer.cs
generated
Normal file
@@ -0,0 +1,208 @@
|
||||
namespace SM64_ROM_Manager.ProgressUpdater
|
||||
{
|
||||
partial class PasteFromDocument
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PasteFromDocument));
|
||||
this.layoutControl1 = new DevComponents.DotNetBar.Layout.LayoutControl();
|
||||
this.textBoxX1 = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.layoutControlItem1 = new DevComponents.DotNetBar.Layout.LayoutControlItem();
|
||||
this.itemPanel1 = new DevComponents.DotNetBar.ItemPanel();
|
||||
this.layoutControlItem2 = new DevComponents.DotNetBar.Layout.LayoutControlItem();
|
||||
this.ButtonX_Paste = new DevComponents.DotNetBar.ButtonX();
|
||||
this.ButtonX_Cancel = new DevComponents.DotNetBar.ButtonX();
|
||||
this.layoutControlItem3 = new DevComponents.DotNetBar.Layout.LayoutControlItem();
|
||||
this.layoutControlItem4 = new DevComponents.DotNetBar.Layout.LayoutControlItem();
|
||||
this.layoutSpacerItem1 = new DevComponents.DotNetBar.Layout.LayoutSpacerItem();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.layoutControl1.Controls.Add(this.itemPanel1);
|
||||
this.layoutControl1.Controls.Add(this.textBoxX1);
|
||||
this.layoutControl1.Controls.Add(this.ButtonX_Paste);
|
||||
this.layoutControl1.Controls.Add(this.ButtonX_Cancel);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.ForeColor = System.Drawing.Color.Black;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
//
|
||||
//
|
||||
//
|
||||
this.layoutControl1.RootGroup.Items.AddRange(new DevComponents.DotNetBar.Layout.LayoutItemBase[] {
|
||||
this.layoutControlItem1,
|
||||
this.layoutControlItem2,
|
||||
this.layoutSpacerItem1,
|
||||
this.layoutControlItem3,
|
||||
this.layoutControlItem4});
|
||||
this.layoutControl1.Size = new System.Drawing.Size(434, 311);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
//
|
||||
// textBoxX1
|
||||
//
|
||||
this.textBoxX1.BackColor = System.Drawing.Color.White;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.textBoxX1.Border.Class = "TextBoxBorder";
|
||||
this.textBoxX1.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.textBoxX1.DisabledBackColor = System.Drawing.Color.White;
|
||||
this.textBoxX1.ForeColor = System.Drawing.Color.Black;
|
||||
this.textBoxX1.Location = new System.Drawing.Point(92, 4);
|
||||
this.textBoxX1.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
|
||||
this.textBoxX1.Name = "textBoxX1";
|
||||
this.textBoxX1.PreventEnterBeep = true;
|
||||
this.textBoxX1.Size = new System.Drawing.Size(338, 20);
|
||||
this.textBoxX1.TabIndex = 0;
|
||||
this.textBoxX1.TextChanged += new System.EventHandler(this.textBoxX1_TextChanged);
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.textBoxX1;
|
||||
this.layoutControlItem1.Height = 28;
|
||||
this.layoutControlItem1.MinSize = new System.Drawing.Size(120, 0);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Text = "Document URL:";
|
||||
this.layoutControlItem1.Width = 100;
|
||||
this.layoutControlItem1.WidthType = DevComponents.DotNetBar.Layout.eLayoutSizeType.Percent;
|
||||
//
|
||||
// itemPanel1
|
||||
//
|
||||
this.itemPanel1.AutoScroll = true;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.itemPanel1.BackgroundStyle.Class = "ItemPanel";
|
||||
this.itemPanel1.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.itemPanel1.ContainerControlProcessDialogKey = true;
|
||||
this.itemPanel1.DragDropSupport = true;
|
||||
this.itemPanel1.LayoutOrientation = DevComponents.DotNetBar.eOrientation.Vertical;
|
||||
this.itemPanel1.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
|
||||
this.itemPanel1.Location = new System.Drawing.Point(92, 32);
|
||||
this.itemPanel1.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
|
||||
this.itemPanel1.Name = "itemPanel1";
|
||||
this.itemPanel1.ReserveLeftSpace = false;
|
||||
this.itemPanel1.Size = new System.Drawing.Size(338, 244);
|
||||
this.itemPanel1.TabIndex = 1;
|
||||
this.itemPanel1.Text = "itemPanel1";
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.itemPanel1;
|
||||
this.layoutControlItem2.Height = 100;
|
||||
this.layoutControlItem2.HeightType = DevComponents.DotNetBar.Layout.eLayoutSizeType.Percent;
|
||||
this.layoutControlItem2.MinSize = new System.Drawing.Size(64, 18);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Text = "Paragraph:";
|
||||
this.layoutControlItem2.Width = 100;
|
||||
this.layoutControlItem2.WidthType = DevComponents.DotNetBar.Layout.eLayoutSizeType.Percent;
|
||||
//
|
||||
// ButtonX_Paste
|
||||
//
|
||||
this.ButtonX_Paste.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.ButtonX_Paste.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.ButtonX_Paste.Location = new System.Drawing.Point(272, 284);
|
||||
this.ButtonX_Paste.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
|
||||
this.ButtonX_Paste.Name = "ButtonX_Paste";
|
||||
this.ButtonX_Paste.Size = new System.Drawing.Size(75, 23);
|
||||
this.ButtonX_Paste.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.ButtonX_Paste.TabIndex = 3;
|
||||
this.ButtonX_Paste.Text = "Paste";
|
||||
this.ButtonX_Paste.Click += new System.EventHandler(this.ButtonX_Paste_Click);
|
||||
//
|
||||
// ButtonX_Cancel
|
||||
//
|
||||
this.ButtonX_Cancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.ButtonX_Cancel.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.ButtonX_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.ButtonX_Cancel.Location = new System.Drawing.Point(355, 284);
|
||||
this.ButtonX_Cancel.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
|
||||
this.ButtonX_Cancel.Name = "ButtonX_Cancel";
|
||||
this.ButtonX_Cancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.ButtonX_Cancel.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
this.ButtonX_Cancel.TabIndex = 4;
|
||||
this.ButtonX_Cancel.Text = "Cancel";
|
||||
//
|
||||
// layoutControlItem3
|
||||
//
|
||||
this.layoutControlItem3.Control = this.ButtonX_Paste;
|
||||
this.layoutControlItem3.Height = 31;
|
||||
this.layoutControlItem3.MinSize = new System.Drawing.Size(32, 20);
|
||||
this.layoutControlItem3.Name = "layoutControlItem3";
|
||||
this.layoutControlItem3.Width = 83;
|
||||
//
|
||||
// layoutControlItem4
|
||||
//
|
||||
this.layoutControlItem4.Control = this.ButtonX_Cancel;
|
||||
this.layoutControlItem4.Height = 31;
|
||||
this.layoutControlItem4.MinSize = new System.Drawing.Size(32, 20);
|
||||
this.layoutControlItem4.Name = "layoutControlItem4";
|
||||
this.layoutControlItem4.Width = 83;
|
||||
//
|
||||
// layoutSpacerItem1
|
||||
//
|
||||
this.layoutSpacerItem1.Height = 31;
|
||||
this.layoutSpacerItem1.Name = "layoutSpacerItem1";
|
||||
this.layoutSpacerItem1.Width = 99;
|
||||
this.layoutSpacerItem1.WidthType = DevComponents.DotNetBar.Layout.eLayoutSizeType.Percent;
|
||||
//
|
||||
// PasteFromDocument
|
||||
//
|
||||
this.AcceptButton = this.ButtonX_Paste;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.ButtonX_Cancel;
|
||||
this.ClientSize = new System.Drawing.Size(434, 311);
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "PasteFromDocument";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "Paste From Document";
|
||||
this.Load += new System.EventHandler(this.PasteFromDocument_Load);
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevComponents.DotNetBar.Layout.LayoutControl layoutControl1;
|
||||
private DevComponents.DotNetBar.ItemPanel itemPanel1;
|
||||
private DevComponents.DotNetBar.Controls.TextBoxX textBoxX1;
|
||||
private DevComponents.DotNetBar.ButtonX ButtonX_Paste;
|
||||
private DevComponents.DotNetBar.ButtonX ButtonX_Cancel;
|
||||
private DevComponents.DotNetBar.Layout.LayoutControlItem layoutControlItem1;
|
||||
private DevComponents.DotNetBar.Layout.LayoutControlItem layoutControlItem2;
|
||||
private DevComponents.DotNetBar.Layout.LayoutSpacerItem layoutSpacerItem1;
|
||||
private DevComponents.DotNetBar.Layout.LayoutControlItem layoutControlItem3;
|
||||
private DevComponents.DotNetBar.Layout.LayoutControlItem layoutControlItem4;
|
||||
}
|
||||
}
|
||||
96
SM64 ROM Manager.ProgressUpdater/PasteFromDocument.cs
Normal file
96
SM64 ROM Manager.ProgressUpdater/PasteFromDocument.cs
Normal file
@@ -0,0 +1,96 @@
|
||||
using DevComponents.DotNetBar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace SM64_ROM_Manager.ProgressUpdater
|
||||
{
|
||||
public partial class PasteFromDocument : OfficeForm
|
||||
{
|
||||
private Settings settings;
|
||||
|
||||
public Image DocumentImage { get; private set; }
|
||||
|
||||
public PasteFromDocument(Settings settings)
|
||||
{
|
||||
this.settings = settings;
|
||||
InitializeComponent();
|
||||
UpdateAmbientColors();
|
||||
}
|
||||
|
||||
private void ButtonX_Paste_Click(object sender, EventArgs e)
|
||||
{
|
||||
BaseItem selectedItem = null;
|
||||
foreach (BaseItem item in itemPanel1.Items)
|
||||
{
|
||||
if (selectedItem == null && item is CheckBoxItem && ((CheckBoxItem)item).Checked)
|
||||
selectedItem = item;
|
||||
}
|
||||
|
||||
if (selectedItem?.Tag is object)
|
||||
{
|
||||
var md = (string)selectedItem.Tag;
|
||||
DocumentImage = MarkdownHelper.GetAsImage(md);
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
}
|
||||
|
||||
private async void textBoxX1_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
var url = textBoxX1.Text.Trim();
|
||||
settings.UpcommingVersionsDownloadURL = url;
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
await GetNewItems(url);
|
||||
}
|
||||
|
||||
private async Task GetNewItems(string url)
|
||||
{
|
||||
var mdDocStr = await DownloadString(url);
|
||||
if (!string.IsNullOrEmpty(mdDocStr))
|
||||
{
|
||||
itemPanel1.SuspendLayout();
|
||||
itemPanel1.Items.Clear();
|
||||
|
||||
foreach (var kvp in MarkdownHelper.SplitToVersions(mdDocStr))
|
||||
{
|
||||
var item = new CheckBoxItem
|
||||
{
|
||||
Text = kvp.Key,
|
||||
Tag = kvp.Value,
|
||||
CheckBoxStyle = eCheckBoxStyle.RadioButton
|
||||
};
|
||||
|
||||
item.DoubleClick += ButtonX_Paste_Click;
|
||||
|
||||
itemPanel1.Items.Add(item);
|
||||
}
|
||||
|
||||
itemPanel1.ResumeLayout();
|
||||
itemPanel1.Refresh();
|
||||
|
||||
if (itemPanel1.Items.Count != 0)
|
||||
((CheckBoxItem)itemPanel1.Items[0]).Checked = true;
|
||||
}
|
||||
}
|
||||
|
||||
private static async Task<string> DownloadString(string url)
|
||||
{
|
||||
var wc = new WebClient();
|
||||
var res = await wc.DownloadStringTaskAsync(url);
|
||||
wc.Dispose();
|
||||
return res;
|
||||
}
|
||||
|
||||
private void PasteFromDocument_Load(object sender, EventArgs e)
|
||||
{
|
||||
textBoxX1.Text = settings.UpcommingVersionsDownloadURL;
|
||||
}
|
||||
}
|
||||
}
|
||||
1978
SM64 ROM Manager.ProgressUpdater/PasteFromDocument.resx
Normal file
1978
SM64 ROM Manager.ProgressUpdater/PasteFromDocument.resx
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,8 @@
|
||||
using global::System;
|
||||
using global::System.Reflection;
|
||||
using global::System.Runtime.InteropServices;
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird.
|
||||
[assembly: Guid("49e87695-c8fa-48b9-9e27-bfbb44534ce4")]
|
||||
|
||||
63
SM64 ROM Manager.ProgressUpdater/Properties/Resources.Designer.cs
generated
Normal file
63
SM64 ROM Manager.ProgressUpdater/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 SM64_ROM_Manager.ProgressUpdater.My.Resources {
|
||||
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", "15.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <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("SM64_ROM_Manager.ProgressUpdater.Properties.Resources", typeof(Resources).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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
117
SM64 ROM Manager.ProgressUpdater/Properties/Resources.resx
Normal file
117
SM64 ROM Manager.ProgressUpdater/Properties/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?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.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: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" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
26
SM64 ROM Manager.ProgressUpdater/Properties/Settings.Designer.cs
generated
Normal file
26
SM64 ROM Manager.ProgressUpdater/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 SM64_ROM_Manager.ProgressUpdater.My {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,212 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>SM64_ROM_Manager.ProgressUpdater.My.MyApplication</StartupObject>
|
||||
<RootNamespace>SM64_ROM_Manager.ProgressUpdater</RootNamespace>
|
||||
<AssemblyName>SM64RM ProgressUpdater</AssemblyName>
|
||||
<MyType>WindowsForms</MyType>
|
||||
<TargetFramework>net48</TargetFramework>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<DefaultItemExcludes>$(DefaultItemExcludes);$(ProjectDir)**\*.vb</DefaultItemExcludes>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<AssemblyTitle>SM64 ROM Manager.ProgressUpdater</AssemblyTitle>
|
||||
<Product>SM64 ROM Manager.ProgressUpdater</Product>
|
||||
<Copyright>Copyright © Pilzinsel64 2019 - 2020</Copyright>
|
||||
<DocumentationFile>SM64RM ProgressUpdater.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>
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
</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>1443729764_forest_mushroom.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageReference Include="System.ComponentModel.Composition" Version="5.0.0" />
|
||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DevComponents.DotNetBar.Layout">
|
||||
<HintPath>..\Shared Libs\DotNetBarNew\DevComponents.DotNetBar.Layout.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevComponents.DotNetBar.Layout.Design">
|
||||
<HintPath>..\Shared Libs\DotNetBarNew\DevComponents.DotNetBar.Layout.Design.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevComponents.DotNetBar.Design">
|
||||
<HintPath>..\Shared Libs\DotNetBarNew\DevComponents.DotNetBar.Design.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="DevComponents.DotNetBar2">
|
||||
<HintPath>..\Shared Libs\DotNetBarNew\DevComponents.DotNetBar2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="drsPwEnc">
|
||||
<HintPath>..\Shared Libs\drsPwEnc.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Drawing" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Windows.Forms" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="DiscordSettingsDialog.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="DiscordSettingsDialog.Designer.cs">
|
||||
<DependentUpon>DiscordSettingsDialog.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PasteFromDocument.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="PasteFromDocument.Designer.cs">
|
||||
<DependentUpon>PasteFromDocument.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="My Project\Application.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Compile Update="WebDavSettingsDialog.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Update="WebDavSettingsDialog.Designer.cs">
|
||||
<DependentUpon>WebDavSettingsDialog.cs</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="DiscordSettingsDialog.resx">
|
||||
<DependentUpon>DiscordSettingsDialog.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="PasteFromDocument.resx">
|
||||
<DependentUpon>PasteFromDocument.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<CustomToolNamespace>SM64_ROM_Manager.ProgressUpdater.My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="WebDavSettingsDialog.resx">
|
||||
<DependentUpon>WebDavSettingsDialog.cs</DependentUpon>
|
||||
</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>SM64_ROM_Manager.ProgressUpdater.My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="1443729764_forest_mushroom.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Discord.Net" Version="2.4.0" />
|
||||
<PackageReference Include="HtmlRenderer.Core" Version="1.5.0.6" />
|
||||
<PackageReference Include="HtmlRenderer.WinForms" Version="1.5.0.6" />
|
||||
<PackageReference Include="Markdig" Version="0.25.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
|
||||
<PackageReference Include="Microsoft.NETCore.Platforms" Version="5.0.2" />
|
||||
<PackageReference Include="Microsoft.Win32.Primitives" Version="4.3.0" />
|
||||
<PackageReference Include="NETStandard.Library" Version="2.0.3" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
|
||||
<PackageReference Include="System.AppContext" Version="4.3.0" />
|
||||
<PackageReference Include="System.Collections" Version="4.3.0" />
|
||||
<PackageReference Include="System.Collections.Concurrent" Version="4.3.0" />
|
||||
<PackageReference Include="System.Collections.Immutable" Version="5.0.0" />
|
||||
<PackageReference Include="System.ComponentModel" Version="4.3.0" />
|
||||
<PackageReference Include="System.Console" Version="4.3.1" />
|
||||
<PackageReference Include="System.Diagnostics.Debug" Version="4.3.0" />
|
||||
<PackageReference Include="System.Diagnostics.DiagnosticSource" Version="5.0.1" />
|
||||
<PackageReference Include="System.Diagnostics.Tools" Version="4.3.0" />
|
||||
<PackageReference Include="System.Diagnostics.Tracing" Version="4.3.0" />
|
||||
<PackageReference Include="System.Globalization" Version="4.3.0" />
|
||||
<PackageReference Include="System.Globalization.Calendars" Version="4.3.0" />
|
||||
<PackageReference Include="System.Interactive.Async" Version="5.0.0" />
|
||||
<PackageReference Include="System.IO.Compression" Version="4.3.0" />
|
||||
<PackageReference Include="System.IO.Compression.ZipFile" Version="4.3.0" />
|
||||
<PackageReference Include="System.IO.FileSystem" Version="4.3.0" />
|
||||
<PackageReference Include="System.Linq" Version="4.3.0" />
|
||||
<PackageReference Include="System.Linq.Expressions" Version="4.3.0" />
|
||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||
<PackageReference Include="System.Net.Primitives" Version="4.3.1" />
|
||||
<PackageReference Include="System.Net.Sockets" Version="4.3.0" />
|
||||
<PackageReference Include="System.ObjectModel" Version="4.3.0" />
|
||||
<PackageReference Include="System.Reflection" Version="4.3.0" />
|
||||
<PackageReference Include="System.Reflection.Extensions" Version="4.3.0" />
|
||||
<PackageReference Include="System.Reflection.Primitives" Version="4.3.0" />
|
||||
<PackageReference Include="System.Resources.ResourceManager" Version="4.3.0" />
|
||||
<PackageReference Include="System.Runtime" Version="4.3.1" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
|
||||
<PackageReference Include="System.Runtime.Extensions" Version="4.3.1" />
|
||||
<PackageReference Include="System.Runtime.Handles" Version="4.3.0" />
|
||||
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
|
||||
<PackageReference Include="System.Runtime.InteropServices.RuntimeInformation" Version="4.3.0" />
|
||||
<PackageReference Include="System.Runtime.Numerics" Version="4.3.0" />
|
||||
<PackageReference Include="System.Security.Cryptography.Algorithms" Version="4.3.1" />
|
||||
<PackageReference Include="System.Security.Cryptography.X509Certificates" Version="4.3.2" />
|
||||
<PackageReference Include="System.Text.Encoding" Version="4.3.0" />
|
||||
<PackageReference Include="System.Text.Encoding.Extensions" Version="4.3.0" />
|
||||
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
|
||||
<PackageReference Include="System.Threading" Version="4.3.0" />
|
||||
<PackageReference Include="System.Threading.Tasks" Version="4.3.0" />
|
||||
<PackageReference Include="System.Threading.Timer" Version="4.3.0" />
|
||||
<PackageReference Include="System.Xml.ReaderWriter" Version="4.3.1" />
|
||||
<PackageReference Include="System.Xml.XDocument" Version="4.3.0" />
|
||||
<PackageReference Include="WebDav.Client" Version="2.7.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
25
SM64 ROM Manager.ProgressUpdater/Settings.cs
Normal file
25
SM64 ROM Manager.ProgressUpdater/Settings.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace SM64_ROM_Manager.ProgressUpdater
|
||||
{
|
||||
public class Settings
|
||||
{
|
||||
public string ProxyUsr { get; set; } = string.Empty;
|
||||
public string ProxyPwd { get; set; } = string.Empty;
|
||||
public string WebDavUsr { get; set; } = string.Empty;
|
||||
public string WebDavPwd { get; set; } = string.Empty;
|
||||
public string WebDavUri { get; set; } = string.Empty;
|
||||
public string Version { get; set; } = string.Empty;
|
||||
public bool DiscordUploadEnabled { get; set; } = false;
|
||||
public string DiscordBotToken { get; set; } = default;
|
||||
public ulong DiscordGuildID { get; set; } = default;
|
||||
public ulong DiscordChannelID { get; set; } = default;
|
||||
public string DiscordMsgBaseURL { get; set; } = string.Empty;
|
||||
public string DiscordMsgParamCounter { get; set; } = string.Empty;
|
||||
public string UpcommingVersionsDownloadURL { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
123
SM64 ROM Manager.ProgressUpdater/WebDavMgr.cs
Normal file
123
SM64 ROM Manager.ProgressUpdater/WebDavMgr.cs
Normal file
@@ -0,0 +1,123 @@
|
||||
using Microsoft.VisualBasic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WebDav;
|
||||
using static Microsoft.VisualBasic.CompilerServices.LikeOperator;
|
||||
|
||||
namespace SM64_ROM_Manager.ProgressUpdater
|
||||
{
|
||||
public class WebDavMgr
|
||||
{
|
||||
private Settings settings;
|
||||
private WebDavClient client = null;
|
||||
public bool IsConnected { get; private set; } = false;
|
||||
|
||||
public WebDavMgr(Settings settings)
|
||||
{
|
||||
this.settings = settings;
|
||||
}
|
||||
|
||||
public bool Connect()
|
||||
{
|
||||
bool result = false;
|
||||
|
||||
if (!IsConnected)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(settings.WebDavUri))
|
||||
{
|
||||
// Set web proxy
|
||||
if (!string.IsNullOrEmpty(settings.ProxyUsr) || !string.IsNullOrEmpty(settings.ProxyPwd))
|
||||
{
|
||||
WebRequest.DefaultWebProxy.Credentials = new NetworkCredential(settings.ProxyUsr, settings.ProxyPwd);
|
||||
}
|
||||
|
||||
// Create client params
|
||||
var clientparams = new WebDavClientParams()
|
||||
{
|
||||
BaseAddress = new Uri(settings.WebDavUri),
|
||||
Credentials = new NetworkCredential(settings.WebDavUsr.Trim(), settings.WebDavPwd),
|
||||
UseProxy = false
|
||||
};
|
||||
|
||||
// Create client
|
||||
client = new WebDavClient(clientparams);
|
||||
|
||||
result = true;
|
||||
IsConnected = true;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task<bool> UploadImage(Image img)
|
||||
{
|
||||
bool result;
|
||||
|
||||
if (string.IsNullOrEmpty(settings.Version) || !Version.TryParse(settings.Version, out Version version))
|
||||
result = false;
|
||||
else
|
||||
{
|
||||
|
||||
// Save image to memory
|
||||
var msImage = new MemoryStream();
|
||||
img.Save(msImage, System.Drawing.Imaging.ImageFormat.Png);
|
||||
msImage.Position = 0;
|
||||
|
||||
// Upload image
|
||||
try
|
||||
{
|
||||
var res = await client.PutFile($"{settings.Version}.png", msImage);
|
||||
result = res.IsSuccessful;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
result = false;
|
||||
}
|
||||
finally
|
||||
{
|
||||
msImage.Close();
|
||||
}
|
||||
|
||||
result = true;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<Version>> GetUsedVersions()
|
||||
{
|
||||
var versions = new List<Version>();
|
||||
var response = await client.Propfind(string.Empty);
|
||||
|
||||
if (response.IsSuccessful)
|
||||
{
|
||||
foreach (var resource in response.Resources)
|
||||
{
|
||||
string displayName = Path.GetFileNameWithoutExtension(resource.Uri);
|
||||
if (!string.IsNullOrEmpty(displayName) && LikeString(displayName, "*.*.*.*", CompareMethod.Text))
|
||||
{
|
||||
if (Version.TryParse(displayName, out Version version))
|
||||
versions.Add(version);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return versions;
|
||||
}
|
||||
|
||||
public async Task<string> GetUpcommingVersions()
|
||||
{
|
||||
var wc = new WebClient();
|
||||
var res = await wc.DownloadStringTaskAsync(settings.UpcommingVersionsDownloadURL);
|
||||
wc.Dispose();
|
||||
return res;
|
||||
}
|
||||
}
|
||||
}
|
||||
251
SM64 ROM Manager.ProgressUpdater/WebDavSettingsDialog.Designer.cs
generated
Normal file
251
SM64 ROM Manager.ProgressUpdater/WebDavSettingsDialog.Designer.cs
generated
Normal file
@@ -0,0 +1,251 @@
|
||||
namespace SM64_ROM_Manager.ProgressUpdater
|
||||
{
|
||||
partial class WebDavSettingsDialog
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WebDavSettingsDialog));
|
||||
this.layoutControl1 = new DevComponents.DotNetBar.Layout.LayoutControl();
|
||||
this.TextBoxX_WebDavUploadUri = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.layoutControlItem1 = new DevComponents.DotNetBar.Layout.LayoutControlItem();
|
||||
this.TextBoxX_WebDavUploadUsr = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.layoutControlItem2 = new DevComponents.DotNetBar.Layout.LayoutControlItem();
|
||||
this.TextBoxX_WebDavUploadPwd = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.layoutControlItem3 = new DevComponents.DotNetBar.Layout.LayoutControlItem();
|
||||
this.TextBoxX_ProxUsr = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.layoutControlItem4 = new DevComponents.DotNetBar.Layout.LayoutControlItem();
|
||||
this.TextBoxX_ProxPwd = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.layoutControlItem5 = new DevComponents.DotNetBar.Layout.LayoutControlItem();
|
||||
this.layoutControl1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// layoutControl1
|
||||
//
|
||||
this.layoutControl1.BackColor = System.Drawing.Color.Transparent;
|
||||
this.layoutControl1.Controls.Add(this.TextBoxX_WebDavUploadUri);
|
||||
this.layoutControl1.Controls.Add(this.TextBoxX_WebDavUploadUsr);
|
||||
this.layoutControl1.Controls.Add(this.TextBoxX_WebDavUploadPwd);
|
||||
this.layoutControl1.Controls.Add(this.TextBoxX_ProxUsr);
|
||||
this.layoutControl1.Controls.Add(this.TextBoxX_ProxPwd);
|
||||
this.layoutControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.layoutControl1.ForeColor = System.Drawing.Color.Black;
|
||||
this.layoutControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.layoutControl1.Name = "layoutControl1";
|
||||
//
|
||||
//
|
||||
//
|
||||
this.layoutControl1.RootGroup.Items.AddRange(new DevComponents.DotNetBar.Layout.LayoutItemBase[] {
|
||||
this.layoutControlItem1,
|
||||
this.layoutControlItem2,
|
||||
this.layoutControlItem3,
|
||||
this.layoutControlItem4,
|
||||
this.layoutControlItem5});
|
||||
this.layoutControl1.Size = new System.Drawing.Size(584, 141);
|
||||
this.layoutControl1.TabIndex = 0;
|
||||
//
|
||||
// TextBoxX_WebDavUploadUri
|
||||
//
|
||||
this.TextBoxX_WebDavUploadUri.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TextBoxX_WebDavUploadUri.BackColor = System.Drawing.Color.White;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.TextBoxX_WebDavUploadUri.Border.Class = "TextBoxBorder";
|
||||
this.TextBoxX_WebDavUploadUri.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.TextBoxX_WebDavUploadUri.DisabledBackColor = System.Drawing.Color.White;
|
||||
this.TextBoxX_WebDavUploadUri.ForeColor = System.Drawing.Color.Black;
|
||||
this.TextBoxX_WebDavUploadUri.Location = new System.Drawing.Point(151, 4);
|
||||
this.TextBoxX_WebDavUploadUri.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
|
||||
this.TextBoxX_WebDavUploadUri.Name = "TextBoxX_WebDavUploadUri";
|
||||
this.TextBoxX_WebDavUploadUri.PreventEnterBeep = true;
|
||||
this.TextBoxX_WebDavUploadUri.Size = new System.Drawing.Size(429, 20);
|
||||
this.TextBoxX_WebDavUploadUri.TabIndex = 4;
|
||||
this.TextBoxX_WebDavUploadUri.TextChanged += new System.EventHandler(this.TextBoxX_WebDavUploadUri_TextChanged);
|
||||
//
|
||||
// layoutControlItem1
|
||||
//
|
||||
this.layoutControlItem1.Control = this.TextBoxX_WebDavUploadUri;
|
||||
this.layoutControlItem1.Height = 28;
|
||||
this.layoutControlItem1.MinSize = new System.Drawing.Size(120, 0);
|
||||
this.layoutControlItem1.Name = "layoutControlItem1";
|
||||
this.layoutControlItem1.Text = "WebDav Directory Address:";
|
||||
this.layoutControlItem1.Width = 100;
|
||||
this.layoutControlItem1.WidthType = DevComponents.DotNetBar.Layout.eLayoutSizeType.Percent;
|
||||
//
|
||||
// TextBoxX_WebDavUploadUsr
|
||||
//
|
||||
this.TextBoxX_WebDavUploadUsr.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TextBoxX_WebDavUploadUsr.BackColor = System.Drawing.Color.White;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.TextBoxX_WebDavUploadUsr.Border.Class = "TextBoxBorder";
|
||||
this.TextBoxX_WebDavUploadUsr.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.TextBoxX_WebDavUploadUsr.DisabledBackColor = System.Drawing.Color.White;
|
||||
this.TextBoxX_WebDavUploadUsr.ForeColor = System.Drawing.Color.Black;
|
||||
this.TextBoxX_WebDavUploadUsr.Location = new System.Drawing.Point(151, 32);
|
||||
this.TextBoxX_WebDavUploadUsr.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
|
||||
this.TextBoxX_WebDavUploadUsr.Name = "TextBoxX_WebDavUploadUsr";
|
||||
this.TextBoxX_WebDavUploadUsr.PreventEnterBeep = true;
|
||||
this.TextBoxX_WebDavUploadUsr.Size = new System.Drawing.Size(429, 20);
|
||||
this.TextBoxX_WebDavUploadUsr.TabIndex = 5;
|
||||
this.TextBoxX_WebDavUploadUsr.TextChanged += new System.EventHandler(this.TextBoxX_WebDavUploadUsr_TextChanged);
|
||||
//
|
||||
// layoutControlItem2
|
||||
//
|
||||
this.layoutControlItem2.Control = this.TextBoxX_WebDavUploadUsr;
|
||||
this.layoutControlItem2.Height = 28;
|
||||
this.layoutControlItem2.MinSize = new System.Drawing.Size(120, 0);
|
||||
this.layoutControlItem2.Name = "layoutControlItem2";
|
||||
this.layoutControlItem2.Text = "WebDav Username:";
|
||||
this.layoutControlItem2.Width = 100;
|
||||
this.layoutControlItem2.WidthType = DevComponents.DotNetBar.Layout.eLayoutSizeType.Percent;
|
||||
//
|
||||
// TextBoxX_WebDavUploadPwd
|
||||
//
|
||||
this.TextBoxX_WebDavUploadPwd.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TextBoxX_WebDavUploadPwd.BackColor = System.Drawing.Color.White;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.TextBoxX_WebDavUploadPwd.Border.Class = "TextBoxBorder";
|
||||
this.TextBoxX_WebDavUploadPwd.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.TextBoxX_WebDavUploadPwd.DisabledBackColor = System.Drawing.Color.White;
|
||||
this.TextBoxX_WebDavUploadPwd.ForeColor = System.Drawing.Color.Black;
|
||||
this.TextBoxX_WebDavUploadPwd.Location = new System.Drawing.Point(151, 60);
|
||||
this.TextBoxX_WebDavUploadPwd.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
|
||||
this.TextBoxX_WebDavUploadPwd.Name = "TextBoxX_WebDavUploadPwd";
|
||||
this.TextBoxX_WebDavUploadPwd.PreventEnterBeep = true;
|
||||
this.TextBoxX_WebDavUploadPwd.Size = new System.Drawing.Size(429, 20);
|
||||
this.TextBoxX_WebDavUploadPwd.TabIndex = 6;
|
||||
this.TextBoxX_WebDavUploadPwd.UseSystemPasswordChar = true;
|
||||
this.TextBoxX_WebDavUploadPwd.TextChanged += new System.EventHandler(this.TextBoxX_WebDavUploadPwd_TextChanged);
|
||||
//
|
||||
// layoutControlItem3
|
||||
//
|
||||
this.layoutControlItem3.Control = this.TextBoxX_WebDavUploadPwd;
|
||||
this.layoutControlItem3.Height = 28;
|
||||
this.layoutControlItem3.MinSize = new System.Drawing.Size(120, 0);
|
||||
this.layoutControlItem3.Name = "layoutControlItem3";
|
||||
this.layoutControlItem3.Text = "WebDav Password:";
|
||||
this.layoutControlItem3.Width = 100;
|
||||
this.layoutControlItem3.WidthType = DevComponents.DotNetBar.Layout.eLayoutSizeType.Percent;
|
||||
//
|
||||
// TextBoxX_ProxUsr
|
||||
//
|
||||
this.TextBoxX_ProxUsr.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TextBoxX_ProxUsr.BackColor = System.Drawing.Color.White;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.TextBoxX_ProxUsr.Border.Class = "TextBoxBorder";
|
||||
this.TextBoxX_ProxUsr.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.TextBoxX_ProxUsr.DisabledBackColor = System.Drawing.Color.White;
|
||||
this.TextBoxX_ProxUsr.ForeColor = System.Drawing.Color.Black;
|
||||
this.TextBoxX_ProxUsr.Location = new System.Drawing.Point(151, 88);
|
||||
this.TextBoxX_ProxUsr.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
|
||||
this.TextBoxX_ProxUsr.Name = "TextBoxX_ProxUsr";
|
||||
this.TextBoxX_ProxUsr.PreventEnterBeep = true;
|
||||
this.TextBoxX_ProxUsr.Size = new System.Drawing.Size(429, 20);
|
||||
this.TextBoxX_ProxUsr.TabIndex = 7;
|
||||
this.TextBoxX_ProxUsr.TextChanged += new System.EventHandler(this.TextBoxX_ProxUsr_TextChanged);
|
||||
//
|
||||
// layoutControlItem4
|
||||
//
|
||||
this.layoutControlItem4.Control = this.TextBoxX_ProxUsr;
|
||||
this.layoutControlItem4.Height = 28;
|
||||
this.layoutControlItem4.MinSize = new System.Drawing.Size(120, 0);
|
||||
this.layoutControlItem4.Name = "layoutControlItem4";
|
||||
this.layoutControlItem4.Text = "Proxy Username:";
|
||||
this.layoutControlItem4.Width = 100;
|
||||
this.layoutControlItem4.WidthType = DevComponents.DotNetBar.Layout.eLayoutSizeType.Percent;
|
||||
//
|
||||
// TextBoxX_ProxPwd
|
||||
//
|
||||
this.TextBoxX_ProxPwd.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TextBoxX_ProxPwd.BackColor = System.Drawing.Color.White;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.TextBoxX_ProxPwd.Border.Class = "TextBoxBorder";
|
||||
this.TextBoxX_ProxPwd.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.TextBoxX_ProxPwd.DisabledBackColor = System.Drawing.Color.White;
|
||||
this.TextBoxX_ProxPwd.ForeColor = System.Drawing.Color.Black;
|
||||
this.TextBoxX_ProxPwd.Location = new System.Drawing.Point(151, 116);
|
||||
this.TextBoxX_ProxPwd.Margin = new System.Windows.Forms.Padding(0, 0, 0, 0);
|
||||
this.TextBoxX_ProxPwd.Name = "TextBoxX_ProxPwd";
|
||||
this.TextBoxX_ProxPwd.PreventEnterBeep = true;
|
||||
this.TextBoxX_ProxPwd.Size = new System.Drawing.Size(429, 20);
|
||||
this.TextBoxX_ProxPwd.TabIndex = 8;
|
||||
this.TextBoxX_ProxPwd.UseSystemPasswordChar = true;
|
||||
this.TextBoxX_ProxPwd.TextChanged += new System.EventHandler(this.TextBoxX_ProxPwd_TextChanged);
|
||||
//
|
||||
// layoutControlItem5
|
||||
//
|
||||
this.layoutControlItem5.Control = this.TextBoxX_ProxPwd;
|
||||
this.layoutControlItem5.Height = 28;
|
||||
this.layoutControlItem5.MinSize = new System.Drawing.Size(120, 0);
|
||||
this.layoutControlItem5.Name = "layoutControlItem5";
|
||||
this.layoutControlItem5.Text = "Proxy Password:";
|
||||
this.layoutControlItem5.Width = 100;
|
||||
this.layoutControlItem5.WidthType = DevComponents.DotNetBar.Layout.eLayoutSizeType.Percent;
|
||||
//
|
||||
// WebDavSettingsDialog
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(584, 141);
|
||||
this.Controls.Add(this.layoutControl1);
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Name = "WebDavSettingsDialog";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "WebDav Settings";
|
||||
this.layoutControl1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private DevComponents.DotNetBar.Layout.LayoutControl layoutControl1;
|
||||
private DevComponents.DotNetBar.Controls.TextBoxX TextBoxX_WebDavUploadUri;
|
||||
private DevComponents.DotNetBar.Layout.LayoutControlItem layoutControlItem1;
|
||||
private DevComponents.DotNetBar.Controls.TextBoxX TextBoxX_WebDavUploadUsr;
|
||||
private DevComponents.DotNetBar.Layout.LayoutControlItem layoutControlItem2;
|
||||
private DevComponents.DotNetBar.Controls.TextBoxX TextBoxX_WebDavUploadPwd;
|
||||
private DevComponents.DotNetBar.Layout.LayoutControlItem layoutControlItem3;
|
||||
private DevComponents.DotNetBar.Controls.TextBoxX TextBoxX_ProxUsr;
|
||||
private DevComponents.DotNetBar.Layout.LayoutControlItem layoutControlItem4;
|
||||
private DevComponents.DotNetBar.Controls.TextBoxX TextBoxX_ProxPwd;
|
||||
private DevComponents.DotNetBar.Layout.LayoutControlItem layoutControlItem5;
|
||||
}
|
||||
}
|
||||
57
SM64 ROM Manager.ProgressUpdater/WebDavSettingsDialog.cs
Normal file
57
SM64 ROM Manager.ProgressUpdater/WebDavSettingsDialog.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
using DevComponents.DotNetBar;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace SM64_ROM_Manager.ProgressUpdater
|
||||
{
|
||||
public partial class WebDavSettingsDialog : OfficeForm
|
||||
{
|
||||
private readonly Settings settings;
|
||||
|
||||
public WebDavSettingsDialog(Settings settings)
|
||||
{
|
||||
this.settings = settings;
|
||||
InitializeComponent();
|
||||
|
||||
|
||||
// Load TextBoxes
|
||||
TextBoxX_ProxUsr.Text = settings.ProxyUsr;
|
||||
TextBoxX_ProxPwd.Text = settings.ProxyPwd;
|
||||
TextBoxX_WebDavUploadUri.Text = settings.WebDavUri;
|
||||
TextBoxX_WebDavUploadUsr.Text = settings.WebDavUsr;
|
||||
TextBoxX_WebDavUploadPwd.Text = settings.WebDavPwd;
|
||||
}
|
||||
|
||||
private void TextBoxX_WebDavUploadUri_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
settings.WebDavUri = TextBoxX_WebDavUploadUri.Text.Trim();
|
||||
}
|
||||
|
||||
private void TextBoxX_WebDavUploadUsr_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
settings.WebDavUsr = TextBoxX_WebDavUploadUsr.Text.Trim();
|
||||
}
|
||||
|
||||
private void TextBoxX_WebDavUploadPwd_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
settings.WebDavPwd = TextBoxX_WebDavUploadPwd.Text;
|
||||
}
|
||||
|
||||
private void TextBoxX_ProxUsr_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
settings.ProxyUsr = TextBoxX_ProxUsr.Text.Trim();
|
||||
}
|
||||
|
||||
private void TextBoxX_ProxPwd_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
settings.ProxyPwd = TextBoxX_ProxPwd.Text;
|
||||
}
|
||||
}
|
||||
}
|
||||
1978
SM64 ROM Manager.ProgressUpdater/WebDavSettingsDialog.resx
Normal file
1978
SM64 ROM Manager.ProgressUpdater/WebDavSettingsDialog.resx
Normal file
File diff suppressed because it is too large
Load Diff
22
SM64 ROM Manager.UpdateInstallerAddOn/AddOn.cs
Normal file
22
SM64 ROM Manager.UpdateInstallerAddOn/AddOn.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using global::System.IO;
|
||||
using global::Pilz.Updating.UpdateInstaller;
|
||||
|
||||
namespace UpdateInstaller
|
||||
{
|
||||
public static class AddOn
|
||||
{
|
||||
public static void Main(UpdateInstallerConfig config, bool isAfterCopyFiles)
|
||||
{
|
||||
if (!isAfterCopyFiles /*&& config.NewApplicationVersion is null && config.CurrentApplicationVersion is null*/)
|
||||
{
|
||||
Directory.Delete(Path.Combine(config.HostApplicationPath, @"Data\Importer Presets"), true);
|
||||
|
||||
Directory.Delete(Path.Combine(config.HostApplicationPath, @"Data\Tweaks\Reviewed"), true);
|
||||
|
||||
var pCustomObjectDatabase = Path.Combine(config.HostApplicationPath, @"Data\Custom Objects\Reviewed");
|
||||
if (Directory.Exists(pCustomObjectDatabase))
|
||||
Directory.Delete(pCustomObjectDatabase, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
11
SM64 ROM Manager.UpdateInstallerAddOn/My Project/Application.Designer.cs
generated
Normal file
11
SM64 ROM Manager.UpdateInstallerAddOn/My Project/Application.Designer.cs
generated
Normal file
@@ -0,0 +1,11 @@
|
||||
// ------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?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>false</MySubMain>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<ApplicationType>1</ApplicationType>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
</MyApplicationData>
|
||||
192
SM64 ROM Manager.UpdateInstallerAddOn/My Project/MyNamespace.Static.1.Designer.cs
generated
Normal file
192
SM64 ROM Manager.UpdateInstallerAddOn/My Project/MyNamespace.Static.1.Designer.cs
generated
Normal file
@@ -0,0 +1,192 @@
|
||||
// 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.Diagnostics;
|
||||
using Microsoft.VisualBasic;
|
||||
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElifDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElifDirectiveTrivia */
|
||||
/* 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 EndIfDirectiveTrivia */
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia */
|
||||
namespace SM64_ROM_Manager.UpdateInstallerAddOn.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 *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped ElifDirectiveTrivia */
|
||||
internal partial class MyApplication : Microsoft.VisualBasic.ApplicationServices.ApplicationBase
|
||||
{
|
||||
/* 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 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 DisabledTextTrivia *//* 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 */
|
||||
[DebuggerHidden()]
|
||||
get
|
||||
{
|
||||
var Value = m_Context.Value;
|
||||
if (Value == null)
|
||||
{
|
||||
Value = new T();
|
||||
m_Context.Value = Value;
|
||||
}
|
||||
|
||||
return Value;
|
||||
}
|
||||
/* TODO ERROR: Skipped ElseDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
}
|
||||
|
||||
[DebuggerHidden()]
|
||||
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)]
|
||||
public ThreadSafeObjectProvider() : base()
|
||||
{
|
||||
}
|
||||
|
||||
/* TODO ERROR: Skipped IfDirectiveTrivia */
|
||||
private readonly Microsoft.VisualBasic.MyServices.Internal.ContextValue<T> m_Context = new Microsoft.VisualBasic.MyServices.Internal.ContextValue<T>();
|
||||
/* TODO ERROR: Skipped ElseDirectiveTrivia *//* TODO ERROR: Skipped DisabledTextTrivia *//* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
}
|
||||
}
|
||||
}
|
||||
/* TODO ERROR: Skipped EndIfDirectiveTrivia */
|
||||
253
SM64 ROM Manager.UpdateInstallerAddOn/My Project/MyNamespace.Static.2.Designer.cs
generated
Normal file
253
SM64 ROM Manager.UpdateInstallerAddOn/My Project/MyNamespace.Static.2.Designer.cs
generated
Normal file
@@ -0,0 +1,253 @@
|
||||
// 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 SM64_ROM_Manager.UpdateInstallerAddOn.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
14
SM64 ROM Manager.UpdateInstallerAddOn/My Project/MyNamespace.Static.3.Designer.cs
generated
Normal file
14
SM64 ROM Manager.UpdateInstallerAddOn/My Project/MyNamespace.Static.3.Designer.cs
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
// 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
|
||||
{
|
||||
}
|
||||
}
|
||||
117
SM64 ROM Manager.UpdateInstallerAddOn/My Project/Resources.resx
Normal file
117
SM64 ROM Manager.UpdateInstallerAddOn/My Project/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?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.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: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" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,8 @@
|
||||
using global::System;
|
||||
using global::System.Reflection;
|
||||
using global::System.Runtime.InteropServices;
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird.
|
||||
[assembly: Guid("3e801f1f-9beb-4f07-bc2b-ec1ba65d524c")]
|
||||
|
||||
63
SM64 ROM Manager.UpdateInstallerAddOn/Properties/Resources.Designer.cs
generated
Normal file
63
SM64 ROM Manager.UpdateInstallerAddOn/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,63 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 SM64_ROM_Manager.UpdateInstallerAddOn.My.Resources {
|
||||
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", "15.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <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("SM64_ROM_Manager.UpdateInstallerAddOn.Properties.Resources", typeof(Resources).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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
117
SM64 ROM Manager.UpdateInstallerAddOn/Properties/Resources.resx
Normal file
117
SM64 ROM Manager.UpdateInstallerAddOn/Properties/Resources.resx
Normal file
@@ -0,0 +1,117 @@
|
||||
<?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.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: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" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</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" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
26
SM64 ROM Manager.UpdateInstallerAddOn/Properties/Settings.Designer.cs
generated
Normal file
26
SM64 ROM Manager.UpdateInstallerAddOn/Properties/Settings.Designer.cs
generated
Normal file
@@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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 SM64_ROM_Manager.UpdateInstallerAddOn.My {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,90 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
<PropertyGroup>
|
||||
<RootNamespace>SM64_ROM_Manager.UpdateInstallerAddOn</RootNamespace>
|
||||
<MyType>Windows</MyType>
|
||||
<TargetFramework>net48</TargetFramework>
|
||||
<DefaultItemExcludes>$(DefaultItemExcludes);$(ProjectDir)**\*.vb</DefaultItemExcludes>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<AssemblyTitle>SM64 ROM Manager.UpdateInstallerAddOn</AssemblyTitle>
|
||||
<Product>SM64 ROM Manager.UpdateInstallerAddOn</Product>
|
||||
<Copyright>Copyright © Pilzinsel64 2020</Copyright>
|
||||
<DocumentationFile>SM64 ROM Manager.UpdateInstallerAddOn.xml</DocumentationFile>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,CS1591</NoWarn>
|
||||
<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>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
|
||||
<PackageReference Include="System.Net.Http" Version="4.3.4" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Microsoft.VisualBasic" />
|
||||
<Reference Include="Pilz.Updating">
|
||||
<HintPath>..\Shared Libs\Pilz.Updating.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="My Project\Application.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Update="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<CustomToolNamespace>SM64_ROM_Manager.UpdateInstallerAddOn.My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</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>SM64_ROM_Manager.UpdateInstallerAddOn.My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
BIN
Shared Libs/DotNetBarNew/DevComponents.Charts.Design.dll
Normal file
BIN
Shared Libs/DotNetBarNew/DevComponents.Charts.Design.dll
Normal file
Binary file not shown.
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
|
||||
<supportedRuntime version="v2.0.50727"/></startup>
|
||||
</configuration>
|
||||
BIN
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.Charts.dll
Normal file
BIN
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.Charts.dll
Normal file
Binary file not shown.
16292
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.Charts.xml
Normal file
16292
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.Charts.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.Design.dll
Normal file
BIN
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.Design.dll
Normal file
Binary file not shown.
1352
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.Keyboard.XML
Normal file
1352
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.Keyboard.XML
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.Keyboard.dll
Normal file
BIN
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.Keyboard.dll
Normal file
Binary file not shown.
Binary file not shown.
2691
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.Layout.XML
Normal file
2691
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.Layout.XML
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.Layout.dll
Normal file
BIN
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.Layout.dll
Normal file
Binary file not shown.
13525
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.Schedule.XML
Normal file
13525
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.Schedule.XML
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.Schedule.dll
Normal file
BIN
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.Schedule.dll
Normal file
Binary file not shown.
25479
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.SuperGrid.XML
Normal file
25479
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.SuperGrid.XML
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.SuperGrid.dll
Normal file
BIN
Shared Libs/DotNetBarNew/DevComponents.DotNetBar.SuperGrid.dll
Normal file
Binary file not shown.
BIN
Shared Libs/DotNetBarNew/DevComponents.DotNetBar2.dll
Normal file
BIN
Shared Libs/DotNetBarNew/DevComponents.DotNetBar2.dll
Normal file
Binary file not shown.
81576
Shared Libs/DotNetBarNew/DevComponents.DotNetBar2.xml
Normal file
81576
Shared Libs/DotNetBarNew/DevComponents.DotNetBar2.xml
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
BIN
Shared Libs/DotNetBarNew/DevComponents.Instrumentation.dll
Normal file
BIN
Shared Libs/DotNetBarNew/DevComponents.Instrumentation.dll
Normal file
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0"?>
|
||||
<configuration>
|
||||
<startup/></configuration>
|
||||
3228
Shared Libs/DotNetBarNew/DevComponents.Instrumentation.xml
Normal file
3228
Shared Libs/DotNetBarNew/DevComponents.Instrumentation.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Shared Libs/DotNetBarNew/DevComponents.SuperGrid.Design.dll
Normal file
BIN
Shared Libs/DotNetBarNew/DevComponents.SuperGrid.Design.dll
Normal file
Binary file not shown.
BIN
Shared Libs/DotNetBarNew/DevComponents.TreeGX.dll
Normal file
BIN
Shared Libs/DotNetBarNew/DevComponents.TreeGX.dll
Normal file
Binary file not shown.
9376
Shared Libs/DotNetBarNew/DevComponents.TreeGX.xml
Normal file
9376
Shared Libs/DotNetBarNew/DevComponents.TreeGX.xml
Normal file
File diff suppressed because it is too large
Load Diff
BIN
Shared Libs/DotNetBarNew/dotnetbar_register.reg
Normal file
BIN
Shared Libs/DotNetBarNew/dotnetbar_register.reg
Normal file
Binary file not shown.
BIN
Shared Libs/Pilz.Cryptography.dll
Normal file
BIN
Shared Libs/Pilz.Cryptography.dll
Normal file
Binary file not shown.
BIN
Shared Libs/Pilz.Updating.dll
Normal file
BIN
Shared Libs/Pilz.Updating.dll
Normal file
Binary file not shown.
BIN
Shared Libs/drsPwEnc.dll
Normal file
BIN
Shared Libs/drsPwEnc.dll
Normal file
Binary file not shown.
Reference in New Issue
Block a user