public lta() { InitializeComponent(); mainDialog dia = new mainDialog(); prb.Visibility = System.Windows.Visibility.Collapsed; try { StreamReader srBasketFiveAnrry = new StreamReader("BasketNum/BasketNum_Five.txt", false); StreamReader srBasketFourAnrry = new StreamReader("BasketNum/BasketNum_Four.txt", false); StreamReader srBasketThreeAnrry = new StreamReader("BasketNum/BasketNum_Three.txt", false); StreamReader srBasketTwoAnrry = new StreamReader("BasketNum/BasketNum_Two.txt", false); int tmpCount = 0; for (int m = 0; m < 8; m++) { string strBasketFiveAnrry = srBasketFiveAnrry.ReadLine(); string strBasketFourAnrry0 = srBasketFourAnrry.ReadLine(); string[] SplitBasketFiveAnrry = strBasketFiveAnrry.Split(','); string[] SplitBasketFourAnrry0 = strBasketFourAnrry0.Split(','); for (int n = 0; n < 56; n++) { tempBasketFourAnrry0[tmpCount, 0] = SplitBasketFourAnrry0[n]; tempBasketFourAnrry0[tmpCount, 1] = "0"; tempBasketFiveAnrry[tmpCount, 0] = SplitBasketFiveAnrry[n]; tempBasketFiveAnrry[tmpCount, 1] = "0"; tmpCount++; } } int tmpCount0 = 0; for (int m = 0; m < 8; m++) { string strBasketFourAnrry9 = srBasketFourAnrry.ReadLine(); string[] SplitBasketFourAnrry9 = strBasketFourAnrry9.Split(','); for (int n = 0; n < 56; n++) { tempBasketFourAnrry9[tmpCount0, 0] = SplitBasketFourAnrry9[n]; tempBasketFourAnrry9[tmpCount0, 1] = "0"; tmpCount0++; } } int tmpCount1 = 0; for (int m = 0; m < 8; m++) { string strBasketFourAnrry09 = srBasketFourAnrry.ReadLine(); string[] SplitBasketFourAnrry09 = strBasketFourAnrry09.Split(','); for (int n = 0; n < 28; n++) { tempBasketFourAnrry09[tmpCount1, 0] = SplitBasketFourAnrry09[n]; tempBasketFourAnrry09[tmpCount1, 1] = "0"; tmpCount1++; } } int tmpCount2 = 0; for (int m = 0; m < 8; m++) { string strBasketThreeAnrry = srBasketThreeAnrry.ReadLine(); string[] SplitBasketThreeAnrry = strBasketThreeAnrry.Split(','); for (int n = 0; n < 7; n++) { tempBasketThreeAnrry0[tmpCount2, 0] = SplitBasketThreeAnrry[n]; tempBasketThreeAnrry0[tmpCount2, 1] = "0"; tmpCount2++; } } int tmpCount3 = 0; for (int m = 0; m < 8; m++) { string strBasketThreeAnrry = srBasketThreeAnrry.ReadLine(); string[] SplitBasketThreeAnrry = strBasketThreeAnrry.Split(','); for (int n = 0; n < 7; n++) { tempBasketThreeAnrry9[tmpCount3, 0] = SplitBasketThreeAnrry[n]; tempBasketThreeAnrry9[tmpCount3, 1] = "0"; tmpCount3++; } } int tmpCount4 = 0; for (int m = 0; m < 8; m++) { string strBasketThreeAnrry = srBasketThreeAnrry.ReadLine(); string[] SplitBasketThreeAnrry = strBasketThreeAnrry.Split(','); for (int n = 0; n < 8; n++) { tempBasketThreeAnrry09[tmpCount4, 0] = SplitBasketThreeAnrry[n]; tempBasketThreeAnrry09[tmpCount4, 1] = "0"; tmpCount4++; } } int tmpCount5 = 0; for (int m = 0; m < 8; m++) { string strBasketTwoAnrry = srBasketTwoAnrry.ReadLine(); string[] SplitBasketTwoAnrry = strBasketTwoAnrry.Split(','); for (int n = 0; n < 8; n++) { tempBasketTwoAnrry0[tmpCount5, 0] = SplitBasketTwoAnrry[n]; tempBasketTwoAnrry0[tmpCount5, 1] = "0"; tmpCount5++; } } int tmpCount6 = 0; for (int m = 0; m < 8; m++) { string strBasketTwoAnrry = srBasketTwoAnrry.ReadLine(); string[] SplitBasketTwoAnrry = strBasketTwoAnrry.Split(','); for (int n = 0; n < 8; n++) { tempBasketTwoAnrry9[tmpCount6, 0] = SplitBasketTwoAnrry[n]; tempBasketTwoAnrry9[tmpCount6, 1] = "0"; tmpCount6++; } } srBasketTwoAnrry.Close(); srBasketThreeAnrry.Close(); srBasketFourAnrry.Close(); srBasketFiveAnrry.Close(); } catch (Exception ex) { mainDialog.ShowMessage(ex.Message, "温馨提示:", MessageBoxButton.OK, null); } }
private void SetupBtn_Click(object sender, RoutedEventArgs e) { mainDialog dia = new mainDialog(); Button closeBtn = dia.CloseButton; closeBtn.Visibility = Visibility.Collapsed;//先关闭按钮的显示 dia.ShowDialog(); }