private void toolStripButton3_Click(object sender, EventArgs e) { if (editWindows != null) { editWindows.Hide(); } if (xmlViewer != null) { xmlViewer.Hide(); } if (!formChat.IsHandleCreated) { formChat = new WebForm(); formChat.MdiParent = this; formChat.Parent = splitContainer2.Panel1; formChat.Dock = DockStyle.Fill; } formChat.Show(); }
private void MainWindow_Load(object sender, EventArgs e) { richTextBox1.Rtf = "{\\rtf1\\ansi\\ansicpg1252\\deff0\\nouicompat\\deflang2055{\\fonttbl{\\f0\\fnil\\fcharset0 Calibri;}{\\f1\\fnil\\fcharset2 Symbol;}}{\\colortbl;\\red0\\green0\\blue255;}{\\*\\generator Riched20 10.0.17134}\\viewkind4\\uc1\\pard\\sl240\\slmult1\\b\\f0\\fs24\\lang7 Welcome to the Pet Editor!\\b0\\fs20\\par This editor is still in beta, so if you get an error, please report it.\\par You can use the chat inside this app(it use a webpage) or put the question on GitHub:\\par {{\\field{\\*\\fldinst{HYPERLINK https://github.com/Adrianotiger/desktopPet }}{\\fldrslt{https://github.com/Adrianotiger/desktopPet\\ul0\\cf0}}}}\\f0\\fs20\\par\\b\\fs24 How to start?\\b0\\fs20\\par\\pard{\\pntext\\f1\\'B7\\tab}{\\*\\pn\\pnlvlblt\\pnf1\\pnindent0{\\pntxtb\\'B7}}\\fi-360\\li720\\sl240\\slmult1 Click on Open or New to begin.\\par{\\pntext\\f1\\'B7\\tab}Fill the fields on \\b Header\\b0\\par{\\pntext\\f1\\'B7\\tab}Set an image on \\b Image\\b0\\par{\\pntext\\f1\\'B7\\tab}Add an animation with some frames\\par{\\pntext\\f1\\'B7\\tab}Add a spawn\\par{\\pntext\\f1\\'B7\\tab}Add more animations if you want\\par{\\pntext\\f1\\'B7\\tab}Add some childs (optional)\\par{\\pntext\\f1\\'B7\\tab}Add some sounds (optional)\\par\\pard\\sa200\\sl276\\slmult1\\fs22\\par}"; Text = Application.ProductName + " - ver." + Application.ProductVersion; Recent.AddRange(Properties.Settings.Default.recent.Split(';')); if (Recent.Count > 0) { for (var k = 0; k < Recent.Count; k++) { if (Recent[k].Length > 5) { var menuText = Recent[k]; var pos = menuText.LastIndexOf("\\"); if (pos > 0) { pos = menuText.LastIndexOf("\\", pos - 1); if (pos > 0) { menuText = menuText.Substring(pos); } } ToolStripItem tsi = new ToolStripMenuItem(menuText, newToolStripButton.Image); tsi.Tag = Recent[k]; tsi.Click += (s, ev) => { OpenFile((s as ToolStripMenuItem).Tag.ToString()); }; openToolStripButton.DropDownItems.Add(tsi); } } } formChat = new WebForm(); formChat.MdiParent = this; formChat.Parent = splitContainer2.Panel1; formChat.Dock = DockStyle.Fill; formChat.Show(); }