Beispiel #1
0
        public static void Initialize()
        {
            _watchLists = new WatchLists();
            _watchLists.Load();
            _watchLists.Remove("RecentlyUsed");

            _recentList = new StockList("RecentlyUsed");
            _recentList.Load("RecentlyUsed.json");
        }
Beispiel #2
0
        public void Load()
        {
            string listDirectory = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\DataMAN\\WatchLists";

            if (Directory.Exists(listDirectory))
            {
                foreach (string file in Directory.GetFiles(listDirectory))
                {
                    FileInfo fileInfo = new FileInfo(file);
                    if (fileInfo.Extension == ".json")
                    {
                        StockList stockList = new StockList(fileInfo.Name);
                        stockList.Load(fileInfo.Name);
                        _stockLists.Add(stockList);
                    }
                }
            }
        }