If anybody got a working Skype Quote Faker source, can you help me?
pm
Old method somehow isn't working.
pm
Old method somehow isn't working.
private void btnGenerate_Click(object sender, EventArgs e)
{
//txtDateTime & txtNAME & txtMSG are GUI controls.. just in case you didn't know
DateTime time = DateTime.Parse(this.txtDateTime.Text, this.txtDateTime.Culture, DateTimeStyles.AssumeLocal);
TimeSpan span = (TimeSpan) (time.ToUniversalTime() - Epoch);
DataObject data = new DataObject();
string str = string.Concat(new object[] { "[", time, "] ", this.txtName.Text, ": ", this.txtMSG.Text });
data.SetData("System.String", str);
data.SetData("UnicodeText", str);
data.SetData("Text", str);
data.SetData("SkypeMessageFragment", new MemoryStream(Encoding.UTF8.GetBytes(string.Concat(new object[] { "<quote author=\"", this.txtName.Text, " \" timestamp=\"", span.TotalSeconds, "\">", this.txtMSG.Text, "</quote>" }))));
data.SetData("Locale", new MemoryStream(BitConverter.GetBytes(CultureInfo.CurrentCulture.LCID)));
data.SetData("OEMText", str);
Clipboard.SetDataObject(data, true);
}
Thanks! Translated it into VB.NET tho, because I'm working on something.Quote:
Code:private void btnGenerate_Click(object sender, EventArgs e) { //txtDateTime & txtNAME & txtMSG are GUI controls.. just in case you didn't know DateTime time = DateTime.Parse(this.txtDateTime.Text, this.txtDateTime.Culture, DateTimeStyles.AssumeLocal); TimeSpan span = (TimeSpan) (time.ToUniversalTime() - Epoch); DataObject data = new DataObject(); string str = string.Concat(new object[] { "[", time, "] ", this.txtName.Text, ": ", this.txtMSG.Text }); data.SetData("System.String", str); data.SetData("UnicodeText", str); data.SetData("Text", str); data.SetData("SkypeMessageFragment", new MemoryStream(Encoding.UTF8.GetBytes(string.Concat(new object[] { "<quote author=\"", this.txtName.Text, " \" timestamp=\"", span.TotalSeconds, "\">", this.txtMSG.Text, "</quote>" })))); data.SetData("Locale", new MemoryStream(BitConverter.GetBytes(CultureInfo.CurrentCulture.LCID))); data.SetData("OEMText", str); Clipboard.SetDataObject(data, true); }