-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b1a6bac
commit 729d8d6
Showing
1 changed file
with
52 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
// Copyright (c) 2014-2018, Els_kom org. | ||
// https://github.com/Elskom/ | ||
// All rights reserved. | ||
// license: MIT, see LICENSE for more details. | ||
|
||
namespace callbacktest_plugin | ||
{ | ||
public partial class CallbacktestForm : System.Windows.Forms.Form | ||
{ | ||
public CallbacktestForm() | ||
{ | ||
InitializeComponent(); | ||
} | ||
internal int callbacksetting1; | ||
internal int callbacksetting1_temp; | ||
|
||
private void CheckBox1_CheckedChanged(object sender, System.EventArgs e) | ||
{ | ||
if (CheckBox1.Checked == true) | ||
{ | ||
callbacksetting1_temp = 1; | ||
} | ||
else if (callbacksetting1_temp > 0) | ||
{ | ||
callbacksetting1_temp = 0; | ||
} | ||
} | ||
|
||
private void CallbacktestForm_FormClosing(object sender, System.Windows.Forms.FormClosingEventArgs e) | ||
{ | ||
Els_kom_Core.Classes.SettingsFile.Settingsxml.ReopenFile(); | ||
if (callbacksetting1 != callbacksetting1_temp) | ||
{ | ||
callbacksetting1 = callbacksetting1_temp; | ||
Els_kom_Core.Classes.SettingsFile.Settingsxml.Write("ShowTestMessages", callbacksetting1.ToString()); | ||
} | ||
Els_kom_Core.Classes.SettingsFile.Settingsxml.Save(); | ||
} | ||
|
||
private void CallbacktestForm_Load(object sender, System.EventArgs e) | ||
{ | ||
callbacksetting1 = 0; | ||
callbacksetting1_temp = 0; | ||
Els_kom_Core.Classes.SettingsFile.Settingsxml.ReopenFile(); | ||
int.TryParse(Els_kom_Core.Classes.SettingsFile.Settingsxml.Read("ShowTestMessages"), out callbacksetting1); | ||
if (callbacksetting1 > 0) | ||
{ | ||
CheckBox1.Checked = true; | ||
} | ||
} | ||
} | ||
} |