示例#1
0
文件: Form1.cs 项目: luddchen/XGame
        private void LoadFileOkEvent(object sender, CancelEventArgs e)
        {
            this.nodeViewer.SelectNothing();
            clearTree();
            TextureNode newRoot = CharXML.ReadChar(this.openFileDialog1.FileName, this);

            if (newRoot != null)
            {
                this.nodeViewer.Root = newRoot;
                this.nodeViewer.Root.Update(true);
                this.statusLabel.Text = this.openFileDialog1.SafeFileName;
            }
            else
            {
                clearTree();
                createRootItem();
            }
            this.nodeViewer.SelectNothing();
        }
示例#2
0
文件: Form1.cs 项目: luddchen/XGame
 private void SaveFileOkEvent(object sender, CancelEventArgs e)
 {
     this.poseViewer.Selected = this.poseViewer.BasePose;
     CharXML.WriteChar(this.saveFileDialog1.FileName, this.nodeViewer.Root, this.poseViewer.Poses, this.poseViewer.BasePose);
     this.statusLabel.Text = Path.GetFileName(this.saveFileDialog1.FileName);
 }