Example #1
0
        internal void OnMenuPowerEstimate(object sender, EventArgs e)
        {
            GadgeteerDSLDocView docView = this.CurrentDocView as GadgeteerDSLDocView;

            if (docView != null)
            {
                docView.IsPowerOverlayVisible ^= true;
            }
        }
Example #2
0
        internal void OnStatusPowerEstimate(object sender, EventArgs e)
        {
            var command = sender as MenuCommand;

            if (command == null)
            {
                return;
            }

            GadgeteerDSLDocView docView = this.CurrentDocView as GadgeteerDSLDocView;

            if (docView == null)
            {
                command.Visible = false;
            }
            else
            {
                command.Visible = true;
                command.Checked = docView.IsPowerOverlayVisible;
                command.Enabled = true; // docView.IsPowerOverlayAvailable;
            }
        }