예제 #1
0
        private static void onNewWorld(object sender, EventArgs a)
        {
            MarketBusinessHourListener listener = null;

            if (_theInstance != null)
            {
                listener = _theInstance.onBusinesStatusChanging;
            }
            _theInstance = (StockCompanyModule)World.world.otherObjects["{227E053A-6667-43fe-8CE2-26EB55CE6A56}"];
            if (_theInstance == null)
            {
                World.world.otherObjects["{227E053A-6667-43fe-8CE2-26EB55CE6A56}"] =
                    _theInstance = new StockCompanyModule();
                Economy.onNewWorld("{227E053A-6667-43fe-8CE4-26EB55CE6A56}");
            }
            else
            {
                Economy.onWorldLoaded("{227E053A-6667-43fe-8CE4-26EB55CE6A56}");
            }
            // restoring listener registrations (may be a BankbookWindow).
            if (listener != null)
            {
                _theInstance.onBusinesStatusChanging = listener;
            }
            _theInstance.rebuildRetainSet();
            // restore registrations for BankbookListHelper
            StocksListHelper.restoreData();
            _theInstance.onTrading = new OwnershipListener(StocksListHelper.onOwnershipStatusChanged);
            Economy.runEconomy();
        }
예제 #2
0
        public StocksWindow()
        {
            //
            // Windows フォーム デザイナ サポートに必要です。
            //
            InitializeComponent();
            StocksListHelper.buildRetainingList(listview);
            onMarketStatusChanged();

            marketListener = new MarketBusinessHourListener(onMarketStatusChanged);
            market.onBusinesStatusChanging += marketListener;
            chart.chart.ScaleTypeX          = XAxisStyle.DAILY;
            chart.chart.ScaleTypeY          = YAxisStyle.AUTOSCALE;
            chart.chart.area.setYRange(0, 15000);
        }