Beispiel #1
0
        private static void onNewWorld(object sender, EventArgs a)
        {
            BankBusinessHourListener listener = null;

            if (_theInstance != null)
            {
                listener = _theInstance.onBusinesStatusChanging;
            }

            _theInstance = (BankModule)World.world.otherObjects["{227E053A-6667-43fe-8CE1-26EB55CE6A56}"];
            if (_theInstance == null)
            {
                World.world.otherObjects["{227E053A-6667-43fe-8CE1-26EB55CE6A56}"] = _theInstance =
                    new BankModule();
            }
            // restoring listener registrations (may be a BankbookWindow).
            if (listener != null)
            {
                _theInstance.onBusinesStatusChanging = listener;
            }
            // restore registrations for BankbookListHelper
            IEnumerator e1 = _theInstance.debts.GetEnumerator();

            BankbookListHelper.restoreData();
        }
        static public void buildDepositList(ListView _list)
        {
            BankModule bank = BankModule.theInstance;
            // Create columns
            ColumnHeader column0 = new ColumnHeader();
            ColumnHeader column1 = new ColumnHeader();
            ColumnHeader column2 = new ColumnHeader();
            ColumnHeader column3 = new ColumnHeader();
            ColumnHeader column4 = new ColumnHeader();
            ColumnHeader column5 = new ColumnHeader();
            int          width   = _list.ClientSize.Width;

            _list.Clear();
            _list.Columns.AddRange(new ColumnHeader[]
                                   { column0, column1, column2, column3, column4, column5 });
            column0.Text = "ID";
            column1.Text = "Maturity date";
            //! column1.Text = "満期日";
            column2.Text = "Credit";
            //! column2.Text = "預金額";
            column2.TextAlign = HorizontalAlignment.Right;
            column3.Text      = "Interest rate";
            //! column3.Text = "利率";
            column3.TextAlign = HorizontalAlignment.Right;
            column4.Text      = "Date of credit";
            //! column4.Text = "預入日";
            column5.Text = "Remarks";
            //! column5.Text = "備考";
            column0.Width = 0;
            if (width < 400)
            {
                column1.Width = Math.Max(70, width * 60 / 300);
                column2.Width = Math.Max(100, width * 100 / 300);
                column3.Width = Math.Max(50, width * 50 / 300);
                column4.Width = 3;
                column5.Width = Math.Max(75, width * 80 / 300);
            }
            else
            {
                column1.Width = 70;
                column2.Width = 110;
                column3.Width = 50;
                column4.Width = 70;
                column5.Width = 75;
            }
            buildDepositListItems(_list);
            depositList.add(_list);
        }
Beispiel #3
0
 public BankPlugIn(XmlElement e) : base(e)
 {
     BankConfig.init(e);
     BankModule.init();
 }