public RemoteConsoleNode(RemoteServerNode parent) : base("Konsola serwera") { this.ImageIndex = ServersTreeView.ConsoleIcon; this.SelectedImageIndex = this.ImageIndex; this.Parent = parent; this.Parent.Nodes.Add(this); }
public RemoteConsoleNode(RemoteServerNode parent) : base(Utils.Language.GetString("Console")) { this.ImageIndex = ServersTreeView.ConsoleIcon; this.SelectedImageIndex = this.ImageIndex; this.Parent = parent; this.Parent.Nodes.Add(this); }
public void FullRefresh() { _systemIcons.Clear(); _imageList.Images.Clear(); Nodes.Clear(); _imageList.Images.Add(Properties.Resources.FolderOpenIcon); _systemIcons.Add(FolderOpenIcon, 0); _imageList.Images.Add(Properties.Resources.FolderCloseIcon); _systemIcons.Add(FolderCloseIcon, 0); _imageList.Images.Add(Properties.Resources.LocalIcon); _systemIcons.Add(LocalServerIcon, 0); _imageList.Images.Add(Properties.Resources.RemoteIcon); _systemIcons.Add(RemoteServerIcon, 0); _imageList.Images.Add(Properties.Resources.ConsoleIcon); _systemIcons.Add(ConsoleIcon, 0); _imageList.Images.Add(Properties.Resources.MenuSettings); foreach (string server in Directory.GetDirectories(Utils.Main.ServersDirectory)) { if (File.Exists(server + Path.DirectorySeparatorChar + "ServerCreatorData.xml")) //old file name { File.Move(server + Path.DirectorySeparatorChar + "ServerCreatorData.xml", server + Path.DirectorySeparatorChar + "ServerManagerData.xml"); } if (File.Exists(server + Path.DirectorySeparatorChar + "ServerManagerData.xml")) { Data.Server serverData = Data.Server.Deserialize(server + Path.DirectorySeparatorChar + "ServerManagerData.xml"); ServerNode node = new ServerNode(this, new DirectoryInfo(server), serverData); node.Expand(); } } foreach (string importedServer in Directory.GetFiles(Utils.Main.ImportDirectory)) { Data.Server serverData = Data.Server.Deserialize(importedServer); ServerNode node = new ServerNode(this, new DirectoryInfo(serverData.path), serverData); node.Expand(); } foreach (string remoteServer in Directory.GetDirectories(Utils.Main.RemoteDirectory)) { if (File.Exists(remoteServer + Path.DirectorySeparatorChar + "MainData.xml")) { Data.RemoteServer serverData = Data.RemoteServer.Deserialize(remoteServer + Path.DirectorySeparatorChar + "MainData.xml"); RemoteServerNode node = new RemoteServerNode(this, serverData); } } }