f4834d8ebc81e748cafa7278afbd2f53de50ce58
API/CodeSamples/ShowSettingsButton.md
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | |
| 5 | 5 | ##About |
| 6 | 6 | |
| 7 | -Gets or sets the value enabling the Settings button on the Izenda Reports toolbar. The settings button launches the settings page, which allows for a GUI-oriented interface for modifying various common settings. However, we highly recommend using the ``InitializeReporting()`` method to perform your initialization. |
|
| 7 | +Gets or sets the value enabling the Settings button on the Izenda Reports toolbar. The settings button launches the settings page, which allows for a GUI-oriented interface for modifying various common settings. However, we highly recommend either removing the settings page entirely, or implementing a custom settings page (example in the third code sample), and using the ``InitializeReporting()`` method to perform your initialization. |
|
| 8 | 8 | |
| 9 | 9 | **Default Value:** True |
| 10 | 10 | |
| ... | ... | @@ -53,6 +53,32 @@ Public Class CustomAdHocConfig |
| 53 | 53 | End Class |
| 54 | 54 | ``` |
| 55 | 55 | |
| 56 | +##Settings.aspx.cs (C♯) |
|
| 57 | + |
|
| 58 | +```csharp |
|
| 59 | +public partial class Settings : System.Web.UI.Page { |
|
| 60 | + protected override void OnLoad(System.EventArgs e) { |
|
| 61 | + ListDictionary tests = Izenda.AdHoc.Utility.DiagnosticTest(); |
|
| 62 | + foreach (DictionaryEntry de in tests) { |
|
| 63 | + if (!(de.Value is bool)) |
|
| 64 | + continue; |
|
| 65 | + if (!(bool) de.Value) { |
|
| 66 | + if (de.Key == "Connection String") { |
|
| 67 | + errorlabel.Text = "Sorry, your Connection String is corrupted"; |
|
| 68 | + } |
|
| 69 | + |
|
| 70 | + else if (de.Key == "License Key") { |
|
| 71 | + |
|
| 72 | + errorlabel.Text = "Your License Key is invalid."; |
|
| 73 | + |
|
| 74 | + } |
|
| 75 | + |
|
| 76 | + else if... |
|
| 77 | + } |
|
| 78 | + } |
|
| 79 | + } |
|
| 80 | +``` |
|
| 81 | + |
|
| 56 | 82 | ##Screenshots |
| 57 | 83 | |
| 58 | 84 | AdHocSettings.ShowSettingsButton = false |