Time of Update: 2018-12-06
一、普通屬性首先我們來探討下.NET裡面的屬性,我們平時寫一個類的時候我們需要定義一些欄位來儲存一些值。public class Person{ public string nam; public int age;}但是我們會發現,這樣子定義的話不能滿足我們的需求,比如說我們需要實現一些對欄位值得驗證限制什麼的,這時候我們就需要屬性來為我們實現了。因為我們能在給屬性設定的時候編寫我們的驗證邏輯。public class Person{ private string name;
Time of Update: 2018-12-06
首先解釋什麼是 API來自百度百科的官方解釋:API(Application Programming
Time of Update: 2018-12-06
interface實現polymophersonView Code 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using TryCollection.Abstract; 6 7 namespace TryCollection 8 { 9 class Engine10 {11 private IState
Time of Update: 2018-12-06
Nested typesClass和Structure裡可以nest任意多的類型(包括class),但是Enum裡不可以。class{ enum ParserState { }}Class Person{ Class Room{} enum GunType{}}View Code Access
Time of Update: 2018-12-06
我們在學校裡學習任何一門語言都是從"Hello World"開始,這裡我們也不例外。1.代碼如下: 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4
Time of Update: 2018-12-06
Field initializers賦值可以直接給值,也可以是對象。建議不直接給filed initialzer賦值,當繼承的時候會出現順序的怪異問題:解決方案:在constructor裡給filed賦值注意如果是繼承類,自己ctor之前先要ctor基類。叫public Person()的時候會先跳到上面的基類public Base()先。using System;using System.Collections.Generic;using System.Linq;using
Time of Update: 2018-12-06
Wilma項目中的例子:View Code 1 <TextBox Width="28" 2 Margin="15,5,0,5" 3 HorizontalAlignment="Left" 4 VerticalContentAlignment="Center" 5
Time of Update: 2018-12-06
1.代碼如下: 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title></title> 5 <!
Time of Update: 2018-12-06
建立Resource的時候我們一般在本Solution根目錄下右鍵建立新的resource檔案,is just a collection of any typed objects, not elements.比如:1 <LinearGradientBrush EndPoint="1,0" x:Key="brush1">2 <GradientStop Color="Yellow" Offset="0" />3 <GradientStop Color="Orange"
Time of Update: 2018-12-06
Time of Update: 2018-12-06
在開發中,我們在使用視圖組件時,經常要設定寬度,高度,標題等屬性。而這些屬性可以通過“繼承”定義在我們定義的新組件中,從而達到重用的目地。1.代碼如下: 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/
Time of Update: 2018-12-06
在這節我們通過前幾節講的內容做一個登陸頁面,把前幾節講的內容貫穿一下。1.代碼如下: 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4
Time of Update: 2018-12-06
繼上一節內容,我們在表單裡加了個表單。如下所示代碼區的第28行位置,items:form。1.代碼如下: 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head>
Time of Update: 2018-12-06
4 kinds of RelativeSourcemode(MSDN)Self:If you want to bind to another property on the object:{Binding Path=PathToProperty, RelativeSource={RelativeSource Self}} Imagine this case, a rectangle that we want that its height is always equal to its
Time of Update: 2018-12-06
Firebug是一個Firefox外掛程式,功能:HTML查看和即時編輯、控制台、網路狀況等,是開發JavaScript、ExtJs的得力調試工具。一、Firefox的安裝.: http://www.mozilla.org.cn二、Firebug: https://addons.mozilla.org/zh-CN/firefox/search?q=firebug 下載後將 firebug 拖入到 firefox
Time of Update: 2018-12-06
繼上一節內容,我們在表單裡加了個兩個文字框。如下所示代碼區的第42行位置,items: [txtusername, txtpassword]。1.代碼如下: 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/
Time of Update: 2018-12-06
1.代碼如下: 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title></title> 5
Time of Update: 2018-12-06
繼上一節內容,我們在表單裡加了個兩個按鈕“提交”與重設。如下所示代碼區的第68行位置, buttons: [btnsubmit, btnreset]。1.代碼如下: 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html
Time of Update: 2018-12-06
1.代碼如下: 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <title></title> 5 <!
Time of Update: 2018-12-06
本教程的製作是基於我從零開始學習ExtJs到正式在項目中應用的整個學習過程和方法,其中肯定會有許多不足之處,還請大家多多批評指正。很多書籍和網上的教程大多是從API與ExtJs的機制開始講解的。而在我的學習過程中發現,沒有接觸過ExtJs或對javascript瞭解很少的同事,在看到前面幾章的時候,感覺到很茫然(本人也系菜鳥),所以對此深有感觸。針對此問題,我的學習方法如下:1.從ExtJs的視圖開始學習。 如:表單,表單,樹等等。先搞些所見即所得