Skip to content

Commit

Permalink
Test pattern fixes and Mono compatibility
Browse files Browse the repository at this point in the history
Moved the test pattern context menu from GeometryPage to AppletForm and added a menu to allow direct selection of the test pattern.
  • Loading branch information
shuuryou committed May 9, 2020
1 parent 27e7833 commit 852ed18
Show file tree
Hide file tree
Showing 17 changed files with 906 additions and 547 deletions.
2 changes: 1 addition & 1 deletion crtcpl.sln
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 36,7 @@ Global
{864D91B2-45C1-4684-A4A0-A9F17BD72949}.Release|Any CPU.Build.0 = Release|Any CPU
{3EA43C76-9821-43BA-BA3C-4E3C13C7C0F7}.Debug|Any CPU.ActiveCfg = Debug|Win32
{3EA43C76-9821-43BA-BA3C-4E3C13C7C0F7}.Debug|Any CPU.Build.0 = Debug|Win32
{3EA43C76-9821-43BA-BA3C-4E3C13C7C0F7}.Mono|Any CPU.ActiveCfg = Release|Win32
{3EA43C76-9821-43BA-BA3C-4E3C13C7C0F7}.Mono|Any CPU.ActiveCfg = Release|x64
{3EA43C76-9821-43BA-BA3C-4E3C13C7C0F7}.Release|Any CPU.ActiveCfg = Release|Win32
{3EA43C76-9821-43BA-BA3C-4E3C13C7C0F7}.Release|Any CPU.Build.0 = Release|Win32
EndGlobalSection
Expand Down
145 changes: 143 additions & 2 deletions crtcpl/AppletForm.Designer.cs

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

29 changes: 29 additions & 0 deletions crtcpl/AppletForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 7,8 @@ namespace crtcpl
{
public partial class AppletForm : Form
{
private readonly TestPatternForm m_TestPatternForm = new TestPatternForm();

public AppletForm()
{
InitializeComponent();
Expand Down Expand Up @@ -55,6 57,7 @@ protected override void Dispose(bool disposing)
this.components.Dispose();
UCCom.ConnectionClosed -= UCCom_ConnectionClosed;
UCCom.ConnectionOpened -= UCCom_ConnectionOpened;
m_TestPatternForm.Dispose();
}
base.Dispose(disposing);
}
Expand Down Expand Up @@ -341,5 344,31 @@ private void SCREEN_BrightnessChanged(object sender, ScreenPageEventArgs e)

this.applyButton.Enabled = true;
}

private void showTestPatternToolStripMenuItem_Click(object sender, EventArgs e)
{
if (showTestPatternToolStripMenuItem.Checked)
{
m_TestPatternForm.Show();
this.TopMost = true;
}
else
{
m_TestPatternForm.Hide();
this.TopMost = false;
}
}

private void testPatternSelectionToolStripMenuItem_Click(object sender, EventArgs e)
{
int tag = int.Parse(((ToolStripMenuItem)sender).Tag.ToString(), NumberStyles.None);
TestPatternForm.TestPatternMode mode = (TestPatternForm.TestPatternMode)tag;

foreach (ToolStripMenuItem item in testPatternSelectionToolStripMenuItem.DropDownItems)
if (item != sender)
item.Checked = false;

m_TestPatternForm.SetTestPattern(mode);
}
}
}
39 changes: 39 additions & 0 deletions crtcpl/AppletForm.de.resx
Original file line number Diff line number Diff line change
Expand Up @@ -681,4 681,43 @@
<data name="$this.Text" xml:space="preserve">
<value>Bildschirmeinstellungen</value>
</data>
<data name="okButton.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="showTestPatternToolStripMenuItem.Text" xml:space="preserve">
<value>Te&amp;stbild einblenden</value>
</data>
<data name="screenAdjustToolStripMenuItem.Text" xml:space="preserve">
<value>Stan&amp;dard</value>
</data>
<data name="sMPTEColorBarToolStripMenuItem.Text" xml:space="preserve">
<value>&amp;SMPTE-Testbild</value>
</data>
<data name="fuBKTestCardToolStripMenuItem.Text" xml:space="preserve">
<value>&amp;FuBK-Testbild</value>
</data>
<data name="bWverticalToolStripMenuItem.Text" xml:space="preserve">
<value>S/W (&amp;vertikal)</value>
</data>
<data name="bWhorizontalToolStripMenuItem.Text" xml:space="preserve">
<value>S/W (&amp;horizontal)</value>
</data>
<data name="rGBverticalToolStripMenuItem.Text" xml:space="preserve">
<value>&amp;RGB (vertikal)</value>
</data>
<data name="rGBhorizontalToolStripMenuItem.Text" xml:space="preserve">
<value>R&amp;GB (horizontal)</value>
</data>
<data name="redScreenToolStripMenuItem.Text" xml:space="preserve">
<value>Rot&amp;er Bildschirm</value>
</data>
<data name="greenScreenToolStripMenuItem.Text" xml:space="preserve">
<value>Grün&amp;er Bildschirm</value>
</data>
<data name="blueScreenToolStripMenuItem.Text" xml:space="preserve">
<value>B&amp;lauer Bildschirm</value>
</data>
<data name="testPatternSelectionToolStripMenuItem.Text" xml:space="preserve">
<value>&amp;Testbild-Auswahl</value>
</data>
</root>
36 changes: 36 additions & 0 deletions crtcpl/AppletForm.fr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -663,4 663,40 @@
<data name="okButton.Text" xml:space="preserve">
<value>OK</value>
</data>
<data name="showTestPatternToolStripMenuItem.Text" xml:space="preserve">
<value>Afficher un motif de te&amp;st</value>
</data>
<data name="screenAdjustToolStripMenuItem.Text" xml:space="preserve">
<value>&amp;Défaut</value>
</data>
<data name="sMPTEColorBarToolStripMenuItem.Text" xml:space="preserve">
<value>Mire &amp;SMPTE</value>
</data>
<data name="fuBKTestCardToolStripMenuItem.Text" xml:space="preserve">
<value>Mire &amp;FuBK</value>
</data>
<data name="bWverticalToolStripMenuItem.Text" xml:space="preserve">
<value>N/&amp;B (verticale)</value>
</data>
<data name="bWhorizontalToolStripMenuItem.Text" xml:space="preserve">
<value>N/B (&amp;horizontale)</value>
</data>
<data name="rGBverticalToolStripMenuItem.Text" xml:space="preserve">
<value>&amp;RGB (verticale)</value>
</data>
<data name="rGBhorizontalToolStripMenuItem.Text" xml:space="preserve">
<value>R&amp;GB (horizontale)</value>
</data>
<data name="redScreenToolStripMenuItem.Text" xml:space="preserve">
<value>Écran roug&amp;e</value>
</data>
<data name="greenScreenToolStripMenuItem.Text" xml:space="preserve">
<value>Écra&amp;n vert</value>
</data>
<data name="blueScreenToolStripMenuItem.Text" xml:space="preserve">
<value>&amp;Écran bleu</value>
</data>
<data name="testPatternSelectionToolStripMenuItem.Text" xml:space="preserve">
<value>Sélec&amp;tion de la mire</value>
</data>
</root>
36 changes: 36 additions & 0 deletions crtcpl/AppletForm.ja.resx
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 144,40 @@
<data name="$this.Text" xml:space="preserve">
<value>画面設定</value>
</data>
<data name="showTestPatternToolStripMenuItem.Text" xml:space="preserve">
<value>テストパターンを表示(&amp;S)</value>
</data>
<data name="screenAdjustToolStripMenuItem.Text" xml:space="preserve">
<value>既定のパターン(&amp;D)</value>
</data>
<data name="sMPTEColorBarToolStripMenuItem.Text" xml:space="preserve">
<value>SMPTEのカラーバー(&amp;S)</value>
</data>
<data name="fuBKTestCardToolStripMenuItem.Text" xml:space="preserve">
<value>FuBKのテストパターン(&amp;F)</value>
</data>
<data name="bWverticalToolStripMenuItem.Text" xml:space="preserve">
<value>水平の白黒バー(&amp;B)</value>
</data>
<data name="bWhorizontalToolStripMenuItem.Text" xml:space="preserve">
<value>垂直の白黒バー(&amp;B)</value>
</data>
<data name="rGBverticalToolStripMenuItem.Text" xml:space="preserve">
<value>水平のRGBバー(&amp;R)</value>
</data>
<data name="rGBhorizontalToolStripMenuItem.Text" xml:space="preserve">
<value>垂直のRGBバー(&amp;G)</value>
</data>
<data name="redScreenToolStripMenuItem.Text" xml:space="preserve">
<value>赤(&amp;E)</value>
</data>
<data name="greenScreenToolStripMenuItem.Text" xml:space="preserve">
<value>緑(&amp;N)</value>
</data>
<data name="blueScreenToolStripMenuItem.Text" xml:space="preserve">
<value>青(&amp;L)</value>
</data>
<data name="testPatternSelectionToolStripMenuItem.Text" xml:space="preserve">
<value>テストパターンの選択(&amp;T)</value>
</data>
</root>
Loading

0 comments on commit 852ed18

Please sign in to comment.