Skip to content

Commit

Permalink
Other Tabs, Reboot Button
Browse files Browse the repository at this point in the history
  • Loading branch information
garrynewman committed Aug 21, 2020
1 parent 92135e2 commit 7715e4a
Show file tree
Hide file tree
Showing 7 changed files with 174 additions and 230 deletions.
70 changes: 58 additions & 12 deletions UI/Composer.Designer.cs

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

34 changes: 34 additions & 0 deletions UI/Composer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,39 @@ private void OpenControl4Reddit( object sender, EventArgs e )
{
System.Diagnostics.Process.Start( $"https://www.reddit.com/r/C4diy/" );
}

private void UpdateCertificates( object sender, EventArgs e )
{
var log = new LogWindow( MainWindow );

log.WriteNormal( "Copying To Composer\n" );
if ( !PatchComposer( log ) )
{
return;
}
log.WriteNormal( "\n\n" );
}


bool PatchComposer( LogWindow log )
{
var configFolder = $"{Environment.GetFolderPath( Environment.SpecialFolder.ApplicationData )}\\Control4\\Composer";

CopyFile( log, $"Certs/{Constants.ComposerCertName}", $"{configFolder}\\{Constants.ComposerCertName}" );
CopyFile( log, $"Certs/composer.p12", $"{configFolder}\\composer.p12" );

return true;
}

private void CopyFile( LogWindow log, string a, string b )
{
log.WriteNormal( $"Copying " );
log.WriteHighlight( a );
log.WriteNormal( $" to " );
log.WriteHighlight( b );
log.WriteNormal( $"\n" );

System.IO.File.Copy( a, b, true );
}
}
}
5 changes: 0 additions & 5 deletions UI/Composer.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,4 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="label3.Text" xml:space="preserve">
<value>We need to stop Composer asking Control4 if you're a dealer. To do this we change the ComposerPro_LicensingService_Licensing setting in ComposerPro.exe.config.

You can do this yourself, or we can do it for you by pressing the button. We'll back up the old config file for you.</value>
</data>
</root>
Loading

0 comments on commit 7715e4a

Please sign in to comment.