Esempio n. 1
0
 public void SetActiveModule(int index)
 {
     if (activeModule != null)
     {
         activeModule.SwitchOut();
         activeModule.ModulePanel.Hide();
         //this.RemoveWidget(activeModule.ModulePanel.Name);
     }
     activeModule = moduleSwitcher.GetAvailableKitModule(index);
     Network.Messenger.SendPacket(PMDCP.Sockets.TcpPacket.CreatePacket("activekitmodule", ((int)(activeModule.ModuleID)).ToString()));
     activeModule.Initialize(new Size(this.Width, this.Height - btnLeft.Height));
     lblModuleName.Text = activeModule.ModuleName + " [" + (index + 1) + "/" + moduleSwitcher.AvailableKitModules.Count + "]";
     if (this.ContainsWidget(activeModule.ModulePanel.Name) == false)
     {
         this.AddWidget(activeModule.ModulePanel);
     }
     activeModule.ModulePanel.Show();
 }
Esempio n. 2
0
 public void SetActiveModule(int index)
 {
     if (activeModule != null) {
         activeModule.SwitchOut();
         activeModule.ModulePanel.Hide();
         //this.RemoveWidget(activeModule.ModulePanel.Name);
     }
     activeModule = moduleSwitcher.GetAvailableKitModule(index);
     Network.Messenger.SendPacket(PMU.Sockets.TcpPacket.CreatePacket("activekitmodule", ((int)(activeModule.ModuleID)).ToString()));
     activeModule.Initialize(new Size(this.Width, this.Height - btnLeft.Height));
     lblModuleName.Text = activeModule.ModuleName + " [" + (index + 1) + "/" + moduleSwitcher.AvailableKitModules.Count + "]";
     if (this.ContainsWidget(activeModule.ModulePanel.Name) == false) {
         this.AddWidget(activeModule.ModulePanel);
     }
     activeModule.ModulePanel.Show();
 }