Exemple #1
0
        public Debt(long amount, Time due, AccountGenre genre)
        {
            this.amount = amount;
            this.due    = due;
            this.genre  = genre;

            manager.addDebt(this);
            World.world.clock.registerOneShot(new ClockHandler(onDue), span);
        }
Exemple #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( MainWindow.mainWindow, "破産しました。お金を増やして続行します" );
         _liquidAssets += 100000000;
     }
 }
Exemple #3
0
 public void earn(long delta, AccountGenre genre)
 {
     transact(-delta, genre);
     genre.history.earn(delta);
     if (genre.onUpdate != null)
     {
         genre.onUpdate();
     }
     if (onAccountChange != null)
     {
         onAccountChange();
     }
 }
            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);
            }