using Functions;\r
using Model;\r
\r
+ /// <summary>\r
+ /// Plist Preset Converter\r
+ /// </summary>\r
public class PlistPresetHandler\r
{\r
- /* WARNING This file is not complete!!!!!!\r
- *\r
- * TODO \r
- * 1. Hookup all the widgets in the GUI so it exports real values.\r
- * 2. Check for any missing key/value pairs\r
- * 3. Test with MacGui / Cleanup code / Retest \r
- */\r
-\r
- private XmlTextWriter Writer;\r
-\r
- /// <summary>\r
- /// Import a Plist preset generated by the Mac or Linux GUI\r
- /// </summary>\r
- /// <param name="filename"></param>\r
- /// <returns></returns>\r
+ #region Import\r
+\r
public static QueryParser Import(string filename)\r
{\r
- XmlNode root = null;\r
- try\r
- {\r
- if (!File.Exists(filename))\r
- return null;\r
-\r
- StreamReader sr = File.OpenText(filename);\r
- string fromfile = string.Empty;\r
- int fileChar;\r
- while ((fileChar = sr.Read()) != -1)\r
- fromfile += Convert.ToChar(fileChar);\r
-\r
- XmlDocument doc = new XmlDocument();\r
- doc.LoadXml(fromfile);\r
-\r
- root = doc;\r
- if (!root.HasChildNodes)\r
- {\r
- MessageBox.Show(\r
- "The Preset file you selected appears to be invlaid or from an older version of HandBrake",\r
- "Error",\r
- MessageBoxButtons.OK, MessageBoxIcon.Error);\r
- return null;\r
- }\r
- }\r
- catch (Exception)\r
- {\r
- MessageBox.Show(\r
- "The Preset file you selected appears to be invlaid or from an older version of HandBrake.\n\n Please note, if you are exporting from the MacGui you may need to rebuild your preset so that it uses the current preset plist format.\n The MacGui does not currently update user presets automatically.",\r
- "Error",\r
- MessageBoxButtons.OK, MessageBoxIcon.Error);\r
- }\r
-\r
+ XmlNode root = loadFile(filename);\r
+ if (root == null) return null;\r
+ \r
// We'll query a query parser object and use it's public var structures to store all the data.\r
// This will allow the preset loader logic to be used instead of writing custom logic just for this file.\r
QueryParser queryParsed = new QueryParser();\r
- string QualityMode = string.Empty;\r
- /***** Get the Audio Tracks *****/\r
+ string qualityMode = string.Empty;\r
+ \r
+\r
+ #region Get a List of Audio Track Objects\r
XmlNode audioListDict = root.ChildNodes[2].ChildNodes[0].FirstChild.ChildNodes[1];\r
- ArrayList AudioInfo = new ArrayList();\r
+ ArrayList audioTracks = new ArrayList();\r
+\r
for (int i = 0; i < audioListDict.ChildNodes.Count; i++)\r
{\r
XmlNode audioChannel = audioListDict.ChildNodes[i];\r
break;\r
}\r
}\r
- AudioInfo.Add(track);\r
+ audioTracks.Add(track);\r
+ queryParsed.AudioInformation = audioTracks;\r
}\r
- queryParsed.AudioInformation = AudioInfo;\r
+ #endregion\r
+\r
+ #region Parse the reset of the plist keys into local variables\r
\r
- /***** Get the rest of the settings. *****/\r
XmlNode presetSettings = root.ChildNodes[2].ChildNodes[0].FirstChild;\r
- for (int i = 2; i < presetSettings.ChildNodes.Count; i += 2)\r
+\r
// Start from 2 to avoid the audio settings which we don't need.\r
+ for (int i = 2; i < presetSettings.ChildNodes.Count; i += 2)\r
{\r
string key = presetSettings.ChildNodes[i].InnerText;\r
string value = presetSettings.ChildNodes[i + 1].InnerText;\r
\r
// Picture Settings\r
case "PictureAutoCrop":\r
+ // Not used\r
break;\r
case "PictureTopCrop":\r
queryParsed.CropTop = value;\r
queryParsed.AnamorphicMode = int.Parse(value);\r
break;\r
\r
-\r
// Filters\r
case "PictureDeblock":\r
queryParsed.DeBlock = int.Parse(value);\r
break;\r
case "PictureDecomb":\r
queryParsed.Decomb = "Off";\r
+ // Don't place custom here as it's handled in the filter panel\r
if (value == "2") queryParsed.Decomb = "Default";\r
break;\r
case "PictureDecombCustom":\r
case "0":\r
queryParsed.DeInterlace = "Off";\r
break;\r
+ // Don't place custom here as it's handled in the filter panel\r
case "2":\r
queryParsed.DeInterlace = "Fast";\r
break;\r
case "0":\r
queryParsed.DeNoise = "Off";\r
break;\r
+ // Don't place custom here as it's handled in the filter panel\r
case "2":\r
queryParsed.DeNoise = "Weak";\r
break;\r
queryParsed.VideoQuality = float.Parse(value);\r
break;\r
case "VideoQualityType": // The Type of Quality Mode used\r
- QualityMode = value;\r
+ qualityMode = value;\r
break;\r
case "VideoTargetSize":\r
queryParsed.VideoTargetSize = value;\r
}\r
\r
// Kill any Quality values we don't need.\r
- switch (QualityMode)\r
+ switch (qualityMode)\r
{\r
case "0": // FileSize\r
queryParsed.VideoQuality = -1;\r
queryParsed.VideoTargetSize = null;\r
break;\r
}\r
+ #endregion\r
\r
return queryParsed;\r
}\r
\r
- /// <summary>\r
- /// Export a preset to a Plist file readable by the Mac and Linux GUI's\r
- /// </summary>\r
- /// <param name="path"></param>\r
- public void Export(string path)\r
+ private static XmlNode loadFile(string filename)\r
{\r
- Writer = new XmlTextWriter("C:\\test.xml", Encoding.UTF8);\r
+ try\r
+ {\r
+ XmlNode root;\r
+\r
+ if (!File.Exists(filename))\r
+ return null;\r
+\r
+ StreamReader sr = File.OpenText(filename);\r
+ string fromfile = string.Empty;\r
+ int fileChar;\r
+ while ((fileChar = sr.Read()) != -1)\r
+ fromfile += Convert.ToChar(fileChar);\r
+\r
+ XmlDocument doc = new XmlDocument();\r
+ doc.LoadXml(fromfile);\r
+\r
+ root = doc;\r
+ if (!root.HasChildNodes)\r
+ {\r
+ MessageBox.Show(\r
+ "The Preset file you selected appears to be invlaid or from an older version of HandBrake",\r
+ "Error",\r
+ MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+ return null;\r
+ }\r
+\r
+ return root;\r
+ }\r
+ catch (Exception)\r
+ {\r
+ MessageBox.Show(\r
+ "The Preset file you selected appears to be invlaid or from an older version of HandBrake.\n\n Please note, if you are exporting from the MacGui you may need to rebuild your preset so that it uses the current preset plist format.\n The MacGui does not currently update user presets automatically.",\r
+ "Error",\r
+ MessageBoxButtons.OK, MessageBoxIcon.Error);\r
+ return null;\r
+ } \r
+ }\r
+ #endregion\r
+\r
+ #region Export\r
+\r
+ public static void Export(string path, QueryParser parsed)\r
+ {\r
+ XmlTextWriter xmlWriter;\r
+\r
+ xmlWriter = new XmlTextWriter(path, Encoding.UTF8);\r
\r
// Header\r
- Writer.WriteStartDocument();\r
- Writer.WriteDocType("plist", "-//Apple//DTD PLIST 1.0//EN",\r
+ xmlWriter.WriteStartDocument();\r
+ xmlWriter.WriteDocType("plist", "-//Apple//DTD PLIST 1.0//EN",\r
@"http://www.apple.com/DTDs/PropertyList-1.0.dtd", null);\r
\r
- Writer.WriteStartElement("plist");\r
- Writer.WriteStartElement("array");\r
+ xmlWriter.WriteStartElement("plist");\r
+ xmlWriter.WriteStartElement("array");\r
\r
// Add New Preset Here. Can write multiple presets here if required in future.\r
- WritePreset();\r
+ WritePreset(xmlWriter, parsed);\r
\r
// Footer\r
- Writer.WriteEndElement();\r
- Writer.WriteEndElement();\r
+ xmlWriter.WriteEndElement();\r
+ xmlWriter.WriteEndElement();\r
\r
- Writer.WriteEndDocument();\r
+ xmlWriter.WriteEndDocument();\r
\r
// Closeout\r
- Writer.Close();\r
+ xmlWriter.Close();\r
}\r
\r
- /// <summary>\r
- /// Write a Plist file\r
- /// </summary>\r
- private void WritePreset()\r
+ private static void WritePreset(XmlTextWriter xmlWriter, QueryParser parsed)\r
{\r
- Writer.WriteStartElement("dict");\r
- AudioListArrayDict();\r
- AddEncodeSettings();\r
+ xmlWriter.WriteStartElement("dict");\r
+ AudioListArrayDict(xmlWriter, parsed);\r
+ AddEncodeSettings(xmlWriter, parsed);\r
\r
- Writer.WriteEndElement();\r
+ xmlWriter.WriteEndElement();\r
}\r
\r
- /// <summary>\r
- /// Add all the encode settings to the preset\r
- /// </summary>\r
- private void AddEncodeSettings()\r
+ private static void AddEncodeSettings(XmlTextWriter xmlWriter, QueryParser parsed)\r
{\r
- AddEncodeElement("ChapterMarkers", "integer", string.Empty);\r
- AddEncodeElement("Default", "integer", string.Empty);\r
- AddEncodeElement("FileFormat", "String", string.Empty);\r
- AddBooleanElement("Folder", true);\r
- AddEncodeElement("Mp4HttpOptimize", "integer", string.Empty);\r
- AddEncodeElement("Mp4LargeFile", "integer", string.Empty);\r
- AddEncodeElement("Mp4iPodCompatible", "integer", string.Empty);\r
- AddEncodeElement("PictureAutoCrop", "integer", string.Empty);\r
- AddEncodeElement("PictureBottomCrop", "integer", string.Empty);\r
- AddEncodeElement("PictureDeblock", "integer", string.Empty);\r
- AddEncodeElement("PictureDecomb", "integer", string.Empty);\r
- AddEncodeElement("PictureDecombCustom", "string", string.Empty);\r
- AddEncodeElement("PictureDecombDeinterlace", "integer", string.Empty);\r
- AddEncodeElement("PictureDeinterlace", "integer", string.Empty);\r
- AddEncodeElement("PictureDeinterlaceCustom", "string", string.Empty);\r
- AddEncodeElement("PictureDenoise", "integer", string.Empty);\r
- AddEncodeElement("PictureDenoiseCustom", "string", string.Empty);\r
- AddEncodeElement("PictureDetelecine", "integer", string.Empty);\r
- AddEncodeElement("PictureDetelecineCustom", "string", string.Empty);\r
- AddEncodeElement("PictureHeight", "integer", string.Empty);\r
- AddEncodeElement("PictureKeepRatio", "integer", string.Empty);\r
- AddEncodeElement("PictureLeftCrop", "integer", string.Empty);\r
- AddEncodeElement("PicturePAR", "integer", string.Empty);\r
- AddEncodeElement("PictureRightCrop", "integer", string.Empty);\r
- AddEncodeElement("PictureTopCrop", "integer", string.Empty);\r
- AddEncodeElement("PictureWidth", "integer", string.Empty);\r
- AddEncodeElement("PresetBuildNumber", "string", string.Empty);\r
- AddEncodeElement("PresetDescription", "string", string.Empty);\r
- AddEncodeElement("PresetName", "string", string.Empty);\r
- AddEncodeElement("Type", "integer", string.Empty);\r
- AddEncodeElement("UsesMaxPictureSettings", "integer", string.Empty);\r
- AddEncodeElement("UsesPictureFilters", "integer", string.Empty);\r
- AddEncodeElement("UsesPictureSettings", "integer", string.Empty);\r
- AddEncodeElement("VideoAvgBitrate", "string", string.Empty);\r
- AddEncodeElement("VideoEncoder", "string", string.Empty);\r
- AddEncodeElement("VideoFramerate", "string", string.Empty);\r
- AddEncodeElement("VideoGrayScale", "integer", string.Empty);\r
- AddEncodeElement("VideoQualitySlider", "real", string.Empty);\r
- AddEncodeElement("VideoQualityType", "integer", string.Empty);\r
- AddEncodeElement("VideoTargetSize", "string", string.Empty);\r
- AddEncodeElement("VideoTurboTwoPass", "integer", string.Empty);\r
- AddEncodeElement("VideoTwoPass", "integer", string.Empty);\r
- AddEncodeElement("x264Option", "string", string.Empty);\r
+ AddEncodeElement(xmlWriter, "ChapterMarkers", "integer", parsed.ChapterMarkers ? "1" : "0");\r
+ AddEncodeElement(xmlWriter, "Default", "integer", string.Empty); // TODO\r
+ AddEncodeElement(xmlWriter, "FileFormat", "string", parsed.Format);\r
+ AddBooleanElement(xmlWriter, "Folder", true); // TODO \r
+ AddEncodeElement(xmlWriter, "Mp4HttpOptimize", "integer", parsed.OptimizeMP4 ? "1" : "0");\r
+ AddEncodeElement(xmlWriter, "Mp4LargeFile", "integer", parsed.LargeMP4 ? "1" : "0");\r
+ AddEncodeElement(xmlWriter, "Mp4iPodCompatible", "integer", parsed.IpodAtom ? "1" : "0");\r
+ AddEncodeElement(xmlWriter, "PictureAutoCrop", "integer", string.Empty); // TODO\r
+ AddEncodeElement(xmlWriter, "PictureBottomCrop", "integer", parsed.CropBottom);\r
+\r
+ // Filters - TODO Requires Some Logic to convert modes\r
+ AddEncodeElement(xmlWriter, "PictureDeblock", "integer", string.Empty);\r
+ AddEncodeElement(xmlWriter, "PictureDecomb", "integer", string.Empty);\r
+ AddEncodeElement(xmlWriter, "PictureDecombCustom", "string", string.Empty);\r
+ AddEncodeElement(xmlWriter, "PictureDecombDeinterlace", "integer", string.Empty); // TODO Requires Logic\r
+ AddEncodeElement(xmlWriter, "PictureDeinterlace", "integer", string.Empty);\r
+ AddEncodeElement(xmlWriter, "PictureDeinterlaceCustom", "string", string.Empty);\r
+ AddEncodeElement(xmlWriter, "PictureDenoise", "integer", string.Empty);\r
+ AddEncodeElement(xmlWriter, "PictureDenoiseCustom", "string", string.Empty);\r
+ AddEncodeElement(xmlWriter, "PictureDetelecine", "integer", string.Empty);\r
+ AddEncodeElement(xmlWriter, "PictureDetelecineCustom", "string", string.Empty);\r
+\r
+ AddEncodeElement(xmlWriter, "PictureHeight", "integer", parsed.Height.ToString());\r
+ AddEncodeElement(xmlWriter, "PictureKeepRatio", "integer", string.Empty);\r
+ AddEncodeElement(xmlWriter, "PictureLeftCrop", "integer", parsed.CropLeft);\r
+ AddEncodeElement(xmlWriter, "PicturePAR", "integer", string.Empty);\r
+ AddEncodeElement(xmlWriter, "PictureRightCrop", "integer", parsed.CropRight);\r
+ AddEncodeElement(xmlWriter, "PictureTopCrop", "integer", parsed.CropTop);\r
+ AddEncodeElement(xmlWriter, "PictureWidth", "integer", parsed.Width.ToString());\r
+\r
+ AddEncodeElement(xmlWriter, "PresetBuildNumber", "string", string.Empty);\r
+ AddEncodeElement(xmlWriter, "PresetDescription", "string", string.Empty);\r
+ AddEncodeElement(xmlWriter, "PresetName", "string", string.Empty);\r
+ AddEncodeElement(xmlWriter, "Type", "integer", string.Empty);\r
+\r
+ AddEncodeElement(xmlWriter, "UsesMaxPictureSettings", "integer", string.Empty);\r
+ AddEncodeElement(xmlWriter, "UsesPictureFilters", "integer", string.Empty);\r
+ AddEncodeElement(xmlWriter, "UsesPictureSettings", "integer", string.Empty);\r
+\r
+ AddEncodeElement(xmlWriter, "VideoAvgBitrate", "string", string.Empty);\r
+ AddEncodeElement(xmlWriter, "VideoEncoder", "string", string.Empty);\r
+ AddEncodeElement(xmlWriter, "VideoFramerate", "string", string.Empty);\r
+\r
+ AddEncodeElement(xmlWriter, "VideoGrayScale", "integer", parsed.Grayscale ? "1" : "0");\r
+ AddEncodeElement(xmlWriter, "VideoQualitySlider", "real", parsed.VideoQuality.ToString());\r
+ AddEncodeElement(xmlWriter, "VideoQualityType", "integer", string.Empty); // TODO Requires Logic\r
+ AddEncodeElement(xmlWriter, "VideoTargetSize", "string", parsed.VideoTargetSize);\r
+ AddEncodeElement(xmlWriter, "VideoTurboTwoPass", "integer", parsed.TurboFirstPass ? "1" : "0");\r
+ AddEncodeElement(xmlWriter, "VideoTwoPass", "integer", parsed.TwoPass ? "1" : "0");\r
+\r
+ AddEncodeElement(xmlWriter, "x264Option", "string", parsed.H264Query);\r
}\r
\r
- /// <summary>\r
- /// Add Preset setting + value\r
- /// </summary>\r
- /// <param name="keyName"></param>\r
- /// <param name="value"></param>\r
- private void AddBooleanElement(string keyName, bool value)\r
+ private static void AddBooleanElement(XmlTextWriter xmlWriter, string keyName, bool value)\r
{\r
- Writer.WriteStartElement("key");\r
- Writer.WriteString(keyName);\r
- Writer.WriteEndElement();\r
+ xmlWriter.WriteStartElement("key");\r
+ xmlWriter.WriteString(keyName);\r
+ xmlWriter.WriteEndElement();\r
if (value)\r
{\r
- Writer.WriteStartElement("true");\r
- Writer.WriteEndElement();\r
+ xmlWriter.WriteStartElement("true");\r
+ xmlWriter.WriteEndElement();\r
}\r
else\r
{\r
- Writer.WriteStartElement("false");\r
- Writer.WriteEndElement();\r
+ xmlWriter.WriteStartElement("false");\r
+ xmlWriter.WriteEndElement();\r
}\r
}\r
\r
- /// <summary>\r
- /// Add Preset setting + value\r
- /// </summary>\r
- /// <param name="keyName"></param>\r
- /// <param name="type"></param>\r
- /// <param name="value"></param>\r
- private void AddEncodeElement(string keyName, string type, string value)\r
+ private static void AddEncodeElement(XmlTextWriter xmlWriter, string keyName, string type, string value)\r
{\r
- Writer.WriteElementString("key", keyName);\r
- Writer.WriteElementString(type, value);\r
+ xmlWriter.WriteElementString("key", keyName);\r
+ xmlWriter.WriteElementString(type, value);\r
}\r
\r
- /// <summary>\r
- /// Add List of audio tracks\r
- /// </summary>\r
- private void AudioListArrayDict()\r
+ private static void AudioListArrayDict(XmlTextWriter xmlWriter, QueryParser parsed)\r
{\r
- Writer.WriteStartElement("key");\r
- Writer.WriteString("AudioList");\r
- Writer.WriteEndElement();\r
-\r
- Writer.WriteStartElement("array");\r
- AddAudioItem();\r
- AddAudioItem();\r
- Writer.WriteEndElement();\r
+ xmlWriter.WriteStartElement("key");\r
+ xmlWriter.WriteString("AudioList");\r
+ xmlWriter.WriteEndElement();\r
+\r
+ xmlWriter.WriteStartElement("array");\r
+ foreach (AudioTrack track in parsed.AudioInformation)\r
+ {\r
+ AddAudioItem(xmlWriter, track);\r
+ }\r
+ xmlWriter.WriteEndElement();\r
}\r
\r
- /// <summary>\r
- /// Add List of audio tracks\r
- /// </summary>\r
- private void AddAudioItem()\r
+ private static void AddAudioItem(XmlTextWriter xmlWriter, AudioTrack audioTrack)\r
{\r
- int bitrate = 448;\r
- string encoder = "AC3 Passthru";\r
- string mixdown = "AC3 Passthru";\r
- string sample = "Auto";\r
- int track = 1;\r
- double drc = 0.0;\r
- string desc = "English (AC3) (5.1 ch)";\r
+ string bitrate = audioTrack.Bitrate;\r
+ string encoder = audioTrack.Encoder;\r
+ string mixdown = audioTrack.MixDown;\r
+ string sample = audioTrack.SampleRate;\r
+ int track;\r
+ int.TryParse(audioTrack.Track, out track);\r
+ string drc = audioTrack.DRC;\r
+ string desc = "Automatic";\r
\r
- Writer.WriteStartElement("dict");\r
+ xmlWriter.WriteStartElement("dict");\r
\r
- Writer.WriteElementString("key", "AudioBitrate");\r
- Writer.WriteElementString("string", bitrate.ToString());\r
+ xmlWriter.WriteElementString("key", "AudioBitrate");\r
+ xmlWriter.WriteElementString("string", bitrate);\r
\r
- Writer.WriteElementString("key", "AudioEncoder");\r
- Writer.WriteElementString("string", encoder);\r
+ xmlWriter.WriteElementString("key", "AudioEncoder");\r
+ xmlWriter.WriteElementString("string", encoder);\r
\r
- Writer.WriteElementString("key", "AudioMixdown");\r
- Writer.WriteElementString("string", mixdown);\r
+ xmlWriter.WriteElementString("key", "AudioMixdown");\r
+ xmlWriter.WriteElementString("string", mixdown);\r
\r
- Writer.WriteElementString("key", "AudioSamplerate");\r
- Writer.WriteElementString("string", sample);\r
+ xmlWriter.WriteElementString("key", "AudioSamplerate");\r
+ xmlWriter.WriteElementString("string", sample);\r
\r
- Writer.WriteElementString("key", "AudioTrack");\r
- Writer.WriteElementString("integer", track.ToString());\r
+ xmlWriter.WriteElementString("key", "AudioTrack");\r
+ xmlWriter.WriteElementString("integer", track.ToString());\r
\r
- Writer.WriteElementString("key", "AudioTrackDRCSlider");\r
- Writer.WriteElementString("real", drc.ToString());\r
+ xmlWriter.WriteElementString("key", "AudioTrackDRCSlider");\r
+ xmlWriter.WriteElementString("real", drc.ToString());\r
\r
- Writer.WriteElementString("key", "AudioTrackDescription");\r
- Writer.WriteElementString("string", desc);\r
+ xmlWriter.WriteElementString("key", "AudioTrackDescription");\r
+ xmlWriter.WriteElementString("string", desc);\r
\r
- Writer.WriteEndElement();\r
+ xmlWriter.WriteEndElement();\r
}\r
+ #endregion\r
}\r
}
\ No newline at end of file
this.components = new System.ComponentModel.Container();\r
System.Windows.Forms.ContextMenuStrip notifyIconMenu;\r
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));\r
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();\r
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();\r
this.btn_restore = new System.Windows.Forms.ToolStripMenuItem();\r
this.DVD_Save = new System.Windows.Forms.SaveFileDialog();\r
this.ToolTip = new System.Windows.Forms.ToolTip(this.components);\r
this.check_optimiseMP4 = new System.Windows.Forms.CheckBox();\r
this.check_iPodAtom = new System.Windows.Forms.CheckBox();\r
this.data_chpt = new System.Windows.Forms.DataGridView();\r
+ this.number = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
+ this.name = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
this.ChaptersMenu = new System.Windows.Forms.ContextMenuStrip(this.components);\r
this.mnu_resetChapters = new System.Windows.Forms.ToolStripMenuItem();\r
this.btn_addPreset = new System.Windows.Forms.Button();\r
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();\r
this.openPreset = new System.Windows.Forms.OpenFileDialog();\r
this.File_ChapterImport = new System.Windows.Forms.OpenFileDialog();\r
- this.number = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
- this.name = new System.Windows.Forms.DataGridViewTextBoxColumn();\r
+ this.mnu_exportMacPreset = new System.Windows.Forms.ToolStripMenuItem();\r
notifyIconMenu = new System.Windows.Forms.ContextMenuStrip(this.components);\r
notifyIconMenu.SuspendLayout();\r
((System.ComponentModel.ISupportInitialize)(this.slider_videoQuality)).BeginInit();\r
this.check_turbo.Enabled = false;\r
this.check_turbo.Location = new System.Drawing.Point(146, 123);\r
this.check_turbo.Name = "check_turbo";\r
- this.check_turbo.Size = new System.Drawing.Size(99, 17);\r
+ this.check_turbo.Size = new System.Drawing.Size(101, 17);\r
this.check_turbo.TabIndex = 7;\r
this.check_turbo.Text = "Turbo first Pass";\r
this.ToolTip.SetToolTip(this.check_turbo, "Makes the first pass of a 2 pass encode faster.");\r
this.data_chpt.TabIndex = 3;\r
this.ToolTip.SetToolTip(this.data_chpt, resources.GetString("data_chpt.ToolTip"));\r
// \r
+ // number\r
+ // \r
+ dataGridViewCellStyle2.Format = "N0";\r
+ dataGridViewCellStyle2.NullValue = null;\r
+ this.number.DefaultCellStyle = dataGridViewCellStyle2;\r
+ this.number.Frozen = true;\r
+ this.number.HeaderText = "Chapter Number";\r
+ this.number.MaxInputLength = 3;\r
+ this.number.Name = "number";\r
+ this.number.Resizable = System.Windows.Forms.DataGridViewTriState.False;\r
+ this.number.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;\r
+ this.number.Width = 165;\r
+ // \r
+ // name\r
+ // \r
+ this.name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;\r
+ this.name.HeaderText = "Chapter Name";\r
+ this.name.Name = "name";\r
+ this.name.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;\r
+ // \r
// ChaptersMenu\r
// \r
this.ChaptersMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {\r
this.toolStripSeparator7,\r
this.btn_new_preset,\r
this.mnu_importMacPreset,\r
+ this.mnu_exportMacPreset,\r
this.mnu_SelectDefault});\r
this.PresetsToolStripMenuItem.Name = "PresetsToolStripMenuItem";\r
this.PresetsToolStripMenuItem.Size = new System.Drawing.Size(56, 20);\r
this.radio_cq.BackColor = System.Drawing.Color.Transparent;\r
this.radio_cq.Location = new System.Drawing.Point(336, 97);\r
this.radio_cq.Name = "radio_cq";\r
- this.radio_cq.Size = new System.Drawing.Size(105, 17);\r
+ this.radio_cq.Size = new System.Drawing.Size(110, 17);\r
this.radio_cq.TabIndex = 18;\r
this.radio_cq.Text = "Constant Quality:";\r
this.radio_cq.UseVisualStyleBackColor = false;\r
this.radio_avgBitrate.Checked = true;\r
this.radio_avgBitrate.Location = new System.Drawing.Point(336, 64);\r
this.radio_avgBitrate.Name = "radio_avgBitrate";\r
- this.radio_avgBitrate.Size = new System.Drawing.Size(112, 17);\r
+ this.radio_avgBitrate.Size = new System.Drawing.Size(116, 17);\r
this.radio_avgBitrate.TabIndex = 17;\r
this.radio_avgBitrate.TabStop = true;\r
this.radio_avgBitrate.Text = "Avg Bitrate (kbps):";\r
this.radio_targetFilesize.BackColor = System.Drawing.Color.Transparent;\r
this.radio_targetFilesize.Location = new System.Drawing.Point(336, 37);\r
this.radio_targetFilesize.Name = "radio_targetFilesize";\r
- this.radio_targetFilesize.Size = new System.Drawing.Size(107, 17);\r
+ this.radio_targetFilesize.Size = new System.Drawing.Size(108, 17);\r
this.radio_targetFilesize.TabIndex = 16;\r
this.radio_targetFilesize.Text = "Target Size (MB):";\r
this.radio_targetFilesize.UseVisualStyleBackColor = false;\r
this.check_2PassEncode.BackColor = System.Drawing.Color.Transparent;\r
this.check_2PassEncode.Location = new System.Drawing.Point(125, 100);\r
this.check_2PassEncode.Name = "check_2PassEncode";\r
- this.check_2PassEncode.Size = new System.Drawing.Size(106, 17);\r
+ this.check_2PassEncode.Size = new System.Drawing.Size(104, 17);\r
this.check_2PassEncode.TabIndex = 6;\r
this.check_2PassEncode.Text = "2-Pass Encoding";\r
this.check_2PassEncode.UseVisualStyleBackColor = false;\r
this.treeView_presets.ShowLines = false;\r
this.treeView_presets.Size = new System.Drawing.Size(240, 424);\r
this.treeView_presets.TabIndex = 0;\r
+ this.treeView_presets.MouseUp += new System.Windows.Forms.MouseEventHandler(this.treeview_presets_mouseUp);\r
this.treeView_presets.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView_presets_AfterSelect);\r
this.treeView_presets.KeyUp += new System.Windows.Forms.KeyEventHandler(this.treeView_presets_deleteKey);\r
- this.treeView_presets.MouseUp += new System.Windows.Forms.MouseEventHandler(this.treeview_presets_mouseUp);\r
// \r
// presets_menu\r
// \r
// \r
this.File_ChapterImport.Filter = "CSV Files|*.csv";\r
// \r
- // number\r
+ // mnu_exportMacPreset\r
// \r
- dataGridViewCellStyle1.Format = "N0";\r
- dataGridViewCellStyle1.NullValue = null;\r
- this.number.DefaultCellStyle = dataGridViewCellStyle1;\r
- this.number.Frozen = true;\r
- this.number.HeaderText = "Chapter Number";\r
- this.number.MaxInputLength = 3;\r
- this.number.Name = "number";\r
- this.number.Resizable = System.Windows.Forms.DataGridViewTriState.False;\r
- this.number.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;\r
- this.number.Width = 165;\r
- // \r
- // name\r
- // \r
- this.name.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill;\r
- this.name.HeaderText = "Chapter Name";\r
- this.name.Name = "name";\r
- this.name.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;\r
+ this.mnu_exportMacPreset.Name = "mnu_exportMacPreset";\r
+ this.mnu_exportMacPreset.Size = new System.Drawing.Size(194, 22);\r
+ this.mnu_exportMacPreset.Text = "Export";\r
+ this.mnu_exportMacPreset.Click += new System.EventHandler(this.mnu_exportMacPreset_Click);\r
// \r
// frmMain\r
// \r
private Button btn_export;\r
private DataGridViewTextBoxColumn number;\r
private DataGridViewTextBoxColumn name;\r
+ private ToolStripMenuItem mnu_exportMacPreset;\r
}\r
}
\ No newline at end of file