示例#1
0
 private void SaveButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         DropBuilder.Save(DataListBox.Items);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
示例#2
0
        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);
            }
        }
示例#3
0
        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();
            }
        }