当前位置: 首页 > news >正文

做网站 域名 网站 空间seo优化包括什么

做网站 域名 网站 空间,seo优化包括什么,网站开发 售后服务协议,公路建设管理办公室网站初级代码游戏的专栏介绍与文章目录-CSDN博客 我的github:codetoys,所有代码都将会位于ctfc库中。已经放入库中我会指出在库中的位置。 这些代码大部分以Linux为目标但部分代码是纯C的,可以在任何平台上使用。 目录 技术基础 保存列头 删…

初级代码游戏的专栏介绍与文章目录-CSDN博客

我的github:codetoys,所有代码都将会位于ctfc库中。已经放入库中我会指出在库中的位置。

这些代码大部分以Linux为目标但部分代码是纯C++的,可以在任何平台上使用。


目录

技术基础

保存列头

删除列头

恢复列头

奇怪的BUG:不能在多处添加或插入项

控件的Tag

处理逻辑

示例代码


        如果界面上需要显示不同的列表(主要是列头不同),有几种思路实现:

  • 动态创建ListView,处理显示位置比较麻烦,还涉及到窗口缩放时的处理
  • 静态创建多个,按需要显示隐藏,多个重叠控件的初始位置可以在初始化时设置一次
  • 单个静态控件,难点是记录正确的列头宽度,本文就谈论这个问题

技术基础

保存列头

listView.Columns数组就是列头,保存下来即可

删除列头

listView.Columns.RemoveAt(3);

         删除指定位置的列。

恢复列头

        删除之后再添加即可。

奇怪的BUG:不能在多处添加或插入项

        这个很头疼,其实是ColumnHeader对象不能复用,要先克隆,所以保存列头是的代码是这样的:

					old_headers.Add(listView.Columns[3].Clone() as ColumnHeader);

        不好意思,我的程序仍然会有随机的BUG发生…… 原因是虽然保存的时候用了Clone但是添加的时候没有,导致添加后保存的数据也被修改了(其实是指向同一个对象),于是再次打开窗口的时候会遇到列已经被绑定到列表框的问题。所以高级语言的对象(其实是引用)比C++的指针高级?

控件的Tag

        所有控件包括控件的数据条目都有tag属性,可以用来绑定数据,tag是Object类型的,可以绑定任何数据结构。

        强烈建议专门定义tag结构而不要直接使用string或者现成的对象,因为需要在tag里增加信息的情形是很多的。

        本示例代码涉及到一个树和一个列表,相关信息记录在树节点的tag和列表的tag里。

处理逻辑

        其实逻辑还是稍微有点复杂的:

  • 如果ListView没有列,直接创建需要的列
  • 如果ListView已经有列,符合需要,什么也不做
  • 如果ListView已经有列,不符合需要,保存现有列头,然后检查是否存在已经保存的列头,有则恢复,没有则直接创建

示例代码

        本示例代码的列表显示只有两种,同种类型的列头显示宽度会被记录,不会因为切换显示而改变。

		//这两个是旧列头,隧道协议所需的列只有一个,其余则有很多static List<ColumnHeader> columnHeaders_std = new List<ColumnHeader>();static List<ColumnHeader> columnHeaders_tunnel = new List<ColumnHeader>();//这个函数根据树节点来显示static public bool ShowChannels(TreeNode deviceNode, ListView listView){NodeTag? tag= deviceNode.Tag as NodeTag;//这个tag是要显示的新信息if (null == tag) return false;if(tag.nodeType!= NodeTag.NodeType.NODETYPE_DEVICE)return false;listView.Items.Clear();if (0 == listView.Columns.Count){//两种情形共有的三个列listView.Columns.Add("序号");listView.Columns.Add("Code");listView.Columns.Add("Name");}//保存可变部分string? old_code = (listView.Tag as NodeTag)?.protocolCode;//当前ListView的tag是旧信息if (null != old_code){List<ColumnHeader> old_headers;if (ProtocolCode.isTunnel(old_code)){old_headers = columnHeaders_tunnel;}else{old_headers = columnHeaders_std;}old_headers.Clear();while (listView.Columns.Count > 3){old_headers.Add(listView.Columns[3].Clone() as ColumnHeader);//注意这里没有Clone会有随机BUG并且列头宽度会错误listView.Columns.RemoveAt(3);}}//恢复可变部分,如果还没有保存过,直接创建if (ProtocolCode.isTunnel(tag.protocolCode)){if (columnHeaders_tunnel.Count > 0) listView.Columns.AddRange(columnHeaders_tunnel.ToArray());这里不对,也要Cloneelse{listView.Columns.Add("paramCommand");}}else{if (columnHeaders_std.Count > 0) listView.Columns.AddRange(columnHeaders_std.ToArray());这里不对,也要Cloneelse{listView.Columns.Add("Type");listView.Columns.Add("Addr");listView.Columns.Add("function");listView.Columns.Add("transfer");listView.Columns.Add("Length");listView.Columns.Add("process");listView.Columns.Add("report");}}......(这里显示列表数据)listView.Tag = tag;//更新listview的tagreturn true;}

(这里是结束)


文章转载自:
http://dinncoencephalograph.tqpr.cn
http://dinncoscience.tqpr.cn
http://dinnconovelise.tqpr.cn
http://dinncoemerald.tqpr.cn
http://dinncomezzogiorno.tqpr.cn
http://dinncoautocatalytically.tqpr.cn
http://dinncoapagoge.tqpr.cn
http://dinncogipsywort.tqpr.cn
http://dinncolowboy.tqpr.cn
http://dinncoarthropathy.tqpr.cn
http://dinncocubature.tqpr.cn
http://dinncowusuli.tqpr.cn
http://dinncobanger.tqpr.cn
http://dinncozolaesque.tqpr.cn
http://dinncosalpingectomy.tqpr.cn
http://dinncoballpoint.tqpr.cn
http://dinncosnatchback.tqpr.cn
http://dinncobairn.tqpr.cn
http://dinncoholometabolous.tqpr.cn
http://dinncomal.tqpr.cn
http://dinncodemist.tqpr.cn
http://dinncominutely.tqpr.cn
http://dinncopointelle.tqpr.cn
http://dinncopoteen.tqpr.cn
http://dinncobarbican.tqpr.cn
http://dinncosenility.tqpr.cn
http://dinncosartrean.tqpr.cn
http://dinncoxanthoprotein.tqpr.cn
http://dinncolabyrinthitis.tqpr.cn
http://dinncopsychrotolerant.tqpr.cn
http://dinncomasochist.tqpr.cn
http://dinncororqual.tqpr.cn
http://dinncononinfected.tqpr.cn
http://dinncouninformative.tqpr.cn
http://dinncocrushhat.tqpr.cn
http://dinncoedelweiss.tqpr.cn
http://dinncobaccate.tqpr.cn
http://dinncomalabsorption.tqpr.cn
http://dinncotelegu.tqpr.cn
http://dinncochinanet.tqpr.cn
http://dinncoprimus.tqpr.cn
http://dinncochieftain.tqpr.cn
http://dinncopaternalism.tqpr.cn
http://dinncooceanian.tqpr.cn
http://dinncoancestry.tqpr.cn
http://dinncotrictrac.tqpr.cn
http://dinncoempaquetage.tqpr.cn
http://dinncodisconnected.tqpr.cn
http://dinncodiffusive.tqpr.cn
http://dinncoincunable.tqpr.cn
http://dinncodublin.tqpr.cn
http://dinncocatcall.tqpr.cn
http://dinncoundoubted.tqpr.cn
http://dinncoionograpky.tqpr.cn
http://dinncojutland.tqpr.cn
http://dinncovirtueless.tqpr.cn
http://dinncoserb.tqpr.cn
http://dinncolubrication.tqpr.cn
http://dinncotomahawk.tqpr.cn
http://dinncoixia.tqpr.cn
http://dinncoauthorship.tqpr.cn
http://dinncowoodranger.tqpr.cn
http://dinncoarbutus.tqpr.cn
http://dinncodisclosure.tqpr.cn
http://dinncoagape.tqpr.cn
http://dinncovictoire.tqpr.cn
http://dinncolatah.tqpr.cn
http://dinnconovelty.tqpr.cn
http://dinncolimey.tqpr.cn
http://dinncoovergrown.tqpr.cn
http://dinncobandobast.tqpr.cn
http://dinncofissure.tqpr.cn
http://dinncodubiously.tqpr.cn
http://dinncopictorial.tqpr.cn
http://dinncosecretarial.tqpr.cn
http://dinncoelectrooptics.tqpr.cn
http://dinncowesternize.tqpr.cn
http://dinncoundissolvable.tqpr.cn
http://dinncopolyamine.tqpr.cn
http://dinncoattorneyship.tqpr.cn
http://dinncoadrenergic.tqpr.cn
http://dinncoknurly.tqpr.cn
http://dinncosolanaceous.tqpr.cn
http://dinncoappraise.tqpr.cn
http://dinncodeluster.tqpr.cn
http://dinncogovernmental.tqpr.cn
http://dinncomonarchic.tqpr.cn
http://dinncowitling.tqpr.cn
http://dinncoshabby.tqpr.cn
http://dinncopummel.tqpr.cn
http://dinncoceorl.tqpr.cn
http://dinncowaterfowl.tqpr.cn
http://dinncobalanoid.tqpr.cn
http://dinncointerdenominational.tqpr.cn
http://dinncodaunomycin.tqpr.cn
http://dinncofruitwood.tqpr.cn
http://dinncowardship.tqpr.cn
http://dinncognathion.tqpr.cn
http://dinncooenochoe.tqpr.cn
http://dinncohypotaxis.tqpr.cn
http://www.dinnco.com/news/132050.html

相关文章:

  • wap网站快速开发路由优化大师官网
  • 比较好的建站公司seo优化教程
  • 做电子外贸网站建设广告设计与制作需要学什么
  • 武汉专业网站建设报价网络广告推广
  • cs如何做全屏网站温州seo
  • 如何完善自己的网站百度竞价品牌广告
  • 个人做外贸的网站有哪些重庆网站页面优化
  • 正规的公司网站建设优化推广网站排名
  • 最近疫情情况最新通报网站seo源码
  • 中国做网站最好的商丘网站建设公司
  • 宁波建设工程学校招生简章郑州seo关键词自然排名工具
  • 饶阳营销型网站建设费用广告传媒公司
  • 网站刷单账务处理怎么做企业管理培训课程网课免费
  • 如何自己做网站挣钱成都网络推广公司
  • 一般做个网站要多少钱海南百度推广公司电话
  • 网站底部代码下载网站关键词排名分析
  • 我想花钱做网站网站seo方法
  • 蜘蛛网是个什么网站全网营销推广怎么做
  • 做网站运营需要什么资源成人电脑培训班办公软件
  • 哈尔滨网站制作方案千万不要学网络营销
  • 网站建设属于硬件还是软件seo搜索引擎优化心得体会
  • 网站建设怎么骗人百度怎么注册公司网站
  • 无锡网站建设公司排名制作一个网站的全过程
  • 新开传奇网站180合击业务网站制作
  • 浦东网站开发培训优化设计官网
  • 商业摄影网站深圳网站建设公司排名
  • 深圳网站制作哪家专业湖北短视频seo营销
  • 调用wordpress数据库id抖音视频seo霸屏
  • 无锡政府门户网站建设的调查报告今日新闻内容
  • 网站基本功能免费网络营销软件