Национальный цифровой ресурс Руконт - межотраслевая электронная библиотека (ЭБС) на базе технологии Контекстум (всего произведений: 605699)
Консорциум Контекстум Информационная технология сбора цифрового контента
Уважаемые СТУДЕНТЫ и СОТРУДНИКИ ВУЗов, использующие нашу ЭБС. Рекомендуем использовать новую версию сайта.

User Interface Development based on Windows Forms Class Library (417,00 руб.)

0   0
Первый авторАбрамян М. Э.
АвторыЮжный федер. ун-т
ИздательствоРостов н/Д.: Изд-во ЮФУ
Страниц280
ID779020
АннотацияThe tutorial focuses on developing a graphical user interface based on the Microsoft Windows Forms class library, which is a part of the .NET Framework since version 1.0. The tutorial is presented in the form of detailed descriptions of 23 projects that demonstrate various aspects of user interface development for Windows applications. Projects can be implemented in the Microsoft Visual Studio 2015–2019 IDE. Description of projects is accompanied by numerous comments. Typical errors that arise during the development of Windows applications are considered, ways to fix them are indicated. The final section contains 65 study assignments designed to consolidate the learning material.
Кому рекомендованоThe textbook is intended for students specializing in science and engineering.
ISBN978-5-9275-3830-0
УДК004.438(075.8)
ББК32.973.202я73
Абрамян, М.Э. User Interface Development based on Windows Forms Class Library = [Разработка пользовательского интерфейса на основе библиотеки классов Windows Forms] : [учебник] / Южный федер. ун-т; М.Э. Абрамян .— Ростов-на-Дону : Изд-во ЮФУ, 2021 .— 280 с. — Текст на англ. яз. — ISBN 978-5-9275-3830-0 .— URL: https://rucont.ru/efd/779020 (дата обращения: 06.02.2023)

Предпросмотр (выдержки из произведения)

User_interface_development_based_on_Windows_Forms_class_library____.pdf
Стр.3
Стр.4
Стр.5
Стр.6
Стр.7
Стр.8
User_interface_development_based_on_Windows_Forms_class_library____.pdf
УДК 004.438.NET ББК 32.973.202 А16 Published by decision of the Educational-Methodical Commission of the I. I. Vorovich Institute of Mathematics, Mechanics, and Computer Science of the Southern Federal University (minutes No. 5 dated April 12, 2021) doctor of Technical Sciences, Professor of the Department of Computer Science of the Rostov State Transport University, Professor M. A. Butakova; Reviewers: candidate of Physical and Mathematical Sciences, Head of the Department of Computer Science and Computational Experiment of the I. I. Vorovich Institute of Mathematics, Mechanics, and Computer Science of the Southern Federal University, Docent S. S. Mikhalkovich Публикуется с разрешения издательства БХВ, являющегося владельцем прав на первое издание книги на русском языке: Абрамян М.Э., Visual C# на примерах, 2008. which is the copyright holder of the first edition of the book in Russian: Абрамян М.Э., Visual C# на примерах, 2008. Published with the permission of the publishing house BHV, А16 Abramyan, M. E. User interface development based on Windows Forms class library : textbook / M. E. Abramyan ; Southern Federal University. – Rostov-on-Don ; Taganrog : Southern Federal University Press, 2021. – 278 p. ISBN 978-5-9275-3830-0 The tutorial focuses on developing a graphical user interface based on the Microsoft Windows Forms class library, which is a part of the .NET Framework since version 1.0. The tutorial is presented in the form of detailed descriptions of 23 projects that demonstrate various aspects of user interface development for Windows applications. Projects can be implemented in the Microsoft Visual Studio 2015–2019 IDE. Description of projects is accompanied by numerous comments. Typical errors that arise during the development of Windows applications are considered, ways to fix them are indicated. The final section contains 65 study assignments designed to consolidate the learning material. The textbook is intended for students specializing in science and engineering. ISBN 978-5-9275-3830-0 УДК 004.438.NET ББК 32.973.202 © ООО “БХВ”, 2017 © Southern Federal University, 2021
Стр.3
3 Contents Preface ................................................................................................................... 8 1. Developing projects in Microsoft Visual Studio environment ..................... 10 1.1. Creating, saving, and opening a project ................................................... 10 1.2. Adding a new form to the project and placing a new control on the form ................................................................................................... 12 1.3. Setting properties of forms and controls .................................................. 16 1.4. Defining event handlers ............................................................................ 18 1.5. Making changes to the program text ........................................................ 19 1.6. Application launch .................................................................................... 20 2. Console application: DISKINFO project ...................................................... 22 2.1. Creating a console application ................................................................. 22 2.2. Receiving the information about current disk .......................................... 24 2.3. Using command line arguments ............................................................... 28 3. Exception handling: EXCEP project ............................................................. 30 3.1. Handling a specific exception and exception groups ............................... 30 3.2. Handling any exception ............................................................................ 34 3.3. Re-throwing a handled exception ............................................................. 35 4. Events: EVENTS project ............................................................................... 37 4.1. Connecting an event to a handler ............................................................. 37 4.2. Disconnecting a handler from an event .................................................... 41 4.3. Connecting another handler to an event ................................................... 43 5. Forms: WINDOWS project ........................................................................... 46 5.1. Setting the visual properties of forms. Opening forms in normal and modal mode ...................................................................................... 46 5.2. Checking the state of the subordinate form .............................................. 49 5.3. Controls adapting to fit the window ......................................................... 51 5.4. Modal and non-modal buttons of the dialog window .............................. 52 5.5. Setting the active form control ................................................................. 54 5.6. Request for confirmation of closing the form .......................................... 54 6. Sharing event handlers and working with keyboard: CALC project ............ 57 6.1. Event handler for multiple controls .......................................................... 57 6.2. Calculations with control of the correctness of the input data ................. 58 6.3. The simplest techniques to speed up work using keyboard ..................... 60 6.4. Using a keyboard event handler ............................................................... 61 6.5. Control over changes to the input data ..................................................... 62
Стр.4
4 7. Working with date and time: CLOCK project .............................................. 64 7.1. Displaying the current time on the form .................................................. 64 7.2. Implementation of the stopwatch capabilities ......................................... 66 7.3. Alternative options for executing commands using the mouse ............... 70 7.4. Displaying the current status of the clock and stopwatch on the taskbar .......................................................................................... 71 8. Text input: TEXTBOXES project ................................................................ 72 8.1. Additional highlighting of the active text box ......................................... 72 8.2. Changing the tab order of text boxes ....................................................... 74 8.3. Blocking exit from an empty text box ..................................................... 76 8.4. Informing the user about the error ........................................................... 77 8.5. Providing additional information about the error .................................... 78 8.6. Form-level error checking ........................................................................ 78 9. Mouse event handling: MOUSE project ....................................................... 80 9.1. Dragging with the mouse. Setting the z-order of controls on a form ................................................................................................. 80 9.2. Resizing with the mouse .......................................................................... 84 9.3. Using additional cursors .......................................................................... 86 9.4. Handling a situation with simultaneous pressing of several mouse buttons ......................................................................... 87 9.5. Dragging and resizing a control of any type. Using the find and replace tool ............................................................... 90 10. Drag-and-drop: ZOO project ........................................................................ 93 10.1. Dragging labels on a form...................................................................... 93 10.2. Dragging labels to text boxes ................................................................. 96 10.3. Interaction of labels ................................................................................ 97 10.4. Actions in case of dragging to invalid target ......................................... 99 10.5. Additional coloring of source and target while dragging .................... 100 10.6. Customizing the cursor in drag-and-drop mode .................................. 101 10.7. Information about the current state of the program. Buttons with images .............................................................................. 102 10.8. Restoring the initial state ..................................................................... 105 11. Cursors and icons: CURSORS project ....................................................... 107 11.1. Using standard cursors ......................................................................... 107 11.2. Setting the cursor for a form and waiting mode indication ................. 109 11.3. Connecting new cursors to the project and saving them as embedded resources .......................................................................... 111 11.4. Working with icons .............................................................................. 112 11.5. Placing an icon of application in the notification area ........................ 113 12. Menus and processing of text files: TEXTEDIT1 project .......................... 116 12.1. Menu creation ...................................................................................... 116 12.2. Saving text to a file .............................................................................. 119
Стр.5
5 12.3. Clearing the editing area and opening an existing file ......................... 121 12.4. Request to save changes ....................................................................... 124 13. Advanced menu options, color and font setting: TEXTEDIT2 project .......................................................................................................... 126 13.1. Setting the font style (menu items as checkboxes) .............................. 126 13.2. Setting text alignment (menu items as radio buttons) .......................... 128 13.3. Setting the color of symbols and background color (thirdlevel menu commands and the Color dialog box) ................................. 130 13.4. Setting font properties using the Font dialog box ................................ 131 14. Editing commands, context menus: TEXTEDIT3 project .......................... 134 14.1. Editing commands ................................................................................ 134 14.2. Special visualization of unavailable editing commands. Working with the clipboard ................................................................... 136 14.3. Creating a context menu ....................................................................... 138 15. Toolbar: TEXTEDIT4 project ..................................................................... 140 15.1. Creation a toolbar and shortcut buttons. Adding images to menu items ........................................................................................ 140 15.2. Using shortcut buttons that behave as checkboxes and radio buttons ................................................................................... 143 16. Status bar and hints: TEXTEDIT5 project .................................................. 147 16.1. Using the status bar .............................................................................. 147 16.2. Inaccessible shortcut buttons ................................................................ 148 16.3. Hiding the toolbar and status bar .......................................................... 149 16.4. Displaying hints on the status bar ......................................................... 149 17. Formatting a document: TEXTEDIT6 project ............................................ 152 17.1. Replacing the TextBox control with the RichTextBox control ........... 152 17.2. Correcting the state of shortcut buttons and menu commands when changing the current format ......................................................... 155 17.3. Setting paragraph properties ................................................................. 157 17.4. Display the current row and column .................................................... 159 17.5. Loading and saving text without format settings ................................. 161 18. Colors: COLORS project ............................................................................ 163 18.1. Defining a color as a combination of four color components. Track bars and scroll bars ...................................................................... 163 18.2. Inverting colors and output color constants ......................................... 167 18.3. Grayscale colors ................................................................................... 168 18.4. Displaying color names ........................................................................ 169 18.5. Controls and their associated labels ..................................................... 171 18.6. Anchoring controls ............................................................................... 172 19. Drop-down list and list box: LISTBOXES project ..................................... 175 19.1. Creating and using drop-down lists ...................................................... 175 19.2. List box: adding and removing items ................................................... 177
Стр.6
6 19.3. Additional list operations ..................................................................... 179 19.4. Performing list operations with the mouse .......................................... 182 20. Checkboxes and checked list boxes: CHECKBOXES project ................... 186 20.1. Checkboxes and checking their state ................................................... 186 20.2. Global setting of CheckedListBox items ............................................. 189 20.3. Using checkboxes with three states ..................................................... 190 21. Viewing images: IMGVIEW project .......................................................... 193 21.1. Displaying a directory tree ................................................................... 193 21.2. View images from image files in the selected directory...................... 200 21.3. Docking of controls and its features .................................................... 206 21.4. Setting the image view mode ............................................................... 208 21.5. Saving information about the state of the program in the Windows registry ........................................................................ 211 21.6. Restoring information from the Windows registry .............................. 213 22. MDI application: JPEGVIEW project ........................................................ 216 22.1. Opening and closing child forms in MDI application ......................... 216 22.2. Standard actions with child forms ....................................................... 220 22.3. Adding a list of open child forms to the menu .................................... 222 22.4. Closing all child forms at the same time ............................................. 223 22.5. Image scaling ....................................................................................... 223 22.6. Automatic resizing of child forms ....................................................... 224 22.7. Additional control tools ....................................................................... 225 22.8. Scrolling the image using the keyboard ............................................... 228 23. Splash screen application: TRIGFUNC project ......................................... 231 23.1. Creating a table of trigonometric function values ............................... 231 23.2. Displaying the splash window when loading the program .................. 235 23.3. Using the splash window as an information window .......................... 237 23.4. Displaying the progress of the program loading .................................. 238 23.5. Early termination of the program ......................................................... 240 23.6. Dragging the splash window ................................................................ 241 24. Creating controls at runtime: HTOWERS project ...................................... 243 24.1. Creating a start position ....................................................................... 243 24.2. Redrawing the tower when changing the number of blocks ............... 244 24.3. Dragging blocks to a new location ...................................................... 245 24.4. Restoring the start position and counting the number of block movings .................................................................................. 248 24.5. Information about solving the problem ............................................... 249 24.6. Demo mode implementation ................................................................ 250 25. Study assignments ....................................................................................... 253 25.1. General requirements ........................................................................... 253 25.2. CONSOLE project: console applications, file and directory processing ................................................................. 253
Стр.7
7 25.3. DIALOGS project: form interaction .................................................... 256 25.4. SYNC project: control synchronization ............................................... 259 25.5. DRAGDROP project: drag-and-drop mode ......................................... 262 25.6. TIMER project: timer-controlled programs ......................................... 265 25.7. REGISTRY project: dialog boxes and working with the Windows registry .................................................................... 269 25.8. MDIFORMS project: MDI applications .............................................. 273 References .......................................................................................................... 277
Стр.8

Облако ключевых слов *


* - вычисляется автоматически