[GH-ISSUE #92] Possible bug in btDisable.Text = (IsDkimAgentTransportInstalled ? "Disable" : "Enable") #70

Closed
opened 2026-02-26 10:35:36 +03:00 by kerem · 3 comments
Owner

Originally created by @gogglespisano on GitHub (Jul 28, 2015).
Original GitHub issue: https://github.com/Pro/dkim-exchange/issues/92

In:
private void ExchangeTransportServiceWindows_Load(object sender, EventArgs e)
{
this.RefreshTransportServiceAgents();

        bool IsDkimAgentTransportInstalled = ExchangeServer.IsDkimAgentTransportInstalled();
        bool IsDkimAgentTransportEnabled = IsDkimAgentTransportInstalled && ExchangeServer.IsDkimAgentTransportEnabled();
        this.btDisable.Text = (IsDkimAgentTransportInstalled ? "Disable" : "Enable");
    }

Should it use Is...Enabled rather than Is...Installed?
this.btDisable.Text = (IsDkimAgentTransportInstalled ? "Disable" : "Enable");

It thinks it is enable when it's disabled and then you can't enable it from the UI.

Originally created by @gogglespisano on GitHub (Jul 28, 2015). Original GitHub issue: https://github.com/Pro/dkim-exchange/issues/92 In: private void ExchangeTransportServiceWindows_Load(object sender, EventArgs e) { this.RefreshTransportServiceAgents(); ``` bool IsDkimAgentTransportInstalled = ExchangeServer.IsDkimAgentTransportInstalled(); bool IsDkimAgentTransportEnabled = IsDkimAgentTransportInstalled && ExchangeServer.IsDkimAgentTransportEnabled(); this.btDisable.Text = (IsDkimAgentTransportInstalled ? "Disable" : "Enable"); } ``` Should it use Is...Enabled rather than Is...Installed? this.btDisable.Text = (IsDkimAgentTransportInstalled ? "Disable" : "Enable"); It thinks it is enable when it's disabled and then you can't enable it from the UI.
kerem closed this issue 2026-02-26 10:35:36 +03:00
Author
Owner

@AlexLaroche commented on GitHub (Jul 28, 2015):

8c0ed68aba

<!-- gh-comment-id:125777050 --> @AlexLaroche commented on GitHub (Jul 28, 2015): 8c0ed68aba7593408f4596613338a8ba0a662145
Author
Owner

@gogglespisano commented on GitHub (Aug 1, 2015):

This is now backwards. When it is enabled it should show "disable" as the choice and vice-versa.

<!-- gh-comment-id:126928617 --> @gogglespisano commented on GitHub (Aug 1, 2015): This is now backwards. When it is enabled it should show "disable" as the choice and vice-versa.
Author
Owner

@gogglespisano commented on GitHub (Aug 1, 2015):

Also, this code should be in RefreshTransportServiceAgents so that it updates when refreshed.

<!-- gh-comment-id:126928676 --> @gogglespisano commented on GitHub (Aug 1, 2015): Also, this code should be in RefreshTransportServiceAgents so that it updates when refreshed.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/dkim-exchange-Pro#70
No description provided.