Created
December 8, 2009 20:53
-
-
Save skyboy/251989 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
namespace WindowsFormsApplication1 | |
{ | |
public class sky | |
{ | |
public string GetFlashData() | |
{ | |
string data = "_height=700&_width=300&api=false&chat_host=of1.kongregate.com&chat_ip=216.246.59.237&chat_port=5222&game_id=0&game_rooms_enabled=true&game_title=Chatting.&game_url=http%3A%2F%2Fwww.kongregate.com%2Fgames%2Fskyboy%2Fsky-splorer_preview&initial_username=skyb0v&room_id=35141&room_name=Feed+the+Ducks&show_beacon=false&stat_grl=10000&stat_irl=30000&uid=503322_8abce8834e96eb5e79d8a519a5fecd13d5e1097e"; | |
return data; | |
} | |
public string ExtractResource(string resource, string path) | |
{ | |
Stream stream = GetType().Assembly.GetManifestResourceStream(resource); | |
byte[] bytes = new byte[(int)stream.Length]; | |
stream.Read(bytes, 0, bytes.Length); | |
File.WriteAllBytes(path, bytes); | |
return path; | |
} | |
} | |
} | |
namespace WindowsFormsApplication1 | |
{ | |
partial class Form1 | |
{ | |
/// <summary> | |
/// Required designer variable. | |
/// </summary> | |
private System.ComponentModel.IContainer components = null; | |
private sky Sky = new sky(); | |
private AxShockwaveFlashObjects.AxShockwaveFlash Flash1; | |
/// <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)) | |
{ | |
File.Delete("./temp.swf"); | |
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(Form1)); | |
this.Flash1 = new AxShockwaveFlashObjects.AxShockwaveFlash(); | |
this.Sky = new sky(); | |
((System.ComponentModel.ISupportInitialize)(this.Flash1)).BeginInit(); | |
this.SuspendLayout(); | |
// | |
// Flash1 | |
// | |
this.Flash1.Enabled = true; | |
this.Flash1.Location = new System.Drawing.Point(0, 0); | |
this.Flash1.MaximumSize = new System.Drawing.Size(300, 3000); | |
this.Flash1.MinimumSize = new System.Drawing.Size(300, 500); | |
this.Flash1.Name = "Flash1"; | |
this.Flash1.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("Flash1.OcxState"))); | |
this.Flash1.Size = new System.Drawing.Size(300, 700); | |
this.Flash1.TabIndex = 0; | |
this.Flash1.TabStop = false; | |
// | |
// Form1 | |
// | |
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); | |
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | |
this.AutoSize = true; | |
this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; | |
this.ClientSize = new System.Drawing.Size(301, 701); | |
this.Controls.Add(this.Flash1); | |
this.Name = "Form1"; | |
this.StartPosition = System.Windows.Forms.FormStartPosition.WindowsDefaultBounds; | |
this.Text = "Kongregate Chat"; | |
((System.ComponentModel.ISupportInitialize)(this.Flash1)).EndInit(); | |
this.ResumeLayout(false); | |
this.Flash1.FlashVars = Sky.GetFlashData(); | |
this.Flash1.Movie = Sky.ExtractResource("WindowsFormsApplication1.Chat.swf", "./temp.swf"); | |
} | |
//#endregion | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment