Exemplo n.º 1
0
 private void CreateSchema(DataTable dataTable)
 {
     // Note: these columns must be defined in the same order that they exist in the DB
     dataTable.Columns.Add("ID", typeof(int));
     dataTable.Columns[0].AutoIncrement = true;
     dataTable.Columns.Add("ConstantID", typeof(string));
     dataTable.Columns.Add("PositionID", typeof(int));
     dataTable.Columns.Add("ParentID", typeof(string));
     dataTable.Columns.Add("LastChange", MiscTools.DBTimeStampType());
     dataTable.Columns.Add("Name", typeof(string));
     dataTable.Columns.Add("Type", typeof(string));
     dataTable.Columns.Add("Expanded", typeof(bool));
     dataTable.Columns.Add("Description", typeof(string));
     dataTable.Columns.Add("Icon", typeof(string));
     dataTable.Columns.Add("Panel", typeof(string));
     dataTable.Columns.Add("Username", typeof(string));
     dataTable.Columns.Add("DomainName", typeof(string));
     dataTable.Columns.Add("Password", typeof(string));
     dataTable.Columns.Add("Hostname", typeof(string));
     dataTable.Columns.Add("Protocol", typeof(string));
     dataTable.Columns.Add("PuttySession", typeof(string));
     dataTable.Columns.Add("Port", typeof(int));
     dataTable.Columns.Add("ConnectToConsole", typeof(bool));
     dataTable.Columns.Add("UseCredSsp", typeof(bool));
     dataTable.Columns.Add("RenderingEngine", typeof(string));
     dataTable.Columns.Add("ICAEncryptionStrength", typeof(string));
     dataTable.Columns.Add("RDPAuthenticationLevel", typeof(string));
     dataTable.Columns.Add("Colors", typeof(string));
     dataTable.Columns.Add("Resolution", typeof(string));
     dataTable.Columns.Add("DisplayWallpaper", typeof(bool));
     dataTable.Columns.Add("DisplayThemes", typeof(bool));
     dataTable.Columns.Add("EnableFontSmoothing", typeof(bool));
     dataTable.Columns.Add("EnableDesktopComposition", typeof(bool));
     dataTable.Columns.Add("CacheBitmaps", typeof(bool));
     dataTable.Columns.Add("RedirectDiskDrives", typeof(bool));
     dataTable.Columns.Add("RedirectPorts", typeof(bool));
     dataTable.Columns.Add("RedirectPrinters", typeof(bool));
     dataTable.Columns.Add("RedirectClipboard", typeof(bool));
     dataTable.Columns.Add("RedirectSmartCards", typeof(bool));
     dataTable.Columns.Add("RedirectSound", typeof(string));
     dataTable.Columns.Add("RedirectAudioCapture", typeof(bool));
     dataTable.Columns.Add("RedirectKeys", typeof(bool));
     dataTable.Columns.Add("Connected", typeof(bool));
     dataTable.Columns.Add("PreExtApp", typeof(string));
     dataTable.Columns.Add("PostExtApp", typeof(string));
     dataTable.Columns.Add("MacAddress", typeof(string));
     dataTable.Columns.Add("UserField", typeof(string));
     dataTable.Columns.Add("ExtApp", typeof(string));
     dataTable.Columns.Add("VNCCompression", typeof(string));
     dataTable.Columns.Add("VNCEncoding", typeof(string));
     dataTable.Columns.Add("VNCAuthMode", typeof(string));
     dataTable.Columns.Add("VNCProxyType", typeof(string));
     dataTable.Columns.Add("VNCProxyIP", typeof(string));
     dataTable.Columns.Add("VNCProxyPort", typeof(int));
     dataTable.Columns.Add("VNCProxyUsername", typeof(string));
     dataTable.Columns.Add("VNCProxyPassword", typeof(string));
     dataTable.Columns.Add("VNCColors", typeof(string));
     dataTable.Columns.Add("VNCSmartSizeMode", typeof(string));
     dataTable.Columns.Add("VNCViewOnly", typeof(bool));
     dataTable.Columns.Add("RDGatewayUsageMethod", typeof(string));
     dataTable.Columns.Add("RDGatewayHostname", typeof(string));
     dataTable.Columns.Add("RDGatewayUseConnectionCredentials", typeof(string));
     dataTable.Columns.Add("RDGatewayUsername", typeof(string));
     dataTable.Columns.Add("RDGatewayPassword", typeof(string));
     dataTable.Columns.Add("RDGatewayDomain", typeof(string));
     dataTable.Columns.Add("InheritCacheBitmaps", typeof(bool));
     dataTable.Columns.Add("InheritColors", typeof(bool));
     dataTable.Columns.Add("InheritDescription", typeof(bool));
     dataTable.Columns.Add("InheritDisplayThemes", typeof(bool));
     dataTable.Columns.Add("InheritDisplayWallpaper", typeof(bool));
     dataTable.Columns.Add("InheritEnableFontSmoothing", typeof(bool));
     dataTable.Columns.Add("InheritEnableDesktopComposition", typeof(bool));
     dataTable.Columns.Add("InheritDomain", typeof(bool));
     dataTable.Columns.Add("InheritIcon", typeof(bool));
     dataTable.Columns.Add("InheritPanel", typeof(bool));
     dataTable.Columns.Add("InheritPassword", typeof(bool));
     dataTable.Columns.Add("InheritPort", typeof(bool));
     dataTable.Columns.Add("InheritProtocol", typeof(bool));
     dataTable.Columns.Add("InheritPuttySession", typeof(bool));
     dataTable.Columns.Add("InheritRedirectDiskDrives", typeof(bool));
     dataTable.Columns.Add("InheritRedirectKeys", typeof(bool));
     dataTable.Columns.Add("InheritRedirectPorts", typeof(bool));
     dataTable.Columns.Add("InheritRedirectPrinters", typeof(bool));
     dataTable.Columns.Add("InheritRedirectClipboard", typeof(bool));
     dataTable.Columns.Add("InheritRedirectSmartCards", typeof(bool));
     dataTable.Columns.Add("InheritRedirectSound", typeof(bool));
     dataTable.Columns.Add("InheritRedirectAudioCapture", typeof(bool));
     dataTable.Columns.Add("InheritResolution", typeof(bool));
     dataTable.Columns.Add("InheritUseConsoleSession", typeof(bool));
     dataTable.Columns.Add("InheritUseCredSsp", typeof(bool));
     dataTable.Columns.Add("InheritRenderingEngine", typeof(bool));
     dataTable.Columns.Add("InheritICAEncryptionStrength", typeof(bool));
     dataTable.Columns.Add("InheritRDPAuthenticationLevel", typeof(bool));
     dataTable.Columns.Add("InheritUsername", typeof(bool));
     dataTable.Columns.Add("InheritPreExtApp", typeof(bool));
     dataTable.Columns.Add("InheritPostExtApp", typeof(bool));
     dataTable.Columns.Add("InheritMacAddress", typeof(bool));
     dataTable.Columns.Add("InheritUserField", typeof(bool));
     dataTable.Columns.Add("InheritExtApp", typeof(bool));
     dataTable.Columns.Add("InheritVNCCompression", typeof(bool));
     dataTable.Columns.Add("InheritVNCEncoding", typeof(bool));
     dataTable.Columns.Add("InheritVNCAuthMode", typeof(bool));
     dataTable.Columns.Add("InheritVNCProxyType", typeof(bool));
     dataTable.Columns.Add("InheritVNCProxyIP", typeof(bool));
     dataTable.Columns.Add("InheritVNCProxyPort", typeof(bool));
     dataTable.Columns.Add("InheritVNCProxyUsername", typeof(bool));
     dataTable.Columns.Add("InheritVNCProxyPassword", typeof(bool));
     dataTable.Columns.Add("InheritVNCColors", typeof(bool));
     dataTable.Columns.Add("InheritVNCSmartSizeMode", typeof(bool));
     dataTable.Columns.Add("InheritVNCViewOnly", typeof(bool));
     dataTable.Columns.Add("InheritRDGatewayUsageMethod", typeof(bool));
     dataTable.Columns.Add("InheritRDGatewayHostname", typeof(bool));
     dataTable.Columns.Add("InheritRDGatewayUseConnectionCredentials", typeof(bool));
     dataTable.Columns.Add("InheritRDGatewayUsername", typeof(bool));
     dataTable.Columns.Add("InheritRDGatewayPassword", typeof(bool));
     dataTable.Columns.Add("InheritRDGatewayDomain", typeof(bool));
     dataTable.Columns.Add("LoadBalanceInfo", typeof(string));
     dataTable.Columns.Add("AutomaticResize", typeof(bool));
     dataTable.Columns.Add("InheritLoadBalanceInfo", typeof(bool));
     dataTable.Columns.Add("InheritAutomaticResize", typeof(bool));
     dataTable.Columns.Add("RDPMinutesToIdleTimeout", typeof(int));
     dataTable.Columns.Add("RDPAlertIdleTimeout", typeof(bool));
     dataTable.Columns.Add("SoundQuality", typeof(string));
     dataTable.Columns.Add("InheritRDPMinutesToIdleTimeout", typeof(bool));
     dataTable.Columns.Add("InheritRDPAlertIdleTimeout", typeof(bool));
     dataTable.Columns.Add("InheritSoundQuality", typeof(bool));
 }