-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add settings save and load functionality
- Loading branch information
1 parent
515d533
commit 28fa81f
Showing
11 changed files
with
168 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
DualTerminal/obj | ||
/DualTerminal/bin/Debug | ||
/DualTerminal/bin/Release/DualTerminal.pdb |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> | ||
<Profiles> | ||
<Profile Name="(Default)" /> | ||
</Profiles> | ||
<Settings /> | ||
</SettingsFile> | ||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="DualTerminal.Properties" GeneratedClassName="Settings"> | ||
<Profiles /> | ||
<Settings> | ||
<Setting Name="port1" Type="System.String" Scope="User"> | ||
<Value Profile="(Default)">COM1</Value> | ||
</Setting> | ||
<Setting Name="port2" Type="System.String" Scope="User"> | ||
<Value Profile="(Default)">COM2</Value> | ||
</Setting> | ||
<Setting Name="baudrate" Type="System.Int32" Scope="User"> | ||
<Value Profile="(Default)">9600</Value> | ||
</Setting> | ||
</Settings> | ||
</SettingsFile> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
namespace DualTerminal.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. | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<configSections> | ||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > | ||
<section name="DualTerminal.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> | ||
</sectionGroup> | ||
</configSections> | ||
<userSettings> | ||
<DualTerminal.Properties.Settings> | ||
<setting name="port1" serializeAs="String"> | ||
<value>COM1</value> | ||
</setting> | ||
<setting name="port2" serializeAs="String"> | ||
<value>COM2</value> | ||
</setting> | ||
<setting name="baudrate" serializeAs="String"> | ||
<value>9600</value> | ||
</setting> | ||
</DualTerminal.Properties.Settings> | ||
</userSettings> | ||
</configuration> |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<configSections> | ||
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > | ||
<section name="DualTerminal.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> | ||
</sectionGroup> | ||
</configSections> | ||
<userSettings> | ||
<DualTerminal.Properties.Settings> | ||
<setting name="port1" serializeAs="String"> | ||
<value>COM1</value> | ||
</setting> | ||
<setting name="port2" serializeAs="String"> | ||
<value>COM2</value> | ||
</setting> | ||
<setting name="baudrate" serializeAs="String"> | ||
<value>9600</value> | ||
</setting> | ||
</DualTerminal.Properties.Settings> | ||
</userSettings> | ||
</configuration> |