Presentation is loading. Please wait.

Presentation is loading. Please wait.

Based On Murach’s slides

Similar presentations


Presentation on theme: "Based On Murach’s slides"— Presentation transcript:

1 Based On Murach’s slides
Starting with Visual Studio Based On Murach’s slides

2 Objectives

3 Objectives (cont.)

4 A Windows Forms application running on the desktop

5 Common types of .NET applications

6 Windows Presentation Foundation (WPF)
A graphical subsystem by Microsoft for rendering user interfaces in Windows-based applications.  WPF, previously known as "Avalon", was initially released as part of .NET Framework 3.0. Rather than relying on the older GDI subsystem, WPF uses DirectX.

7 Visual Studio 2015/2017 Editions

8 Programming languages supported by Visual Studio 2015/17

9 The .NET Framework

10 The Visual Studio IDE

11 How a C# application is compiled and run

12 The Visual Studio Start Page

13 The Open Project dialog box

14 Project and solution concepts

15 FinancialCalculations.csproj (fragment)
<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" xmlns=" ToolsVersion="12.0"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion> </ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{03C1A F2-825D-9A46B1F803F2}</ProjectGuid> <OutputType>WinExe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>FinancialCalculations</RootNamespace> <AssemblyName>FinancialCalculations</AssemblyName> <FileUpgradeFlags> </FileUpgradeFlags> <OldToolsVersion>3.5</OldToolsVersion> <UpgradeBackupLocation> </UpgradeBackupLocation> <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> <TargetFrameworkProfile> </TargetFrameworkProfile> </PropertyGroup>

16 FinancialCalculations.sln (fragment)
Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 VisualStudioVersion = MinimumVisualStudioVersion = Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FinancialCalculations", "FinancialCalculations.csproj", "{03C1A F2-825D-9A46B1F803F2}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {03C1A F2-825D-9A46B1F803F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {03C1A F2-825D-9A46B1F803F2}.Debug|Any CPU.Build.0 = Debug|Any CPU {03C1A F2-825D-9A46B1F803F2}.Release|Any CPU.ActiveCfg = Release|Any CPU {03C1A F2-825D-9A46B1F803F2}.Release|Any CPU.Build.0 = Release|Any CPU GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobal >

17 The Form Designer window of Visual

18 The Code Editor window of Visual

19 The Solution Explorer

20 Project files The Solution Explorer uses different icons to distinguish between source code files that define forms and source code files that don’t. Each form is defined by two C# source files where each file contains a partial class. The file with the cs extension contains the code that’s entered by the programmer, and the file with the Designer.cs extension contains the code that’s generated when the programmer works with the Form Designer. When the project is compiled, these partial classes are combined into a single class that determines the appearance and operation of the form. A source code file that doesn’t define a form is usually stored in a single C# source file that contains a single class. The Program.cs file contains the C# code that starts the application and runs the first form. The app.config file contains configuration information for the application. The References folder contains references to the assemblies for the namespaces that the application can use.

21 Two floating windows, a hidden window, and a pinned window
On the Window menu, click Reset Workspace Layout Tools > Import and Export Settings > Reset all settings

22 How to rearrange windows
To undock a docked window so it floats on the screen, drag it by its title bar away from the edge of the application window or double-click its title bar. To dock a floating window, drag it by its title bar onto one of the positioning arrows that become available. Or, hold down the Ctrl key and then double-click its title bar to return it to its previous docked location. To hide a docked window, click its Auto Hide button. Then, the window is displayed as a tab at the edge of the screen, and you can display it by clicking on the tab. To display a window in a group of tabbed windows, click on its tab. If you dock, undock, hide, or unhide a tabbed window, all the windows in the group are docked, undocked, hidden, or unhidden. To pin a window to the left side of the Form Designer, click its Toggle Pin Status button. You can also use the commands in the Window menu to work with windows. For example, you can use the Reset Window Layout command to return the windows to their default layout. You can also save, apply, and manage custom layouts.

23 The form that’s displayed when the Financial Calculations project is run

24 How to build a project without running it
Use the BuildBuild Solution command. Or, right-click the project in the Solution Explorer and select the Build command from the shortcut menu. How to run a project You can run a project by clicking on the Start button in the Standard toolbar or by pressing F5. Then, the first form of the project is displayed on top of the Visual Studio window. If the project hasn’t already been built, the project is first built and then run.

25 The dialog box for upgrading a project to Visual Studio 2015/17

26 The application properties for a project


Download ppt "Based On Murach’s slides"

Similar presentations


Ads by Google