private void saveFileToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ScriptFileTab tab = tabControl1.SelectedTab.Tag as ScriptFileTab;

            if (tab != null)
            {
                Messenger.SendPacket(TcpPacket.CreatePacket("savescript", tab.File.Replace(".cs", ""),
                                                            tab.SyntaxBox.Document.Text.Replace(TcpPacket.SEP_CHAR, '/')));
            }
        }
Beispiel #2
0
 public void AddDocumentTab(ScriptFileTab tab)
 {
     if (InvokeRequired) {
         Invoke(new AddDocumentTabDelegate(AddDocumentTab), tab);
     } else {
         TabPage page = new TabPage(tab.File);
         tab.AddToTabPage(page);
         tabControl1.TabPages.Add(page);
     }
 }
 public void AddDocumentTab(ScriptFileTab tab)
 {
     if (InvokeRequired)
     {
         Invoke(new AddDocumentTabDelegate(AddDocumentTab), tab);
     }
     else
     {
         TabPage page = new TabPage(tab.File);
         tab.AddToTabPage(page);
         tabControl1.TabPages.Add(page);
     }
 }