Inheritance: ITransactionJournal
Beispiel #1
0
        protected bool LoadJournal()
        {
            Journal.ITransactionJournal journal = null;
            if (Configuration == null)
            {
                return(false);
            }

            if (Configuration.JournalType.Equals("xml", StringComparison.InvariantCultureIgnoreCase) == true)
            {
                Wolfje.Plugins.SEconomy.Journal.XMLJournal.XmlTransactionJournal xmlJournal = new Journal.XMLJournal.XmlTransactionJournal(this, Config.JournalPath);
                xmlJournal.JournalLoadingPercentChanged += (sender, args) => ConsoleEx.WriteBar(args);

                journal = xmlJournal;
            }
            else if (Configuration.JournalType.Equals("mysql", StringComparison.InvariantCultureIgnoreCase) == true ||
                     Configuration.JournalType.Equals("sql", StringComparison.InvariantCultureIgnoreCase) == true)
            {
                Wolfje.Plugins.SEconomy.Journal.MySQLJournal.MySQLTransactionJournal sqlJournal = new Journal.MySQLJournal.MySQLTransactionJournal(this, Configuration.SQLConnectionProperties);
                sqlJournal.JournalLoadingPercentChanged += (sender, args) => ConsoleEx.WriteBar(args);

                journal = sqlJournal;
            }

            this.RunningJournal = journal;
            if (this.RunningJournal.LoadJournal() == false)
            {
                return(false);
            }

            return(true);
        }
Beispiel #2
0
 public MySQLBankAccount(MySQLTransactionJournal journal)
 {
     this.journal = journal;
 }
Beispiel #3
0
		protected bool LoadJournal()
		{
			Journal.ITransactionJournal journal = null;
			if (Configuration == null) {
				return false;
			}

			if (Configuration.JournalType.Equals("xml", StringComparison.InvariantCultureIgnoreCase) == true) {
				Wolfje.Plugins.SEconomy.Journal.XMLJournal.XmlTransactionJournal xmlJournal = new Journal.XMLJournal.XmlTransactionJournal(this, Config.JournalPath);
				xmlJournal.JournalLoadingPercentChanged += (sender, args) => ConsoleEx.WriteBar(args);

				journal = xmlJournal;
			} else if (Configuration.JournalType.Equals("mysql", StringComparison.InvariantCultureIgnoreCase) == true
			           || Configuration.JournalType.Equals("sql", StringComparison.InvariantCultureIgnoreCase) == true) {
				Wolfje.Plugins.SEconomy.Journal.MySQLJournal.MySQLTransactionJournal sqlJournal = new Journal.MySQLJournal.MySQLTransactionJournal(this, Configuration.SQLConnectionProperties);
				sqlJournal.JournalLoadingPercentChanged += (sender, args) => ConsoleEx.WriteBar(args);

				journal = sqlJournal;
			}

			this.RunningJournal = journal;
			if (this.RunningJournal.LoadJournal() == false) {
				return false;
			}

			return true;
		}
Beispiel #4
0
		public MySQLBankAccount(MySQLTransactionJournal journal)
		{
			this.journal = journal;
		}