Beispiel #1
0
 private void buttonLoadVMI_Click(object sender, EventArgs e)
 {
     using (OpenFileDialog od = new OpenFileDialog()
     {
         DefaultExt = "vmi", Filter = "VMI Files|*.vmi|All Files|*.*"
     })
         if (od.ShowDialog(this) == DialogResult.OK)
         {
             vmi = new VMIFile(File.ReadAllBytes(od.FileName));
             UpdateAllLabels();
         }
 }
Beispiel #2
0
 private void buttonGenerateVMI_Click(object sender, EventArgs e)
 {
     using (OpenFileDialog od = new OpenFileDialog()
     {
         DefaultExt = "vms", Filter = "VMS Files|*.vms|All Files|*.*"
     })
         if (od.ShowDialog(this) == DialogResult.OK)
         {
             byte[] data = File.ReadAllBytes(od.FileName);
             if (BitConverter.ToUInt16(data, 0) == 0x8038)
             {
                 vmi = new VMIFile(new VMSFile(data), "SADV_000");
             }
             SetCurrentTime();
             UpdateAllLabels();
         }
 }
Beispiel #3
0
 public EditorVMI(Form parent = null)
 {
     ProgramModeSelectorForm = parent;
     InitializeComponent();
     if (Program.args.Length > 0)
     {
         if (File.Exists(Program.args[0]))
         {
             vmi = new VMIFile(File.ReadAllBytes(Program.args[0]));
             UpdateAllLabels();
         }
     }
     if (parent == null)
     {
         Application.ThreadException += ProgramModeSelector.Application_ThreadException;
     }
 }