Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.vs/

# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
bin
obj
Expand Down
17 changes: 17 additions & 0 deletions Configuration/Configuration/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
using System.Windows;
using AlarmWorkflow.Shared.Diagnostics;
using AlarmWorkflow.Shared.Diagnostics.Reports;
using AlarmWorkflow.Windows.Configuration.Properties;
using AutoUpdaterDotNET;

namespace AlarmWorkflow.Windows.Configuration
{
Expand All @@ -39,6 +41,21 @@ public App()
{
Logger.Instance.Initialize(ComponentName);
ErrorReportManager.RegisterAppDomainUnhandledExceptionListener(ComponentName);

ConfigureAutoUpdate();
}

#endregion

#region Methods

private void ConfigureAutoUpdate()
{
AutoUpdater.OpenDownloadPage = true;
AutoUpdater.ReportErrors = false;
AutoUpdater.AppTitle = "AlarmWorkflow";

AutoUpdater.Start(Settings.Default.AutoUpdateURL);
}

#endregion
Expand Down
21 changes: 13 additions & 8 deletions Configuration/Configuration/Configuration.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@
<Reference Include="AlarmWorkflow.Windows.UIContracts.dll">
<HintPath>..\..\Build\AlarmWorkflow.Windows.UIContracts.dll</HintPath>
</Reference>
<Reference Include="AutoUpdater.NET, Version=1.4.11.0, Culture=neutral, PublicKeyToken=501435c91b35f4bc, processorArchitecture=MSIL">
<HintPath>..\packages\Autoupdater.NET.Official.1.4.11\lib\net40\AutoUpdater.NET.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Configuration.Install" />
<Reference Include="System.Data" />
Expand All @@ -85,7 +88,13 @@
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="Helper.cs" />
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="ServiceHelper.cs" />
<Compile Include="Settings.cs" />
<Compile Include="TypeEditors\BooleanTypeEditor.xaml.cs">
<DependentUpon>BooleanTypeEditor.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -306,25 +315,21 @@
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="app.config">
<SubType>Designer</SubType>
</None>
<None Include="Resources\ObjectTestDatabase.xsd">
<SubType>Designer</SubType>
</None>
<None Include="packages.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<None Include="Resources\ObjectTestDatabase.xsd">
<SubType>Designer</SubType>
</None>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
Expand Down
11 changes: 10 additions & 1 deletion Configuration/Configuration/Properties/Settings.Designer.cs

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

12 changes: 7 additions & 5 deletions Configuration/Configuration/Properties/Settings.settings
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="AlarmWorkflow.Windows.Configuration.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="AutoUpdateURL" Type="System.String" Scope="Application">
<Value Profile="(Default)">https://www.openfiresource.de/release.xml</Value>
</Setting>
</Settings>
</SettingsFile>
28 changes: 28 additions & 0 deletions Configuration/Configuration/Settings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
namespace AlarmWorkflow.Windows.Configuration.Properties {


// This class allows you to handle specific events on the settings class:
// The SettingChanging event is raised before a setting's value is changed.
// The PropertyChanged event is raised after a setting's value is changed.
// The SettingsLoaded event is raised after the setting values are loaded.
// The SettingsSaving event is raised before the setting values are saved.
internal sealed partial class Settings {

public Settings() {
// // To add event handlers for saving and changing settings, uncomment the lines below:
//
// this.SettingChanging += this.SettingChangingEventHandler;
//
// this.SettingsSaving += this.SettingsSavingEventHandler;
//
}

private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
// Add code to handle the SettingChangingEvent event here.
}

private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
// Add code to handle the SettingsSaving event here.
}
}
}
15 changes: 14 additions & 1 deletion Configuration/Configuration/app.config
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="AlarmWorkflow.Windows.Configuration.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup>
<applicationSettings>
<AlarmWorkflow.Windows.Configuration.Properties.Settings>
<setting name="AutoUpdateURL" serializeAs="String">
<value>https://www.openfiresource.de/release.xml</value>
</setting>
</AlarmWorkflow.Windows.Configuration.Properties.Settings>
</applicationSettings>
</configuration>
4 changes: 4 additions & 0 deletions Configuration/Configuration/packages.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Autoupdater.NET.Official" version="1.4.11" targetFramework="net46" />
</packages>