Exemple #1
0
        void BymlEditor(object sender, EventArgs e)
        {
            OpenFileDialog openFile = new OpenFileDialog();

            openFile.Filter = "byaml file |*.byml;*.byaml| every file | *.*";
            if (openFile.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            ByamlViewer.OpenByml(openFile.FileName);
        }
Exemple #2
0
        void XmlImport(object sender, EventArgs e)
        {
            OpenFileDialog openFile = new OpenFileDialog();

            openFile.Filter = "xml file |*.xml| every file | *.*";
            if (openFile.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            StreamReader t = new StreamReader(new FileStream(openFile.FileName, FileMode.Open), UnicodeEncoding.Unicode);

            ByamlViewer.OpenByml(Byaml.XmlConverter.ToByml(t.ReadToEnd()), Path.GetFileName(openFile.FileName));
        }
Exemple #3
0
 public void OpenFileEdit(string filename, Stream file, Stream saveStream) =>
 ByamlViewer.OpenByml(file, filename, saveStream, true);
Exemple #4
0
 public void OpenFile(string filename, Stream file) =>
 ByamlViewer.OpenByml(file, filename);
Exemple #5
0
        public void OpenFile(string filename, Stream file)
        {
            StreamReader t = new StreamReader(file, Encoding.GetEncoding(932));

            ByamlViewer.OpenByml(Byaml.XmlConverter.ToByml(t.ReadToEnd()), filename);
        }