Exemple #1
0
        private async void btnProg_Click(object sender, EventArgs e)
        {
            if (txtPath.Text != "" && txtPath.Text.IndexOf("tradeskillmaster_apphelper\\appdata.lua", StringComparison.OrdinalIgnoreCase) >= 0)
            {
                var assembly   = Assembly.GetExecutingAssembly();
                var wowItemCsv = "Loonie_Tunes.Resources.AuctionItemNames.csv";

                lblProgress.Visible = true;
                progBar.Visible     = true;
                var progress = new Progress <int>(value =>
                {
                    progBar.Value = value;
                });

                lblProgress.Text = "Reading TSM File...";
                var appDataFile             = File.ReadAllText(txtPath.Text);
                var realmName               = cmbRealmName.Text;
                List <AuctionItem> tsmParse = await Task.Run(() => csvParse.ParseTSM(appDataFile, progress, realmName));

                //List<AuctionItem> tsmParse = csvParse.ParseTSM(appDataFile);
                lblProgress.Text = "Reading TSM File...Done";

                //using (var file = File.Create(filePath + @"\\TSMParse.csv"))
                lblProgress.Text = "Parsing TSM AppData...";
                await Task.Run(() => csvParse.ListToCSV(tsmParse, rootDir + @"\\TSMParse.csv", progress));

                lblProgress.Text = "Parsing TSM AppData...Done";

                lblProgress.Text = "Reading known Item Entries...";
                List <WoWItem> wowItemParse = await Task.Run(() => csvParse.ReadWoWCSV(wowItemCsv, progress));

                lblProgress.Text = "Reading known Item Entries...";

                lblProgress.Text = "Reading Auction Price Data...";
                List <AuctionItem> auctionItemParse = await Task.Run(() => csvParse.ReadAuctionCsv(rootDir + @"\\TSMParse.csv", progress));

                lblProgress.Text = "Reading Auction price data...Done";

                lblProgress.Text = "Linking Item Entries with Auction Price Data...";
                await Task.Run(() => csvParse.CombinedCSV(auctionItemParse, wowItemParse, rootDir + @"\\" + realmName + "Final.csv", progress));

                lblProgress.Text = "Linking Item Entries with Auction Price Data...Done";
                MessageBox.Show("Complete!");
                btnCopy.Visible = true;
            }
            else
            {
                MessageBox.Show("You have Selected a wrong or invalid file. Please try again.");
            }
        }
Exemple #2
0
        private async void BtnProg_Click(object sender, EventArgs e)
        {
            if (appDataFileCheck())
            {
                loadBar();
                progBar.Value    = 0;
                lblProgress.Text = "Reading TSM File...";
                var appDataFile = File.ReadAllText(txtPath.Text);
                var realmName   = cmbRealmName.Text;
                var region      = cmbRegion.Text;
                List <AuctionItem> tsmParseRealm = await Task.Run(() => csvParse.ParseTSMRealm(appDataFile, progressBar, realmName));

                lblProgress.Text = "Reading TSM File...Done";

                lblProgress.Text = "Parsing TSM AppData...";
                await Task.Run(() => csvParse.ListToCSV(tsmParseRealm, rootDir + @"\\TSMParse.csv", progressBar));

                lblProgress.Text = "Parsing TSM AppData...Done";

                lblProgress.Text = "Reading known Item Entries...";
                List <WoWItem> wowItemParse = await Task.Run(() => csvParse.ReadWoWCSV(wowItemCsv, progressBar));

                lblProgress.Text = "Reading known Item Entries...";

                //lblProgress.Text = "Reading Auction Price Data...";
                //List<AuctionItem> auctionItemParse = await Task.Run(() => csvParse.ReadAuctionCsv(rootDir + @"\\TSMParse.csv", progressBar));
                //lblProgress.Text = "Reading Auction price data...Done";

                lblProgress.Text = "Linking Item Entries with Auction Price Data...";
                await Task.Run(() => csvParse.CombinedCSV(tsmParseRealm, wowItemParse, rootDir + @"\\" + realmName + "Final.csv", progressBar));

                lblProgress.Text = "Linking Item Entries with Auction Price Data...Done";
                MessageBox.Show("Complete!");
                btnCopy.Visible = true;
            }
        }