Skip to content

Commit 88e0160

Browse files
added updater
1 parent b5336d0 commit 88e0160

File tree

13 files changed

+88
-38
lines changed

13 files changed

+88
-38
lines changed

ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
### Installed product versions
22
- Visual Studio: [example 2017 Professional]
3-
- This extension: [example 1.1.21]
3+
44

55
### Description
66
Replace this text with a short description

src/Converter/Converter.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<AppDesignerFolder>Properties</AppDesignerFolder>
1010
<RootNamespace>Converter</RootNamespace>
1111
<AssemblyName>Converter</AssemblyName>
12-
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
12+
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
1313
<FileAlignment>512</FileAlignment>
1414
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1515
<TargetFrameworkProfile />
@@ -55,6 +55,9 @@
5555
<Version>0.5.91</Version>
5656
</PackageReference>
5757
</ItemGroup>
58+
<ItemGroup>
59+
<None Include="app.config" />
60+
</ItemGroup>
5861
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
5962
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
6063
Other similar extension points exist, see Microsoft.Common.targets.

src/Converter/app.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/></startup></configuration>

src/DemoPlayer/DemoPlayer.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<RootNamespace>DemoPlayer</RootNamespace>
1111
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1212
<AssemblyName>DemoPlayer</AssemblyName>
13-
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
13+
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
1515
<IsWebBootstrapper>false</IsWebBootstrapper>
1616
<CodeContractsAssemblyMode>0</CodeContractsAssemblyMode>
@@ -133,6 +133,9 @@
133133
<Version>3.0.1</Version>
134134
</PackageReference>
135135
</ItemGroup>
136+
<ItemGroup>
137+
<None Include="app.config" />
138+
</ItemGroup>
136139
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
137140
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
138141
Other similar extension points exist, see Microsoft.Common.targets.

src/DemoPlayer/app.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/></startup></configuration>

src/DemoRecorder/DemoRecorder.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<RootNamespace>DemoRecorder</RootNamespace>
1111
<AssemblyName>DemoRecorder</AssemblyName>
1212
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
13-
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
13+
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
1515
<IsWebBootstrapper>false</IsWebBootstrapper>
1616
<CodeContractsAssemblyMode>0</CodeContractsAssemblyMode>
@@ -133,6 +133,9 @@
133133
<Version>3.0.1</Version>
134134
</PackageReference>
135135
</ItemGroup>
136+
<ItemGroup>
137+
<None Include="app.config" />
138+
</ItemGroup>
136139
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
137140
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
138141
Other similar extension points exist, see Microsoft.Common.targets.

src/DemoRecorder/app.config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<configuration>
3+
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7"/></startup></configuration>

src/ShaderForm/DemoModelFactory/ShaderFile.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ private void LoadShader(string fileName)
5656
}
5757
catch (Exception e)
5858
{
59-
//try reload in 2 seconds, because sometimes file system is still busy
60-
Timer timer = new Timer
61-
{
62-
Interval = 2000
63-
}; //TODO: is this executed on main thread?
64-
timer.Tick += (a, b) =>
59+
//try reload in 2 seconds, because sometimes file system is still busy
60+
Timer timer = new Timer
61+
{
62+
Interval = 200
63+
}; //TODO: is this executed on main thread?
64+
timer.Tick += (a, b) =>
6565
{
6666
timer.Stop();
6767
timer.Dispose();

src/ShaderForm/FormMain.Designer.cs

Lines changed: 21 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ShaderForm/FormMain.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using ControlClassLibrary;
1+
using AutoUpdateViaGitHubRelease;
2+
using ControlClassLibrary;
23
using ShaderForm.Camera;
34
using ShaderForm.Demo;
45
using ShaderForm.Graph;
@@ -10,6 +11,7 @@
1011
using System.IO;
1112
using System.Linq;
1213
using System.Numerics;
14+
using System.Reflection;
1315
using System.Windows.Forms;
1416
using Zenseless.ExampleFramework;
1517

@@ -29,6 +31,19 @@ public partial class FormMain : Form
2931
public FormMain()
3032
{
3133
InitializeComponent();
34+
var update = new Update("danielscherzer", "ShaderForm", Assembly.GetExecutingAssembly(), Path.GetTempPath());
35+
update.PropertyChanged += (s, a) =>
36+
{
37+
if(update.Available)
38+
{
39+
updateAvailableToolStripMenuItem.Click += (_, __) =>
40+
{
41+
update.Install();
42+
Close();
43+
};
44+
updateAvailableToolStripMenuItem.Visible = true;
45+
}
46+
};
3247

3348
string demoFilter = DefaultFiles.GetDemoExtension() + " (*" + DefaultFiles.GetDemoExtension() + ")|*" + DefaultFiles.GetDemoExtension();
3449
menuSizeSetting.SelectedIndexChanged += (sender, e) => glControl.Invalidate();

0 commit comments

Comments
 (0)