Hello all. I have a plugin where I have a Connect and Disconnect button. I've been exploring the use of conditions to enable/disable the buttons. What I cannot figure out is how to have the Connect enabled while the Disconnect is disabled from the start. Below is the snippet from my Config.daml. With this setup the Connect and Disconnect buttons are disabled from the start. Based on the state of the connection I'd like the button state to change too.
Thanks!
<button id="btnConnect" caption="Connect" className="Connect" smallImage="Images\greenCheck16.png" largeImage="Images\greenCheck32.png" condition="Disconnected">
<tooltip heading="Tooltip">
Use this button to connect to the system
</tooltip>"
</button>
<button id="btnDisconnect" caption="Disconnect" className="Disconnect" smallImage="Images\redX16.png" largeImage="Images\redX32.png" condition="Connected">
<tooltip heading="Tooltip">
Use this button to disconnect to the system
</tooltip>"
</button>
</controls>
</insertModule>
</modules>
<conditions>
<!-- our custom condition -->
<insertCondition id="Connected" caption="Connected to the system">
<!-- our condition is set true or false based on this underlying state -->
<state id="connected" />
</insertCondition>
<insertCondition id="Disconnected" caption="Disconnected from the system">
<!-- our condition is set true or false based on this underlying state -->
<state id="disconnected" />
</insertCondition>
</conditions>