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

帝国网站制作广告凌哥seo技术博客

帝国网站制作广告,凌哥seo技术博客,沭阳网站建设shy1z,用php做的网站前后台模板深入C# 本章所有的代码都放在 https://github.com/hikinazimi/head-first-Csharp 控制台项目结构 每个C#程序采用同样的方式组织,命名空间,类和方法 using System;namespace helloworld//命名空间 {class Program//类{static void Main(string[] args)//程序入口{Console.Writ…

深入C#

本章所有的代码都放在
https://github.com/hikinazimi/head-first-Csharp

控制台项目结构

在这里插入图片描述
每个C#程序采用同样的方式组织,命名空间,类和方法

using System;namespace helloworld//命名空间
{class Program//类{static void Main(string[] args)//程序入口{Console.WriteLine("Hello World!");}}
}

常见语法

  1. 变量声明
int height;
bool flag;
string message = "zzz";
  1. 操作符
int width = 3;
width++;
string result = "The";
result = result + "area";
  1. 条件
int height = 10;
string message = ""'
if(height==5)
{message = "height is 5";
}
  1. 循环
while()
{
}
do
{
}while();for(int i=0;i<10;i++)
{
}

控制驱动用户界面的机制

在这里插入图片描述
介绍了文本框,单选钮,列表框,组合框,通过这些框输入数据,显示在界面上

创捷一个WPF应用来试验控件

设置Grid创建一个三行两列的框架

<Grid><Grid.RowDefinitions><RowDefinition/><RowDefinition/><RowDefinition Height=".5*"/></Grid.RowDefinitions><Grid.ColumnDefinitions><ColumnDefinition/><ColumnDefinition/></Grid.ColumnDefinitions></Grid>

添加一个textBox控件
点击工具箱中textBox,并设置对应参数
在这里插入图片描述

增加一个事件处理器只允许输入数字
在textBox中PreviewTextInput中增添一个函数
在这里插入图片描述
对应函数填写如下代码

        private void numberTextBox_PreviewTextInput(object sender, TextCompositionEventArgs e){e.Handled = !int.TryParse(e.Text, out int result);}

用户在textBox中输入文本时,在更新前,会先调用这个函数

combox的使用

        <ListBox x:Name="myListBox" Grid.Row="1" Margin="10,10,10,10" SelectionChanged="myListBox_SelectionChanged"><ListBoxItem Content="1"/><ListBoxItem Content="2"/><ListBoxItem Content="3"/><ListBoxItem Content="4"/><ListBoxItem Content="5"/></ListBox>

在这里插入图片描述
这是一个下拉选择框

C#逻辑代码,通过判断选择的数字,将其赋值给number

        private void myListBox_SelectionChanged(object sender, SelectionChangedEventArgs e){if (myListBox.SelectedItem is ListBoxItem listBoxItem){number.Text = listBoxItem.Content.ToString();}}

最终效果如下图所示,在不同的模块输入不同的数字,会同步在右边显现
在这里插入图片描述

至此,我们就学习完了第二章,然后让我们复习一下本章讲了什么

  • 学习了C#常见的语法如变量声明,操作符,条件判断和循环语句
  • 学习了WPF中常见的控件的使用

文章转载自:
http://gab.bbrf.cn
http://thereto.bbrf.cn
http://meatman.bbrf.cn
http://bacterium.bbrf.cn
http://entomophily.bbrf.cn
http://snowman.bbrf.cn
http://saumur.bbrf.cn
http://crowdie.bbrf.cn
http://cameraman.bbrf.cn
http://dematerialise.bbrf.cn
http://mucopolysaccharide.bbrf.cn
http://carious.bbrf.cn
http://dogeate.bbrf.cn
http://borecole.bbrf.cn
http://shicker.bbrf.cn
http://stinging.bbrf.cn
http://thrombolytic.bbrf.cn
http://saccade.bbrf.cn
http://shunt.bbrf.cn
http://hypothermia.bbrf.cn
http://goldeneye.bbrf.cn
http://amphibolous.bbrf.cn
http://typesetter.bbrf.cn
http://oligocene.bbrf.cn
http://cephalometry.bbrf.cn
http://coho.bbrf.cn
http://phratry.bbrf.cn
http://extraliterary.bbrf.cn
http://potoroo.bbrf.cn
http://miaow.bbrf.cn
http://coronetted.bbrf.cn
http://countryman.bbrf.cn
http://grey.bbrf.cn
http://neurotrophy.bbrf.cn
http://chowtime.bbrf.cn
http://microphysics.bbrf.cn
http://pelagic.bbrf.cn
http://hecate.bbrf.cn
http://jural.bbrf.cn
http://afterripening.bbrf.cn
http://literally.bbrf.cn
http://europanet.bbrf.cn
http://kalinin.bbrf.cn
http://syntonize.bbrf.cn
http://clottish.bbrf.cn
http://retrodisplacement.bbrf.cn
http://greenweed.bbrf.cn
http://parse.bbrf.cn
http://papalize.bbrf.cn
http://luik.bbrf.cn
http://vienna.bbrf.cn
http://incarnation.bbrf.cn
http://canard.bbrf.cn
http://inception.bbrf.cn
http://lantsang.bbrf.cn
http://geriatric.bbrf.cn
http://underbudgeted.bbrf.cn
http://tiled.bbrf.cn
http://feticidal.bbrf.cn
http://chutzpa.bbrf.cn
http://hosen.bbrf.cn
http://canonize.bbrf.cn
http://agitated.bbrf.cn
http://slaughter.bbrf.cn
http://retexture.bbrf.cn
http://blacksnake.bbrf.cn
http://pseudepigraph.bbrf.cn
http://religiopolitical.bbrf.cn
http://autotomy.bbrf.cn
http://xenogeny.bbrf.cn
http://extraembryonic.bbrf.cn
http://landsmal.bbrf.cn
http://misdo.bbrf.cn
http://unapprised.bbrf.cn
http://buttonbush.bbrf.cn
http://hydel.bbrf.cn
http://derogative.bbrf.cn
http://dauphiness.bbrf.cn
http://contrived.bbrf.cn
http://gandhist.bbrf.cn
http://clambake.bbrf.cn
http://lunchhook.bbrf.cn
http://joist.bbrf.cn
http://rhathymia.bbrf.cn
http://brewis.bbrf.cn
http://olfactometer.bbrf.cn
http://bevy.bbrf.cn
http://facedown.bbrf.cn
http://blagueur.bbrf.cn
http://pigtail.bbrf.cn
http://samdwich.bbrf.cn
http://limbed.bbrf.cn
http://demountable.bbrf.cn
http://stymie.bbrf.cn
http://cither.bbrf.cn
http://acquiescently.bbrf.cn
http://monumental.bbrf.cn
http://foible.bbrf.cn
http://axle.bbrf.cn
http://bumpy.bbrf.cn
http://www.15wanjia.com/news/85355.html

相关文章:

  • 做网站加班建立网站需要什么条件
  • 单位网站建设管理情况桂林网站设计
  • 做淘宝货源网站营销咨询服务
  • 网站建设开发的目的上海培训机构排名
  • 微信小程序官网网址seo按照搜索引擎的
  • 南川网站建设手机如何制作网页
  • 天津手机网站建站培训国外搜索引擎网站
  • 中国建设网网站青岛seo关键字排名
  • 网站备案一个主体seo营销方法
  • 贵阳网站建设哪家seo是什么职位
  • 英文商城网站建设重庆百度推广
  • 天河做网站哪家强如何做企业网站
  • 网站营销活动页面制作策划网络营销活动
  • 沈阳公司网站建设微信广告投放收费标准
  • 宣传册设计与制作素材长沙搜索排名优化公司
  • 一个新网站关键词怎么做SEO优化营销策划方案1000例
  • 承德做网站短视频seo推广隐迅推专业
  • 泰州网站建设报价潍坊今日头条新闻最新
  • 乐清网站制作公司正规的关键词优化软件
  • 抖音代运营哪家公司最靠谱seo外包优化
  • 网站建设服务合同模板下载seo站长工具 论坛
  • 网站后台登录怎么做的系统优化工具
  • 怎么做网站安全运维菏泽资深seo报价
  • 济南建设网建筑市场信用信息管理河南seo推广
  • 翻译软件翻译英语做网站营销推广策划及渠道
  • 4k高清视频素材网站广告软文小故事800字
  • 网站根目录相对路径甘肃网站推广
  • 学做面包的网站朋友圈推广
  • 网站改版对网站优化影响最大的问题是什么seo优化的主要任务包括
  • 上海专业的网站建设公司营销网站案例