Visual Studio C#将2个列表框中的项目组合成第3个 [英] Visual studio C# combine items from 2 listboxes into a 3rd

查看:133
本文介绍了Visual Studio C#将2个列表框中的项目组合成第3个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Visual Studio的新功能。我已经为工程项目创建了两个填充了各种引脚号的列表框。我有两个单选按钮,允许用户选择从前两个用户框中选择的引脚之间的开路或短路连接。



即Pin 1(第1个列表框)打开(单选按钮)Pin 2(第2个列表框)...



我有一个'创建'按钮,我想用它来填充第3个列表框,其中2个引脚通过列表框选项连接,以及它们如何通过两个单选按钮选项连接。



即Pin 1 short Pin 2将被放入第3个列表框中。



我希望前两个列表框中的项目如果被选中则不被删除,因为第三个列表框会填充不同的连接方案,因为它们可能需要用于另一个连接。



谢谢!



我的尝试:



除了花费大量时间在网上搜索此类情景之外,我还没有为项目的这一部分尝试过任何代码。

Very new to Visual Studio. I have created two list boxes populated with various pin numbers for an engineering project. I have two radio buttons which allow the user to select an open or short connection between the pins selected from each of the first two user boxes.

ie Pin 1 (1st list box) open (radio button) Pin 2 (2nd list box)...

I have a 'create' button which I would like use to populate a 3rd list box with the 2 pins that are connected via the list box selections and how they are connected via the two radio button options.

ie Pin 1 short Pin 2 would be put into the 3rd list box from the for the example.

I would like the items in the first two list boxes to not be removed if selected as they may be needed for another connection as the 3rd list box gets populated with different connection scenarios.

Thanks!

What I have tried:

I really haven't tried any code for this part of my project other than spending a lot of time searching the web for this type of scenario.

推荐答案

根据需要进行调整(不动)。



在C#中的两个ListBox之间移动项目 - C#HelperC#Helper [ ^ ]
Adapt as required ("no moving").

Move items between two ListBoxes in C# - C# HelperC# Helper[^]


这篇关于Visual Studio C#将2个列表框中的项目组合成第3个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆