private void button1_Click(object sender, EventArgs e) { //await data.DownloadTagJson(); //await data.DownloadMetadata(); data.LoadTagJson(); data.LoadMetadataJson(); MessageBox.Show(data.metadata_collection.Count.ToString()); }
private async void bDataOpen_Click(object sender, EventArgs e) { bDataNew.Enabled = false; bDataOpen.Enabled = false; pbLoad.Visible = true; pbLoad.MarqueeAnimationSpeed = 10; await Task.Run(() => hitomi_data.LoadTagJson()); await Task.Run(() => hitomi_data.LoadMetadataJson()); if (hitomi_data.tag_collection.female == null || hitomi_data.metadata_collection == null) { MessageBox.Show("누락된 파일이 있습니다. 데이터를 새로 작성하세요.", Text, MessageBoxButtons.OK, MessageBoxIcon.Error); bDataNew.Enabled = true; pbLoad.Visible = false; return; } boxData.Enabled = true; bStat.Enabled = true; pbLoad.Visible = false; MessageBox.Show("데이터 로딩 완료!", Text, MessageBoxButtons.OK, MessageBoxIcon.Information); }