upgrade ProgressUpdater to .net6

This commit is contained in:
2022-06-09 08:41:47 +02:00
parent 50347d6ae6
commit 83b0ca22cd
22 changed files with 942 additions and 1061 deletions

View File

@@ -35,4 +35,7 @@
</dependentAssembly>
</assemblyBinding>
</runtime>
<appSettings>
<add key="TelerikWinFormsThemeName" value="Fluent" />
</appSettings>
</configuration>

View File

@@ -30,208 +30,180 @@ namespace SM64_ROM_Manager.ProgressUpdater
{
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.radWaitingBar1 = new Telerik.WinControls.UI.RadWaitingBar();
this.radTreeView1 = new Telerik.WinControls.UI.RadTreeView();
this.dotsRingWaitingBarIndicatorElement1 = new Telerik.WinControls.UI.DotsRingWaitingBarIndicatorElement();
this.RadButton_LoadServersAndChannels = new Telerik.WinControls.UI.RadButton();
this.RadTextBoxControl_UrlExtraCounterParamName = new Telerik.WinControls.UI.RadTextBoxControl();
this.radLabel3 = new Telerik.WinControls.UI.RadLabel();
this.RadTextBoxControl_ImageBaseURL = new Telerik.WinControls.UI.RadTextBoxControl();
this.radLabel2 = new Telerik.WinControls.UI.RadLabel();
this.RadTextBoxControl_DiscordBotToken = new Telerik.WinControls.UI.RadTextBoxControl();
this.radLabel1 = new Telerik.WinControls.UI.RadLabel();
this.RadCheckBox_EnableDiscordUpload = new Telerik.WinControls.UI.RadCheckBox();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.AdvTree1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.radWaitingBar1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.radTreeView1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.RadButton_LoadServersAndChannels)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.RadTextBoxControl_UrlExtraCounterParamName)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.radLabel3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.RadTextBoxControl_ImageBaseURL)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.radLabel2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.RadTextBoxControl_DiscordBotToken)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.radLabel1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.RadCheckBox_EnableDiscordUpload)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).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.Controls.Add(this.radWaitingBar1);
this.panel1.Controls.Add(this.radTreeView1);
this.panel1.Controls.Add(this.RadButton_LoadServersAndChannels);
this.panel1.Controls.Add(this.RadTextBoxControl_UrlExtraCounterParamName);
this.panel1.Controls.Add(this.radLabel3);
this.panel1.Controls.Add(this.RadTextBoxControl_ImageBaseURL);
this.panel1.Controls.Add(this.radLabel2);
this.panel1.Controls.Add(this.RadTextBoxControl_DiscordBotToken);
this.panel1.Controls.Add(this.radLabel1);
this.panel1.Controls.Add(this.RadCheckBox_EnableDiscordUpload);
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.Size = new System.Drawing.Size(511, 281);
this.panel1.TabIndex = 0;
//
// labelX3
// radWaitingBar1
//
this.labelX3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
this.radWaitingBar1.AssociatedControl = this.radTreeView1;
this.radWaitingBar1.Location = new System.Drawing.Point(127, 241);
this.radWaitingBar1.Name = "radWaitingBar1";
this.radWaitingBar1.Size = new System.Drawing.Size(70, 70);
this.radWaitingBar1.TabIndex = 9;
this.radWaitingBar1.Text = "radWaitingBar1";
this.radWaitingBar1.WaitingIndicators.Add(this.dotsRingWaitingBarIndicatorElement1);
this.radWaitingBar1.WaitingIndicatorSize = new System.Drawing.Size(100, 14);
this.radWaitingBar1.WaitingSpeed = 50;
this.radWaitingBar1.WaitingStyle = Telerik.WinControls.Enumerations.WaitingBarStyles.DotsRing;
this.radWaitingBar1.WaitingStarted += new System.EventHandler(this.RadWaitingBar1_WaitingStarted);
this.radWaitingBar1.WaitingStopped += new System.EventHandler(this.RadWaitingBar1_WaitingStopped);
//
// radTreeView1
//
this.radTreeView1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Right)));
this.radTreeView1.ItemHeight = 28;
this.radTreeView1.LineColor = System.Drawing.Color.FromArgb(((int)(((byte)(204)))), ((int)(((byte)(204)))), ((int)(((byte)(204)))));
this.radTreeView1.LineStyle = Telerik.WinControls.UI.TreeLineStyle.Solid;
this.radTreeView1.Location = new System.Drawing.Point(289, 34);
this.radTreeView1.Name = "radTreeView1";
this.radTreeView1.Size = new System.Drawing.Size(219, 244);
this.radTreeView1.TabIndex = 8;
this.radTreeView1.SelectedNodeChanged += new Telerik.WinControls.UI.RadTreeView.RadTreeViewEventHandler(this.RadTreeView1_SelectedNodeChanged);
//
// dotsRingWaitingBarIndicatorElement1
//
this.dotsRingWaitingBarIndicatorElement1.Name = "dotsRingWaitingBarIndicatorElement1";
//
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:";
// RadButton_LoadServersAndChannels
//
// TextBoxX_UrlExtraCounterParam
this.RadButton_LoadServersAndChannels.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.RadButton_LoadServersAndChannels.Location = new System.Drawing.Point(289, 4);
this.RadButton_LoadServersAndChannels.Name = "RadButton_LoadServersAndChannels";
this.RadButton_LoadServersAndChannels.Size = new System.Drawing.Size(219, 24);
this.RadButton_LoadServersAndChannels.TabIndex = 7;
this.RadButton_LoadServersAndChannels.Text = "Load Server and Channels";
this.RadButton_LoadServersAndChannels.Click += new System.EventHandler(this.ButtonX1_Click);
//
this.TextBoxX_UrlExtraCounterParam.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
// RadTextBoxControl_UrlExtraCounterParamName
//
this.RadTextBoxControl_UrlExtraCounterParamName.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.RadTextBoxControl_UrlExtraCounterParamName.Location = new System.Drawing.Point(3, 155);
this.RadTextBoxControl_UrlExtraCounterParamName.Name = "RadTextBoxControl_UrlExtraCounterParamName";
this.RadTextBoxControl_UrlExtraCounterParamName.Size = new System.Drawing.Size(280, 22);
this.RadTextBoxControl_UrlExtraCounterParamName.TabIndex = 6;
this.RadTextBoxControl_UrlExtraCounterParamName.Click += new System.EventHandler(this.TextBoxX_UrlExtraCounterParam_TextChanged);
//
// radLabel3
//
this.radLabel3.Location = new System.Drawing.Point(3, 131);
this.radLabel3.Name = "radLabel3";
this.radLabel3.Size = new System.Drawing.Size(164, 18);
this.radLabel3.TabIndex = 5;
this.radLabel3.Text = "URL extra counter param name:";
//
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);
// RadTextBoxControl_ImageBaseURL
//
// labelX2
//
this.labelX2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
this.RadTextBoxControl_ImageBaseURL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.RadTextBoxControl_ImageBaseURL.Location = new System.Drawing.Point(3, 103);
this.RadTextBoxControl_ImageBaseURL.Name = "RadTextBoxControl_ImageBaseURL";
this.RadTextBoxControl_ImageBaseURL.Size = new System.Drawing.Size(280, 22);
this.RadTextBoxControl_ImageBaseURL.TabIndex = 4;
this.RadTextBoxControl_ImageBaseURL.Click += new System.EventHandler(this.TextBoxX_ImgBaseURL_TextChanged);
//
// radLabel2
//
this.radLabel2.Location = new System.Drawing.Point(3, 79);
this.radLabel2.Name = "radLabel2";
this.radLabel2.Size = new System.Drawing.Size(89, 18);
this.radLabel2.TabIndex = 3;
this.radLabel2.Text = "Image Base URL:";
//
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:";
// RadTextBoxControl_DiscordBotToken
//
// TextBoxX_ImgBaseURL
//
this.TextBoxX_ImgBaseURL.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
this.RadTextBoxControl_DiscordBotToken.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.RadTextBoxControl_DiscordBotToken.Location = new System.Drawing.Point(3, 51);
this.RadTextBoxControl_DiscordBotToken.Name = "RadTextBoxControl_DiscordBotToken";
this.RadTextBoxControl_DiscordBotToken.Size = new System.Drawing.Size(280, 22);
this.RadTextBoxControl_DiscordBotToken.TabIndex = 2;
this.RadTextBoxControl_DiscordBotToken.Click += new System.EventHandler(this.TextBoxX_BotToken_TextChanged);
//
// radLabel1
//
this.radLabel1.Location = new System.Drawing.Point(3, 27);
this.radLabel1.Name = "radLabel1";
this.radLabel1.Size = new System.Drawing.Size(100, 18);
this.radLabel1.TabIndex = 1;
this.radLabel1.Text = "Discord Bot Token:";
//
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);
// RadCheckBox_EnableDiscordUpload
//
// 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);
this.RadCheckBox_EnableDiscordUpload.Location = new System.Drawing.Point(3, 3);
this.RadCheckBox_EnableDiscordUpload.Name = "RadCheckBox_EnableDiscordUpload";
this.RadCheckBox_EnableDiscordUpload.Size = new System.Drawing.Size(137, 18);
this.RadCheckBox_EnableDiscordUpload.TabIndex = 0;
this.RadCheckBox_EnableDiscordUpload.Text = "Enable Discord Upload";
this.RadCheckBox_EnableDiscordUpload.Click += new System.EventHandler(this.CheckBoxX_EnableDiscordUpload_CheckedChanged);
//
// DiscordSettingsDialog
//
this.ClientSize = new System.Drawing.Size(394, 194);
this.ClientSize = new System.Drawing.Size(511, 281);
this.Controls.Add(this.panel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "DiscordSettingsDialog";
//
//
//
this.RootElement.ApplyShapeToControl = true;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Discord Settings";
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.AdvTree1)).EndInit();
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.radWaitingBar1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.radTreeView1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.RadButton_LoadServersAndChannels)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.RadTextBoxControl_UrlExtraCounterParamName)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.radLabel3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.RadTextBoxControl_ImageBaseURL)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.radLabel2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.RadTextBoxControl_DiscordBotToken)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.radLabel1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.RadCheckBox_EnableDiscordUpload)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
this.ResumeLayout(false);
}
@@ -239,16 +211,16 @@ namespace SM64_ROM_Manager.ProgressUpdater
#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;
private Telerik.WinControls.UI.RadTreeView radTreeView1;
private Telerik.WinControls.UI.RadButton RadButton_LoadServersAndChannels;
private Telerik.WinControls.UI.RadTextBoxControl RadTextBoxControl_UrlExtraCounterParamName;
private Telerik.WinControls.UI.RadLabel radLabel3;
private Telerik.WinControls.UI.RadTextBoxControl RadTextBoxControl_ImageBaseURL;
private Telerik.WinControls.UI.RadLabel radLabel2;
private Telerik.WinControls.UI.RadTextBoxControl RadTextBoxControl_DiscordBotToken;
private Telerik.WinControls.UI.RadLabel radLabel1;
private Telerik.WinControls.UI.RadCheckBox RadCheckBox_EnableDiscordUpload;
private Telerik.WinControls.UI.RadWaitingBar radWaitingBar1;
private Telerik.WinControls.UI.DotsRingWaitingBarIndicatorElement dotsRingWaitingBarIndicatorElement1;
}
}

View File

@@ -5,12 +5,12 @@ using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevComponents.AdvTree;
using DevComponents.DotNetBar;
using Telerik.WinControls;
using Telerik.WinControls.UI;
namespace SM64_ROM_Manager.ProgressUpdater
{
public partial class DiscordSettingsDialog : OfficeForm
public partial class DiscordSettingsDialog : RadForm
{
private readonly Settings settings;
@@ -18,29 +18,32 @@ namespace SM64_ROM_Manager.ProgressUpdater
{
InitializeComponent();
this.settings = settings;
TextBoxX_BotToken.Text = settings.DiscordBotToken;
TextBoxX_ImgBaseURL.Text = settings.DiscordMsgBaseURL;
TextBoxX_UrlExtraCounterParam.Text = settings.DiscordMsgParamCounter;
CheckBoxX_EnableDiscordUpload.Checked = settings.DiscordUploadEnabled;
RadTextBoxControl_DiscordBotToken.Text = settings.DiscordBotToken;
RadTextBoxControl_ImageBaseURL.Text = settings.DiscordMsgBaseURL;
RadTextBoxControl_UrlExtraCounterParamName.Text = settings.DiscordMsgParamCounter;
RadCheckBox_EnableDiscordUpload.Checked = settings.DiscordUploadEnabled;
}
private void TextBoxX_BotToken_TextChanged(object sender, EventArgs e)
{
settings.DiscordBotToken = TextBoxX_BotToken.Text.Trim();
settings.DiscordBotToken = RadTextBoxControl_DiscordBotToken.Text.Trim();
}
private void TextBoxX_ImgBaseURL_TextChanged(object sender, EventArgs e)
{
settings.DiscordMsgBaseURL = TextBoxX_ImgBaseURL.Text.Trim();
settings.DiscordMsgBaseURL = RadTextBoxControl_ImageBaseURL.Text.Trim();
}
private void TextBoxX_UrlExtraCounterParam_TextChanged(object sender, EventArgs e)
{
settings.DiscordMsgParamCounter = TextBoxX_UrlExtraCounterParam.Text.Trim();
settings.DiscordMsgParamCounter = RadTextBoxControl_UrlExtraCounterParamName.Text.Trim();
}
private void ButtonX1_Click(object sender, EventArgs e)
{
radWaitingBar1.StartWaiting();
RadButton_LoadServersAndChannels.Enabled = false;
var dmgr = new DiscordMgr(settings);
bool hasError = false;
dmgr.LoggedMsg += (ssender, msg, isError) => { if (hasError) hasError = true; };
@@ -53,43 +56,47 @@ namespace SM64_ROM_Manager.ProgressUpdater
if (hasError)
{
MessageBox.Show("Entwender deaktiviert oder Token ist falsch.", string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Error);
RadMessageBox.Show("Entwender deaktiviert oder Token ist falsch.", string.Empty, MessageBoxButtons.OK, RadMessageIcon.Error);
}
else
{
AdvTree1.BeginUpdate();
AdvTree1.Nodes.Clear();
radTreeView1.BeginUpdate();
radTreeView1.Nodes.Clear();
foreach (var guild in dmgr.Client.Guilds)
{
var nGuild = new Node()
var nGuild = new RadTreeNode()
{
Name = "g" + guild.Id,
Text = guild.Name,
Tag = guild.Id
Tag = guild.Id,
Expanded = true
};
foreach (var channel in guild.TextChannels)
{
var nChannel = new Node()
var nChannel = new RadTreeNode()
{
Name = "c" + channel.Id,
Text = "#" + channel.Name,
Tag = channel.Id
};
nGuild.Nodes.Add(nChannel);
}
AdvTree1.Nodes.Add(nGuild);
radTreeView1.Nodes.Add(nGuild);
}
AdvTree1.EndUpdate();
radTreeView1.EndUpdate();
radTreeView1.Refresh();
dmgr.Stop();
}
radWaitingBar1.StopWaiting();
}
private void AdvTree1_AfterNodeSelect(object sender, DevComponents.AdvTree.AdvTreeNodeEventArgs e)
private void RadTreeView1_SelectedNodeChanged(object sender, RadTreeViewEventArgs e)
{
if (e.Node.Name.StartsWith("c"))
{
@@ -100,7 +107,17 @@ namespace SM64_ROM_Manager.ProgressUpdater
private void CheckBoxX_EnableDiscordUpload_CheckedChanged(object sender, EventArgs e)
{
settings.DiscordUploadEnabled = CheckBoxX_EnableDiscordUpload.Checked;
settings.DiscordUploadEnabled = RadCheckBox_EnableDiscordUpload.Checked;
}
private void RadWaitingBar1_WaitingStarted(object sender, EventArgs e)
{
RadButton_LoadServersAndChannels.Enabled = false;
}
private void RadWaitingBar1_WaitingStopped(object sender, EventArgs e)
{
RadButton_LoadServersAndChannels.Enabled = true;
}
}
}

View File

@@ -1,64 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">

View File

@@ -8,7 +8,7 @@ using Microsoft.VisualBasic.CompilerServices;
namespace SM64_ROM_Manager.ProgressUpdater
{
[DesignerGenerated()]
public partial class Form1 : DevComponents.DotNetBar.OfficeForm
public partial class Form1 : Telerik.WinControls.UI.RadForm
{
// Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
@@ -37,213 +37,202 @@ namespace SM64_ROM_Manager.ProgressUpdater
[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.RadButton_InvertImage = new Telerik.WinControls.UI.RadButton();
this.RadButton_PasteFromDocument = new Telerik.WinControls.UI.RadButton();
this.RadButton_PasteFromClipboard = new Telerik.WinControls.UI.RadButton();
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.RadButton_Upload = new Telerik.WinControls.UI.RadButton();
this.RadDropDownList_Version = new Telerik.WinControls.UI.RadDropDownList();
this.radLabel1 = new Telerik.WinControls.UI.RadLabel();
this.RadButton_DiscordSetup = new Telerik.WinControls.UI.RadButton();
this.RadButton_SetupWebDav = new Telerik.WinControls.UI.RadButton();
this.PictureBox1 = new System.Windows.Forms.PictureBox();
this.radWaitingBar1 = new Telerik.WinControls.UI.RadWaitingBar();
this.dotsRingWaitingBarIndicatorElement1 = new Telerik.WinControls.UI.DotsRingWaitingBarIndicatorElement();
this.Panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.RadButton_InvertImage)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.RadButton_PasteFromDocument)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.RadButton_PasteFromClipboard)).BeginInit();
this.Panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.RadButton_Upload)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.RadDropDownList_Version)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.radLabel1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.RadButton_DiscordSetup)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.RadButton_SetupWebDav)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.radWaitingBar1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
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.RadButton_InvertImage);
this.Panel1.Controls.Add(this.RadButton_PasteFromDocument);
this.Panel1.Controls.Add(this.RadButton_PasteFromClipboard);
this.Panel1.Controls.Add(this.Panel2);
this.Panel1.Controls.Add(this.PictureBox1);
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
// RadButton_InvertImage
//
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);
this.RadButton_InvertImage.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.RadButton_InvertImage.Location = new System.Drawing.Point(563, 33);
this.RadButton_InvertImage.Name = "RadButton_InvertImage";
this.RadButton_InvertImage.Size = new System.Drawing.Size(128, 24);
this.RadButton_InvertImage.TabIndex = 22;
this.RadButton_InvertImage.Text = "Invert Image";
this.RadButton_InvertImage.Click += new System.EventHandler(this.buttonX1_Click_1);
//
// PictureBox1
// RadButton_PasteFromDocument
//
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;
this.RadButton_PasteFromDocument.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.RadButton_PasteFromDocument.Location = new System.Drawing.Point(429, 3);
this.RadButton_PasteFromDocument.Name = "RadButton_PasteFromDocument";
this.RadButton_PasteFromDocument.Size = new System.Drawing.Size(128, 24);
this.RadButton_PasteFromDocument.TabIndex = 1;
this.RadButton_PasteFromDocument.Text = "Paste from Document";
this.RadButton_PasteFromDocument.Click += new System.EventHandler(this.ButtonX_PasteDocument_Click);
//
// RadButton_PasteFromClipboard
//
this.RadButton_PasteFromClipboard.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.RadButton_PasteFromClipboard.Location = new System.Drawing.Point(563, 3);
this.RadButton_PasteFromClipboard.Name = "RadButton_PasteFromClipboard";
this.RadButton_PasteFromClipboard.Size = new System.Drawing.Size(128, 24);
this.RadButton_PasteFromClipboard.TabIndex = 21;
this.RadButton_PasteFromClipboard.Text = "Paste from Clipboard";
this.RadButton_PasteFromClipboard.Click += new System.EventHandler(this.ButtonX1_Click);
//
// 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.Controls.Add(this.RadButton_Upload);
this.Panel2.Controls.Add(this.RadDropDownList_Version);
this.Panel2.Controls.Add(this.radLabel1);
this.Panel2.Controls.Add(this.RadButton_DiscordSetup);
this.Panel2.Controls.Add(this.RadButton_SetupWebDav);
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
// RadButton_Upload
//
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);
this.RadButton_Upload.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.RadButton_Upload.Location = new System.Drawing.Point(3, 457);
this.RadButton_Upload.Name = "RadButton_Upload";
this.RadButton_Upload.Size = new System.Drawing.Size(194, 48);
this.RadButton_Upload.TabIndex = 18;
this.RadButton_Upload.Text = "Upload";
this.RadButton_Upload.Click += new System.EventHandler(this.ButtonX_Upload_Click);
//
// ButtonX_SetupWebDav
// RadDropDownList_Version
//
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);
this.RadDropDownList_Version.DropDownAnimationEnabled = true;
this.RadDropDownList_Version.Location = new System.Drawing.Point(3, 87);
this.RadDropDownList_Version.Name = "RadDropDownList_Version";
this.RadDropDownList_Version.NullText = "e.g. 1.2.0.0";
this.RadDropDownList_Version.Size = new System.Drawing.Size(194, 24);
this.RadDropDownList_Version.TabIndex = 19;
//
// circularProgress1
// radLabel1
//
this.circularProgress1.Anchor = System.Windows.Forms.AnchorStyles.None;
this.circularProgress1.BackColor = System.Drawing.Color.Transparent;
this.radLabel1.Location = new System.Drawing.Point(3, 63);
this.radLabel1.Name = "radLabel1";
this.radLabel1.Size = new System.Drawing.Size(46, 18);
this.radLabel1.TabIndex = 18;
this.radLabel1.Text = "Version:";
//
// RadButton_DiscordSetup
//
this.RadButton_DiscordSetup.Location = new System.Drawing.Point(3, 33);
this.RadButton_DiscordSetup.Name = "RadButton_DiscordSetup";
this.RadButton_DiscordSetup.Size = new System.Drawing.Size(194, 24);
this.RadButton_DiscordSetup.TabIndex = 17;
this.RadButton_DiscordSetup.Text = "Setup Discord Bot";
this.RadButton_DiscordSetup.Click += new System.EventHandler(this.ButtonX_DiscordSetup_Click);
//
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;
// RadButton_SetupWebDav
//
// ButtonX_DiscordSetup
this.RadButton_SetupWebDav.Location = new System.Drawing.Point(3, 3);
this.RadButton_SetupWebDav.Name = "RadButton_SetupWebDav";
this.RadButton_SetupWebDav.Size = new System.Drawing.Size(194, 24);
this.RadButton_SetupWebDav.TabIndex = 16;
this.RadButton_SetupWebDav.Text = "Setup WebDav Client";
this.RadButton_SetupWebDav.Click += new System.EventHandler(this.ButtonX_SetupWebDav_Click);
//
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);
// PictureBox1
//
// ButtonX_Upload
this.PictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.PictureBox1.Location = new System.Drawing.Point(0, 0);
this.PictureBox1.Name = "PictureBox1";
this.PictureBox1.Size = new System.Drawing.Size(694, 508);
this.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.PictureBox1.TabIndex = 0;
this.PictureBox1.TabStop = false;
//
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);
// radWaitingBar1
//
// LabelX6
this.radWaitingBar1.AssociatedControl = this.RadButton_Upload;
this.radWaitingBar1.Location = new System.Drawing.Point(29, -23);
this.radWaitingBar1.Name = "radWaitingBar1";
this.radWaitingBar1.Size = new System.Drawing.Size(70, 70);
this.radWaitingBar1.TabIndex = 21;
this.radWaitingBar1.WaitingIndicators.Add(this.dotsRingWaitingBarIndicatorElement1);
this.radWaitingBar1.WaitingIndicatorSize = new System.Drawing.Size(100, 14);
this.radWaitingBar1.WaitingSpeed = 50;
this.radWaitingBar1.WaitingStyle = Telerik.WinControls.Enumerations.WaitingBarStyles.DotsRing;
((Telerik.WinControls.UI.RadWaitingBarElement)(radWaitingBar1.GetChildAt(0))).WaitingIndicatorSize = new System.Drawing.Size(100, 14);
((Telerik.WinControls.UI.RadWaitingBarElement)(radWaitingBar1.GetChildAt(0))).WaitingSpeed = 50;
((Telerik.WinControls.UI.WaitingBarContentElement)(radWaitingBar1.GetChildAt(0).GetChildAt(0))).WaitingStyle = Telerik.WinControls.Enumerations.WaitingBarStyles.DotsRing;
((Telerik.WinControls.UI.WaitingBarSeparatorElement)(radWaitingBar1.GetChildAt(0).GetChildAt(0).GetChildAt(0))).ProgressOrientation = Telerik.WinControls.ProgressOrientation.Right;
((Telerik.WinControls.UI.WaitingBarSeparatorElement)(radWaitingBar1.GetChildAt(0).GetChildAt(0).GetChildAt(0))).Dash = false;
//
this.LabelX6.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
// dotsRingWaitingBarIndicatorElement1
//
//
//
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);
this.dotsRingWaitingBarIndicatorElement1.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.Auto;
this.dotsRingWaitingBarIndicatorElement1.FitToSizeMode = Telerik.WinControls.RadFitToSizeMode.FitToParentBounds;
this.dotsRingWaitingBarIndicatorElement1.Name = "dotsRingWaitingBarIndicatorElement1";
//
// Form1
//
this.AcceptButton = this.ButtonX_Upload;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleBaseSize = new System.Drawing.Size(7, 15);
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(694, 508);
this.Controls.Add(this.Panel1);
this.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.ForeColor = System.Drawing.Color.Black;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "Form1";
//
//
//
this.RootElement.ApplyShapeToControl = true;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "SM64RM Progress Updater";
this.Load += new System.EventHandler(this.Form1_Load);
this.Panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.RadButton_InvertImage)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.RadButton_PasteFromDocument)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.RadButton_PasteFromClipboard)).EndInit();
this.Panel2.ResumeLayout(false);
this.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.RadButton_Upload)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.RadDropDownList_Version)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.radLabel1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.RadButton_DiscordSetup)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.RadButton_SetupWebDav)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.PictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.radWaitingBar1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
this.ResumeLayout(false);
}
@@ -251,8 +240,6 @@ namespace SM64_ROM_Manager.ProgressUpdater
private Panel Panel1;
private DevComponents.DotNetBar.StyleManager StyleManager1;
private PictureBox PictureBox1;
@@ -260,7 +247,6 @@ namespace SM64_ROM_Manager.ProgressUpdater
private Panel Panel2;
private DevComponents.DotNetBar.ButtonX ButtonX_Upload;
@@ -269,20 +255,15 @@ namespace SM64_ROM_Manager.ProgressUpdater
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;
private Telerik.WinControls.UI.RadButton RadButton_SetupWebDav;
private Telerik.WinControls.UI.RadDropDownList RadDropDownList_Version;
private Telerik.WinControls.UI.RadLabel radLabel1;
private Telerik.WinControls.UI.RadButton RadButton_DiscordSetup;
private Telerik.WinControls.UI.RadButton RadButton_Upload;
private Telerik.WinControls.UI.RadButton RadButton_InvertImage;
private Telerik.WinControls.UI.RadButton RadButton_PasteFromDocument;
private Telerik.WinControls.UI.RadButton RadButton_PasteFromClipboard;
private Telerik.WinControls.UI.RadWaitingBar radWaitingBar1;
private Telerik.WinControls.UI.DotsRingWaitingBarIndicatorElement dotsRingWaitingBarIndicatorElement1;
}
}

View File

@@ -3,10 +3,11 @@ 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;
using Telerik.WinControls.UI;
using Telerik.WinControls;
namespace SM64_ROM_Manager.ProgressUpdater
{
@@ -51,7 +52,7 @@ namespace SM64_ROM_Manager.ProgressUpdater
private void LoadTextBoxes()
{
ComboBoxEx_Version.Text = settings.Version;
RadDropDownList_Version.Text = settings.Version;
}
private void SaveConfig()
@@ -89,19 +90,19 @@ namespace SM64_ROM_Manager.ProgressUpdater
if (dmgr is object && dmgr.IsReady)
dmgr.Stop();
dmgr = new DiscordMgr(settings);
dmgr.GotReady += (_, __) => ButtonX_DiscordSetup.Enabled = true;
dmgr.GotReady += (_, __) => RadButton_DiscordSetup.Enabled = true;
dmgr.Start();
}
private Task LoadWebDavMgr()
{
ButtonX_Upload.Enabled = false;
RadButton_Upload.Enabled = false;
return Task.Run(() =>
{
wdmgr = new WebDavMgr(settings);
if (wdmgr.Connect())
{
Invoke(new Action(() => ButtonX_Upload.Enabled = true));
Invoke(new Action(() => RadButton_Upload.Enabled = true));
LoadUsedVersions();
}
});
@@ -109,10 +110,10 @@ namespace SM64_ROM_Manager.ProgressUpdater
private async void LoadUsedVersions()
{
Invoke(new Action(() => ComboBoxEx_Version.Items.Clear()));
Invoke(new Action(() => RadDropDownList_Version.Items.Clear()));
foreach (var version in await wdmgr.GetUsedVersions())
Invoke(new Action(() => ComboBoxEx_Version.Items.Add(version)));
Invoke(new Action(() => RadDropDownList_Version.Items.Add(version.ToString())));
}
private void InvertImage()
@@ -141,25 +142,27 @@ namespace SM64_ROM_Manager.ProgressUpdater
private async void ButtonX_Upload_Click(object sender, EventArgs e)
{
RadButton_Upload.Image = null;
if (settings.DiscordUploadEnabled && !dmgr.IsReady)
{
ToastNotification.Show(this, "Discord ist noch nicht bereit!", eToastGlowColor.Orange, eToastPosition.BottomCenter);
RadMessageBox.Show(this, "Discord ist noch nicht bereit!", string.Empty, MessageBoxButtons.OK, RadMessageIcon.Error);
}
else
{
Enabled = false;
circularProgress1.Start();
radWaitingBar1.StartWaiting();
if (await wdmgr.UploadImage(PictureBox1.Image))
{
if (dmgr is object && dmgr.IsReady)
await dmgr.SendMessage();
ToastNotification.Show(this, "Erfolgreich hochgeladen!", eToastGlowColor.Green, eToastPosition.BottomCenter);
RadButton_Upload.Image = MySymbols.icons8_ok_32px_4;
}
else
{
ToastNotification.Show(this, "Fehler beim Hochladen!", eToastGlowColor.Orange, eToastPosition.BottomCenter);
RadMessageBox.Show(this, "Fehler beim Hochladen!", string.Empty, MessageBoxButtons.OK, RadMessageIcon.Error);
}
circularProgress1.Stop();
radWaitingBar1.StopWaiting();
Enabled = true;
}
}
@@ -179,7 +182,7 @@ namespace SM64_ROM_Manager.ProgressUpdater
private void TextBoxX_Version_TextChanged(object sender, EventArgs e)
{
settings.Version = ComboBoxEx_Version.Text.Trim();
settings.Version = RadDropDownList_Version.Text.Trim();
}
private void ButtonX_DiscordSetup_Click(object sender, EventArgs e)
@@ -208,4 +211,4 @@ namespace SM64_ROM_Manager.ProgressUpdater
InvertImage();
}
}
}
}

View File

@@ -1,64 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
@@ -117,9 +57,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="StyleManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

View File

@@ -2,12 +2,9 @@
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

View File

@@ -0,0 +1,33 @@
// ------------------------------------------------------------------------------
// <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 Microsoft.VisualBasic.ApplicationServices;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Drawing;
using System.Windows.Forms;
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
{
protected override bool OnInitialize(ReadOnlyCollection<string> commandLineArgs)
{
Application.SetDefaultFont(new Font(Control.DefaultFont.FontFamily, 8.25f));
return base.OnInitialize(commandLineArgs);
}
}
}

View File

@@ -0,0 +1,73 @@
//------------------------------------------------------------------------------
// <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 {
using System;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class MySymbols {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal MySymbols() {
}
/// <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.MySymbols", typeof(MySymbols).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap icons8_ok_32px_4 {
get {
object obj = ResourceManager.GetObject("icons8_ok_32px_4", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
}
}

View File

@@ -0,0 +1,124 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="icons8_ok_32px_4" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>Resources\icons8_ok_32px_4.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@@ -29,180 +29,109 @@
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.RadButton_Paste = new Telerik.WinControls.UI.RadButton();
this.RadButton_Cancel = new Telerik.WinControls.UI.RadButton();
this.radTextBoxControl1 = new Telerik.WinControls.UI.RadTextBoxControl();
this.panel1 = new System.Windows.Forms.Panel();
this.RadListControl_Paragraph = new Telerik.WinControls.UI.RadListControl();
((System.ComponentModel.ISupportInitialize)(this.RadButton_Paste)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.RadButton_Cancel)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.radTextBoxControl1)).BeginInit();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.RadListControl_Paragraph)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
this.SuspendLayout();
//
// layoutControl1
// RadButton_Paste
//
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.RadButton_Paste.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.RadButton_Paste.Location = new System.Drawing.Point(205, 286);
this.RadButton_Paste.Name = "RadButton_Paste";
this.RadButton_Paste.Size = new System.Drawing.Size(110, 24);
this.RadButton_Paste.TabIndex = 0;
this.RadButton_Paste.Text = "Paste";
this.RadButton_Paste.Click += new System.EventHandler(this.ButtonX_Paste_Click);
//
// RadButton_Cancel
//
this.RadButton_Cancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.RadButton_Cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.RadButton_Cancel.Location = new System.Drawing.Point(321, 286);
this.RadButton_Cancel.Name = "RadButton_Cancel";
this.RadButton_Cancel.Size = new System.Drawing.Size(110, 24);
this.RadButton_Cancel.TabIndex = 1;
this.RadButton_Cancel.Text = "Cancel";
//
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;
// radTextBoxControl1
//
// textBoxX1
this.radTextBoxControl1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.radTextBoxControl1.Location = new System.Drawing.Point(3, 3);
this.radTextBoxControl1.Name = "radTextBoxControl1";
this.radTextBoxControl1.NullText = "Document URL";
this.radTextBoxControl1.Size = new System.Drawing.Size(428, 22);
this.radTextBoxControl1.TabIndex = 2;
this.radTextBoxControl1.TextChanged += new System.EventHandler(this.textBoxX1_TextChanged);
//
this.textBoxX1.BackColor = System.Drawing.Color.White;
// panel1
//
this.panel1.BackColor = System.Drawing.Color.Transparent;
this.panel1.Controls.Add(this.RadListControl_Paragraph);
this.panel1.Controls.Add(this.RadButton_Cancel);
this.panel1.Controls.Add(this.radTextBoxControl1);
this.panel1.Controls.Add(this.RadButton_Paste);
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(434, 313);
this.panel1.TabIndex = 4;
//
// RadListControl_Paragraph
//
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;
this.RadListControl_Paragraph.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.RadListControl_Paragraph.ItemHeight = 24;
this.RadListControl_Paragraph.Location = new System.Drawing.Point(3, 31);
this.RadListControl_Paragraph.Name = "RadListControl_Paragraph";
this.RadListControl_Paragraph.Size = new System.Drawing.Size(428, 249);
this.RadListControl_Paragraph.TabIndex = 4;
//
// PasteFromDocument
//
this.AcceptButton = this.ButtonX_Paste;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AcceptButton = this.RadButton_Paste;
this.AutoScaleBaseSize = new System.Drawing.Size(7, 15);
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
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.CancelButton = this.RadButton_Cancel;
this.ClientSize = new System.Drawing.Size(434, 313);
this.Controls.Add(this.panel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.Name = "PasteFromDocument";
//
//
//
this.RootElement.ApplyShapeToControl = true;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Paste From Document";
this.Load += new System.EventHandler(this.PasteFromDocument_Load);
this.layoutControl1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.RadButton_Paste)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.RadButton_Cancel)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.radTextBoxControl1)).EndInit();
this.panel1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.RadListControl_Paragraph)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
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;
private Telerik.WinControls.UI.RadButton RadButton_Paste;
private Telerik.WinControls.UI.RadButton RadButton_Cancel;
private Telerik.WinControls.UI.RadTextBoxControl radTextBoxControl1;
private System.Windows.Forms.Panel panel1;
private Telerik.WinControls.UI.RadListControl RadListControl_Paragraph;
}
}

View File

@@ -1,18 +1,19 @@
using DevComponents.DotNetBar;
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Telerik.WinControls.UI;
namespace SM64_ROM_Manager.ProgressUpdater
{
public partial class PasteFromDocument : OfficeForm
public partial class PasteFromDocument : RadForm
{
private Settings settings;
@@ -22,15 +23,14 @@ namespace SM64_ROM_Manager.ProgressUpdater
{
this.settings = settings;
InitializeComponent();
UpdateAmbientColors();
}
private void ButtonX_Paste_Click(object sender, EventArgs e)
{
BaseItem selectedItem = null;
foreach (BaseItem item in itemPanel1.Items)
RadListDataItem selectedItem = null;
foreach (RadListDataItem item in RadListControl_Paragraph.Items)
{
if (selectedItem == null && item is CheckBoxItem && ((CheckBoxItem)item).Checked)
if (selectedItem == null && item is RadCheckedListDataItem && ((RadCheckedListDataItem)item).Checked)
selectedItem = item;
}
@@ -44,7 +44,7 @@ namespace SM64_ROM_Manager.ProgressUpdater
private async void textBoxX1_TextChanged(object sender, EventArgs e)
{
var url = textBoxX1.Text.Trim();
var url = radTextBoxControl1.Text.Trim();
settings.UpcommingVersionsDownloadURL = url;
if (!string.IsNullOrEmpty(url))
await GetNewItems(url);
@@ -55,42 +55,39 @@ namespace SM64_ROM_Manager.ProgressUpdater
var mdDocStr = await DownloadString(url);
if (!string.IsNullOrEmpty(mdDocStr))
{
itemPanel1.SuspendLayout();
itemPanel1.Items.Clear();
RadListControl_Paragraph.BeginUpdate();
RadListControl_Paragraph.Items.Clear();
foreach (var kvp in MarkdownHelper.SplitToVersions(mdDocStr))
{
var item = new CheckBoxItem
var item = new RadListDataItem
{
Text = kvp.Key,
Tag = kvp.Value,
CheckBoxStyle = eCheckBoxStyle.RadioButton
Tag = kvp.Value
};
item.DoubleClick += ButtonX_Paste_Click;
itemPanel1.Items.Add(item);
RadListControl_Paragraph.Items.Add(item);
}
itemPanel1.ResumeLayout();
itemPanel1.Refresh();
RadListControl_Paragraph.EndUpdate();
RadListControl_Paragraph.Refresh();
if (itemPanel1.Items.Count != 0)
((CheckBoxItem)itemPanel1.Items[0]).Checked = true;
if (RadListControl_Paragraph.Items.Any())
((RadCheckedListDataItem)RadListControl_Paragraph.Items[0]).Checked = true;
}
}
private static async Task<string> DownloadString(string url)
{
var wc = new WebClient();
var res = await wc.DownloadStringTaskAsync(url);
var wc = new HttpClient();
var res = await wc.GetStringAsync(url);
wc.Dispose();
return res;
}
private void PasteFromDocument_Load(object sender, EventArgs e)
{
textBoxX1.Text = settings.UpcommingVersionsDownloadURL;
radTextBoxControl1.Text = settings.UpcommingVersionsDownloadURL;
}
}
}

View File

@@ -1,64 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">

Binary file not shown.

After

Width:  |  Height:  |  Size: 1022 B

View File

@@ -5,13 +5,13 @@
<RootNamespace>SM64_ROM_Manager.ProgressUpdater</RootNamespace>
<AssemblyName>SM64RM ProgressUpdater</AssemblyName>
<MyType>WindowsForms</MyType>
<TargetFramework>net48</TargetFramework>
<TargetFramework>net6.0-windows10.0.17763.0</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>
<Copyright>Copyright © Pilzinsel64 2019 - 2022</Copyright>
<DocumentationFile>SM64RM ProgressUpdater.xml</DocumentationFile>
<DefineTrace>true</DefineTrace>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022,CS1591</NoWarn>
@@ -41,30 +41,20 @@
<ApplicationIcon>1443729764_forest_mushroom.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="HtmlRenderer.Core" Version="1.5.0.6" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.ComponentModel.Composition" Version="5.0.0" />
<PackageReference Include="Microsoft.Toolkit.Uwp.Notifications" Version="7.1.2" />
<PackageReference Include="Microsoft.VisualBasic" Version="10.3.0" />
<PackageReference Include="System.ComponentModel.Composition" Version="6.0.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="UI.for.WinForms.AllControls.Net60">
<Version>2022.2.510</Version>
</PackageReference>
</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" />
@@ -80,22 +70,24 @@
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Update="DiscordSettingsDialog.cs">
<SubType>Form</SubType>
<Compile Update="MyApplication.cs">
<AutoGen>True</AutoGen>
</Compile>
<Compile Update="DiscordSettingsDialog.cs" />
<Compile Update="DiscordSettingsDialog.Designer.cs">
<DependentUpon>DiscordSettingsDialog.cs</DependentUpon>
</Compile>
<Compile Update="Form1.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="Form1.cs" />
<Compile Update="Form1.Designer.cs">
<DependentUpon>Form1.cs</DependentUpon>
<SubType>Form</SubType>
</Compile>
<Compile Update="PasteFromDocument.cs">
<SubType>Form</SubType>
<Compile Update="MySymbols.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>MySymbols.resx</DependentUpon>
</Compile>
<Compile Update="PasteFromDocument.cs" />
<Compile Update="PasteFromDocument.Designer.cs">
<DependentUpon>PasteFromDocument.cs</DependentUpon>
</Compile>
@@ -113,9 +105,7 @@
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Update="WebDavSettingsDialog.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="WebDavSettingsDialog.cs" />
<Compile Update="WebDavSettingsDialog.Designer.cs">
<DependentUpon>WebDavSettingsDialog.cs</DependentUpon>
</Compile>
@@ -127,6 +117,10 @@
<EmbeddedResource Update="Form1.resx">
<DependentUpon>Form1.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Update="MySymbols.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>MySymbols.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="PasteFromDocument.resx">
<DependentUpon>PasteFromDocument.cs</DependentUpon>
</EmbeddedResource>
@@ -155,28 +149,26 @@
<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="Discord.Net" Version="3.7.2" />
<PackageReference Include="Markdig" Version="0.30.2" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageReference Include="Microsoft.NETCore.Platforms" Version="6.0.3" />
<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.Collections.Immutable" Version="6.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.DiagnosticSource" Version="6.0.0" />
<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.Interactive.Async" Version="6.0.1" />
<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" />
@@ -191,7 +183,7 @@
<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.CompilerServices.Unsafe" Version="6.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" />
@@ -207,6 +199,6 @@
<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" />
<PackageReference Include="WebDav.Client" Version="2.8.0" />
</ItemGroup>
</Project>

View File

@@ -8,11 +8,11 @@ namespace SM64_ROM_Manager.ProgressUpdater
{
public class Settings
{
public string ProxyUsr { get; set; } = string.Empty;
public string ProxyPwd { get; set; } = string.Empty;
public string WebDavUri { 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 ProxyUsr { get; set; } = string.Empty;
public string ProxyPwd { get; set; } = string.Empty;
public string Version { get; set; } = string.Empty;
public bool DiscordUploadEnabled { get; set; } = false;
public string DiscordBotToken { get; set; } = default;

View File

@@ -29,223 +29,73 @@
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.radDataLayout1 = new Telerik.WinControls.UI.RadDataLayout();
this.radPropertyGrid1 = new Telerik.WinControls.UI.RadPropertyGrid();
((System.ComponentModel.ISupportInitialize)(this.radDataLayout1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.radDataLayout1.LayoutControl)).BeginInit();
this.radDataLayout1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.radPropertyGrid1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
this.SuspendLayout();
//
// layoutControl1
// radDataLayout1
//
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.radDataLayout1.BackColor = System.Drawing.Color.Transparent;
this.radDataLayout1.Dock = System.Windows.Forms.DockStyle.Fill;
//
// radDataLayout1.LayoutControl
//
this.radDataLayout1.LayoutControl.BackColor = System.Drawing.Color.Transparent;
this.radDataLayout1.LayoutControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.radDataLayout1.LayoutControl.DrawBorder = false;
this.radDataLayout1.LayoutControl.Location = new System.Drawing.Point(0, 0);
this.radDataLayout1.LayoutControl.Name = "LayoutControl";
this.radDataLayout1.LayoutControl.Size = new System.Drawing.Size(584, 132);
this.radDataLayout1.LayoutControl.TabIndex = 0;
this.radDataLayout1.Location = new System.Drawing.Point(0, 0);
this.radDataLayout1.Name = "radDataLayout1";
this.radDataLayout1.Size = new System.Drawing.Size(584, 132);
this.radDataLayout1.TabIndex = 0;
this.radDataLayout1.EditorInitializing += new Telerik.WinControls.UI.EditorInitializingEventHandler(this.RadDataLayout1_EditorInitializing);
//
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;
// radPropertyGrid1
//
// 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;
this.radPropertyGrid1.ItemHeight = 28;
this.radPropertyGrid1.ItemIndent = 28;
this.radPropertyGrid1.Location = new System.Drawing.Point(292, 0);
this.radPropertyGrid1.Name = "radPropertyGrid1";
this.radPropertyGrid1.Size = new System.Drawing.Size(280, 300);
this.radPropertyGrid1.TabIndex = 1;
this.radPropertyGrid1.Visible = false;
//
// WebDavSettingsDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleBaseSize = new System.Drawing.Size(7, 15);
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(584, 141);
this.Controls.Add(this.layoutControl1);
this.ClientSize = new System.Drawing.Size(584, 132);
this.Controls.Add(this.radDataLayout1);
this.Controls.Add(this.radPropertyGrid1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "WebDavSettingsDialog";
//
//
//
this.RootElement.ApplyShapeToControl = true;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "WebDav Settings";
this.layoutControl1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.radDataLayout1.LayoutControl)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.radDataLayout1)).EndInit();
this.radDataLayout1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.radPropertyGrid1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
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;
private Telerik.WinControls.UI.RadDataLayout radDataLayout1;
private Telerik.WinControls.UI.RadPropertyGrid radPropertyGrid1;
}
}

View File

@@ -1,5 +1,4 @@
using DevComponents.DotNetBar;
using System;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -8,50 +7,94 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Telerik.WinControls.UI;
namespace SM64_ROM_Manager.ProgressUpdater
{
public partial class WebDavSettingsDialog : OfficeForm
public partial class WebDavSettingsDialog : RadForm
{
private readonly Settings settings;
private readonly Dictionary<string, string> propNameLabel = new Dictionary<string, string>();
private readonly List<string> propNameChar = new List<string>();
public WebDavSettingsDialog(Settings settings)
{
this.settings = settings;
InitializeComponent();
SetupPropDics();
radDataLayout1.ItemInitializing += RadDataLayout1_ItemInitializing;
radDataLayout1.DataSource = settings;
// 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;
#region "Example-Methods for RadPropertyGrid"
//radPropertyGrid1.CreateItemElement += RadPropertyGrid1_CreateItemElement;
//radPropertyGrid1.EditorInitialized += RadPropertyGrid1_EditorInitialized;
//radPropertyGrid1.PropertyGridElement.PropertyTableElement.ListSource.CollectionChanged += ListSource_CollectionChanged;
//radPropertyGrid1.SelectedObjectChanging += PropertyTableElement_SelectedObjectChanging;
//radPropertyGrid1.SelectedObjectChanged += PropertyTableElement_SelectedObjectChanged;
//radPropertyGrid1.SelectedObject = settings;
#endregion
}
private void TextBoxX_WebDavUploadUri_TextChanged(object sender, EventArgs e)
#region "Example-Methods for RadPropertyGrid"
//private void PropertyTableElement_SelectedObjectChanging(object sender, PropertyGridSelectedObjectChangingEventArgs e)
//{
//}
//private void ListSource_CollectionChanged(object sender, Telerik.WinControls.Data.NotifyCollectionChangedEventArgs e)
//{
//}
//private void PropertyTableElement_SelectedObjectChanged(object sender, PropertyGridSelectedObjectChangedEventArgs e)
//{
//}
//private void RadPropertyGrid1_EditorInitialized(object sender, PropertyGridItemEditorInitializedEventArgs e)
//{
//}
//private void RadPropertyGrid1_CreateItemElement(object sender, CreatePropertyGridItemElementEventArgs e)
//{
// if (propNameLabel.ContainsKey(e.Item.Name))
// e.Item.Label = propNameLabel[e.Item.Name];
// else
// {
// ((PropertyGridItem)e.Item).Visible = false;
// //((PropertyGridItem)e.Item).Enabled = false;
// }
//}
#endregion
private void SetupPropDics()
{
settings.WebDavUri = TextBoxX_WebDavUploadUri.Text.Trim();
propNameLabel.Clear();
propNameLabel.Add(nameof(Settings.WebDavUri), "WebDav URL:");
propNameLabel.Add(nameof(Settings.WebDavUsr), "WebDav User:");
propNameLabel.Add(nameof(Settings.WebDavPwd), "WebDav Password:");
propNameLabel.Add(nameof(Settings.ProxyUsr), "Proxy User:");
propNameLabel.Add(nameof(Settings.ProxyPwd), "Proxy Password:");
propNameChar.Clear();
propNameChar.Add(nameof(Settings.WebDavPwd));
propNameChar.Add(nameof(Settings.ProxyPwd));
}
private void TextBoxX_WebDavUploadUsr_TextChanged(object sender, EventArgs e)
private void RadDataLayout1_EditorInitializing(object sender, EditorInitializingEventArgs e)
{
settings.WebDavUsr = TextBoxX_WebDavUploadUsr.Text.Trim();
if (!propNameLabel.ContainsKey(e.Property.Name))
e.Cancel = true;
else if (propNameChar.Contains(e.Property.Name) && e.EditorType == typeof(RadTextBox))
((RadTextBox)e.Editor).UseSystemPasswordChar = true;
}
private void TextBoxX_WebDavUploadPwd_TextChanged(object sender, EventArgs e)
private void RadDataLayout1_ItemInitializing(object sender, DataLayoutItemInitializingEventArgs 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;
if (propNameLabel.ContainsKey(e.Item.AccessibleName))
e.Item.Text = propNameLabel[e.Item.AccessibleName];
}
}
}

View File

@@ -1,64 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">