Esempio n. 1
0
        private void Import(Sprite a_sp, bool a_bReplace)
        {
            OpenFileDialog dlg = new OpenFileDialog();

            dlg.Filter = "Endogine/Director (*.sgr)|*.sgr|Photoshop (*.psd)|*.psd|Flash (*.swf)|*.swf|All files|*.*";
            //dlgOpenFile.ShowReadOnly = true;
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                System.IO.FileInfo finfo = new System.IO.FileInfo(dlg.FileName);
                if (finfo.Extension == ".psd")
                {
                    Endogine.Serialization.Photoshop.Document psd = new Endogine.Serialization.Photoshop.Document(dlg.FileName);
                }
                else
                {
                    Endogine.Serialization.EndogineXML.Load(dlg.FileName, a_sp);
                }
                //TODO: why doesn't it work to show this messagebox?
                //	if (MessageBox.Show(this, "Merge with current scene (otherwise replace)?", "Merge or replace", MessageBoxButtons.YesNo,
                //		MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.No)
            }
        }
Esempio n. 2
0
        private void Import(Sprite a_sp, bool a_bReplace)
        {
            OpenFileDialog dlg = new OpenFileDialog();
            dlg.Filter = "Endogine/Director (*.sgr)|*.sgr|Photoshop (*.psd)|*.psd|Flash (*.swf)|*.swf|All files|*.*";
            //dlgOpenFile.ShowReadOnly = true;
            if(dlg.ShowDialog() == DialogResult.OK)
            {
                System.IO.FileInfo finfo = new System.IO.FileInfo(dlg.FileName);
                if (finfo.Extension == ".psd")
                {
                    Endogine.Serialization.Photoshop.Document psd = new Endogine.Serialization.Photoshop.Document(dlg.FileName);
                }
                else
                    Endogine.Serialization.EndogineXML.Load(dlg.FileName, a_sp);
                //TODO: why doesn't it work to show this messagebox?
                //	if (MessageBox.Show(this, "Merge with current scene (otherwise replace)?", "Merge or replace", MessageBoxButtons.YesNo,
                //		MessageBoxIcon.Question, MessageBoxDefaultButton.Button1) == DialogResult.No)

            }
        }