C# 为节点添加修改图标

bool RangeLinePrintManagerSwitchifON = false;
private void ribbonBtnRangeLinePrintManagerSwitch_Click(object sender, EventArgs e)
{
    TreeNode node;
    if (NodeRight(out node))
    {
        for (int i = 0; i < this.UserControls.UC_P2D.Count; i++)
        {
            if (this.UserControls.UC_P2D[i].nodeInfo.nodeToolTipText == node.ToolTipText)
            {
                RangeLinePrintManagerSwitchifON = !RangeLinePrintManagerSwitchifON;
                UserControls.UC_P2D[i].u2D.RangeLinePrintManagerSwitch(RangeLinePrintManagerSwitchifON);
                if (RangeLinePrintManagerSwitchifON)
                   this.ribbonBtnRangeLinePrintManagerSwitch.SmallImage = global::Sunvey.UI.Properties.Resources.显示管理1;//打开
                else
                   this.ribbonBtnRangeLinePrintManagerSwitch.SmallImage = global::Sunvey.UI.Properties.Resources.显示管理_Off;//关闭
                break;
             }
        }
    }
}

 

你可能感兴趣的:(C#)