예제 #1
0
        public void Load(Stream stream)
        {
            CanSave = true;
            Text    = FileName;

            uint Version = CheckVersion(stream);

            if (Version == 1)
            {
                aampFileV1   = new aampv1.AampFile(stream);
                Text         = $"{FileName} Type [{aampFileV1.EffectType}]";
                aampEditorV1 = new AampV1Editor();
                aampEditorV1.LoadFile(aampFileV1, this);
            }
            else if (Version == 2)
            {
                aampFileV2   = new aampv2.AampFile(stream);
                Text         = $"{FileName} Type [{aampFileV2.EffectType}]";
                aampEditorV2 = new AampV2Editor();
                aampEditorV2.LoadFile(aampFileV2, this);
            }
            else
            {
                throw new Exception($"Unsupported AAMP version! {Version}");
            }
        }
예제 #2
0
 public AampEditorBase OpenForm()
 {
     if (aampFileV1 != null)
     {
         AampV1Editor editor = new AampV1Editor(this, IsSaveDialog);
         editor.Text = FileName;
         editor.Dock = DockStyle.Fill;
         return(editor);
     }
     else
     {
         AampV2Editor editor = new AampV2Editor(this, IsSaveDialog);
         editor.Text = FileName;
         editor.Dock = DockStyle.Fill;
         return(editor);
     }
 }