コード例 #1
0
        private void addItem()
        {
            String line;

            if ((line = sr.ReadLine()) != null)
            {
                var           array = line.ToString().Split('\t');
                List <string> data  = new List <string>();
                foreach (string item in array)
                {
                    if (item != "\n")
                    {
                        data.Add(item);
                    }
                }
                AnalysisTableItem temp = new AnalysisTableItem(data);
                ItemList.Add(temp);
                TableView.Dispatcher.BeginInvoke(DispatcherPriority.Background, new AddItemDelegate(addItem));
            }
            else
            {
                sr.Close();
                MainWindow temp = (MainWindow)Application.Current.MainWindow;
                temp.Mips.IsEnabled = true;
            }
        }
コード例 #2
0
        private List <AnalysisTableItem> ReadTable()
        {
            string       sourceFolder  = Storage.getStoragePath("Source");
            string       tableFilePath = Path.Combine(sourceFolder, "analysis.table");
            StreamReader sr            = new StreamReader(tableFilePath, Encoding.Default);

            sr.ReadLine();
            string line;

            while ((line = sr.ReadLine()) != null)
            {
                var           array = line.ToString().Split('\t');
                List <string> data  = new List <string>();
                foreach (string item in array)
                {
                    if (item != "\n")
                    {
                        data.Add(item);
                    }
                }
                AnalysisTableItem temp = new AnalysisTableItem(data);
                ItemList.Add(temp);
            }
            sr.Close();
            return(ItemList);
        }