New chat client-side.

This commit is contained in:
Michael 2017-02-12 20:13:06 -05:00
parent f5f4dcbdb5
commit f483997d33
6 changed files with 502 additions and 414 deletions

View file

@ -22,7 +22,7 @@ namespace ShiftOS.Server.WebAdmin
{
var HostConf = new HostConfiguration();
HostConf.UrlReservations.CreateAutomatically = true;
HostConf.RewriteLocalhost = true;
using(var nancy = new NancyHost(HostConf, new Uri("http://localhost:13371/mudadmin/")))
{
nancy.Start();

View file

@ -40,6 +40,10 @@
<Reference Include="NetSockets">
<HintPath>..\Libraries\NetSockets.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=8.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.8.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Nito.AsyncEx, Version=3.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Nito.AsyncEx.3.0.1\lib\net45\Nito.AsyncEx.dll</HintPath>
<Private>True</Private>
@ -68,9 +72,6 @@
<Reference Include="DynamicLua, Version=1.1.2.0, Culture=neutral, PublicKeyToken=null">
<HintPath>..\packages\DynamicLua.1.1.2.0\lib\net40-Client\DynamicLua.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed">
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="WebSocket4Net, Version=0.14.1.0, Culture=neutral, PublicKeyToken=eb4e154b696bf72a, processorArchitecture=MSIL">
<HintPath>..\packages\WebSocket4Net.0.14.1\lib\net45\WebSocket4Net.dll</HintPath>
<Private>True</Private>

View file

@ -2,7 +2,7 @@
<packages>
<package id="Discord.Net" version="0.9.6" targetFramework="net451" />
<package id="DynamicLua" version="1.1.2.0" targetFramework="net452" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net451" />
<package id="Nito.AsyncEx" version="3.0.1" targetFramework="net451" />
<package id="RestSharp" version="105.2.3" targetFramework="net451" />
<package id="WebSocket4Net" version="0.14.1" targetFramework="net451" />

View file

@ -36,10 +36,6 @@ using ShiftOS.Engine;
namespace ShiftOS.WinForms.Applications
{
[MultiplayerOnly]
[Launcher("MUD Chat", true, "al_mud_chat", "Networking")]
[RequiresUpgrade("mud_fundamentals")]
[WinOpen("chat")]
public partial class Chat : UserControl, IShiftOSWindow
{
public Chat(string chatId)
@ -48,13 +44,16 @@ namespace ShiftOS.WinForms.Applications
id = chatId;
ServerManager.MessageReceived += (msg) =>
{
if (msg.Name == "cbroadcast")
if (msg.Name == "chat_msgreceived")
{
try
{
this.Invoke(new Action(() =>
{
rtbchat.Text += msg.Contents + Environment.NewLine;
var cmsg = JsonConvert.DeserializeObject<ShiftOS.Objects.ChatMessage>(msg.Contents);
if(id == cmsg.Channel)
rtbchat.AppendText($"[{cmsg.Username}@{cmsg.SystemName}] {cmsg.Message}{Environment.NewLine}");
}));
}
catch { }
@ -62,15 +61,16 @@ namespace ShiftOS.WinForms.Applications
};
}
public void SendMessage(string msg)
{
ServerManager.SendMessage("chat_send", JsonConvert.SerializeObject(new ShiftOS.Objects.ChatMessage(SaveSystem.CurrentSave.Username, SaveSystem.CurrentSave.SystemName, msg, id)));
}
private string id = "";
public void OnLoad()
{
var save = SaveSystem.CurrentSave;
ServerManager.SendMessage("chat_join", $@"{{
id: ""{id}"",
user: {JsonConvert.SerializeObject(save)}
}}");
SendMessage("User has joined the chat.");
}
public void OnSkinLoad()
@ -79,12 +79,8 @@ namespace ShiftOS.WinForms.Applications
public bool OnUnload()
{
var save = SaveSystem.CurrentSave;
ServerManager.SendMessage("chat_leave", $@"{{
id: ""{id}"",
user: {JsonConvert.SerializeObject(save)}
}}");
SendMessage("User has left the chat.");
id = null;
return true;
}
@ -105,11 +101,7 @@ namespace ShiftOS.WinForms.Applications
var save = SaveSystem.CurrentSave;
ServerManager.SendMessage("chat", $@"{{
id: ""{id}"",
user: {JsonConvert.SerializeObject(save)},
msg: ""{txtuserinput.Text}""
}}");
SendMessage(txtuserinput.Text);
txtuserinput.Text = "";
}
}

View file

@ -72,6 +72,36 @@ namespace ShiftOS.WinForms.Applications
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.txtappstatus = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer();
this.shop_view = new System.Windows.Forms.Panel();
this.panel5 = new System.Windows.Forms.Panel();
this.lbupgradedesc = new System.Windows.Forms.Label();
this.pnlbuy = new System.Windows.Forms.Panel();
this.btneditshop = new System.Windows.Forms.Button();
this.lbprice = new System.Windows.Forms.Label();
this.btnbuy = new System.Windows.Forms.Button();
this.lbupgradetitle = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.lbupgrades = new System.Windows.Forms.ListBox();
this.lbcodepoints = new System.Windows.Forms.Label();
this.lbshopname = new System.Windows.Forms.Label();
this.shop_editor = new System.Windows.Forms.Panel();
this.panel7 = new System.Windows.Forms.Panel();
this.txtshopdescription = new System.Windows.Forms.TextBox();
this.panel8 = new System.Windows.Forms.Panel();
this.label15 = new System.Windows.Forms.Label();
this.btnsaveshop = new System.Windows.Forms.Button();
this.label16 = new System.Windows.Forms.Label();
this.panel9 = new System.Windows.Forms.Panel();
this.lbeditingshopitems = new System.Windows.Forms.ListBox();
this.txtshopname = new System.Windows.Forms.TextBox();
this.flowLayoutPanel5 = new System.Windows.Forms.FlowLayoutPanel();
this.btnaddshopitem = new System.Windows.Forms.Button();
this.btnremoveitem = new System.Windows.Forms.Button();
this.btnedititem = new System.Windows.Forms.Button();
this.shop_all = new System.Windows.Forms.Panel();
this.flshoplist = new System.Windows.Forms.FlowLayoutPanel();
this.label12 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.lgn_create = new System.Windows.Forms.Panel();
this.btncreate = new System.Windows.Forms.Button();
this.txtnewlegiondescription = new System.Windows.Forms.TextBox();
@ -92,17 +122,6 @@ namespace ShiftOS.WinForms.Applications
this.lbtaskdescription = new System.Windows.Forms.Label();
this.lbtaskname = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.shop_view = new System.Windows.Forms.Panel();
this.panel5 = new System.Windows.Forms.Panel();
this.lbupgradedesc = new System.Windows.Forms.Label();
this.pnlbuy = new System.Windows.Forms.Panel();
this.lbprice = new System.Windows.Forms.Label();
this.btnbuy = new System.Windows.Forms.Button();
this.lbupgradetitle = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel();
this.lbupgrades = new System.Windows.Forms.ListBox();
this.lbcodepoints = new System.Windows.Forms.Label();
this.lbshopname = new System.Windows.Forms.Label();
this.lgn_view = new System.Windows.Forms.Panel();
this.pnllgnusers = new System.Windows.Forms.Panel();
this.lvusers = new System.Windows.Forms.ListView();
@ -127,40 +146,29 @@ namespace ShiftOS.WinForms.Applications
this.you_systemstatus = new System.Windows.Forms.Panel();
this.lblsysstatus = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.shop_all = new System.Windows.Forms.Panel();
this.flshoplist = new System.Windows.Forms.FlowLayoutPanel();
this.label12 = new System.Windows.Forms.Label();
this.label13 = new System.Windows.Forms.Label();
this.shop_editor = new System.Windows.Forms.Panel();
this.panel7 = new System.Windows.Forms.Panel();
this.panel8 = new System.Windows.Forms.Panel();
this.label15 = new System.Windows.Forms.Label();
this.btnsaveshop = new System.Windows.Forms.Button();
this.label16 = new System.Windows.Forms.Label();
this.panel9 = new System.Windows.Forms.Panel();
this.lbeditingshopitems = new System.Windows.Forms.ListBox();
this.flowLayoutPanel5 = new System.Windows.Forms.FlowLayoutPanel();
this.btnaddshopitem = new System.Windows.Forms.Button();
this.btnremoveitem = new System.Windows.Forms.Button();
this.btnedititem = new System.Windows.Forms.Button();
this.txtshopname = new System.Windows.Forms.TextBox();
this.txtshopdescription = new System.Windows.Forms.TextBox();
this.btneditshop = new System.Windows.Forms.Button();
this.chatToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.joinAChatToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout();
this.statusStrip1.SuspendLayout();
this.toolStripContainer1.BottomToolStripPanel.SuspendLayout();
this.toolStripContainer1.ContentPanel.SuspendLayout();
this.toolStripContainer1.TopToolStripPanel.SuspendLayout();
this.toolStripContainer1.SuspendLayout();
this.shop_view.SuspendLayout();
this.panel5.SuspendLayout();
this.pnlbuy.SuspendLayout();
this.panel1.SuspendLayout();
this.shop_editor.SuspendLayout();
this.panel7.SuspendLayout();
this.panel8.SuspendLayout();
this.panel9.SuspendLayout();
this.flowLayoutPanel5.SuspendLayout();
this.shop_all.SuspendLayout();
this.lgn_create.SuspendLayout();
this.panel2.SuspendLayout();
this.panel4.SuspendLayout();
this.flowLayoutPanel4.SuspendLayout();
this.job_current.SuspendLayout();
this.shop_view.SuspendLayout();
this.panel5.SuspendLayout();
this.pnlbuy.SuspendLayout();
this.panel1.SuspendLayout();
this.lgn_view.SuspendLayout();
this.pnllgnusers.SuspendLayout();
this.banner.SuspendLayout();
@ -170,12 +178,6 @@ namespace ShiftOS.WinForms.Applications
this.flowLayoutPanel2.SuspendLayout();
this.you_memos.SuspendLayout();
this.you_systemstatus.SuspendLayout();
this.shop_all.SuspendLayout();
this.shop_editor.SuspendLayout();
this.panel7.SuspendLayout();
this.panel8.SuspendLayout();
this.panel9.SuspendLayout();
this.flowLayoutPanel5.SuspendLayout();
this.SuspendLayout();
//
// menuStrip1
@ -185,7 +187,8 @@ namespace ShiftOS.WinForms.Applications
this.youToolStripMenuItem,
this.shopsToolStripMenuItem,
this.tasksToolStripMenuItem,
this.legionsToolStripMenuItem});
this.legionsToolStripMenuItem,
this.chatToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(756, 24);
@ -236,21 +239,21 @@ namespace ShiftOS.WinForms.Applications
// browseToolStripMenuItem
//
this.browseToolStripMenuItem.Name = "browseToolStripMenuItem";
this.browseToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.browseToolStripMenuItem.Size = new System.Drawing.Size(142, 22);
this.browseToolStripMenuItem.Text = "Browse";
this.browseToolStripMenuItem.Click += new System.EventHandler(this.browseToolStripMenuItem_Click);
//
// myShopToolStripMenuItem
//
this.myShopToolStripMenuItem.Name = "myShopToolStripMenuItem";
this.myShopToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.myShopToolStripMenuItem.Size = new System.Drawing.Size(142, 22);
this.myShopToolStripMenuItem.Text = "My Shop";
this.myShopToolStripMenuItem.Click += new System.EventHandler(this.myShopToolStripMenuItem_Click);
//
// openAShopToolStripMenuItem
//
this.openAShopToolStripMenuItem.Name = "openAShopToolStripMenuItem";
this.openAShopToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.openAShopToolStripMenuItem.Size = new System.Drawing.Size(142, 22);
this.openAShopToolStripMenuItem.Text = "Open a Shop";
this.openAShopToolStripMenuItem.Click += new System.EventHandler(this.openAShopToolStripMenuItem_Click);
//
@ -354,6 +357,336 @@ namespace ShiftOS.WinForms.Applications
//
this.toolStripContainer1.TopToolStripPanel.Controls.Add(this.menuStrip1);
//
// shop_view
//
this.shop_view.Controls.Add(this.panel5);
this.shop_view.Controls.Add(this.panel1);
this.shop_view.Dock = System.Windows.Forms.DockStyle.Fill;
this.shop_view.Location = new System.Drawing.Point(0, 0);
this.shop_view.Name = "shop_view";
this.shop_view.Size = new System.Drawing.Size(756, 442);
this.shop_view.TabIndex = 6;
//
// panel5
//
this.panel5.Controls.Add(this.lbupgradedesc);
this.panel5.Controls.Add(this.pnlbuy);
this.panel5.Controls.Add(this.lbupgradetitle);
this.panel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel5.Location = new System.Drawing.Point(389, 0);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(367, 442);
this.panel5.TabIndex = 1;
//
// lbupgradedesc
//
this.lbupgradedesc.Dock = System.Windows.Forms.DockStyle.Fill;
this.lbupgradedesc.Location = new System.Drawing.Point(0, 43);
this.lbupgradedesc.Name = "lbupgradedesc";
this.lbupgradedesc.Size = new System.Drawing.Size(367, 363);
this.lbupgradedesc.TabIndex = 2;
this.lbupgradedesc.Text = "label6";
this.lbupgradedesc.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// pnlbuy
//
this.pnlbuy.Controls.Add(this.btneditshop);
this.pnlbuy.Controls.Add(this.lbprice);
this.pnlbuy.Controls.Add(this.btnbuy);
this.pnlbuy.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pnlbuy.Location = new System.Drawing.Point(0, 406);
this.pnlbuy.Name = "pnlbuy";
this.pnlbuy.Size = new System.Drawing.Size(367, 36);
this.pnlbuy.TabIndex = 1;
//
// btneditshop
//
this.btneditshop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btneditshop.Location = new System.Drawing.Point(198, 3);
this.btneditshop.Name = "btneditshop";
this.btneditshop.Size = new System.Drawing.Size(75, 23);
this.btneditshop.TabIndex = 2;
this.btneditshop.Text = "Edit shop";
this.btneditshop.UseVisualStyleBackColor = true;
this.btneditshop.Click += new System.EventHandler(this.btneditshop_Click);
//
// lbprice
//
this.lbprice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lbprice.AutoSize = true;
this.lbprice.Location = new System.Drawing.Point(6, 10);
this.lbprice.Name = "lbprice";
this.lbprice.Size = new System.Drawing.Size(35, 13);
this.lbprice.TabIndex = 1;
this.lbprice.Text = "label6";
//
// btnbuy
//
this.btnbuy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnbuy.Location = new System.Drawing.Point(283, 3);
this.btnbuy.Name = "btnbuy";
this.btnbuy.Size = new System.Drawing.Size(75, 23);
this.btnbuy.TabIndex = 0;
this.btnbuy.Text = "Buy";
this.btnbuy.UseVisualStyleBackColor = true;
this.btnbuy.Click += new System.EventHandler(this.btnbuy_Click);
//
// lbupgradetitle
//
this.lbupgradetitle.Dock = System.Windows.Forms.DockStyle.Top;
this.lbupgradetitle.Location = new System.Drawing.Point(0, 0);
this.lbupgradetitle.Name = "lbupgradetitle";
this.lbupgradetitle.Size = new System.Drawing.Size(367, 43);
this.lbupgradetitle.TabIndex = 0;
this.lbupgradetitle.Tag = "header2";
this.lbupgradetitle.Text = "Welcome to my shop!";
this.lbupgradetitle.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// panel1
//
this.panel1.Controls.Add(this.lbupgrades);
this.panel1.Controls.Add(this.lbcodepoints);
this.panel1.Controls.Add(this.lbshopname);
this.panel1.Cursor = System.Windows.Forms.Cursors.Default;
this.panel1.Dock = System.Windows.Forms.DockStyle.Left;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(389, 442);
this.panel1.TabIndex = 0;
//
// lbupgrades
//
this.lbupgrades.Dock = System.Windows.Forms.DockStyle.Fill;
this.lbupgrades.FormattingEnabled = true;
this.lbupgrades.Location = new System.Drawing.Point(0, 46);
this.lbupgrades.Name = "lbupgrades";
this.lbupgrades.Size = new System.Drawing.Size(389, 383);
this.lbupgrades.TabIndex = 2;
//
// lbcodepoints
//
this.lbcodepoints.AutoSize = true;
this.lbcodepoints.Dock = System.Windows.Forms.DockStyle.Bottom;
this.lbcodepoints.Location = new System.Drawing.Point(0, 429);
this.lbcodepoints.Margin = new System.Windows.Forms.Padding(10);
this.lbcodepoints.Name = "lbcodepoints";
this.lbcodepoints.Size = new System.Drawing.Size(72, 13);
this.lbcodepoints.TabIndex = 1;
this.lbcodepoints.Tag = "header2";
this.lbcodepoints.Text = "Codepoints: 0";
//
// lbshopname
//
this.lbshopname.Dock = System.Windows.Forms.DockStyle.Top;
this.lbshopname.Location = new System.Drawing.Point(0, 0);
this.lbshopname.Name = "lbshopname";
this.lbshopname.Size = new System.Drawing.Size(389, 46);
this.lbshopname.TabIndex = 0;
this.lbshopname.Tag = "header1";
this.lbshopname.Text = "My shop";
this.lbshopname.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// shop_editor
//
this.shop_editor.Controls.Add(this.panel7);
this.shop_editor.Controls.Add(this.panel9);
this.shop_editor.Dock = System.Windows.Forms.DockStyle.Fill;
this.shop_editor.Location = new System.Drawing.Point(0, 0);
this.shop_editor.Name = "shop_editor";
this.shop_editor.Size = new System.Drawing.Size(756, 442);
this.shop_editor.TabIndex = 8;
//
// panel7
//
this.panel7.Controls.Add(this.txtshopdescription);
this.panel7.Controls.Add(this.panel8);
this.panel7.Controls.Add(this.label16);
this.panel7.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel7.Location = new System.Drawing.Point(389, 0);
this.panel7.Name = "panel7";
this.panel7.Size = new System.Drawing.Size(367, 442);
this.panel7.TabIndex = 1;
//
// txtshopdescription
//
this.txtshopdescription.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtshopdescription.Location = new System.Drawing.Point(0, 43);
this.txtshopdescription.Multiline = true;
this.txtshopdescription.Name = "txtshopdescription";
this.txtshopdescription.Size = new System.Drawing.Size(367, 363);
this.txtshopdescription.TabIndex = 2;
this.txtshopdescription.TextChanged += new System.EventHandler(this.txtshopdescription_TextChanged);
//
// panel8
//
this.panel8.Controls.Add(this.label15);
this.panel8.Controls.Add(this.btnsaveshop);
this.panel8.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel8.Location = new System.Drawing.Point(0, 406);
this.panel8.Name = "panel8";
this.panel8.Size = new System.Drawing.Size(367, 36);
this.panel8.TabIndex = 1;
//
// label15
//
this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(6, 10);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(267, 13);
this.label15.TabIndex = 1;
this.label15.Text = "When you are done editing your shop, click this button:";
//
// btnsaveshop
//
this.btnsaveshop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnsaveshop.Location = new System.Drawing.Point(283, 3);
this.btnsaveshop.Name = "btnsaveshop";
this.btnsaveshop.Size = new System.Drawing.Size(75, 23);
this.btnsaveshop.TabIndex = 0;
this.btnsaveshop.Text = "Save";
this.btnsaveshop.UseVisualStyleBackColor = true;
this.btnsaveshop.Click += new System.EventHandler(this.btnsaveshop_Click);
//
// label16
//
this.label16.Dock = System.Windows.Forms.DockStyle.Top;
this.label16.Location = new System.Drawing.Point(0, 0);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(367, 43);
this.label16.TabIndex = 0;
this.label16.Tag = "header2";
this.label16.Text = "Welcome to my shop!";
this.label16.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// panel9
//
this.panel9.Controls.Add(this.lbeditingshopitems);
this.panel9.Controls.Add(this.txtshopname);
this.panel9.Controls.Add(this.flowLayoutPanel5);
this.panel9.Cursor = System.Windows.Forms.Cursors.Default;
this.panel9.Dock = System.Windows.Forms.DockStyle.Left;
this.panel9.Location = new System.Drawing.Point(0, 0);
this.panel9.Name = "panel9";
this.panel9.Size = new System.Drawing.Size(389, 442);
this.panel9.TabIndex = 0;
//
// lbeditingshopitems
//
this.lbeditingshopitems.Dock = System.Windows.Forms.DockStyle.Fill;
this.lbeditingshopitems.FormattingEnabled = true;
this.lbeditingshopitems.Location = new System.Drawing.Point(0, 20);
this.lbeditingshopitems.Name = "lbeditingshopitems";
this.lbeditingshopitems.Size = new System.Drawing.Size(389, 393);
this.lbeditingshopitems.TabIndex = 2;
//
// txtshopname
//
this.txtshopname.Dock = System.Windows.Forms.DockStyle.Top;
this.txtshopname.Location = new System.Drawing.Point(0, 0);
this.txtshopname.Name = "txtshopname";
this.txtshopname.Size = new System.Drawing.Size(389, 20);
this.txtshopname.TabIndex = 4;
this.txtshopname.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtshopname.TextChanged += new System.EventHandler(this.txtshopname_TextChanged);
//
// flowLayoutPanel5
//
this.flowLayoutPanel5.AutoSize = true;
this.flowLayoutPanel5.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.flowLayoutPanel5.Controls.Add(this.btnaddshopitem);
this.flowLayoutPanel5.Controls.Add(this.btnremoveitem);
this.flowLayoutPanel5.Controls.Add(this.btnedititem);
this.flowLayoutPanel5.Dock = System.Windows.Forms.DockStyle.Bottom;
this.flowLayoutPanel5.Location = new System.Drawing.Point(0, 413);
this.flowLayoutPanel5.Name = "flowLayoutPanel5";
this.flowLayoutPanel5.Size = new System.Drawing.Size(389, 29);
this.flowLayoutPanel5.TabIndex = 3;
//
// btnaddshopitem
//
this.btnaddshopitem.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnaddshopitem.AutoSize = true;
this.btnaddshopitem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btnaddshopitem.Location = new System.Drawing.Point(3, 3);
this.btnaddshopitem.Name = "btnaddshopitem";
this.btnaddshopitem.Size = new System.Drawing.Size(36, 23);
this.btnaddshopitem.TabIndex = 1;
this.btnaddshopitem.Text = "Add";
this.btnaddshopitem.UseVisualStyleBackColor = true;
this.btnaddshopitem.Click += new System.EventHandler(this.btnaddshopitem_Click);
//
// btnremoveitem
//
this.btnremoveitem.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnremoveitem.AutoSize = true;
this.btnremoveitem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btnremoveitem.Location = new System.Drawing.Point(45, 3);
this.btnremoveitem.Name = "btnremoveitem";
this.btnremoveitem.Size = new System.Drawing.Size(57, 23);
this.btnremoveitem.TabIndex = 2;
this.btnremoveitem.Text = "Remove";
this.btnremoveitem.UseVisualStyleBackColor = true;
this.btnremoveitem.Click += new System.EventHandler(this.btnremoveitem_Click);
//
// btnedititem
//
this.btnedititem.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnedititem.AutoSize = true;
this.btnedititem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btnedititem.Location = new System.Drawing.Point(108, 3);
this.btnedititem.Name = "btnedititem";
this.btnedititem.Size = new System.Drawing.Size(35, 23);
this.btnedititem.TabIndex = 3;
this.btnedititem.Text = "Edit";
this.btnedititem.UseVisualStyleBackColor = true;
this.btnedititem.Click += new System.EventHandler(this.btnedititem_Click);
//
// shop_all
//
this.shop_all.Controls.Add(this.flshoplist);
this.shop_all.Controls.Add(this.label12);
this.shop_all.Controls.Add(this.label13);
this.shop_all.Dock = System.Windows.Forms.DockStyle.Fill;
this.shop_all.Location = new System.Drawing.Point(0, 0);
this.shop_all.Name = "shop_all";
this.shop_all.Size = new System.Drawing.Size(756, 442);
this.shop_all.TabIndex = 7;
//
// flshoplist
//
this.flshoplist.AutoScroll = true;
this.flshoplist.Dock = System.Windows.Forms.DockStyle.Fill;
this.flshoplist.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flshoplist.Location = new System.Drawing.Point(0, 94);
this.flshoplist.Name = "flshoplist";
this.flshoplist.Size = new System.Drawing.Size(756, 348);
this.flshoplist.TabIndex = 1;
this.flshoplist.WrapContents = false;
//
// label12
//
this.label12.Dock = System.Windows.Forms.DockStyle.Top;
this.label12.Location = new System.Drawing.Point(0, 43);
this.label12.Name = "label12";
this.label12.Padding = new System.Windows.Forms.Padding(15, 0, 15, 15);
this.label12.Size = new System.Drawing.Size(756, 51);
this.label12.TabIndex = 0;
this.label12.Tag = "";
this.label12.Text = resources.GetString("label12.Text");
//
// label13
//
this.label13.AutoSize = true;
this.label13.Dock = System.Windows.Forms.DockStyle.Top;
this.label13.Location = new System.Drawing.Point(0, 0);
this.label13.Name = "label13";
this.label13.Padding = new System.Windows.Forms.Padding(15);
this.label13.Size = new System.Drawing.Size(67, 43);
this.label13.TabIndex = 2;
this.label13.Tag = "header1";
this.label13.Text = "Shops";
//
// lgn_create
//
this.lgn_create.Controls.Add(this.btncreate);
@ -586,124 +919,6 @@ namespace ShiftOS.WinForms.Applications
this.label6.Tag = "header1";
this.label6.Text = "Current Task";
//
// shop_view
//
this.shop_view.Controls.Add(this.panel5);
this.shop_view.Controls.Add(this.panel1);
this.shop_view.Dock = System.Windows.Forms.DockStyle.Fill;
this.shop_view.Location = new System.Drawing.Point(0, 0);
this.shop_view.Name = "shop_view";
this.shop_view.Size = new System.Drawing.Size(756, 442);
this.shop_view.TabIndex = 6;
//
// panel5
//
this.panel5.Controls.Add(this.lbupgradedesc);
this.panel5.Controls.Add(this.pnlbuy);
this.panel5.Controls.Add(this.lbupgradetitle);
this.panel5.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel5.Location = new System.Drawing.Point(389, 0);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(367, 442);
this.panel5.TabIndex = 1;
//
// lbupgradedesc
//
this.lbupgradedesc.Dock = System.Windows.Forms.DockStyle.Fill;
this.lbupgradedesc.Location = new System.Drawing.Point(0, 43);
this.lbupgradedesc.Name = "lbupgradedesc";
this.lbupgradedesc.Size = new System.Drawing.Size(367, 363);
this.lbupgradedesc.TabIndex = 2;
this.lbupgradedesc.Text = "label6";
this.lbupgradedesc.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// pnlbuy
//
this.pnlbuy.Controls.Add(this.btneditshop);
this.pnlbuy.Controls.Add(this.lbprice);
this.pnlbuy.Controls.Add(this.btnbuy);
this.pnlbuy.Dock = System.Windows.Forms.DockStyle.Bottom;
this.pnlbuy.Location = new System.Drawing.Point(0, 406);
this.pnlbuy.Name = "pnlbuy";
this.pnlbuy.Size = new System.Drawing.Size(367, 36);
this.pnlbuy.TabIndex = 1;
//
// lbprice
//
this.lbprice.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.lbprice.AutoSize = true;
this.lbprice.Location = new System.Drawing.Point(6, 10);
this.lbprice.Name = "lbprice";
this.lbprice.Size = new System.Drawing.Size(35, 13);
this.lbprice.TabIndex = 1;
this.lbprice.Text = "label6";
//
// btnbuy
//
this.btnbuy.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnbuy.Location = new System.Drawing.Point(283, 3);
this.btnbuy.Name = "btnbuy";
this.btnbuy.Size = new System.Drawing.Size(75, 23);
this.btnbuy.TabIndex = 0;
this.btnbuy.Text = "Buy";
this.btnbuy.UseVisualStyleBackColor = true;
this.btnbuy.Click += new System.EventHandler(this.btnbuy_Click);
//
// lbupgradetitle
//
this.lbupgradetitle.Dock = System.Windows.Forms.DockStyle.Top;
this.lbupgradetitle.Location = new System.Drawing.Point(0, 0);
this.lbupgradetitle.Name = "lbupgradetitle";
this.lbupgradetitle.Size = new System.Drawing.Size(367, 43);
this.lbupgradetitle.TabIndex = 0;
this.lbupgradetitle.Tag = "header2";
this.lbupgradetitle.Text = "Welcome to my shop!";
this.lbupgradetitle.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// panel1
//
this.panel1.Controls.Add(this.lbupgrades);
this.panel1.Controls.Add(this.lbcodepoints);
this.panel1.Controls.Add(this.lbshopname);
this.panel1.Cursor = System.Windows.Forms.Cursors.Default;
this.panel1.Dock = System.Windows.Forms.DockStyle.Left;
this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(389, 442);
this.panel1.TabIndex = 0;
//
// lbupgrades
//
this.lbupgrades.Dock = System.Windows.Forms.DockStyle.Fill;
this.lbupgrades.FormattingEnabled = true;
this.lbupgrades.Location = new System.Drawing.Point(0, 46);
this.lbupgrades.Name = "lbupgrades";
this.lbupgrades.Size = new System.Drawing.Size(389, 383);
this.lbupgrades.TabIndex = 2;
//
// lbcodepoints
//
this.lbcodepoints.AutoSize = true;
this.lbcodepoints.Dock = System.Windows.Forms.DockStyle.Bottom;
this.lbcodepoints.Location = new System.Drawing.Point(0, 429);
this.lbcodepoints.Margin = new System.Windows.Forms.Padding(10);
this.lbcodepoints.Name = "lbcodepoints";
this.lbcodepoints.Size = new System.Drawing.Size(72, 13);
this.lbcodepoints.TabIndex = 1;
this.lbcodepoints.Tag = "header2";
this.lbcodepoints.Text = "Codepoints: 0";
//
// lbshopname
//
this.lbshopname.Dock = System.Windows.Forms.DockStyle.Top;
this.lbshopname.Location = new System.Drawing.Point(0, 0);
this.lbshopname.Name = "lbshopname";
this.lbshopname.Size = new System.Drawing.Size(389, 46);
this.lbshopname.TabIndex = 0;
this.lbshopname.Tag = "header1";
this.lbshopname.Text = "My shop";
this.lbshopname.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// lgn_view
//
this.lgn_view.Controls.Add(this.pnllgnusers);
@ -987,217 +1202,20 @@ namespace ShiftOS.WinForms.Applications
this.label1.Tag = "header1";
this.label1.Text = "You";
//
// shop_all
// chatToolStripMenuItem
//
this.shop_all.Controls.Add(this.flshoplist);
this.shop_all.Controls.Add(this.label12);
this.shop_all.Controls.Add(this.label13);
this.shop_all.Dock = System.Windows.Forms.DockStyle.Fill;
this.shop_all.Location = new System.Drawing.Point(0, 0);
this.shop_all.Name = "shop_all";
this.shop_all.Size = new System.Drawing.Size(756, 442);
this.shop_all.TabIndex = 7;
this.chatToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.joinAChatToolStripMenuItem});
this.chatToolStripMenuItem.Name = "chatToolStripMenuItem";
this.chatToolStripMenuItem.Size = new System.Drawing.Size(44, 20);
this.chatToolStripMenuItem.Text = "Chat";
//
// flshoplist
// joinAChatToolStripMenuItem
//
this.flshoplist.AutoScroll = true;
this.flshoplist.Dock = System.Windows.Forms.DockStyle.Fill;
this.flshoplist.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flshoplist.Location = new System.Drawing.Point(0, 94);
this.flshoplist.Name = "flshoplist";
this.flshoplist.Size = new System.Drawing.Size(756, 348);
this.flshoplist.TabIndex = 1;
this.flshoplist.WrapContents = false;
//
// label12
//
this.label12.Dock = System.Windows.Forms.DockStyle.Top;
this.label12.Location = new System.Drawing.Point(0, 43);
this.label12.Name = "label12";
this.label12.Padding = new System.Windows.Forms.Padding(15, 0, 15, 15);
this.label12.Size = new System.Drawing.Size(756, 51);
this.label12.TabIndex = 0;
this.label12.Tag = "";
this.label12.Text = resources.GetString("label12.Text");
//
// label13
//
this.label13.AutoSize = true;
this.label13.Dock = System.Windows.Forms.DockStyle.Top;
this.label13.Location = new System.Drawing.Point(0, 0);
this.label13.Name = "label13";
this.label13.Padding = new System.Windows.Forms.Padding(15);
this.label13.Size = new System.Drawing.Size(67, 43);
this.label13.TabIndex = 2;
this.label13.Tag = "header1";
this.label13.Text = "Shops";
//
// shop_editor
//
this.shop_editor.Controls.Add(this.panel7);
this.shop_editor.Controls.Add(this.panel9);
this.shop_editor.Dock = System.Windows.Forms.DockStyle.Fill;
this.shop_editor.Location = new System.Drawing.Point(0, 0);
this.shop_editor.Name = "shop_editor";
this.shop_editor.Size = new System.Drawing.Size(756, 442);
this.shop_editor.TabIndex = 8;
//
// panel7
//
this.panel7.Controls.Add(this.txtshopdescription);
this.panel7.Controls.Add(this.panel8);
this.panel7.Controls.Add(this.label16);
this.panel7.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel7.Location = new System.Drawing.Point(389, 0);
this.panel7.Name = "panel7";
this.panel7.Size = new System.Drawing.Size(367, 442);
this.panel7.TabIndex = 1;
//
// panel8
//
this.panel8.Controls.Add(this.label15);
this.panel8.Controls.Add(this.btnsaveshop);
this.panel8.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel8.Location = new System.Drawing.Point(0, 406);
this.panel8.Name = "panel8";
this.panel8.Size = new System.Drawing.Size(367, 36);
this.panel8.TabIndex = 1;
//
// label15
//
this.label15.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(6, 10);
this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(267, 13);
this.label15.TabIndex = 1;
this.label15.Text = "When you are done editing your shop, click this button:";
//
// btnsaveshop
//
this.btnsaveshop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnsaveshop.Location = new System.Drawing.Point(283, 3);
this.btnsaveshop.Name = "btnsaveshop";
this.btnsaveshop.Size = new System.Drawing.Size(75, 23);
this.btnsaveshop.TabIndex = 0;
this.btnsaveshop.Text = "Save";
this.btnsaveshop.UseVisualStyleBackColor = true;
this.btnsaveshop.Click += new System.EventHandler(this.btnsaveshop_Click);
//
// label16
//
this.label16.Dock = System.Windows.Forms.DockStyle.Top;
this.label16.Location = new System.Drawing.Point(0, 0);
this.label16.Name = "label16";
this.label16.Size = new System.Drawing.Size(367, 43);
this.label16.TabIndex = 0;
this.label16.Tag = "header2";
this.label16.Text = "Welcome to my shop!";
this.label16.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// panel9
//
this.panel9.Controls.Add(this.lbeditingshopitems);
this.panel9.Controls.Add(this.txtshopname);
this.panel9.Controls.Add(this.flowLayoutPanel5);
this.panel9.Cursor = System.Windows.Forms.Cursors.Default;
this.panel9.Dock = System.Windows.Forms.DockStyle.Left;
this.panel9.Location = new System.Drawing.Point(0, 0);
this.panel9.Name = "panel9";
this.panel9.Size = new System.Drawing.Size(389, 442);
this.panel9.TabIndex = 0;
//
// lbeditingshopitems
//
this.lbeditingshopitems.Dock = System.Windows.Forms.DockStyle.Fill;
this.lbeditingshopitems.FormattingEnabled = true;
this.lbeditingshopitems.Location = new System.Drawing.Point(0, 20);
this.lbeditingshopitems.Name = "lbeditingshopitems";
this.lbeditingshopitems.Size = new System.Drawing.Size(389, 393);
this.lbeditingshopitems.TabIndex = 2;
//
// flowLayoutPanel5
//
this.flowLayoutPanel5.AutoSize = true;
this.flowLayoutPanel5.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.flowLayoutPanel5.Controls.Add(this.btnaddshopitem);
this.flowLayoutPanel5.Controls.Add(this.btnremoveitem);
this.flowLayoutPanel5.Controls.Add(this.btnedititem);
this.flowLayoutPanel5.Dock = System.Windows.Forms.DockStyle.Bottom;
this.flowLayoutPanel5.Location = new System.Drawing.Point(0, 413);
this.flowLayoutPanel5.Name = "flowLayoutPanel5";
this.flowLayoutPanel5.Size = new System.Drawing.Size(389, 29);
this.flowLayoutPanel5.TabIndex = 3;
//
// btnaddshopitem
//
this.btnaddshopitem.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnaddshopitem.AutoSize = true;
this.btnaddshopitem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btnaddshopitem.Location = new System.Drawing.Point(3, 3);
this.btnaddshopitem.Name = "btnaddshopitem";
this.btnaddshopitem.Size = new System.Drawing.Size(36, 23);
this.btnaddshopitem.TabIndex = 1;
this.btnaddshopitem.Text = "Add";
this.btnaddshopitem.UseVisualStyleBackColor = true;
this.btnaddshopitem.Click += new System.EventHandler(this.btnaddshopitem_Click);
//
// btnremoveitem
//
this.btnremoveitem.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnremoveitem.AutoSize = true;
this.btnremoveitem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btnremoveitem.Location = new System.Drawing.Point(45, 3);
this.btnremoveitem.Name = "btnremoveitem";
this.btnremoveitem.Size = new System.Drawing.Size(57, 23);
this.btnremoveitem.TabIndex = 2;
this.btnremoveitem.Text = "Remove";
this.btnremoveitem.UseVisualStyleBackColor = true;
this.btnremoveitem.Click += new System.EventHandler(this.btnremoveitem_Click);
//
// btnedititem
//
this.btnedititem.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnedititem.AutoSize = true;
this.btnedititem.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.btnedititem.Location = new System.Drawing.Point(108, 3);
this.btnedititem.Name = "btnedititem";
this.btnedititem.Size = new System.Drawing.Size(35, 23);
this.btnedititem.TabIndex = 3;
this.btnedititem.Text = "Edit";
this.btnedititem.UseVisualStyleBackColor = true;
this.btnedititem.Click += new System.EventHandler(this.btnedititem_Click);
//
// txtshopname
//
this.txtshopname.Dock = System.Windows.Forms.DockStyle.Top;
this.txtshopname.Location = new System.Drawing.Point(0, 0);
this.txtshopname.Name = "txtshopname";
this.txtshopname.Size = new System.Drawing.Size(389, 20);
this.txtshopname.TabIndex = 4;
this.txtshopname.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtshopname.TextChanged += new System.EventHandler(this.txtshopname_TextChanged);
//
// txtshopdescription
//
this.txtshopdescription.Dock = System.Windows.Forms.DockStyle.Fill;
this.txtshopdescription.Location = new System.Drawing.Point(0, 43);
this.txtshopdescription.Multiline = true;
this.txtshopdescription.Name = "txtshopdescription";
this.txtshopdescription.Size = new System.Drawing.Size(367, 363);
this.txtshopdescription.TabIndex = 2;
this.txtshopdescription.TextChanged += new System.EventHandler(this.txtshopdescription_TextChanged);
//
// btneditshop
//
this.btneditshop.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btneditshop.Location = new System.Drawing.Point(198, 3);
this.btneditshop.Name = "btneditshop";
this.btneditshop.Size = new System.Drawing.Size(75, 23);
this.btneditshop.TabIndex = 2;
this.btneditshop.Text = "Edit shop";
this.btneditshop.UseVisualStyleBackColor = true;
this.btneditshop.Click += new System.EventHandler(this.btneditshop_Click);
this.joinAChatToolStripMenuItem.Name = "joinAChatToolStripMenuItem";
this.joinAChatToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
this.joinAChatToolStripMenuItem.Text = "Join a chat";
this.joinAChatToolStripMenuItem.Click += new System.EventHandler(this.joinAChatToolStripMenuItem_Click);
//
// MUDControlCentre
//
@ -1219,6 +1237,23 @@ namespace ShiftOS.WinForms.Applications
this.toolStripContainer1.TopToolStripPanel.PerformLayout();
this.toolStripContainer1.ResumeLayout(false);
this.toolStripContainer1.PerformLayout();
this.shop_view.ResumeLayout(false);
this.panel5.ResumeLayout(false);
this.pnlbuy.ResumeLayout(false);
this.pnlbuy.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.shop_editor.ResumeLayout(false);
this.panel7.ResumeLayout(false);
this.panel7.PerformLayout();
this.panel8.ResumeLayout(false);
this.panel8.PerformLayout();
this.panel9.ResumeLayout(false);
this.panel9.PerformLayout();
this.flowLayoutPanel5.ResumeLayout(false);
this.flowLayoutPanel5.PerformLayout();
this.shop_all.ResumeLayout(false);
this.shop_all.PerformLayout();
this.lgn_create.ResumeLayout(false);
this.lgn_create.PerformLayout();
this.panel2.ResumeLayout(false);
@ -1229,12 +1264,6 @@ namespace ShiftOS.WinForms.Applications
this.flowLayoutPanel4.PerformLayout();
this.job_current.ResumeLayout(false);
this.job_current.PerformLayout();
this.shop_view.ResumeLayout(false);
this.panel5.ResumeLayout(false);
this.pnlbuy.ResumeLayout(false);
this.pnlbuy.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.lgn_view.ResumeLayout(false);
this.lgn_view.PerformLayout();
this.pnllgnusers.ResumeLayout(false);
@ -1252,17 +1281,6 @@ namespace ShiftOS.WinForms.Applications
this.you_memos.PerformLayout();
this.you_systemstatus.ResumeLayout(false);
this.you_systemstatus.PerformLayout();
this.shop_all.ResumeLayout(false);
this.shop_all.PerformLayout();
this.shop_editor.ResumeLayout(false);
this.panel7.ResumeLayout(false);
this.panel7.PerformLayout();
this.panel8.ResumeLayout(false);
this.panel8.PerformLayout();
this.panel9.ResumeLayout(false);
this.panel9.PerformLayout();
this.flowLayoutPanel5.ResumeLayout(false);
this.flowLayoutPanel5.PerformLayout();
this.ResumeLayout(false);
}
@ -1362,5 +1380,7 @@ namespace ShiftOS.WinForms.Applications
private System.Windows.Forms.Button btnremoveitem;
private System.Windows.Forms.Button btnedititem;
private System.Windows.Forms.Button btneditshop;
private System.Windows.Forms.ToolStripMenuItem chatToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem joinAChatToolStripMenuItem;
}
}

View file

@ -78,6 +78,13 @@ namespace ShiftOS.WinForms.Applications
myLegionToolStripMenuItem_Click(this, EventArgs.Empty);
}));
}
else if(msg.Name == "chat_all")
{
this.Invoke(new Action(() =>
{
this.ListAllChats(JsonConvert.DeserializeObject<Channel[]>(msg.Contents));
}));
}
else if (msg.Name == "user_shop_check_result")
{
if (msg.Contents == "0")
@ -169,6 +176,69 @@ namespace ShiftOS.WinForms.Applications
};
}
public void ListAllChats(Channel[] channels)
{
shop_all.BringToFront();
flshoplist.Controls.Clear();
foreach (var shop in channels)
{
var bnr = new Panel();
bnr.Height = 100;
bnr.Tag = "keepbg";
bnr.Width = flshoplist.Width;
var lTitle = new Label();
lTitle.AutoSize = true;
lTitle.Tag = "keepbg header2";
lTitle.Text = shop.Name;
lTitle.Location = new Point(18, 17);
bnr.Controls.Add(lTitle);
lTitle.Show();
var desc = new Label();
desc.Text = shop.Topic;
bnr.Controls.Add(desc);
desc.Show();
var flButtons = new FlowLayoutPanel();
flButtons.AutoSize = true;
flButtons.AutoSizeMode = AutoSizeMode.GrowAndShrink;
flButtons.Tag = "keepbg";
flButtons.FlowDirection = FlowDirection.RightToLeft;
flButtons.Anchor = AnchorStyles.Top | AnchorStyles.Right;
flButtons.Top = 2;
flButtons.Left = bnr.Width - flButtons.Width - 2;
bnr.Controls.Add(flButtons);
flButtons.Show();
var btn = new Button();
btn.Text = "Browse";
btn.Click += (o, a) =>
{
OpenChat(shop.ID);
};
flButtons.Controls.Add(btn);
btn.Show();
flshoplist.Controls.Add(bnr);
bnr.Show();
ControlManager.SetupControls(bnr);
desc.Left = lTitle.Left;
desc.Width = (bnr.Width - desc.Left - desc.Left);
desc.Top = lTitle.Top + lTitle.Height;
desc.Height = (bnr.Height - lTitle.Top);
}
}
public void OpenChat(string id)
{
AppearanceManager.SetupWindow(new Chat(id));
}
private Shop editingShop = null;
private string editingShopOldName = "";
@ -782,5 +852,10 @@ Current legions: {legionname}";
shop_editor.BringToFront();
PopulateShopEditor();
}
private void joinAChatToolStripMenuItem_Click(object sender, EventArgs e)
{
ServerManager.SendMessage("chat_getallchannels", "");
}
}
}