Skip to content

Commit

Permalink
Merge pull request #13 from Myriadbits/Cleanup
Browse files Browse the repository at this point in the history
Cleanup compiler errors + fix form resizing issues
  • Loading branch information
Myriadbits authored Feb 19, 2023
2 parents 78b3a21 + 61c9414 commit 64b6282
Show file tree
Hide file tree
Showing 22 changed files with 1,036 additions and 1,759 deletions.
526 changes: 39 additions & 487 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion MXF/Entries/MXFANCPacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ static MXFANCPacket()
m_DIDDescription.Add(combinedDID, string.Format("{0} ({1})", parts[5], parts[4]));
//Debug.WriteLine("combinedDID = {0:X4}, Name = {1} ({2})", combinedDID, parts[5], parts[4]);
}
catch (Exception ex)
catch (Exception)
{
}
}
Expand Down
2 changes: 1 addition & 1 deletion MXF/Entries/MXFEntryCCData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public MXFEntryCCData(IKLVStreamReader reader)

// When this object is not valid, set the type to filler
// TODO this does not seem to be the correct thing to do!
if (this.Valid.HasValue && !this.Valid.Value);
//if (this.Valid.HasValue && !this.Valid.Value);
//this.m_eType = MXFObjectType.Filler;
}

Expand Down
3 changes: 1 addition & 2 deletions MXF/MXFFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,9 @@ protected async Task<MXFFile> ParseAsync(IProgress<TaskReport> overallProgress =
ct.ThrowIfCancellationRequested();
}
// TODO be more selective with the exception
catch (ArgumentException e)
catch (ArgumentException)
{
// error in klv-stream

long lastgoodPos = parser.Current.Offset + parser.Current.TotalLength;
if (!parser.SeekForNextPotentialKey(out long newOffset))
{
Expand Down
109 changes: 67 additions & 42 deletions MXFInspect/AboutForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions MXFInspect/AboutForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ private void linkLabel2_LinkClicked(object sender, LinkLabelLinkClickedEventArgs
vis = false;

this.lblTitle.Visible = !vis;
this.lblContributors.Visible = !vis;
this.lblVersion.Visible = !vis;
this.lblCopyright.Visible = !vis;
this.llMyriadbits.Visible = !vis;
Expand Down
64 changes: 2 additions & 62 deletions MXFInspect/AboutForm.resx
Original file line number Diff line number Diff line change
@@ -1,64 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
Expand Down Expand Up @@ -121,7 +61,7 @@
<data name="pbLogo.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAABOwAAAB4CAIAAADOn/qUAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wgAADsIBFShKgAAAABZ0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMDvo9WkAAH7SSURBVHhe7b1/0K1X
vAAADrwBlbxySQAAABZ0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMDvo9WkAAH7SSURBVHhe7b1/0K1X
dR6WGRjDOCSlNhlTWyZ2h7RkomaITTEpio1jTZAxYUStENmiFFyREKNibMAVgYApMbhVY2GDR5MwNRVg
q4EBNRZBg2kqY0HkQSayIjGXGbmRsNJ806qVxnOdwYz+oGv/WHuv9ay11/vu7/vO1b3X+5lv7nv2u579
7Getvd/3u/uc853zp76xsLCwsLCwsLCwsLCwsHCBADexjz70lYce/Xp7nHB0tjQBMvr12vgKdS5RhbNH
Expand Down
10 changes: 6 additions & 4 deletions MXFInspect/CustomControls/LogicalTreeListView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Runtime.Versioning;
using System.Windows.Forms;

namespace Myriadbits.MXFInspect
Expand Down Expand Up @@ -59,12 +60,13 @@ private void SetupColumns()
this.ColumnMXFObject.Width = 276;
this.ColumnMXFObject.Renderer = TreeColumnRenderer;

Pen pen = new Pen(Color.Black, 1.001f);
pen.DashStyle = System.Drawing.Drawing2D.DashStyle.Dot;
this.TreeColumnRenderer.LinePen = pen;
if (OperatingSystem.IsWindows())
{
base.SetupTreeColumnRenderer();
}

this.RebuildColumns();
}
}

protected override void Tree_FormatCell(object sender, FormatCellEventArgs e)
{
Expand Down
Loading

0 comments on commit 64b6282

Please sign in to comment.