Represents a configuration unit for the NetworkManager.
예제 #1
0
 protected AdditionalSetting(AdditionalSettingTypes type)
 {
     NameValue = null;
     BaseValue = null;
     BaseUnitValue = null;
     TypeValue = type;
 }
예제 #2
0
 public bool IsVisibleFor(NetworkManagerConfigurationUnit unit)
 {
     if (unit is NetworkManager && (Visibility & SettingPanelVisibility.Main) == SettingPanelVisibility.Main) return true;
     else if (unit is Network && (Visibility & SettingPanelVisibility.Network) == SettingPanelVisibility.Network) return true;
     else if (unit is ServerConfiguration && (Visibility & SettingPanelVisibility.Server) == SettingPanelVisibility.Server) return true;
     else if ((Visibility & SettingPanelVisibility.All) == SettingPanelVisibility.All) return true;
     return false;
 }
예제 #3
0
 private TreeNode TreeNodeFromConfigUnit(NetworkManagerConfigurationUnit unit)
 {
     TreeNode result = new TreeNode(unit.Name);
     result.Tag = unit;
     if (unit is NetworkManager)
     {
         NetworkManager unit2 = (NetworkManager)unit;
         foreach (Network subUnit in unit2.Networks)
         {
             result.Nodes.Add(TreeNodeFromConfigUnit(subUnit));
         }
     }
     else if (unit is Network)
     {
         Network unit2 = (Network)unit;
         foreach (ServerConfiguration subUnit in unit2.Servers)
         {
             result.Nodes.Add(TreeNodeFromConfigUnit(subUnit));
         }
     }
     return result;
 }
예제 #4
0
 private void LoadConfigUnit(NetworkManagerConfigurationUnit unit)
 {
     SettingTabs.TabPages.Clear();
     foreach (TabPage tab in TabPages)
     {
         NetworkManagerSettingPanel panel = (NetworkManagerSettingPanel)tab.Controls[0];
         if (panel.IsVisibleFor(unit))
         {
             panel.CurrentConfigurationUnit = unit;
             SettingTabs.TabPages.Add(tab);
         }
     }
 }