Initial commit (2011)
This commit is contained in:
commit
298bffd56b
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
bin/
|
||||
obj/
|
||||
|
||||
*.suo
|
||||
*.docstates
|
||||
*.user
|
20
GamerService Updater.sln
Normal file
20
GamerService Updater.sln
Normal file
@ -0,0 +1,20 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||
# Visual Studio 2010
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GamerService Updater", "GamerService Updater\GamerService Updater.csproj", "{77C83B45-FCB0-4F45-9666-523D8C4EC8EC}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|x86 = Debug|x86
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{77C83B45-FCB0-4F45-9666-523D8C4EC8EC}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{77C83B45-FCB0-4F45-9666-523D8C4EC8EC}.Debug|x86.Build.0 = Debug|x86
|
||||
{77C83B45-FCB0-4F45-9666-523D8C4EC8EC}.Release|x86.ActiveCfg = Release|x86
|
||||
{77C83B45-FCB0-4F45-9666-523D8C4EC8EC}.Release|x86.Build.0 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
201
GamerService Updater/Config.cs
Normal file
201
GamerService Updater/Config.cs
Normal file
@ -0,0 +1,201 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace MrAG
|
||||
{
|
||||
public class Config
|
||||
{
|
||||
private static Hashtable Data = new Hashtable();
|
||||
private static bool Busy;
|
||||
|
||||
public static void New(){
|
||||
Data.Clear();
|
||||
}
|
||||
|
||||
public static void Write(string path){
|
||||
while (Busy) { };
|
||||
Busy = true;
|
||||
|
||||
StreamWriter writer = new StreamWriter(File.OpenWrite(path));
|
||||
foreach( DictionaryEntry cat in Data)
|
||||
{
|
||||
writer.WriteLine("[\"" + cat.Key + "\"] = {");
|
||||
|
||||
Hashtable values = (Hashtable)Data[cat.Key];
|
||||
foreach( DictionaryEntry entry in values)
|
||||
{
|
||||
writer.WriteLine(" [\"" + entry.Key + "\"] = \"" + entry.Value + "\";");
|
||||
}
|
||||
|
||||
writer.WriteLine("}");
|
||||
writer.WriteLine("");
|
||||
}
|
||||
|
||||
Busy = false;
|
||||
writer.Close();
|
||||
}
|
||||
|
||||
public static bool Read(string file){
|
||||
while (Busy) { };
|
||||
Busy = true;
|
||||
Data.Clear();
|
||||
|
||||
string realfile = Directory.GetCurrentDirectory() + "/" + file;
|
||||
|
||||
if (File.Exists(realfile)){
|
||||
StreamReader reader = new StreamReader(File.OpenRead(realfile));
|
||||
string[] content = reader.ReadToEnd().Replace("\r", "").Split('\n');
|
||||
reader.Close();
|
||||
|
||||
int entrys = 0;
|
||||
string CurrentSection = "";
|
||||
string CurrentName = "";
|
||||
foreach(string line in content){
|
||||
if (line.Length > 0){
|
||||
if (line.Replace(" ","").Replace(" ", "").StartsWith("#")){ // comment
|
||||
}else if (line.StartsWith("[\"")){ // section
|
||||
CurrentSection = line.Substring(2, line.Length - 8);
|
||||
Data[CurrentSection] = new Hashtable();
|
||||
}else if (line == "}"){ // end-section
|
||||
CurrentSection = "";
|
||||
}else if (line.StartsWith(" [\"") || line.StartsWith(" [\"")){ // name/value
|
||||
int splitpos = line.IndexOf("\"] = \"");
|
||||
if (line.EndsWith("\";")){
|
||||
entrys++;
|
||||
(Data[CurrentSection] as Hashtable)[line.Substring(3, splitpos - 3)] = line.Substring(splitpos + 6, line.Length - splitpos - 8);
|
||||
}else{
|
||||
CurrentName = line.Substring(3, splitpos - 3);
|
||||
(Data[CurrentSection] as Hashtable)[CurrentName] = line.Substring(splitpos + 6, line.Length - splitpos - 6);
|
||||
}
|
||||
}else{ // resume value on next line (multilined crap :3)
|
||||
if (line.EndsWith("\";")){
|
||||
(Data[CurrentSection] as Hashtable)[CurrentName] += "\n" + line.Substring(1, line.Length - 3);
|
||||
CurrentName = "";
|
||||
}else{
|
||||
(Data[CurrentSection] as Hashtable)[CurrentName] += "\n" + line;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Console.WriteLine("Finished reading '" + file + "', " + entrys + " entrys");
|
||||
Busy = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Busy = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool IsBusy(){
|
||||
return Busy;
|
||||
}
|
||||
|
||||
public static bool Value_Exist(string section, string name){
|
||||
while (Busy) { };
|
||||
Busy = true;
|
||||
if (Data[section] == null){
|
||||
|
||||
Busy = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if ((Data[section] as Hashtable)[name] == null){
|
||||
|
||||
Busy = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
Busy = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public static Hashtable Section_Get(string name){
|
||||
while (Busy) { };
|
||||
Busy = true;
|
||||
if (Data[name] == null) {
|
||||
Busy = false;
|
||||
return new Hashtable();
|
||||
}
|
||||
|
||||
Busy = false;
|
||||
return (Hashtable)Data[name];
|
||||
}
|
||||
|
||||
public static bool Section_Exists(string name){
|
||||
while (Busy) { };
|
||||
return Data[name] != null;
|
||||
}
|
||||
|
||||
public static void Section_Set(string name, Hashtable data){
|
||||
while (Busy) { };
|
||||
Busy = true;
|
||||
|
||||
Data[name] = data;
|
||||
|
||||
Busy = false;
|
||||
}
|
||||
|
||||
public static string Value_Get(string section, string name){
|
||||
while (Busy) { };
|
||||
Busy = true;
|
||||
|
||||
if (Data[section] == null) {
|
||||
Busy = false;
|
||||
return "";
|
||||
}
|
||||
|
||||
Busy = false;
|
||||
return (string)(Data[section] as Hashtable)[name];
|
||||
}
|
||||
|
||||
public static string Value_Get(string section, string name, string def){
|
||||
while (Busy) { };
|
||||
Busy = true;
|
||||
|
||||
if (Data[section] == null) {
|
||||
Busy = false;
|
||||
return def;
|
||||
}
|
||||
|
||||
Busy = false;
|
||||
return (string)(Data[section] as Hashtable)[name];
|
||||
}
|
||||
|
||||
public static void Value_Set(string section, string name, string value){
|
||||
while (Busy) { };
|
||||
Busy = true;
|
||||
|
||||
if (Data[section] == null)
|
||||
Data[section] = new Hashtable();
|
||||
|
||||
(Data[section] as Hashtable)[name] = value;
|
||||
|
||||
Busy = false;
|
||||
}
|
||||
|
||||
public static void PrintContent(){
|
||||
while (Busy) { };
|
||||
Busy = true;
|
||||
|
||||
foreach( DictionaryEntry cat in Data )
|
||||
{
|
||||
Console.WriteLine("[\"" + cat.Key + "\"] = {");
|
||||
|
||||
Hashtable values = (Hashtable)Data[cat.Key];
|
||||
foreach( DictionaryEntry entry in values)
|
||||
{
|
||||
Console.WriteLine(" [\"" + entry.Key + "\"] = \"" + entry.Value + "\";");
|
||||
}
|
||||
|
||||
Console.WriteLine("}");
|
||||
Console.WriteLine("");
|
||||
}
|
||||
|
||||
Busy = false;
|
||||
}
|
||||
}
|
||||
}
|
1005
GamerService Updater/Form1.Designer.cs
generated
Normal file
1005
GamerService Updater/Form1.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
277
GamerService Updater/Form1.cs
Normal file
277
GamerService Updater/Form1.cs
Normal file
@ -0,0 +1,277 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Net;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading;
|
||||
|
||||
namespace GamerService_Updater
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
#region structs
|
||||
public struct afile{
|
||||
public int action;
|
||||
public string path;
|
||||
public string rev;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region fncs
|
||||
public void MakeFolder(string path){
|
||||
List<string> folders = String_Explode(path, "/");
|
||||
string curdir = System.IO.Directory.GetCurrentDirectory();
|
||||
while(folders.Count > 0){
|
||||
curdir += "/" + folders[0];
|
||||
if (!System.IO.Directory.Exists(curdir))
|
||||
System.IO.Directory.CreateDirectory(path);
|
||||
|
||||
folders.RemoveAt(0);
|
||||
}
|
||||
}
|
||||
|
||||
public List<string> String_Explode(string text, string spliter){
|
||||
List<string> returnz = new List<string>();
|
||||
|
||||
for (int i = 0; i < text.Length - spliter.Length; i++){
|
||||
while (text.Substring(i, spliter.Length) == spliter){
|
||||
returnz.Add(text.Substring(0, i));
|
||||
text = text.Substring(i + spliter.Length, text.Length - i - spliter.Length);
|
||||
i = 0;
|
||||
|
||||
if (text.Length == 0)return returnz;
|
||||
}
|
||||
}
|
||||
if (text.Length > 0){
|
||||
returnz.Add(text.Substring(0, text.Length));
|
||||
}
|
||||
|
||||
return returnz;
|
||||
}
|
||||
|
||||
public string String_Implode(List<string> Data, string spliter){
|
||||
string returnz = "";
|
||||
|
||||
foreach (string a in Data)
|
||||
returnz += a + spliter;
|
||||
|
||||
if (returnz == "") return "";
|
||||
return returnz.Substring(0, returnz.Length - spliter.Length);
|
||||
}
|
||||
#endregion
|
||||
|
||||
public class DownloadInfo {
|
||||
public string Path;
|
||||
public string URL;
|
||||
public string Version;
|
||||
public int GameID;
|
||||
public int TotalActions;
|
||||
|
||||
public byte Action;
|
||||
}
|
||||
|
||||
public List<DownloadInfo> FilesToDownload;
|
||||
|
||||
public List<afile> files = new List<afile>();
|
||||
public string Curversion = "0";
|
||||
public string NewVersion = "";
|
||||
public string Ip = "";
|
||||
public int Port = 0;
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
CheckForIllegalCrossThreadCalls = false;
|
||||
|
||||
MrAG.Config.Read("config.gs");
|
||||
Curversion = MrAG.Config.Value_Get("Main", "Version", "0.0.0.0");
|
||||
}
|
||||
|
||||
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
System.Diagnostics.Process.GetCurrentProcess().Close();
|
||||
}
|
||||
|
||||
System.Net.WebClient client;
|
||||
string currenthandelingrev;
|
||||
private void DoUpdate(){
|
||||
this.timer1.Enabled = true;
|
||||
|
||||
client = new WebClient();
|
||||
client.Proxy = null;
|
||||
|
||||
string[] FileData = null;
|
||||
int actions = 0;
|
||||
try {
|
||||
FileData = new StreamReader(client.OpenRead("http://" + "gs.mrag.nl/download.php?gid=-1&file=version.txt")).ReadToEnd().Replace("\r", "").Split('\n');
|
||||
} catch(Exception e) {
|
||||
return;
|
||||
}
|
||||
|
||||
FilesToDownload = new List<DownloadInfo>();
|
||||
lock (FilesToDownload) {
|
||||
currenthandelingrev = "";
|
||||
List<string> filesdone = new List<string>();
|
||||
foreach (string line in FileData){
|
||||
if (line.Length > 0) {
|
||||
string[] args = null;
|
||||
if (line.Contains("=")) args = line.Split('=');
|
||||
|
||||
if (line.TrimStart('\t', ' ').StartsWith("#")){
|
||||
}else if (args[0] == "VER"){
|
||||
if (currenthandelingrev.Length == 0){
|
||||
currenthandelingrev = args[1];
|
||||
}
|
||||
if (args[1] == Curversion) {
|
||||
break;
|
||||
}
|
||||
}else{
|
||||
if (!filesdone.Contains(args[1])) {
|
||||
filesdone.Add(args[1]);
|
||||
DownloadInfo info = new DownloadInfo();
|
||||
info.Action = 0;
|
||||
info.URL = "http://" + "gs.mrag.nl/download.php?gid=-1&file=" + args[1];
|
||||
info.Path = args[1];
|
||||
|
||||
switch (args[0]) {
|
||||
case "ADD":
|
||||
info.Action = 0;
|
||||
break;
|
||||
|
||||
case "MNF":
|
||||
info.Action = 1;
|
||||
break;
|
||||
|
||||
case "DEL":
|
||||
info.Action = 2;
|
||||
break;
|
||||
|
||||
case "MDR":
|
||||
info.Action = 3;
|
||||
break;
|
||||
}
|
||||
|
||||
FilesToDownload.Add(info);
|
||||
actions++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = FilesToDownload.Count - 1; i > 0; i--) {
|
||||
FilesToDownload[i].TotalActions = actions;
|
||||
}
|
||||
|
||||
if (FilesToDownload.Count != 0)
|
||||
new Thread(new ThreadStart(DoDownloads)).Start();
|
||||
else {
|
||||
MessageBox.Show("No updates :D", "Newest version");
|
||||
Application.Exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void DoDownloads() {
|
||||
while (FilesToDownload.Count > 0) {
|
||||
DownloadInfo info = FilesToDownload[0];
|
||||
|
||||
switch (info.Action) {
|
||||
case 0:
|
||||
int failsafe = 0;
|
||||
if (File.Exists(info.Path)){
|
||||
while (failsafe < 50) {
|
||||
failsafe++;
|
||||
try{
|
||||
File.Delete(info.Path);
|
||||
break;
|
||||
}catch{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if (failsafe > 49) {
|
||||
MessageBox.Show("Fatal error while trying to remove old file: " + info.Path + "\nPlease do this remotely!", "FATAL ERROR", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
Application.Exit();
|
||||
return;
|
||||
}
|
||||
|
||||
client.DownloadFile(new Uri(info.URL.Replace("\\", "/")), info.Path);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
if (File.Exists(info.Path))
|
||||
File.Delete(info.Path);
|
||||
|
||||
File.Create(info.Path);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (Directory.Exists(info.Path))
|
||||
Directory.Delete(info.Path, true);
|
||||
|
||||
if (File.Exists(info.Path))
|
||||
File.Delete(info.Path);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
if (Directory.Exists(info.Path))
|
||||
Directory.Delete(info.Path, true);
|
||||
|
||||
Directory.CreateDirectory(info.Path);
|
||||
break;
|
||||
}
|
||||
|
||||
FilesToDownload.RemoveAt(0);
|
||||
}
|
||||
|
||||
MrAG.Config.Value_Set("Main", "Version", currenthandelingrev);
|
||||
MrAG.Config.Write("config.gs");
|
||||
Application.Exit();
|
||||
|
||||
System.Diagnostics.Process.Start("GamerServices.exe");
|
||||
}
|
||||
|
||||
List<List<CheckBox>> cblist = new List<List<CheckBox>>();
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
int currow = 0;
|
||||
foreach(CheckBox cb in this.Controls){
|
||||
if (cb.Checked) {
|
||||
if (cb.Location.Y != currow) {
|
||||
cblist.Add(new List<CheckBox>());
|
||||
}
|
||||
|
||||
cblist[cblist.Count - 1].Add(cb);
|
||||
cb.Checked = false;
|
||||
}
|
||||
}
|
||||
|
||||
DoUpdate();
|
||||
}
|
||||
|
||||
private byte timeranimation = 0;
|
||||
private bool kak = true;
|
||||
|
||||
private void timer1_Tick(object sender, EventArgs e) {
|
||||
foreach (CheckBox cb in cblist[timeranimation]) {
|
||||
cb.Checked = kak;
|
||||
}
|
||||
|
||||
timeranimation++;
|
||||
if (timeranimation > cblist.Count - 1) {
|
||||
timeranimation = 0;
|
||||
kak = !kak;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
123
GamerService Updater/Form1.resx
Normal file
123
GamerService Updater/Form1.resx
Normal file
@ -0,0 +1,123 @@
|
||||
<?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>
|
||||
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
88
GamerService Updater/GamerService Updater.csproj
Normal file
88
GamerService Updater/GamerService Updater.csproj
Normal file
@ -0,0 +1,88 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{77C83B45-FCB0-4F45-9666-523D8C4EC8EC}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>GamerService_Updater</RootNamespace>
|
||||
<AssemblyName>GamerService Updater</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<PlatformTarget>x86</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|x86' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<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.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Config.cs" />
|
||||
<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" />
|
||||
<EmbeddedResource Include="Form1.resx">
|
||||
<DependentUpon>Form1.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</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>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
18
GamerService Updater/Program.cs
Normal file
18
GamerService Updater/Program.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace GamerService_Updater {
|
||||
static class Program {
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main() {
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
36
GamerService Updater/Properties/AssemblyInfo.cs
Normal file
36
GamerService Updater/Properties/AssemblyInfo.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("GamerService Updater")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft")]
|
||||
[assembly: AssemblyProduct("GamerService Updater")]
|
||||
[assembly: AssemblyCopyright("Copyright © Microsoft 2011")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("08e3f08f-e64e-44cc-967d-5b70fb43b0e1")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
62
GamerService Updater/Properties/Resources.Designer.cs
generated
Normal file
62
GamerService Updater/Properties/Resources.Designer.cs
generated
Normal file
@ -0,0 +1,62 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.1
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GamerService_Updater.Properties {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if ((resourceMan == null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("GamerService_Updater.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
117
GamerService Updater/Properties/Resources.resx
Normal file
117
GamerService Updater/Properties/Resources.resx
Normal file
@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
26
GamerService Updater/Properties/Settings.Designer.cs
generated
Normal file
26
GamerService Updater/Properties/Settings.Designer.cs
generated
Normal file
@ -0,0 +1,26 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.1
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace GamerService_Updater.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
7
GamerService Updater/Properties/Settings.settings
Normal file
7
GamerService Updater/Properties/Settings.settings
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
Loading…
Reference in New Issue
Block a user