示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="amount"></param>
        /// <param name="due"></param>
        /// <param name="genre"></param>
        public Debt(long amount, Time due, AccountGenre genre)
        {
            this.amount = amount;
            this.due    = due;
            this.genre  = genre;

            manager.addDebt(this);
            WorldDefinition.World.Clock.registerOneShot(new ClockHandler(onDue), span);
        }
示例#2
0
 private void transact(long delta, AccountGenre genre)
 {
     _liquidAssets -= delta;
     if (_liquidAssets < 0)
     {
         // TODO: go bunkrupt
         MessageBox.Show(MainWindow.mainWindow, "You are bankrupt. Proceeding with more funds.");
         //! MessageBox.Show( MainWindowMDI.mainWindow, "破産しました。お金を増やして続行します" );
         _liquidAssets += 100000000;
     }
 }
示例#3
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="delta"></param>
 /// <param name="genre"></param>
 public void earn(long delta, AccountGenre genre)
 {
     transact(-delta, genre);
     genre.History.earn(delta);
     if (genre.onUpdate != null)
     {
         genre.onUpdate();
     }
     if (onAccountChange != null)
     {
         onAccountChange();
     }
 }
示例#4
0
            internal GenreListItem(AccountSummaryWindow _parent, AccountGenre genre)
            {
                this.parent = _parent;
                this.genre  = genre;
                this.Text   = genre.name;

                this.SubItems.Add("0");
                this.SubItems.Add("0");
                this.SubItems.Add("0");
                onUpdate();

                genre.onUpdate     += new AccountListener(onUpdate);
                parent.updateItems += new AccountListener(onUpdate);
            }