From 4800d7686b470b3a39314e76ea02daee790078b7 Mon Sep 17 00:00:00 2001 From: Trey <32907415+TheEdgeNK@users.noreply.github.com> Date: Sun, 26 Aug 2018 00:35:17 -0400 Subject: Chatter, ChatAPI, and other changes. --- Project Ports/Programs/ChatApp.Designer.cs | 111 ++++++++++++++++++++++++ Project Ports/Programs/ChatApp.cs | 27 ++++++ Project Ports/Programs/ChatApp.resx | 120 ++++++++++++++++++++++++++ Project Ports/Programs/Settings.Designer.cs | 4 +- Project Ports/Programs/TestWindow.Designer.cs | 25 +----- Project Ports/Programs/TestWindow.cs | 1 + 6 files changed, 262 insertions(+), 26 deletions(-) create mode 100644 Project Ports/Programs/ChatApp.Designer.cs create mode 100644 Project Ports/Programs/ChatApp.cs create mode 100644 Project Ports/Programs/ChatApp.resx (limited to 'Project Ports/Programs') diff --git a/Project Ports/Programs/ChatApp.Designer.cs b/Project Ports/Programs/ChatApp.Designer.cs new file mode 100644 index 0000000..c2200c1 --- /dev/null +++ b/Project Ports/Programs/ChatApp.Designer.cs @@ -0,0 +1,111 @@ +namespace Project_Ports +{ + partial class ChatApp + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.txtSentMessages = new System.Windows.Forms.TextBox(); + this.txtMsgContents = new System.Windows.Forms.TextBox(); + this.listBox1 = new System.Windows.Forms.ListBox(); + this.btnSendMSG = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // txtSentMessages + // + this.txtSentMessages.BackColor = System.Drawing.SystemColors.InfoText; + this.txtSentMessages.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtSentMessages.Font = new System.Drawing.Font("Lucida Console", 8.25F); + this.txtSentMessages.ForeColor = System.Drawing.SystemColors.Control; + this.txtSentMessages.Location = new System.Drawing.Point(136, 3); + this.txtSentMessages.Multiline = true; + this.txtSentMessages.Name = "txtSentMessages"; + this.txtSentMessages.ReadOnly = true; + this.txtSentMessages.Size = new System.Drawing.Size(439, 187); + this.txtSentMessages.TabIndex = 0; + // + // txtMsgContents + // + this.txtMsgContents.BackColor = System.Drawing.SystemColors.InactiveCaptionText; + this.txtMsgContents.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.txtMsgContents.Font = new System.Drawing.Font("Lucida Console", 8.25F); + this.txtMsgContents.ForeColor = System.Drawing.SystemColors.ControlLight; + this.txtMsgContents.Location = new System.Drawing.Point(136, 196); + this.txtMsgContents.Name = "txtMsgContents"; + this.txtMsgContents.Size = new System.Drawing.Size(384, 18); + this.txtMsgContents.TabIndex = 1; + // + // listBox1 + // + this.listBox1.BackColor = System.Drawing.SystemColors.WindowText; + this.listBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.listBox1.Font = new System.Drawing.Font("Lucida Console", 10F); + this.listBox1.ForeColor = System.Drawing.SystemColors.Control; + this.listBox1.FormattingEnabled = true; + this.listBox1.Items.AddRange(new object[] { + "#test"}); + this.listBox1.Location = new System.Drawing.Point(4, 4); + this.listBox1.Name = "listBox1"; + this.listBox1.Size = new System.Drawing.Size(126, 210); + this.listBox1.TabIndex = 2; + // + // btnSendMSG + // + this.btnSendMSG.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.btnSendMSG.Font = new System.Drawing.Font("Lucida Console", 8F); + this.btnSendMSG.ForeColor = System.Drawing.SystemColors.ButtonFace; + this.btnSendMSG.Location = new System.Drawing.Point(527, 197); + this.btnSendMSG.Name = "btnSendMSG"; + this.btnSendMSG.Size = new System.Drawing.Size(48, 19); + this.btnSendMSG.TabIndex = 3; + this.btnSendMSG.Text = "Send"; + this.btnSendMSG.UseVisualStyleBackColor = true; + this.btnSendMSG.Click += new System.EventHandler(this.btnSendMSG_Click); + // + // ChatApp + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.SystemColors.ControlText; + this.Controls.Add(this.btnSendMSG); + this.Controls.Add(this.listBox1); + this.Controls.Add(this.txtMsgContents); + this.Controls.Add(this.txtSentMessages); + this.Name = "ChatApp"; + this.Size = new System.Drawing.Size(578, 219); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox txtSentMessages; + private System.Windows.Forms.TextBox txtMsgContents; + private System.Windows.Forms.ListBox listBox1; + private System.Windows.Forms.Button btnSendMSG; + } +} diff --git a/Project Ports/Programs/ChatApp.cs b/Project Ports/Programs/ChatApp.cs new file mode 100644 index 0000000..593fa17 --- /dev/null +++ b/Project Ports/Programs/ChatApp.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using PortEngine; + +namespace Project_Ports +{ + public partial class ChatApp : UserControl + { + + public ChatApp() + { + InitializeComponent(); + } + + private void btnSendMSG_Click(object sender, EventArgs e) + { + PortEngine.ChatAPI.SendMessage(txtMsgContents, txtSentMessages); + } + } +} diff --git a/Project Ports/Programs/ChatApp.resx b/Project Ports/Programs/ChatApp.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Project Ports/Programs/ChatApp.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Project Ports/Programs/Settings.Designer.cs b/Project Ports/Programs/Settings.Designer.cs index 6ebbbf9..714ef48 100644 --- a/Project Ports/Programs/Settings.Designer.cs +++ b/Project Ports/Programs/Settings.Designer.cs @@ -46,7 +46,7 @@ // this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("Segoe UI", 18F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.label1.Location = new System.Drawing.Point(251, 19); + this.label1.Location = new System.Drawing.Point(10, 9); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(107, 32); this.label1.TabIndex = 1; @@ -55,7 +55,7 @@ // label2 // this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(30, 149); + this.label2.Location = new System.Drawing.Point(31, 140); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(46, 13); this.label2.TabIndex = 2; diff --git a/Project Ports/Programs/TestWindow.Designer.cs b/Project Ports/Programs/TestWindow.Designer.cs index ff91e5a..bb99823 100644 --- a/Project Ports/Programs/TestWindow.Designer.cs +++ b/Project Ports/Programs/TestWindow.Designer.cs @@ -28,42 +28,19 @@ /// private void InitializeComponent() { - this.button1 = new System.Windows.Forms.Button(); - this.progressBar1 = new System.Windows.Forms.ProgressBar(); this.SuspendLayout(); // - // button1 - // - this.button1.Location = new System.Drawing.Point(24, 35); - this.button1.Name = "button1"; - this.button1.Size = new System.Drawing.Size(75, 23); - this.button1.TabIndex = 0; - this.button1.Text = "button1"; - this.button1.UseVisualStyleBackColor = true; - // - // progressBar1 - // - this.progressBar1.Location = new System.Drawing.Point(24, 77); - this.progressBar1.Name = "progressBar1"; - this.progressBar1.Size = new System.Drawing.Size(100, 23); - this.progressBar1.TabIndex = 1; - // // TestWindow // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(443, 341); - this.Controls.Add(this.progressBar1); - this.Controls.Add(this.button1); this.Name = "TestWindow"; + this.Size = new System.Drawing.Size(443, 341); this.Load += new System.EventHandler(this.TestWindow_Load); this.ResumeLayout(false); } #endregion - - private System.Windows.Forms.Button button1; - private System.Windows.Forms.ProgressBar progressBar1; } } diff --git a/Project Ports/Programs/TestWindow.cs b/Project Ports/Programs/TestWindow.cs index 8de01ec..4f27de8 100644 --- a/Project Ports/Programs/TestWindow.cs +++ b/Project Ports/Programs/TestWindow.cs @@ -22,5 +22,6 @@ namespace Project_Ports { WindowManager wm = new WindowManager(); } + } } -- cgit v1.2.3