Winform DataGridView 绑定资源后设置行高与布满图片的设置
我通过datasource绑定了datagridview的资源,通过遍历dataTable后台增加行,因为有图片所以需要修改列宽与行高,但是修改属性界面中的几个属性都无法干预这个动作,排查后发现,直接在增加Row的类里面修改即可。下面是code: 123var dateRow = new DataGridViewRow(); dateRow.Height = 150; dateRow.CreateCells(this.dataGridView1); 图片布满ColumnItem在属性里面将Normal修改为Zoom即可
Winform DataGridView Binding Resource Then Setting Row Height and Fill Image Setting
I bound resources of datagridview through datasource, adding rows in background by traversing dataTable, because there are images so need to modify column width and row height, but modifying several properties in property interface cannot intervene this action, after troubleshooting found, directly modify inside class adding Row works. Below is code: 123var dateRow = new DataGridViewRow(); dateRow.Height = 150; dateRow.CreateCells(this.dataGridView1); Image fill Colu...
CLion 2021.3 + QT 5.14.2 配置
参考链接: QT Projects Qt. Copying file error while trying to run the project. How to fix a mistake and why is it happening? 安装在配置之前首先安装CLion和QT,相应下载链接网上都有,直接官网下载即可 配置2.1 打开CLion创建项目2.2 创建好之后点击File->Setting->Build,Exexution,Deployment->ToolChains配置文件,我们需要把里面的环境和C Compiler替换成QT自带的MinGW,配置如图。 2.3 此时配置完成后还需要配置Debug,点击2.2下方的CMake,配置Debug,在CMakeOption中输入-DCMAKE_PREFIX_PATH=E:\Qt\5.14.2\mingw73_64\lib\cmake,点击Apply之后会发现右上角能够进行Debug,此时我们需要再把CLion与QT Designwe链接,此时需要设置ExternalTool,点击File->...
CLion 2021.3 + QT 5.14.2 Configuration
Reference Links: QT Projects Qt. Copying file error while trying to run the project. How to fix a mistake and why is it happening? InstallationInstall CLion and QT before configuration. Download links can be found online, or download directly from their official websites. Configuration2.1 Open CLion and create a project 2.2 After creating, click File->Setting->Build,Execution,Deployment->ToolChains configuration file. We need to replace the environment and C Compiler with MinGW...
Teigha 4.0 Net 开发记录
因为做Revit的二次开发多一点,拿到Teigha的时候还有点懵,看完样例还是觉得一知半解的,原因还是对于AutoCad的底层逻辑不是很明白,包括视图与布局之间的层级关系,块与视图的关系等等,看代码会有些累。 下面通过一个案例说一下昨天一天整理的知识点。 teigha本身是ODA下面的Cad分项,有需要的可以去ODA官网下载或是从CSDN的链接下载。刚申请完会有一段时间的试用期,这个时间可以和ODA邮件沟通。 Teigha本身沿用AutoCad的逻辑,如果和我一样有Revit或是其他Autodesk家的开发经验有一些还是比较容易理解的,比如事务(transation) CAD中模型视图(Model Space),布局1(Paper_Space),布局2(Paper_Space),各种块(Block)<其实各种块在CAD中看作一个视图,我们在遍历模型视图内构件时,块的类定义为’BlockReference’从名称上可以看出这是一个引用>,昨天我一直在尝试在BlockReference中获取快内部构件信息,但是一直没有头绪,后来打开CAD点击-编辑块功能,发现他与视图这...
Teigha 4.0 Net Development Record
Because doing more Revit secondary development, was a bit confused when getting Teigha. After reading examples still felt half-understood. Reason is not very clear about underlying logic of AutoCad, including hierarchical relationship between view and layout, relationship between block and view etc. Reading code is somewhat tiring. Below use a case to talk about knowledge points organized yesterday. teigha itself is Cad sub-item under ODA. Those in need can download from ODA official website...
c++ 单独使用remove_if造成数据重复的问题
在使用remove_if时发现此函数无法对容器内满足pred表达式的数据删除,remove_if将会使用列表内其他数据填充,而本身的大小不变,具体解释可以参考remove_if的用法,这种情况下需要搭配erase方法彻底删除. 12bool IsMoreThen(LinkList target){return target.count>=5;}list.erase(std::remove_if(list.begin(), list.end(), IsMoreThen)); 原因remove_if方法是找出符合条件的元素,并使用erase删除返回的vector<_type_>::iterator 的值,并将元素跳转向下一个元素,此时由于元素指针自动跳转+1,会造成连续值删除出现漏删的情况,针对这种情况需要写一个方法重新计算即可。 1234567891011std::vector<LinkList> RemovePredList(std::vector<LinkList> lists){ std::vec...
Issue with C++ remove_if causing data duplication
When using remove_if, I found that this function cannot delete data in the container that satisfies the pred expression. remove_if will use other data in the list to fill, while the size itself remains unchanged. For specific explanation, refer to Usage of remove_if. In this case, you need to use the erase method to completely delete it. 12bool IsMoreThen(LinkList target){return target.count>=5;}list.erase(std::remove_if(list.begin(), list.end(), IsMoreThen)); ReasonThe remove_i...
C++ 没有找到接受const _Ty类型的左操作数的运算符
在使用STL中的count(const )算法时报错没有找到接受const _Ty类型的左操作数的运算符,原因是 使用自己创建的双向链表类没有重载左运算符== ,添加上重载运算即可。
C++ operator not found which takes a left operand of type 'const _Ty'
When using the count(const) algorithm in STL, an error operator not found which takes a left operand of type 'const _Ty' occurred.The reason is that the custom doubly linked list class did not overload the left operator ==. Adding the overload operation fixes it.
ListView IsMouseOver Create Mouse Hover Selectable Effect
12345678910<ListView.ItemContainerStyle> <Style TargetType="{x:Type ListViewItem}"> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Foreground" Value="Black"></Setter> <Setter Property="IsSelected" Value="True">...
ListView IsMouseOver 创建鼠标悬停即可选中的效果
12345678910<ListView.ItemContainerStyle> <Style TargetType="{x:Type ListViewItem}"> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Foreground" Value="Black"></Setter> <Setter Property="IsSelected" Value="True">...
WPF WrapPanel IsMouseOver Controlling Visibility Causes Flicker
Searching for the problem, found answers were mostly about how to make controls flicker. Finally went to stackflow to find the answer. If you want the control to show when the mouse enters, you can use the Opacity property to control visibility. code: 1234567891011121314151617181920<WrapPanel.Resources> <Style x:Key="WrapPanelStyle" TargetType="WrapPanel"> <Styl...
WPF WrapPanel IsMouseOver 控制Visibility控件不停闪烁
搜索问题,发现答案都是如果使控件闪烁的答案,最后去stackflow找答案,如果希望鼠标进入就显示控件,可以使用Opacity属性控制显隐。 code: 1234567891011121314151617181920<WrapPanel.Resources> <Style x:Key="WrapPanelStyle" TargetType="WrapPanel"> <Style.Setters> <Setter Property="Opacity" Value="0"></Setter> ...
Revit PromptForFamilyInstancePlacementOptions Family Placement API
Doing family library during this period, when needed to connect with Revit at the end, hoping users can choose to download and then directly arrange components in Revit. Searching API, found PromptForFamilyInstancePlacementOptions method can be used to implement family placement. The code is relatively simple, but need to remember, since PromptForFamilyInstancePlacementOptions will create a transaction itself, so if using it, need to move this method out of transaction. code: 1234567891011121...
Revit PromptForFamilyInstancePlacementOptions 族放置API
这段时间在做族库,在做到最后需要与Revit连同时,希望可以用户选择下载然后直接在Revit中布置构件,查找API ,发现可以使用PromptForFamilyInstancePlacementOptions方法实现族放置。 代码 比较简单,只不过需要记住,由于PromptForFamilyInstancePlacementOptions会自己创建一个事务,所以使用的话需要将此方法挪出事务。 code: 1234567891011121314151617181920212223242526Family family; using (Transaction trans = new Transaction(app.ActiveUIDocument.Document,"load family")) { trans.Start(); var loa...
WCF Exceeded Max Quota (65536)
Today pulling 500 records from database via WCF connection reported this error. Baidu problem found most solutions are modifying ServiceModel parameter of App.config, as follows 123456789101112131415<bindings> <basicHttpBinding> <binding name="webIn" sendTimeout="00:30:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" transferMode="Streamed"> <...
WCF 超出最大配额(65536)
今天通过WCF连接数据库拉取500条数据报出这个错误,百度问题发现大部分解决办法都是修改App.config的’ServiceModel`参数,如下 123456789101112131415<bindings> <basicHttpBinding> <binding name="webIn" sendTimeout="00:30:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" transferMode="Streamed"> <readerQuotas maxDepth="32" maxStringContentLength="2147483647" maxArrayLength=...
WCF Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http].
Originally WCF only used < BasicHttpBinding >, now added net.tcp protocol. After adding server reported error Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http]., checked Web.config and website configuration still reported error.Finally referred to WCF: How to host net.tcp protocol to IIS, in Website->Binding->Add net.tcp protocol, situation solved.If just starting configuration, don’t f...
WCF 找不到具有绑定 NetTcpBinding 的终结点的与方案 net.tcp 匹配的基址。注册的基址方案是 [http]。
原本WCF只使用了< BasicHttpBinding >,现在新增net.tcp协议,添加后服务器报错找不到具有绑定 NetTcpBinding 的终结点的与方案 net.tcp 匹配的基址。注册的基址方案是 [http]。,检查Web.config与网站配置之后依旧报错。最后参照 WCF:如何将net.tcp协议寄宿到IIS,在网站->绑定->添加net.tcp协议 ,情况解决。如果刚开始配置,不要忘记在高级设置中增加net.tcp协议 Web.config配置文件 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172<?xml version="1.0" encoding="utf-8"?><configuration> <appSettings> &...





![WCF Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http].](https://cdn.bimath.com/blog/pg/24c0ff56deac8ab4315bc9a5d21486b1.png)


