做视频图片博客网站营销型设计网站

pingmian/2026/1/27 0:08:38/文章来源:
做视频图片博客网站,营销型设计网站,做网站需要什么许可证,程序做网站好还是app好Mono对gtk做了很努力的封装#xff0c;即便如此仍然与System.Windows.Form中的控件操作方法有许多差异#xff0c;这是gtk本身特性或称为特色决定的。下面是gtk常用控件在Mono C#中的一些用法。 Button控件 在工具箱中该控件的clicked信号双击后自动生成回调函数prototype即便如此仍然与System.Windows.Form中的控件操作方法有许多差异这是gtk本身特性或称为特色决定的。下面是gtk常用控件在Mono C#中的一些用法。 Button控件 在工具箱中该控件的clicked信号双击后自动生成回调函数prototype下面的函数当Button12点击后其标签名变为Button12 is Pressed!。还有ToggleButtonImageButton 用法类似。 protected void OnButton12Clicked(object sender, EventArgs e){Button12.Label Button12 is Pressed!;} Entry控件 用法与Winform的TextBox非常相似。 protected void OnButton13Clicked(object sender, EventArgs e){string sText ;entry2.Text Hello;sText entry2.Text;} Checkbutton和Radiobutton 读当选中后它的Active属性是true ; 未选中时它的Active属性是false。 写Checkbutton1.Active true; Radiobutton1.Active true; ColorButton颜料按钮 自动调出颜色选取dialog用colorbutton1.Color.Red 读入红色值或Gr een/Blue读取绿色和蓝色值。因为调出的是dialog所以用其它Button调用dialog功效是类同的。 protected void OnColorbutton1ColorSet(object sender, EventArgs e){var redcolor colorbutton1.Color.Red;var greencolor colorbutton1.Color.Green;var bluecolor colorbutton1.Color.Blue;} 下面是通过 ColorSelectionDialog 方式调出颜料盒对话框用后直接dispose扔给收垃圾的不需要destroy打砸它。C#是通过runtime执行的不是CLR平台管理的要自己处理垃圾自动回收是管不了的。 protected void OnButton3Clicked(object sender, EventArgs e){Gtk.ColorSelectionDialog colorSelectionDialog new Gtk.ColorSelectionDialog(Color selection dialog);colorSelectionDialog.ColorSelection.HasOpacityControl true;colorSelectionDialog.ColorSelection.HasPalette true;colorSelectionDialog.ColorSelection.CurrentColor StoreColor;if (colorSelectionDialog.Run() (int)ResponseType.Ok){StoreColor colorSelectionDialog.ColorSelection.CurrentColor;var redcolor colorSelectionDialog.ColorSelection.CurrentColor.Red;var greencolor colorSelectionDialog.ColorSelection.CurrentColor.Green;var bluecolor colorSelectionDialog.ColorSelection.CurrentColor.Blue;}colorSelectionDialog.Dispose();} FontButton控件 它通过FontName返回字体名称、字型、字号自动调用字体选择对话框。 protected void OnFontbutton1FontSet(object sender, EventArgs e){entry1.Text fontbutton1.FontName;} 也可以使用其它钮调用字体选择对话框用后Dispose()掉。 protected void OnButton2Clicked(object sender, EventArgs e){Gtk.FontSelectionDialog fontSelectionDialog new Gtk.FontSelectionDialog(Font selection);if (fontSelectionDialog.Run() (int)ResponseType.Ok){entry1.Text fontSelectionDialog.FontName;}fontSelectionDialog.Dispose();} ComboBox框 用InsertText用AppendText添加新内容用RemoveText方法删除指定项用Active属性选中指定项显示在显示框中。ComboBox框类似于Winform的ListBox是不能输入的。 protected void OnButton7Clicked(object sender, EventArgs e){combobox1.InsertText(0, Item - 1);combobox1.InsertText(0, Item - 2);combobox1.InsertText(0, Item - 3);combobox1.InsertText(0, Item - 4);combobox1.InsertText(0, Item - 5);combobox1.InsertText(0, Item - 6);combobox1.InsertText(0, Item - 7);combobox1.InsertText(0, Item - 8);combobox1.Active 5;} ComboBoxEntry框 ComboBoxEntry框是可输入的用法同ComboBox。 TreeView列表 这框比较有特色可显示图片和文本。图片用Gdk.Pixbuf装载是个特殊类型。 protected void OnButton15Clicked(object sender, EventArgs e){Gtk.ListStore listStore new Gtk.ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(string));treeview1.Model null;treeview1.AppendColumn(Icon, new Gtk.CellRendererPixbuf(), pixbuf, 0);treeview1.AppendColumn(Artist, new Gtk.CellRendererText(), text, 1);treeview1.AppendColumn(Title, new Gtk.CellRendererText(), text, 2);listStore.AppendValues(new Gdk.Pixbuf(sample.png), Rupert, Yellow bananas);treeview1.Model listStore;listStore.Dispose();} DrawArea Cairo 图像 是做图用的先创建surface,可以在内存中、图片上、pdf上、DrawArea上画图或写字也可以存成png图片图形可以变换座标。在内存中绘图然后在DrawAre的context上show显示或在其它地方显示。功能很灵活与GDI在bitmap上做图通过hdc显示在pictureBox上有对比性。 protected void OnButton11Clicked(object sender, EventArgs e){//// Creates an Image-based surface with with data stored in// ARGB32 format. //drawingarea1Width drawingarea1.Allocation.Width;drawingarea1Height drawingarea1.Allocation.Height;ImageSurface surface new ImageSurface(Format.ARGB32, drawingarea1Width, drawingarea1Height);// Create a context, using is used here to ensure that the// context is Disposed once we are done////using (Context ctx new Cairo.Context(surface))using (Context ctx Gdk.CairoHelper.Create(drawingarea1.GdkWindow)){// Select a font to draw withctx.SelectFontFace(serif, FontSlant.Normal, FontWeight.Bold);ctx.SetFontSize(32.0);// Select a color (blue)ctx.SetSourceRGB(0, 0, 1);//ctx.LineTo(new PointD(iArea1ObjX, drawingarea1.Allocation.Height));//ctx.StrokePreserve();// Drawctx.MoveTo(iArea1ObjX, iArea1ObjY);ctx.ShowText(Hello, World);/*//Drawings can be save to png picture file//surface.WriteToPng(test.png);//Context ctxArea1 Gdk.CairoHelper.Create(drawingarea1.GdkWindow);//Surface surface1 new Cairo.ImageSurface(test.png);//Option: coordinator change, origin 0,0 is the middle of the drawingarea//ctxArea1.Translate(drawingarea1Width / 2, drawingarea1Height / 2);//surface.Show(ctxArea1, 0, 0);//ctxArea1.Dispose();*/}} About对话框 固定格式的对话框有贡献者、文档人员、版权说明等与windows的about不太相同。 protected void OnButton9Clicked(object sender, EventArgs e){string[] textabout {abcde,fdadf,adsfasdf };const string LicensePath COPYING.txt;Gtk.AboutDialog aboutDialog new Gtk.AboutDialog();aboutDialog.Title About mono learning;aboutDialog.Documenters textabout;//aboutDialog.License mit license;aboutDialog.ProgramName my Program;aboutDialog.Logo new Gdk.Pixbuf(logo.png);//aboutDialog.LogoIconName logo.png;//aboutDialog.AddButton(New-Button, 1);aboutDialog.Artists textabout;aboutDialog.Authors textabout;aboutDialog.Comments This is the comments;aboutDialog.Copyright The copyright;aboutDialog.TranslatorCredits translators;aboutDialog.Version 1.12;aboutDialog.WrapLicense true;aboutDialog.Website www.me.com;aboutDialog.WebsiteLabel A website;aboutDialog.WindowPosition WindowPosition.Mouse;try{aboutDialog.License System.IO.File.ReadAllText(LicensePath);}catch (System.IO.FileNotFoundException){aboutDialog.License Could not load license file LicensePath .\nGo to http://www.abcd.org;}aboutDialog.Run();aboutDialog.Destroy();aboutDialog.Dispose();} Timer时钟 使用Glib的时钟100ms timerID1  GLib.Timeout.Add(100, OnTimedEvent1); 使用System的时钟300ms aTimer  new System.Timers.Timer(300);  aTimer.Elapsed  OnTimedEvent;  aTimer.AutoReset  true;  aTimer.Enabled  true; 异步写文件(VB.NET) protected void OnButton4Clicked(object sender, EventArgs e){Task r Writedata();async Task Writedata(){await Task.Run(() {VB.FileSystem.FileOpen(1, VBNETTEST.TXT, VB.OpenMode.Output, VB.OpenAccess.Write, VB.OpenShare.Shared);VB.FileSystem.WriteLine(1, Hello World! - 1);VB.FileSystem.WriteLine(1, Hello World! - 2);VB.FileSystem.WriteLine(1, Hello World! - 3);VB.FileSystem.WriteLine(1, Hello World! - 4);VB.FileSystem.WriteLine(1, Hello World! - 5);VB.FileSystem.FileClose(1);return 0;});}}SQLite操作 创建Table protected void OnButton13Clicked(object sender, EventArgs e){const string connectionString URIfile:SqliteTest.db, version3;IDbConnection dbcon new SqliteConnection(connectionString);dbcon.Open();IDbCommand dbcmd dbcon.CreateCommand();string sql;sql CREATE TABLE employee ( firstname nvarchar(32), lastname nvarchar(32));dbcmd.CommandText sql;dbcmd.ExecuteNonQuery();dbcmd.Dispose();dbcon.Close();} INSERT记录 protected void OnButton13Clicked(object sender, EventArgs e){const string connectionString URIfile:SqliteTest.db, version3;IDbConnection dbcon new SqliteConnection(connectionString);dbcon.Open();IDbCommand dbcmd dbcon.CreateCommand();string sql;sql INSERT INTO employee( firstname, lastname) values(W1ang, B1odang);dbcmd.CommandText sql;dbcmd.ExecuteNonQuery();dbcmd.Dispose();dbcon.Close();} 循环读 protected void OnButton13Clicked(object sender, EventArgs e){const string connectionString URIfile:SqliteTest.db, version3;IDbConnection dbcon new SqliteConnection(connectionString);dbcon.Open();IDbCommand dbcmd dbcon.CreateCommand();string sql;sql SELECT firstname, lastname FROM employee;dbcmd.CommandText sql;IDataReader reader dbcmd.ExecuteReader();while (reader.Read()){string firstName reader.GetString(0);string lastName reader.GetString(1);Console.WriteLine(Name: {0} {1},firstName, lastName);}// clean upreader.Dispose();dbcmd.Dispose();dbcon.Close();} 包/项目/程序集 测试引用Windows.Form并创建了窗体和对话框也能显示但不是Linux平台原生的不太美观且速度不理想。如果只是创建了不Show让它处于Hide状态比如带sort属性的ListBox还是可以使用的。 Mono自己有许多基础库 还有DOTNET的库 还有其它第三方库

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/pingmian/85371.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

广东省建设厅投诉网站国家icp备案网站

Ubuntu20.04安装ROS Excerpt ubuntu安装方式有两种,一种是安装ubuntu系统,另一种是在windows下安装虚拟机,在虚拟机里安装ubuntu。下面为双系统安装ubuntu(用虚拟机装ubuntu会很卡,bug很多,除非电脑配置极好…

网站建设设计技术方案模板软件开发上海

注解Annotation 一、介绍二、使用三、三个基本的Annotation四、JDK内置的基本注解类型1、Override2、Deprecated3、SuppressWarnings 五、JDK的元注解1、Retention2、Target3、Documented4、Inherited 一、介绍 注解(Annotation)也被称为元数据&#xf…

个人网站 如何做推广做网站放视频

POKT Network(也被称为 Pocket Network)在通证经济模型上完成了重大的改进,不仅将通货膨胀率降至 5% 以下,并使 POKT 通证在 2025 年走向通缩的轨迹上,预计到2024 年年底通货膨胀率将降至 2% 以下。POKT Network 的 “…

襄阳集团网站建设香奈儿电子商务网站建设策划书

大体流程: 步骤: 1.加载数据到缓存中(Buffer Pool): 在进行数据更新时,InnoDB首先会在缓冲池(Buffer Pool)中查找该记录是否已经在内存中。如果记录不在内存中,会将需要更新的数据…

wordpress博客站搭建免费推广网站短视频

说明 bind命令 用于显示和设置命令行的键盘序列绑定功能。通过这一命令,可以提高命令行中操作效率。可以利用bind命令了解有哪些按键组合与其功能,也可以自行指定要用哪些按键组合。 语法 bind(选项)选项 -d:显示按键配置的内容&#xff…

专家库 网站 建设方案湛江论坛建站模板

From: http://www.cppblog.com/elva/archive/2010/08/13/123313.html 因为项目需要,学习了一下RTSP协议,为了防止以后忘记,就把学习过程和成果记载下来。期间参考了一些网上的资料,并分析了VLC的RTSP报文。 RTSP(…

怎么学建网站wordpress打开慢

1。一位工科男在拿到华为实习生offer后的面经干货某211学校,机械学院研究生。不得不说一下,华为的员工们真的是认真做事,因为怕我们担心下班轮不到面试。工作人员特意去休息区告诉我们,不面试完他们不会下班,果然是个爱…

甘肃城乡建设部网站首页人才市场招聘网站

目录 0.环境 1.问题简述 2.分析报错原因 3.解决方法 1)set() 相关语句 2)target_link_libraries() 相关语句 4.参考 0.环境 windows11 、 vs-code 、 qt 、 c、编译器为vs2019-x86_amd64 1.问题简述 项目编译release版本时会报错:报错…

电子商务毕业设计 网站建设太原网页制作招聘网

以Android 11源码下载流程图如下所示: 1. 安装Git和Repo工具 2. 创建一个工作目录 3. 初始化仓库并下载源码 4. 切换到指定的分支 5. 编译源码 具体步骤如下: 安装Git和Repo工具:在Linux或Mac上,可以通过终端运行以下命令安装Gi…

服务器怎么发布网站二手书网站开发需求分析

前言 Axios 是一个基于 Promise 的 HTTP 库,它的概念及使用方法本文不过多赘述,请参考:axios传送门 本文重点讲述下在项目中是如何利用 axios 封装 http 请求。 一、预设全局变量 在 /const/preset.js 中配置预先设置一些全局变量 window.…

php做的网站好不好网站建设模板下载免费

*************************************优雅的分割线 ********************************** 分享一波:程序员赚外快-必看的巅峰干货 如果以上内容对你觉得有用,并想获取更多的赚钱方式和免费的技术教程 请关注微信公众号:HB荷包 一个能让你学习技术和赚钱方法的公众号,持续更…

二手商品网站怎么做模型网站大全免费

专属领域论文订阅 VX 扫吗关注{晓理紫|小李子},每日更新论文,如感兴趣,请转发给有需要的同学,谢谢支持 分类: 大语言模型LLM视觉模型VLM扩散模型视觉导航具身智能,机器人强化学习开放词汇,检测分割 [晓理紫…

中山营销网站建设费用湘潭县建设投资有限公司网站

文章目录 什么是数据库数据库是运行在操作系统中的软件 为什么需要数据库有哪些数据库MySQL 的体系架构网络连接层/API 层数据库服务层存储引擎层系统文件层 什么是 SQL参考资料 阅读前导:理论上数据库可以在操作系统和网络之前学习,但是这样会让学习层次…

提升网站建设品质信息凡科 wordpress

最近,抖音上的AI扩图突然火了,看完真的让人笑掉大牙~~~ 这一热议的话题#AI扩图#在短视频平台抖音上的播放量已经突破7.8亿次,而相关的讨论也如同星火燎原,迅速点燃了公众的好奇心。从“用AI扩图…

我学我做我知道网站展馆设计的主题有哪些

1.基本的读取配置文件-read(filename) 直接读取ini文件内容-sections() 得到所有的section,并以列表的形式返回-options(section) 得到该section的所有option-items(section) 得到该section的所有键值对-get(section,option) 得到section中option的值,返…

大连旧房翻新装修哪家公司好班级优化大师免费下载app

注:比较简陋,仅供参考。 编写PHP代码,实现反序列化的时候魔法函数自动调用计算器 PHP反序列化 serialize(); 将对象序列化成字符串 unserialize(); 将字符串反序列化回对象 创建类 class Stu{ public $name; public $age; public $sex; publi…

高校档案馆网站建设肥料网站建设

写在开始三年前,曾写过一篇文章:从.NET和Java之争谈IT这个行业,当时遭到某些自认为懂得java就了不起的Javaer抨击,现在可以致敬伟大的.NET斗士甲骨文了  (JDK8以上都需要收费,Android弃用java作为第一语言,别高兴:OpenJDK是甲骨文的).《ASP.NET Core 高性能系列》是一套如何编…

像素时代网站建设手机站设计通州青岛网站建设

目录 自动映射 表映射 字段映射 字段失效 视图属性 Mybatis框架之所以能够简化数据库操作,是因为他内部的映射机制,通过自动映射,进行数据的封装,我们只要符合映射规则,就可以快速高效的完成SQL操作的实现。既然…

校园网站制作模板网页设计图片排版代码

【Blazor】| 总结/Edison Zhou大家好,我是Edison。许久没有更新Blazor学习系列了,今天续更。Blazor 的路由系统就和 ASP.NET MVC的路由系统一样,可以为我们提供灵活的选项,可用于确保用户请求到达可处理它们并返回用户想要的信息的…

山东省工程建设交易信息网站重庆妇科医院排名前三

如果想要从Excel导入数据,那么就要用到xlsread函数。 具体如下: filename‘E:\数据\test.xlsx’; sheet3; xlRange‘C:E’; subsetAxlsread(filename,sheet,xlRange);%这样导入没有标题名字 其中sheet3;这里的3代表的是sheet从左到由的顺序&#xff0c…