This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void button1_Click(object sender, EventArgs e) | |
| { | |
| // Show hộp thoại open file ra | |
| // Nhận kết quả trả về qua biến kiểu DialogResult | |
| DialogResult result = openFileDialog1.ShowDialog(); | |
| //Kiểm tra xem người dùng đã chọn file chưa | |
| if(result == DialogResult.OK) | |
| { | |
| // Gán .... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void Form1_Load(object sender, EventArgs e) | |
| { | |
| // Chèn ảnh từ ổ cứng trực tiếp bằng thuộc tính ImageLocation | |
| // Thiết lập thuộc tính Size một cách tự động | |
| pictureBox1.ImageLocation = "BeigeMonitor1.png"; | |
| pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private void Form1_Load(object sender, EventArgs e) | |
| { | |
| // Lấy file ảnh từ ổ cứng | |
| // File ảnh phải có trong thư mục debug của solution | |
| // Nếu không chương trình sẽ bị crash vì không tìm thấy file | |
| // Có thể để đường dẫn tuyệt đối đến file ảnh | |
| //(bao gồm cả ổ đĩa, thư mục,...) | |
| Image image = Image.FromFile("BeigeMonitor1.png"); | |
| // Thiết lập thuộc tính của PictureBox |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // access modifiers, accessors và constructors được bỏ qua cho ngắn gọn | |
| class IceTeaVietDeveloper implements Parcelable { | |
| String name; | |
| int yearsOfExperience; | |
| List skillSet; | |
| float favoriteFloat; | |
| IceTeaVietDeveloper(Parcel in) { | |
| this.name = in.readString(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // access modifiers, accessors và constructors được bỏ qua cho ngắn gọn | |
| public class HCMUSDeveloper implements Serializable | |
| String name; | |
| int yearsOfExperience; | |
| List skillSet; | |
| float favoriteFloat; | |
| static class Skill implements Serializable { | |
| String name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sourceSets { | |
| main { | |
| res.srcDirs = ['src/main/res', | |
| 'src/main/res/layouts/chat', | |
| 'src/main/res/layouts/home', | |
| 'src/main/res/layouts/profile' | |
| ] | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Base | |
| { | |
| public Base() | |
| { | |
| Console.WriteLine("Base 0 constructor called"); | |
| } | |
| public Base(int i) | |
| { | |
| Console.WriteLine("Base " + i + " constructor called"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Base | |
| { | |
| public Base() | |
| { | |
| Console.WriteLine("Base 0 constructor called"); | |
| } | |
| } | |
| class Child : Base | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Button | |
| android:id="@+id/start" | |
| android:layout_width="wrap_content" | |
| android:layout_height="wrap_content" | |
| android:layout_below="@+id/check"/> | |
| <Button | |
| android:id="@id/check" | |
| android:layout_width="wrap_content" | |
| android:layout_height="wrap_content"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <Button | |
| android:id="@+id/check" | |
| android:layout_width="wrap_content" | |
| android:layout_height="wrap_content" | |
| /> | |
| <Button | |
| android:id="@+id/start" | |
| android:layout_width="wrap_content" | |
| android:layout_height="wrap_content" |