Aggiungere i file di progetto.
This commit is contained in:
parent
a495ff97b3
commit
cdd920e5eb
25
DynUpdater.sln
Normal file
25
DynUpdater.sln
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.31702.278
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DynUpdater", "DynUpdater\DynUpdater.csproj", "{1A53BC99-0265-49A0-B5A6-1BCBA2007C33}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{1A53BC99-0265-49A0-B5A6-1BCBA2007C33}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{1A53BC99-0265-49A0-B5A6-1BCBA2007C33}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{1A53BC99-0265-49A0-B5A6-1BCBA2007C33}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{1A53BC99-0265-49A0-B5A6-1BCBA2007C33}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {071563C1-6BE9-405A-9CDA-67EB9EDC38F2}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
24
DynUpdater/App.config
Normal file
24
DynUpdater/App.config
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="DynUpdater.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
<userSettings>
|
||||
<DynUpdater.Properties.Settings>
|
||||
<setting name="DynUsername" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="DynPassword" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="DynHostname" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
</DynUpdater.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
91
DynUpdater/DynUpdater.csproj
Normal file
91
DynUpdater/DynUpdater.csproj
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{1A53BC99-0265-49A0-B5A6-1BCBA2007C33}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>DynUpdater</RootNamespace>
|
||||
<AssemblyName>DynUpdater</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>favicon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Form1.Designer.cs">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Settings.cs" />
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="favicon.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
279
DynUpdater/Form1.Designer.cs
generated
Normal file
279
DynUpdater/Form1.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,279 @@
|
|||
|
||||
namespace DynUpdater
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Variabile di progettazione necessaria.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Pulire le risorse in uso.
|
||||
/// </summary>
|
||||
/// <param name="disposing">ha valore true se le risorse gestite devono essere eliminate, false in caso contrario.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Codice generato da Progettazione Windows Form
|
||||
|
||||
/// <summary>
|
||||
/// Metodo necessario per il supporto della finestra di progettazione. Non modificare
|
||||
/// il contenuto del metodo con l'editor di codice.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
|
||||
this.backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.TXTusername = new System.Windows.Forms.TextBox();
|
||||
this.TXTpassword = new System.Windows.Forms.TextBox();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.TXThostname = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.BTNsave = new System.Windows.Forms.Button();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.LBLstatus = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
|
||||
this.ProgressBarStatus = new System.Windows.Forms.ToolStripProgressBar();
|
||||
this.timer1 = new System.Windows.Forms.Timer(this.components);
|
||||
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
|
||||
this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.BTNopen = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.configurazioneToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
|
||||
this.BTNexit = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.TXTstatus = new System.Windows.Forms.TextBox();
|
||||
this.statusStrip1.SuspendLayout();
|
||||
this.contextMenuStrip.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// backgroundWorker1
|
||||
//
|
||||
this.backgroundWorker1.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorker1_DoWork);
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(17, 19);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(74, 19);
|
||||
this.label1.TabIndex = 0;
|
||||
this.label1.Text = "Username:";
|
||||
//
|
||||
// TXTusername
|
||||
//
|
||||
this.TXTusername.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TXTusername.Location = new System.Drawing.Point(101, 16);
|
||||
this.TXTusername.Name = "TXTusername";
|
||||
this.TXTusername.Size = new System.Drawing.Size(307, 25);
|
||||
this.TXTusername.TabIndex = 1;
|
||||
//
|
||||
// TXTpassword
|
||||
//
|
||||
this.TXTpassword.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TXTpassword.Location = new System.Drawing.Point(101, 46);
|
||||
this.TXTpassword.Name = "TXTpassword";
|
||||
this.TXTpassword.PasswordChar = '*';
|
||||
this.TXTpassword.Size = new System.Drawing.Size(307, 25);
|
||||
this.TXTpassword.TabIndex = 3;
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(21, 49);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(70, 19);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "Password:";
|
||||
//
|
||||
// TXThostname
|
||||
//
|
||||
this.TXThostname.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TXThostname.Location = new System.Drawing.Point(101, 75);
|
||||
this.TXThostname.Name = "TXThostname";
|
||||
this.TXThostname.Size = new System.Drawing.Size(307, 25);
|
||||
this.TXThostname.TabIndex = 5;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(17, 78);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(75, 19);
|
||||
this.label3.TabIndex = 4;
|
||||
this.label3.Text = "Hostname:";
|
||||
//
|
||||
// BTNsave
|
||||
//
|
||||
this.BTNsave.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.BTNsave.Location = new System.Drawing.Point(101, 108);
|
||||
this.BTNsave.Name = "BTNsave";
|
||||
this.BTNsave.Size = new System.Drawing.Size(306, 34);
|
||||
this.BTNsave.TabIndex = 6;
|
||||
this.BTNsave.Text = "Apply";
|
||||
this.BTNsave.UseVisualStyleBackColor = true;
|
||||
this.BTNsave.Click += new System.EventHandler(this.BTNsave_Click);
|
||||
//
|
||||
// statusStrip1
|
||||
//
|
||||
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.LBLstatus,
|
||||
this.toolStripStatusLabel1,
|
||||
this.ProgressBarStatus});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 155);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Size = new System.Drawing.Size(616, 26);
|
||||
this.statusStrip1.TabIndex = 7;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
// LBLstatus
|
||||
//
|
||||
this.LBLstatus.Name = "LBLstatus";
|
||||
this.LBLstatus.Size = new System.Drawing.Size(70, 20);
|
||||
this.LBLstatus.Text = "LBLstatus";
|
||||
//
|
||||
// toolStripStatusLabel1
|
||||
//
|
||||
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
|
||||
this.toolStripStatusLabel1.Size = new System.Drawing.Size(531, 20);
|
||||
this.toolStripStatusLabel1.Spring = true;
|
||||
//
|
||||
// ProgressBarStatus
|
||||
//
|
||||
this.ProgressBarStatus.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
|
||||
this.ProgressBarStatus.Name = "ProgressBarStatus";
|
||||
this.ProgressBarStatus.Size = new System.Drawing.Size(100, 18);
|
||||
this.ProgressBarStatus.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
|
||||
this.ProgressBarStatus.Visible = false;
|
||||
//
|
||||
// timer1
|
||||
//
|
||||
this.timer1.Interval = 300000;
|
||||
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
|
||||
//
|
||||
// notifyIcon1
|
||||
//
|
||||
this.notifyIcon1.ContextMenuStrip = this.contextMenuStrip;
|
||||
this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon")));
|
||||
this.notifyIcon1.Text = "OVH DynUpdater";
|
||||
this.notifyIcon1.Visible = true;
|
||||
this.notifyIcon1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon1_MouseDoubleClick);
|
||||
//
|
||||
// contextMenuStrip
|
||||
//
|
||||
this.contextMenuStrip.ImageScalingSize = new System.Drawing.Size(20, 20);
|
||||
this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.BTNopen,
|
||||
this.configurazioneToolStripMenuItem,
|
||||
this.toolStripSeparator1,
|
||||
this.BTNexit});
|
||||
this.contextMenuStrip.Name = "contextMenuStrip";
|
||||
this.contextMenuStrip.Size = new System.Drawing.Size(170, 82);
|
||||
this.contextMenuStrip.Text = "Open";
|
||||
//
|
||||
// BTNopen
|
||||
//
|
||||
this.BTNopen.Name = "BTNopen";
|
||||
this.BTNopen.Size = new System.Drawing.Size(169, 24);
|
||||
this.BTNopen.Text = "Show";
|
||||
this.BTNopen.Click += new System.EventHandler(this.BTNopen_Click);
|
||||
//
|
||||
// configurazioneToolStripMenuItem
|
||||
//
|
||||
this.configurazioneToolStripMenuItem.Name = "configurazioneToolStripMenuItem";
|
||||
this.configurazioneToolStripMenuItem.Size = new System.Drawing.Size(169, 24);
|
||||
this.configurazioneToolStripMenuItem.Text = "Configuration";
|
||||
this.configurazioneToolStripMenuItem.Click += new System.EventHandler(this.configurazioneToolStripMenuItem_Click);
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
this.toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
this.toolStripSeparator1.Size = new System.Drawing.Size(166, 6);
|
||||
//
|
||||
// BTNexit
|
||||
//
|
||||
this.BTNexit.Name = "BTNexit";
|
||||
this.BTNexit.Size = new System.Drawing.Size(169, 24);
|
||||
this.BTNexit.Text = "Exit";
|
||||
this.BTNexit.Click += new System.EventHandler(this.BTNexit_Click);
|
||||
//
|
||||
// TXTstatus
|
||||
//
|
||||
this.TXTstatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.TXTstatus.Location = new System.Drawing.Point(414, 16);
|
||||
this.TXTstatus.Multiline = true;
|
||||
this.TXTstatus.Name = "TXTstatus";
|
||||
this.TXTstatus.ReadOnly = true;
|
||||
this.TXTstatus.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
|
||||
this.TXTstatus.Size = new System.Drawing.Size(190, 126);
|
||||
this.TXTstatus.TabIndex = 1;
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(616, 181);
|
||||
this.Controls.Add(this.TXTstatus);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Controls.Add(this.BTNsave);
|
||||
this.Controls.Add(this.TXThostname);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.TXTpassword);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.TXTusername);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Font = new System.Drawing.Font("Segoe UI", 7.8F);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.Name = "Form1";
|
||||
this.ShowInTaskbar = false;
|
||||
this.Text = "OVH DynUpdater";
|
||||
this.WindowState = System.Windows.Forms.FormWindowState.Minimized;
|
||||
this.Load += new System.EventHandler(this.Form1_Load);
|
||||
this.statusStrip1.ResumeLayout(false);
|
||||
this.statusStrip1.PerformLayout();
|
||||
this.contextMenuStrip.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.ComponentModel.BackgroundWorker backgroundWorker1;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.TextBox TXTusername;
|
||||
private System.Windows.Forms.TextBox TXTpassword;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox TXThostname;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Button BTNsave;
|
||||
private System.Windows.Forms.StatusStrip statusStrip1;
|
||||
private System.Windows.Forms.ToolStripStatusLabel LBLstatus;
|
||||
private System.Windows.Forms.Timer timer1;
|
||||
private System.Windows.Forms.NotifyIcon notifyIcon1;
|
||||
private System.Windows.Forms.ContextMenuStrip contextMenuStrip;
|
||||
private System.Windows.Forms.ToolStripMenuItem BTNopen;
|
||||
private System.Windows.Forms.ToolStripSeparator toolStripSeparator1;
|
||||
private System.Windows.Forms.ToolStripMenuItem BTNexit;
|
||||
private System.Windows.Forms.ToolStripProgressBar ProgressBarStatus;
|
||||
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
|
||||
private System.Windows.Forms.TextBox TXTstatus;
|
||||
private System.Windows.Forms.ToolStripMenuItem configurazioneToolStripMenuItem;
|
||||
}
|
||||
}
|
||||
|
||||
124
DynUpdater/Form1.cs
Normal file
124
DynUpdater/Form1.cs
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DynUpdater
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private async void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
|
||||
{
|
||||
var x = new Properties.Settings();
|
||||
|
||||
HttpClient client = new HttpClient();
|
||||
var byteArray = Encoding.ASCII.GetBytes(x.DynUsername+":"+x.DynPassword);
|
||||
client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));
|
||||
|
||||
try
|
||||
{
|
||||
BTNsave.Invoke((MethodInvoker)delegate () {
|
||||
ProgressBarStatus.Visible = true;
|
||||
});
|
||||
HttpResponseMessage response = await client.GetAsync("https://www.ovh.com/nic/update?system=dyndns&hostname="+x.DynHostname);
|
||||
HttpContent content = response.Content;
|
||||
var result = content.ReadAsStringAsync();
|
||||
|
||||
Console.WriteLine(StripHtml(result.Result));
|
||||
BTNsave.Invoke((MethodInvoker)delegate () {
|
||||
TXTstatus.Text = StripHtml(result.Result);
|
||||
LBLstatus.Text = response.StatusCode.ToString();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
catch (Exception ex)
|
||||
{
|
||||
BTNsave.Invoke((MethodInvoker)delegate () {
|
||||
TXTstatus.Text = ex.Message;
|
||||
});
|
||||
Console.WriteLine(ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
BTNsave.Invoke((MethodInvoker)delegate () {
|
||||
ProgressBarStatus.Visible = false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private string StripHtml(string source)
|
||||
{
|
||||
string output;
|
||||
output = Regex.Replace(source, "<[^>]*>", string.Empty);
|
||||
output = Regex.Replace(output, @"^\s*$\n", string.Empty, RegexOptions.Multiline);
|
||||
return output;
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
LBLstatus.Text = "";
|
||||
var x = new Properties.Settings();
|
||||
TXTusername.Text = x.DynUsername;
|
||||
TXTpassword.Text = x.DynPassword;
|
||||
TXThostname.Text = x.DynHostname;
|
||||
timer1.Start();
|
||||
RunTask();
|
||||
}
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e)
|
||||
{
|
||||
RunTask();
|
||||
}
|
||||
|
||||
private void RunTask()
|
||||
{
|
||||
if(!backgroundWorker1.IsBusy) backgroundWorker1.RunWorkerAsync();
|
||||
}
|
||||
|
||||
private void BTNexit_Click(object sender, EventArgs e)
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
private void BTNopen_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.WindowState = FormWindowState.Normal;
|
||||
}
|
||||
|
||||
private void BTNsave_Click(object sender, EventArgs e)
|
||||
{
|
||||
var x = new Properties.Settings();
|
||||
x.DynUsername = TXTusername.Text;
|
||||
x.DynPassword = TXTpassword.Text;
|
||||
x.DynHostname = TXThostname.Text;
|
||||
x.Save();
|
||||
RunTask();
|
||||
}
|
||||
|
||||
private void configurazioneToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
var path = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.PerUserRoamingAndLocal).FilePath;
|
||||
Process.Start("notepad.exe", path);
|
||||
}
|
||||
|
||||
private void notifyIcon1_MouseDoubleClick(object sender, MouseEventArgs e)
|
||||
{
|
||||
this.WindowState = FormWindowState.Normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
3898
DynUpdater/Form1.resx
Normal file
3898
DynUpdater/Form1.resx
Normal file
File diff suppressed because it is too large
Load Diff
22
DynUpdater/Program.cs
Normal file
22
DynUpdater/Program.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace DynUpdater
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// Punto di ingresso principale dell'applicazione.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
||||
36
DynUpdater/Properties/AssemblyInfo.cs
Normal file
36
DynUpdater/Properties/AssemblyInfo.cs
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// Le informazioni generali relative a un assembly sono controllate dal seguente
|
||||
// set di attributi. Modificare i valori di questi attributi per modificare le informazioni
|
||||
// associate a un assembly.
|
||||
[assembly: AssemblyTitle("OVH DynUpdater")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("DaxTech")]
|
||||
[assembly: AssemblyProduct("OVH DynUpdater")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2021")]
|
||||
[assembly: AssemblyTrademark("Daxtech.net")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Se si imposta ComVisible su false, i tipi in questo assembly non saranno visibili
|
||||
// ai componenti COM. Se è necessario accedere a un tipo in questo assembly da
|
||||
// COM, impostare su true l'attributo ComVisible per tale tipo.
|
||||
[assembly: ComVisible(true)]
|
||||
|
||||
// Se il progetto viene esposto a COM, il GUID seguente verrà utilizzato come ID della libreria dei tipi
|
||||
[assembly: Guid("1a53bc99-0265-49a0-b5a6-1bcba2007c33")]
|
||||
|
||||
// Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
|
||||
//
|
||||
// Versione principale
|
||||
// Versione secondaria
|
||||
// Numero di build
|
||||
// Revisione
|
||||
//
|
||||
// È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
|
||||
// usando l'asterisco '*' come illustrato di seguito:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
63
DynUpdater/Properties/Resources.Designer.cs
generated
Normal file
63
DynUpdater/Properties/Resources.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Il codice è stato generato da uno strumento.
|
||||
// Versione runtime:4.0.30319.42000
|
||||
//
|
||||
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace DynUpdater.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Classe di risorse fortemente tipizzata per la ricerca di stringhe localizzate e così via.
|
||||
/// </summary>
|
||||
// Questa classe è stata generata automaticamente dalla classe StronglyTypedResourceBuilder.
|
||||
// tramite uno strumento quale ResGen o Visual Studio.
|
||||
// Per aggiungere o rimuovere un membro, modificare il file con estensione ResX ed eseguire nuovamente ResGen
|
||||
// con l'opzione /str oppure ricompilare il progetto VS.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce l'istanza di ResourceManager nella cache utilizzata da questa classe.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("DynUpdater.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Esegue l'override della proprietà CurrentUICulture del thread corrente per tutte le
|
||||
/// ricerche di risorse eseguite utilizzando questa classe di risorse fortemente tipizzata.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
120
DynUpdater/Properties/Resources.resx
Normal file
120
DynUpdater/Properties/Resources.resx
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
62
DynUpdater/Properties/Settings.Designer.cs
generated
Normal file
62
DynUpdater/Properties/Settings.Designer.cs
generated
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// Il codice è stato generato da uno strumento.
|
||||
// Versione runtime:4.0.30319.42000
|
||||
//
|
||||
// Le modifiche apportate a questo file possono provocare un comportamento non corretto e andranno perse se
|
||||
// il codice viene rigenerato.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace DynUpdater.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string DynUsername {
|
||||
get {
|
||||
return ((string)(this["DynUsername"]));
|
||||
}
|
||||
set {
|
||||
this["DynUsername"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string DynPassword {
|
||||
get {
|
||||
return ((string)(this["DynPassword"]));
|
||||
}
|
||||
set {
|
||||
this["DynPassword"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string DynHostname {
|
||||
get {
|
||||
return ((string)(this["DynHostname"]));
|
||||
}
|
||||
set {
|
||||
this["DynHostname"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
15
DynUpdater/Properties/Settings.settings
Normal file
15
DynUpdater/Properties/Settings.settings
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="DynUpdater.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="DynUsername" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="DynPassword" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="DynHostname" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
28
DynUpdater/Settings.cs
Normal file
28
DynUpdater/Settings.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
namespace DynUpdater.Properties {
|
||||
|
||||
|
||||
// Questa classe consente di gestire eventi specifici sulla classe delle impostazioni:
|
||||
// L'evento SettingChanging viene generato prima della modifica del valore di un'impostazione.
|
||||
// L'evento PropertyChanged viene generato dopo la modifica del valore di un'impostazione.
|
||||
// L'evento SettingsLoaded viene generato dopo il caricamento dei valori dell'impostazione.
|
||||
// L'evento SettingsSaving viene generato prima del salvataggio dei valori dell'impostazione.
|
||||
internal sealed partial class Settings {
|
||||
|
||||
public Settings() {
|
||||
// // Per aggiungere gestori eventi per il salvataggio e la modifica delle impostazioni, rimuovere il commento dalle righe seguenti:
|
||||
//
|
||||
// this.SettingChanging += this.SettingChangingEventHandler;
|
||||
//
|
||||
// this.SettingsSaving += this.SettingsSavingEventHandler;
|
||||
//
|
||||
}
|
||||
|
||||
private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
|
||||
// Aggiungere qui il codice per gestire l'evento SettingChangingEvent.
|
||||
}
|
||||
|
||||
private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
|
||||
// Aggiungere qui il codice per gestire l'evento SettingsSaving.
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
DynUpdater/favicon.ico
Normal file
BIN
DynUpdater/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 110 KiB |
Loading…
Reference in New Issue
Block a user