Example #1
0
        public MainWindow()
        {
            InitializeComponent();
            PuzzleXMLResource.Load("PuzzleResource.xml");

            settingGrid.DataContext = PuzzleXMLResource.PuzzleRes;
            programmeLV.DataContext = null;
            textBlock.DataContext   = null;
            reset_cube();
        }
Example #2
0
        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();
        }
Example #3
0
        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("已保存更新");
        }