private async void AddBtn_Click(object sender, RoutedEventArgs e) { string ZipFile = FileHelper.OpenFileDialog("Zip Files (*.zip)|*.zip"); if (String.IsNullOrEmpty(ZipFile)) { return; } string ZipName = ZipFile.Substring(ZipFile.LastIndexOf("\\") + 1, ZipFile.LastIndexOf(".") - (ZipFile.LastIndexOf("\\") + 1)); await FileHelper.TempUnzip(ZipFile); GlobalVariables_Core.Init_Variables(); GlobalVariables_Core.ZipName = ZipName; CoreInstall coreInstall = new CoreInstall(); coreInstall.Owner = MainWindow.GlobalMainWindow; coreInstall.WindowStartupLocation = WindowStartupLocation.CenterOwner; coreInstall.ShowDialog(); if (GlobalVariables_Core.isCompelete) { CoreData coreData = new CoreData() { CoreVersion = GlobalVariables_Core.CoreVersion, InstallTime = DateTime.UtcNow }; CoreHelper.AddCore(coreData); var newCard = CreateCard(coreData); AddToView(newCard, newCard.Name); SB_Message("Success_CoreAdded"); } }