private void ResManager_Click(object sender, RoutedEventArgs e) { PuzzleResourceWindow prw = new PuzzleResourceWindow(); prw.ShowDialog(); PuzzleXMLResource.Save("PuzzleResource.xml"); sectionCBB.Items.Refresh(); musicCBB.Items.Refresh(); sceneCBB.Items.Refresh(); resolutionCBB.Items.Refresh(); sizeCBB.Items.Refresh(); backgroundCBB.Items.Refresh(); }
private void save_update(object sender, RoutedEventArgs e) { foreach (var rotate in rotate_dict) { string name = rotate.Key; Shape shape = mainCanvas.FindName(name) as Shape; double x = Canvas.GetLeft(shape), y = Canvas.GetTop(shape); double r = rotate.Value.Angle; State state = getCubeState(shape); if (state == null) { continue; } state.X = x; state.Y = y; state.R = r; } PuzzleXMLResource.Save("PuzzleResource.xml"); MessageBox.Show("已保存更新"); }