C# 引用动态流水管道(WinForm)开与关

C# 引用动态流水管道(WinForm)开与关

首页休闲益智欢乐管道更新时间:2024-04-21

引用HZH_Controls;添加管道开关1:

private void ucValve1_Click(object sender, EventArgs e) { if (ucValve1.Opened == false) { ucValve1.Opened = true; ucConduit3.LiquidDirection = HZH_Controls.Controls.LiquidDirection.Forward; } else { ucValve1.Opened = false; ucConduit3.LiquidDirection = HZH_Controls.Controls.LiquidDirection.None; } }

添加管道开关2:

private void ucValve2_Click(object sender, EventArgs e) { if (ucValve2.Opened == false) { ucValve2.Opened = true; ucConduit1.LiquidDirection = HZH_Controls.Controls.LiquidDirection.Backward; } else { ucValve2.Opened = false; ucConduit1.LiquidDirection = HZH_Controls.Controls.LiquidDirection.None; } }添加管道开关3:

private void ucValve3_Click(object sender, EventArgs e) { if(ucValve3.Opened == false) { ucValve3.Opened= true; ucConduit2.LiquidDirection = HZH_Controls.Controls.LiquidDirection.Backward; ucConduit4.LiquidDirection = HZH_Controls.Controls.LiquidDirection.Backward; } else { ucValve3.Opened= false; ucConduit2.LiquidDirection = HZH_Controls.Controls.LiquidDirection.None; ucConduit4.LiquidDirection = HZH_Controls.Controls.LiquidDirection.None; } }



查看全文
大家还看了
也许喜欢
更多游戏

Copyright © 2024 妖气游戏网 www.17u1u.com All Rights Reserved