private void audioProfile_SelectedProfileChanged(object sender, EventArgs e) { if (lastCodec == AudCodecSettings.EncoderType) return; lastCodec = AudCodecSettings.EncoderType; Util.ChangeItemsKeepingSelectedSame(audioContainer, AudioEncoderProvider.GetSupportedOutput(lastCodec)); }
/// <summary> /// default constructor /// initializes all the GUI components, initializes the internal objects and makes a default selection for all the GUI dropdowns /// In addition, all the jobs and profiles are being loaded from the harddisk /// </summary> public MeGUIInfo() { this.codecs = new CodecManager(); this.gen = new CommandLineGenerator(); this.path = System.Windows.Forms.Application.StartupPath; this.jobs = new Dictionary <string, Job>(); this.skipJobs = new List <Job>(); this.logBuilder = new StringBuilder(); this.jobUtil = new JobUtil(this); this.settings = new MeGUISettings(); this.calc = new BitrateCalculator(); audioStreams = new AudioStream[2]; audioStreams[0].path = ""; audioStreams[0].output = ""; audioStreams[0].settings = null; audioStreams[1].path = ""; audioStreams[1].output = ""; audioStreams[1].settings = null; this.videoEncoderProvider = new VideoEncoderProvider(); this.audioEncoderProvider = new AudioEncoderProvider(); this.profileManager = new ProfileManager(this.path); this.profileManager.LoadProfiles(videoProfile, audioProfile); this.loadSettings(); this.loadJobs(); this.dialogManager = new DialogManager(this); #warning refactor menus int index = menuItem1.MenuItems.Count; foreach (IMuxing muxer in PackageSystem.MuxerProviders.Values) { MenuItem newMenuItem = new MenuItem(); newMenuItem.Text = muxer.Name; newMenuItem.Tag = muxer; newMenuItem.Index = index; index++; menuItem1.MenuItems.Add(newMenuItem); newMenuItem.Click += new System.EventHandler(this.mnuMuxer_Click); } index = mnuTools.MenuItems.Count; foreach (ITool tool in PackageSystem.Tools.Values) { MenuItem newMenuItem = new MenuItem(); newMenuItem.Text = tool.Name; newMenuItem.Tag = tool; newMenuItem.Index = index; index++; mnuTools.MenuItems.Add(newMenuItem); newMenuItem.Click += new System.EventHandler(this.mnuTool_Click); } //MessageBox.Show(String.Join("|", this.GetType().Assembly.GetManifestResourceNames())); using (TextReader r = new StreamReader(this.GetType().Assembly.GetManifestResourceStream("MeGUI.Changelog.txt"))) { mainForm.Changelog.Text = r.ReadToEnd(); } }
/// <summary> /// default constructor /// initializes all the GUI components, initializes the internal objects and makes a default selection for all the GUI dropdowns /// In addition, all the jobs and profiles are being loaded from the harddisk /// </summary> public MeGUIInfo() { this.codecs = new CodecManager(); this.gen = new CommandLineGenerator(); this.path = System.Windows.Forms.Application.StartupPath; this.jobs = new Dictionary<string, Job>(); this.skipJobs = new List<Job>(); this.logBuilder = new StringBuilder(); this.jobUtil = new JobUtil(this); this.settings = new MeGUISettings(); this.calc = new BitrateCalculator(); audioStreams = new AudioStream[2]; audioStreams[0].path = ""; audioStreams[0].output = ""; audioStreams[0].settings = null; audioStreams[1].path = ""; audioStreams[1].output = ""; audioStreams[1].settings = null; this.videoEncoderProvider = new VideoEncoderProvider(); this.audioEncoderProvider = new AudioEncoderProvider(); this.profileManager = new ProfileManager(this.path); this.profileManager.LoadProfiles(videoProfile, audioProfile); this.loadSettings(); this.loadJobs(); this.dialogManager = new DialogManager(this); int index = menuItem1.MenuItems.Count; foreach (IMuxing muxer in PackageSystem.MuxerProviders.Values) { MenuItem newMenuItem = new MenuItem(); newMenuItem.Text = muxer.Name; newMenuItem.Tag = muxer; newMenuItem.Index = index; index++; menuItem1.MenuItems.Add(newMenuItem); newMenuItem.Click += new System.EventHandler(this.mnuMuxer_Click); } index = mnuTools.MenuItems.Count; foreach (ITool tool in PackageSystem.Tools.Values) { MenuItem newMenuItem = new MenuItem(); newMenuItem.Text = tool.Name; newMenuItem.Tag = tool; newMenuItem.Index = index; index++; mnuTools.MenuItems.Add(newMenuItem); newMenuItem.Click += new System.EventHandler(this.mnuTool_Click); } //MessageBox.Show(String.Join("|", this.GetType().Assembly.GetManifestResourceNames())); using (TextReader r = new StreamReader(this.GetType().Assembly.GetManifestResourceStream("MeGUI.Changelog.txt"))) { mainForm.Changelog.Text = r.ReadToEnd(); } }
public OneClickWindow(MainForm mainForm, JobUtil jobUtil, VideoEncoderProvider vProv, AudioEncoderProvider aProv) { this.mainForm = mainForm; vUtil = new VideoUtil(mainForm); this.muxProvider = mainForm.MuxProvider; acceptableContainerTypes = muxProvider.GetSupportedContainers().ToArray(); InitializeComponent(); initTabs(); videoProfile.Manager = mainForm.Profiles; initAudioHandler(); avsProfile.Manager = mainForm.Profiles; initOneClickHandler(); audioTrack1.StandardItems = audioTrack2.StandardItems = new object[] { "None" }; audioTrack1.SelectedIndex = audioTrack2.SelectedIndex = 0; //if containerFormat has not yet been set by the oneclick profile, add supported containers if (containerFormat.Items.Count == 0) { containerFormat.Items.AddRange(muxProvider.GetSupportedContainers().ToArray()); this.containerFormat.SelectedIndex = 0; } //add device type if (devicetype.Items.Count == 0) { devicetype.Items.Add("Standard"); devicetype.Items.AddRange(muxProvider.GetSupportedDevices().ToArray()); this.devicetype.SelectedIndex = 0; } showAdvancedOptions_CheckedChanged(null, null); }