Lecture 1 Making a C# GUI Program

Slides:



Advertisements
Similar presentations
Foundations of Programming and Problem Solving Introduction.
Advertisements

Revealing the CLR 4.0 Internals Svetlin Nakov Telerik Corporation
Introduction to the C# Programming Language for the VB Programmer.
Data Structure and Algorithm 1 Yingcai Xiao. You Me The Course (
Programming A Historic Perspective on Code Reuse Yingcai Xiao.
1 Programming Languages Translation  Lecture Objectives:  Be able to list and explain five features of the Java programming language.  Be able to explain.
Copyright © 2012 Pearson Education, Inc. Chapter 2 Introduction to Visual C#
Introduction to Java.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Tahir Nawaz Visual Programming C# Week 2. What is C#? C# (pronounced "C sharp") is an object- oriented language that is used to build applications for.
CMSC 202 Computer Science II for Majors Fall 2009 Introduction.
Object Oriented Software Development 1. Introduction to C# and Visual Studio.
Introduction to .Net Framework
1 8/29/05CS360 Windows Programming Professor Shereen Khoja.
C# A 1 CSC 298 Introduction to C#. C# A 2 What to expect in this class  Background: knowledge of an object oriented language of the C++, Java, … family.
11 Getting Started with C# Chapter Objectives You will be able to: 1. Say in general terms how C# differs from C. 2. Create, compile, and run a.
Lecture Set 1 Part B: Understanding Visual Studio and.NET – Structure and Terminology 1/16/ :04 PM.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Developing Applications for Mobile Devices Dr. Frank McCown GUI Programming Fall 2008.
CMSC 202 Computer Science II for Majors Object-Oriented Programming.
Tutorial C#. PLAN I. Introduction II. Example of C# program :Hello World III. How to use C# language GUI elements Primitives Types Expressions and operators.
All 300/400 Level CS Major Courses Tutoring Location: SEC 3433 Sign up or walk-in Introduction2-1.
Lecture 1 Programming in C# Introducing C# Writing a C# Program.
Jens Krüger & Polina Kondratieva – Computer Graphics and Visualization Group computer graphics & visualization Practical Course C# / DirectX WS 05/06 Introduction.
Computing with C# and the.NET Framework Chapter 1 An Introduction to Computing with C# ©2003, 2011 Art Gittleman.
ISYS 573 Special Topic – VB.Net David Chao. The History of VB Early 1960s:BASIC-Beginner’s All-Purpose Symbolic Instruction Code –Teaching –Simple syntax,
Introduction to the Java Virtual Machine 井民全. JVM (Java Virtual Machine) the environment in which the java programs execute The specification define an.
FRST JAVA PROGRAM. Getting Started with Java Programming A Simple Java Application Compiling Programs Executing Applications.
Week 1: THE C# LANGUAGE Chapter 1: Variables and Expressions ➤ Included in Visual Studio.NET ➤ What the.NET Framework is and what it contains ➤ How.NET.
1 CSC204 – Programming I Lecture 2 Intro to OOP with Java.
ISYS 812 Business Software Development David Chao.
Languages and IDE (Integrated Development Environment)
Overview of Java CSCI 392 Day One. Running C code vs Java code C Source Code C Compiler Object File (machine code) Library Files Linker Executable File.
Text Introduction to.NET Framework. CONFIDENTIAL Agenda .NET Training – Purpose  What is.NET?  Why.NET?  Advantages  Architecture  Components: CLR,
ITP 109 Week 2 Trina Gregory Introduction to Java.
Introduction CMSC 202 Fall Instructors Mr. Ryan Bergeron – Lecture Section 01 Tues/Thu 1:00 – 2:15 am, Sondheim 111 – Lecture Section 04 Tues/Thu.
Computer System Structures
Lecture 1b- Introduction
Before You Begin Nahla Abuel-ola /WIT.
Programming Language Hierarchy, Phases of a Java Program
Key Ideas from day 1 slides
Foundations of .Net Programming with C#
Lecture 1: Introduction to JAVA
Frank McCown TechLunch Old Dominion University March 28, 2007
Introduction to.
Ch 1. A Python Q&A Session Bernard Chen 2007.
C# and the .NET Framework
Introduction to .NET Framework Ch2 – Deitel’s Book
CE-105 Spring 2007 Engr. Faisal ur Rehman
2.1. Compilers and Interpreters
Part C - Introduction to Programming and the .NET Framework
Module 0: Introduction Chapter 2: Getting Started
Module 1: Getting Started
CS1S467 GUI Programming Lab Introduction.
Introduction to C# AKEEL AHMED.
Tutorial C#.
Assembler, Compiler, Interpreter
Lecturer: Mukhtar Mohamed Ali “Hakaale”
CS1S467 GUI Programming Lecture 2 Variables 1.
CSCI 3328 Object Oriented Programming in C# Chapter 1: Introduction to C# UTPA – Fall 2012 This set of slides is revised from lecture slides of Prof.
Advanced Programming: C# Lecture 01: Introduction
Introduction CSC 111.
.Net Framework Details Imran Rashid CTO at ManiWeber Technologies.
Computer Architecture
Frank McCown TechLunch Old Dominion University March 28, 2007
DOT NET ARCHITECTURE (OR) DOT NET FRAME WORK ARCHITECTURE
Programming language translators
IS 135 Business Programming
CS4540 Special Topics in Web Development Introduction to .NET
Presentation transcript:

Lecture 1 Making a C# GUI Program CS1S467 GUI Programming Lecture 1 Making a C# GUI Program

I am Dr Peter Plassmann peter.plassmann@southwales.ac.uk J226 (office) / J150 (lab) 01443 / 48 3717

My Co-Lecturer Dr Mark Ware mark.ware@southwales.ac.uk J302 (office) 01443 / 48 3608

Today RU Here Lecture slides are NOT good for learning Module content Difference Interpretation – Compilation .NET overview Structure of a C# program Lab preview

https://ruhere.southwales.ac.uk/

RFID Card Readers

RU Here Card

Electronic Register

Today RU Here Lecture slides are NOT good for learning Module content Difference Interpretation – Compilation .NET overview Structure of a C# program Lab preview

Lecture Slides Lecture Slides are unsuitable for learning how to program! You just get an illusion of learning! Programming is a craft. You have to do it to learn it.

Can you ride a bike by knowing this? Lecture Slides Can you ride a bike by knowing this?

Occasionally in Lectures Lecture Slides This Lecture Occasionally in Lectures Labs, & Home

Today RU Here Lecture slides are NOT good for learning Module content Difference Interpretation – Compilation .NET overview Structure of a C# program Lab preview

Timetable You Lectures Labs 1 hour lecture Mondays, 11:00 to 12:00, H230 Labs 2 hours lab Thursdays, 15:00 to 17:00, J113 You should all be Information Communications Technology (BSc / MComp) students

Assessment No Exam 2 Courseworks We know, you must be gutted... In labs, programming tasks CW 1: 40% CW 2: 60% To pass: CW1 * 0.4 + CW2 *0.6 > 40%

Module Content BlackBoard tour now (content, assignments, books, resources, labs, ...)

We Are Using C# C ‘dialect’ by MS (derived from J++ but a $20 million legal dispute later…) C is most popular programming language (Java, C# 2nd) Identical principle, different implementation: C# under .NET Java under JVM (Java Virtual Machine)

We Are Using Visual Studio 2017

Today RU Here Lecture slides are NOT good for learning Module content Difference Interpretation – Compilation .NET overview Structure of a C# program Lab preview

Making a Python Program Hello.py Human readable text file Interpretation of text file by Python Interpreter - line by line: translate to machine code, then run - this is VERY slow Python Interpreter for Windows PC Python Interpreter for Ubuntu PC Python Interpreter for Android Phone Output always the same “Hello World” “Hello World” “Hello World”

Making a C Program Hello.c Hello.exe “Hello World” Human readable text file Compilation of text file by the C compiler (e.g. gcc) Executable file, runs directly on the target system (but not other systems) Hello.exe Running of .EXE executable by target OS only Windows PC Ubuntu PC Android Phone “Hello World”

Making a Java Program Hello.java Hello.class “Hello World” Human readable text file Compilation of text file by ‘javac’ compiler ‘Byte Code’ file, interpreted by different dedicated Java Virtual Machines (JVMs) Hello.class JVM for Windows PC JVM for Ubuntu PC JVM for Android Phone Interpretation of Byte Code by JVMs Output always the same “Hello World” “Hello World” “Hello World”

monoDroid for Android Phone Making a C# Program Hello.cs Human readable text file Compilation of text file by C# compiler into CIL (Common Intermediate Language) .exe CIL executable, JIT (Just In Time) compiled by the .NET or mono CLR (the Common Language Runtime) Hello.exe Running of exe Code under the .NET/mono CLR .NET for Windows PC mono for Ubuntu PC monoDroid for Android Phone Output always the same “Hello World” “Hello World” “Hello World”

Today RU Here Lecture slides are NOT good for learning Module content Difference Interpretation – Compilation .NET overview Structure of a C# program Lab preview

CIL+CLR+BCL+"stuff" = .NET We are using these parts only The .NET Framework Stack from: http://en.wikipedia.org/wiki/File:DotNet.svg

Why the Complexity? Safety of code execution (e.g. array buffer overflows) Garbage collection (avoid memory leaks) Operating Systems agnostic (develop once, run anywhere. Java OK, Microsoft - kicking & screaming - .NET going Open Source) Many languages - 1 platform now some details……

Today RU Here Lecture slides are NOT good for learning Module content Difference Interpretation – Compilation .NET overview Structure of a C# program Lab preview

Structure of a C# Program Every C# (and Java, C, VB, ...) Program starts with ‘Main()’ ‘Main()’ is located in the ‘Program.cs’ file: using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using System.Windows.Forms; namespace ExampleProgram { static class Program // The main entry point for the application. static void Main() Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); }

Structure of a C# Program using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace ExampleProgram { public partial class Form1 : Form public Form1() InitializeComponent(); } The ‘Form1.cs’ file Application.Run(new Form1());

Structure of a C# Program The ‘bits and pieces: ‘using’: libraries with functionality, most default ones not needed ‘namespace’: combines multiple .cs files to a single program, normally one file contains one class ‘public partial class’: several classes make a program, required for OO programming. ‘{‘ and ‘}’ brackets: a pair defines a block. Note the alignment using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace ExampleProgram { public partial class Form1 : Form public Form1() InitializeComponent(); }

Today RU Here Lecture slides are NOT good for learning Module content Difference Interpretation – Compilation .NET overview Structure of a C# program Lab preview

Preview of Lab Session Where are the files? Where is my exectutable? Debug vs. Release How to copy a C# Project between computers The ‘Properties’ pane The ‘Toolbox’ pane How to run, how to stop a program

End of Lecture 1