Audio and MIDI library for .NET
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

62 lines
2.1 KiB

using System;
using System.Collections.Generic;
using System.Windows.Forms;
namespace AudioFileInspector
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static int Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
List<IAudioFileInspector> inspectors = new List<IAudioFileInspector>();
inspectors.Add(new WaveFileInspector());
inspectors.Add(new MidiFileInspector());
inspectors.Add(new SoundFontInspector());
inspectors.Add(new CakewalkMapInspector());
if (args.Length > 0)
{
if (args[0] == "-install")
{
try
{
OptionsForm.Associate(inspectors);
Console.WriteLine("Created {0} file associations", inspectors.Count);
}
catch (Exception e)
{
Console.WriteLine("Unable to create file associations");
Console.WriteLine(e.ToString());
return -1;
}
return 0;
}
else if (args[0] == "-uninstall")
{
try
{
OptionsForm.Disassociate(inspectors);
Console.WriteLine("Removed {0} file associations", inspectors.Count);
}
catch (Exception e)
{
Console.WriteLine("Unable to remove file associations");
Console.WriteLine(e.ToString());
return -1;
}
return 0;
}
}
Application.Run(new AudioFileInspectorForm(inspectors,args));
return 0;
}
}
}