public QueryManager(IFilenames filenames, IDatabase database)
        {
            _filenames = filenames;

            _database = database;
            _database.IterationsToRun = 1;

            _data          = new RefactorData();
            _data.Database = this._database;
        }
        public void LoadFromFile(string filename)
        {
            _currentFilename = filename;

            using (System.Xml.XmlReader reader = System.Xml.XmlReader.Create(filename))
            {
                System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(typeof(RefactorData));
                this._data = serializer.Deserialize(reader) as RefactorData;
            }

            // Wire it all up again.
            this._data.Database             = this._database;
            this._data.MasterQuery.Database = this._database;

            CurrentQueryIndex = this._data.Queries.Count - 1;
            ShowMasterQuery();
            _isModified = false;
        }
		public QueryManager ( IFilenames filenames, IDatabase database )
		{
			_filenames = filenames;

			_database = database;
			_database.IterationsToRun = 1;

			_data = new RefactorData ();
			_data.Database = this._database;
		}
		public void LoadFromFile ( string filename )
		{
			_currentFilename = filename;

			using ( System.Xml.XmlReader reader = System.Xml.XmlReader.Create ( filename ) )
			{
				System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer ( typeof ( RefactorData ) );
				this._data = serializer.Deserialize ( reader ) as RefactorData;
			}

			// Wire it all up again.
			this._data.Database = this._database;
			this._data.MasterQuery.Database = this._database;

			CurrentQueryIndex = this._data.Queries.Count - 1;
			ShowMasterQuery ();
			_isModified = false;
		}