Skip to content

Commit

Permalink
Added a button to test the configuration settings
Browse files Browse the repository at this point in the history
  • Loading branch information
easly1989 committed Sep 10, 2019
1 parent b58ee42 commit dbd6ecf
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 4 deletions.
12 changes: 12 additions & 0 deletions DFAssist/Helpers/DFAssistUIInteractionHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public void Subscribe()
_mainControl.TelegramCheckBox.CheckStateChanged += EnableTelegramOnCheckedChanged;
_mainControl.PushBulletCheckbox.CheckStateChanged += EnablePushBulletOnCheckedChanged;
_mainControl.ClearLogButton.Click += ClearLogsButton_Click;
_mainControl.TestConfigurationButton.Click += TestConfigurationButton_Click;

}

Expand All @@ -60,6 +61,7 @@ public void UnSubscribe()
_mainControl.TelegramCheckBox.CheckStateChanged -= EnableTelegramOnCheckedChanged;
_mainControl.PushBulletCheckbox.CheckStateChanged -= EnablePushBulletOnCheckedChanged;
_mainControl.ClearLogButton.Click -= ClearLogsButton_Click;
_mainControl.TestConfigurationButton.Click -= TestConfigurationButton_Click;
}

private void DisableToastsOnCheckedChanged(object sender, EventArgs e)
Expand Down Expand Up @@ -145,6 +147,16 @@ private void ClearLogsButton_Click(object sender, EventArgs e)
_mainControl.LoggingRichTextBox.Clear();
}

private void TestConfigurationButton_Click(object sender, EventArgs e)
{
var title = _localizationRepository.GetText("ui-toast-notification-test-title");
var message = _localizationRepository.GetText("ui-toast-notification-test-message");
ToastHelper.Instance.SendNotification(title, message);
TelegramHelper.Instance.SendNotification(title, message);
PushBulletHelper.Instance.SendNotification(title, message);
TTSHelper.Instance.SendNotification(_localizationRepository.GetText("ui-tts-notification-test-title"), _localizationRepository.GetText("ui-tts-notification-test-message"));
}

public void Dispose()
{
UnSubscribe();
Expand Down
13 changes: 13 additions & 0 deletions DFAssist/MainControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class MainControl : UserControl
public GroupBox GeneralSettings;

public Button ClearLogButton;
public Button TestConfigurationButton;

public Label LanguageLabel;
public Label AppTitle;
Expand Down Expand Up @@ -74,6 +75,7 @@ private void InitializeComponent()
_mainTabPage = new TabPage();
_mainTableLayout = new TableLayoutPanel();
ClearLogButton = new Button();
TestConfigurationButton = new Button();
LoggingRichTextBox = new RichTextBox();
AppTitle = new Label();
_copyrightLink = new LinkLabel();
Expand Down Expand Up @@ -132,6 +134,16 @@ private void InitializeComponent()
LanguageComboBox.Name = "LanguageComboBox";
LanguageComboBox.Size = new Size(390, 25);
LanguageComboBox.TabIndex = 0;
//
// _testConfigurationButton
//
TestConfigurationButton.AutoSize = true;
TestConfigurationButton.Name = "TestConfigurationButton";
TestConfigurationButton.Location = new Point(6, 45);
TestConfigurationButton.MinimumSize = new Size(100, 25);
TestConfigurationButton.TabIndex = 0;
TestConfigurationButton.Text = "Test Configuration";
TestConfigurationButton.UseVisualStyleBackColor = true;
//
// _disableToasts
//
Expand Down Expand Up @@ -400,6 +412,7 @@ private void InitializeComponent()
GeneralSettings.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right;
GeneralSettings.Controls.Add(LanguageLabel);
GeneralSettings.Controls.Add(LanguageComboBox);
GeneralSettings.Controls.Add(TestConfigurationButton);
GeneralSettings.Name = "GeneralSettings";
GeneralSettings.TabStop = false;
GeneralSettings.Text = "General Settings";
Expand Down
2 changes: 2 additions & 0 deletions DFAssist/Resources/localization/de-de.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"ui-pushbullet-token-display-text": "Zugriffstoken",
"ui-pushbullet-deviceid-display-text": "Geräte-ID",

"ui-test-settings-display-text": "Konfiguration testen",

"ui-enable-test-environment": "Testumgebung aktivieren",

"ui-update-available-message": "Es ist eine aktualisierte Version des DFAssist-Plugins vorhanden. Jetzt aktualisieren? \\ n \\ n (Wenn ein Update für ACT vorhanden ist, müssen Sie zuerst auf Nein klicken und ACT aktualisieren.)",
Expand Down
2 changes: 2 additions & 0 deletions DFAssist/Resources/localization/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"ui-pushbullet-token-display-text": "Access Token",
"ui-pushbullet-deviceid-display-text": "Device Id",

"ui-test-settings-display-text": "Test Configuration",

"ui-enable-test-environment": "Enable Test Environment",

"ui-update-available-message": "There is an updated version of the DFAssist Plugin. Update it now?\n\n(If there is an update to ACT, you should click No and update ACT first.)",
Expand Down
2 changes: 2 additions & 0 deletions DFAssist/Resources/localization/fr-fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"ui-pushbullet-token-display-text": "Jeton",
"ui-pushbullet-deviceid-display-text": "Identifiant de device",

"ui-test-settings-display-text": "Test de configuration",

"ui-enable-test-environment": "Activer l'environnement de test",

"ui-update-available-message": "Il existe une version mise à jour du plug-in DFAssist. Mettez-le à jour maintenant?\n\n(S'il y a une mise à jour vers ACT, vous devez cliquer sur Non et mettre à jour ACT en premier.)",
Expand Down
2 changes: 2 additions & 0 deletions DFAssist/Resources/localization/ja-jp.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"ui-pushbullet-token-display-text": "アクセストークン",
"ui-pushbullet-deviceid-display-text": "デバイスID",

"ui-test-settings-display-text": "テスト構成",

"ui-enable-test-environment": "テスト環境を有効にする",

"ui-update-available-message": "DFAssistプラグインの更新版があります。 今すぐ更新しますか\n\nACTが更新された場合は、[いいえ]をクリックしてからACTを更新してください。",
Expand Down
2 changes: 2 additions & 0 deletions DFAssist/Resources/localization/ko-kr.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
"ui-pushbullet-token-display-text": "액세스 토큰",
"ui-pushbullet-deviceid-display-text": "장치 아이디",

"ui-test-settings-display-text": "테스트 구성",

"ui-enable-test-environment": "테스트 환경 사용",

"ui-update-available-message": "DFAssist Plugin의 업데이트 된 버전이 있습니다. 지금 업데이트 하시겠습니까?\n\n(ACT에 대한 업데이트가있는 경우, 아니요를 클릭하고 먼저 ACT를 업데이트해야합니다.)",
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,11 @@ You can download the latest binaries from [here](https://github.com/easly1989/ff
### Add the plugin to ACT
- As usual add the plugin in ACT, after the [FFXIV_Parsing_Plugin](https://github.com/ravahn/FFXIV_ACT_Plugin) by [ravahn](https://github.com/ravahn)
![install](https://github.com/easly1989/ffxiv_act_dfassist/blob/master/images/install_1.png)
- If everthing went ok you will see this toast in the bottom right corner of the screen
![toast](https://github.com/easly1989/ffxiv_act_dfassist/blob/master/images/install_2.png)
- Once installed you can go into the plugin tab and edit the settings
- You can check the default settings, or test your custom settings clicking the "Test Configuration" button located in the General Settings panel
![settings](https://github.com/easly1989/ffxiv_act_dfassist/blob/master/images/install_2.png)
- By default you should see this when clicking the Test Configuration button (unless you have changed the settings)
![toast](https://github.com/easly1989/ffxiv_act_dfassist/blob/master/images/install_3.png)
- Congratulations! You did it! (:

## Building from Sources
Expand Down
4 changes: 2 additions & 2 deletions SharedAssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
// to distinguish one build from another. AssemblyFileVersion is specified
// in AssemblyVersionInfo.cs so that it can be easily incremented by the
// automated build process.
[assembly: AssemblyVersion("2.0.5")]
[assembly: AssemblyVersion("2.0.6")]

// By default, the "Product version" shown in the file properties window is
// the same as the value specified for AssemblyFileVersionAttribute.
// Set AssemblyInformationalVersionAttribute to be the same as
// AssemblyVersionAttribute so that the "Product version" in the file
// properties window matches the version displayed in the GAC shell extension.
[assembly: AssemblyInformationalVersion("2.0.5")] // a.k.a. "Product version"
[assembly: AssemblyInformationalVersion("2.0.6")] // a.k.a. "Product version"

Binary file modified images/install_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/install_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dbd6ecf

Please sign in to comment.