Represents a configuration unit for the NetworkManager.
Exemplo n.º 1
0
 protected AdditionalSetting(AdditionalSettingTypes type)
 {
     NameValue = null;
     BaseValue = null;
     BaseUnitValue = null;
     TypeValue = type;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 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);
         }
     }
 }