private void SaveButton_Click(object sender, RoutedEventArgs e) { try { DropBuilder.Save(DataListBox.Items); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void Window_Loaded(object sender, RoutedEventArgs e) { DropBuilder.GetDropTemplate(); foreach (var data in DropBuilder.Drop) { ListViewTemplate view = new ListViewTemplate(); view.npcid = data.Key; view.itemlist = data.Value; DataListBox.Items.Add(view); } }
private void YbDropOpenMenu_Click(object sender, RoutedEventArgs e) { OpenFileDialog fileDialog = new OpenFileDialog(); fileDialog.DefaultExt = "*.cfg"; fileDialog.Filter = "Yulgang Info|*.cfg"; Nullable <bool> result = fileDialog.ShowDialog(); if (result == true) { string filename = fileDialog.FileName; DropBuilder.YBBuffer = YBi.Decrypt(File.ReadAllBytes(filename)); DropBuilder.ReadYBData(); } }