public void TestFilenameGenerator()
 {
     Server.ConnectionString = @"SERVER=(local);DATABASE=;UID=sa;PWD=m14m14;";
     Server.ProviderType = DataProviderType.MSSQL;
     Server server = new Server();
     Client c = new Client();
     string sd = c.StartDelimiter;
     string ed = c.EndingDelimiter;
     c.StartDelimiter = String.Empty;
     c.EndingDelimiter = String.Empty;
     Console.WriteLine(c.Parse(server.Databases[0].Tables[0],"DATABASE.NAME_TABLE.NAMEForm.aspx"));
 }
 public void SetUp()
 {
     Server.ConnectionString = @"SERVER=(local);DATABASE=;UID=sa;PWD=m14m14;";
     Server.ProviderType = DataProviderType.MSSQL;
     _server = new Server();
 }
 public void Connect()
 {
     try
     {
         _rootNode.Nodes.Clear();
         Server server = new Server();
         _rootNode.Text = ProviderType.ToString() + " " + ConnectionString.Split(new char[] { ';' } )[0]; //do not show the whole connection string, because password is included
         foreach(Database database in server.Databases)
         {
             TreeNode databaseNode = new TreeNode(database.Name);
             databaseNode.Tag = database;
             databaseNode.ImageIndex = (int)NavigatorIcon.DatabaseOff;
             databaseNode.SelectedImageIndex = (int)NavigatorIcon.DatabaseOff;
             _rootNode.Nodes.Add(databaseNode);
         }
         _rootNode.SelectedImageIndex = (int)NavigatorIcon.ServerOn;
         _rootNode.ImageIndex = (int)NavigatorIcon.ServerOn;
     }
     catch (Exception)
     {
         ShowEditConnectionStringDialog();
     }
 }
		public void Connect()
		{
			try
			{
				_rootNode.Nodes.Clear();
				Server server = new Server();
				_rootNode.Text = ConnectionString;
				foreach(Database database in server.Databases)
				{
					TreeNode databaseNode = new TreeNode(database.Name);
					databaseNode.Tag = database;
					databaseNode.ImageIndex = (int)NavigatorIcon.DatabaseOff;
					databaseNode.SelectedImageIndex = (int)NavigatorIcon.DatabaseOff;
					_rootNode.Nodes.Add(databaseNode);
				}
				_rootNode.SelectedImageIndex = (int)NavigatorIcon.ServerOn;
				_rootNode.ImageIndex = (int)NavigatorIcon.ServerOn;
			}
			catch (Exception)
			{
				ShowEditConnectionStringDialog();
			}
		}