Define the standards for a typical static data maintenance

Assignment Help Computer Engineering
Reference no: EM132991018

ITAP3011 Developing Windows Applications

Lab Tutorial - 5

BusCase UI 6.1

Dafesty Video Rental Pte Ltd.is interested in creating the following Forms:
• Customer Maintenance
• Video Tape Master Maintenance

They suspect that there may be a few more Static Data Maintenance Screens that would have similar functionality and hence desire to create a template form to act as a "master" format for all such maintenance screens.

Your Task:
1. Define the Standards for a typical static data maintenance screen.
2. Identify the Template Components, i.e., those features that would be common for all the data maintenance screens.
3. Sketch a rough figure on the look and feel.
4. Identify program codes that would be common for all the screens.
5. Create a Template Form with the look and feel identified in step 3 and having program codes determined in step 4.
6. Use (Inherit) the template to create
a. Customer Maintenance Screen
b. Video Maintenance Screen

BusCase UI 6.2
Dafesty Video Co's CTO, Karen is taking efforts to convert their video rental information system not only friendly from user point of view but is bent upon making his system adopt good programming and design practices. In this light, she noticed that there is a common requirement in many of their Windows Forms.

The textbox used in many screens invariably proceeded with a label - this was not her major concern. She found that very often text boxes used in the forms required only alphanumeric entry and she felt the need to prevent the users from entering data other than alphanumeric characters. Not knowing how to approach the problem, she called Venkat of VIT who had taught her in a short course she attended. After listening to her requirement Venkat said: "I do not off- hand remember any property in Textbox control that would prevent entry of special characters." He suggested that a good way to do this would be to create a "user control" object that would comprise of a composition of two .NET visual controls, viz., Label and TextBox. Further the TextBox in the user control can have an event handler on keydown that would cancel the entry if the key that was pressed were non-alphanumeric.

Karen was thrilled by the idea, but confessed that though she understood the concept, she does not know how to proceed on actual development and requested Venkat to provide a proof of concept code sample. Venkat is currently very busy, so can you help him develop the user- control?

Description of the User Control:

The above control can be used in ay form. Let us call the user control: CodeFieldUControl. The user control would consist of a label and a textbox pair.

The user control should provide a facility for the consuming form to set the label text since each consuming form can have different captions. This is achieved fy providing a public get/ser property (accessor/mutator) to the label's text property. We would require a public property as mapping since the label control is private to the user control class. Let us call the getter/serer public property as LabelCaption.

The text box (placed in the user control) is a normal textbox, but we wish to have some additional features for this textbox. These features should be ser / programmed at the user control level for the text box. Hence the consumer of this user control would automatically be able to achieve all these features without writing codes each time in his/her form.

The following are the identified preset properties of the components within the user control.
a. Label's Text font size is 10pt
b. Textbox's Text font size is default.
c. Textbox automatically makes the text to upper case.
- To achieve this you need to sert the CharacterCasing Property appropriately.
d. Only alphanumeric characters can be entered in the text box when a person tries to enter values in the user-control's text box when this user control is used in a consuming form.*

Checking for the Alphanumeric data entry:

o Use the KeyPress event of the textbox.

o From the event argument, it would be possible for you to capture the key character that invoked the event.

o If the character pressed is not alphanumeric, then you can stop proceeding with the action by setting the Handled property of the event argument to true.

o It would be a challenge to incorporate permitting the backspace or delete keys since these are often used during data entry process - if you are not able to achieve this it is ok. If you need to achieve this also, you may need to consider additional programming and may require use of a combination of events like keydown /keyup in addition to the keypress. This may be taken up if students wish perfection.

Steps for doing this workshop:

1. Create (or use) the Windows forms project.
2. Add a couple of forms that would consume the usercontrol. Ideally these are forms that would be launched from a menu in form1, the application start up form.
3. Add a user control (name it CodeFieldUControl.cs).
4. Define the user control features:
a. Place Textbox and label with predefined properties as mentioned in the specs (including the character casing restrictions).
b. Add the getter/setter Property for label text.
c. Write event handler codes for alphanumeric check.
5. Add the user control to a consuming form:
a. Selecting the UserControl, look in the Properties Window - you should be able to see the get/set property LabelCaption in the properties window! Set the label as desired on the fly.
b. Add any other normal controls if required.
6. Run the project and test.
7. Repeat steps 5 and 6 in another form - notice how the features are well reused.

Wow what a reuse!

To distribute your user controls to other projects you may try this: (this is an optional exercise)
1. Start a fresh project called UCLib - the project should be a user control project not a windows forms project.
2. You need to do the user control as before - rather than repeating all the steps, you may simply copy the CodeFieldUControl.cs into the new project directory and include it from the solution explorer.
3. Compile the project into a dll library.
4. Start a new windows forms project call it TestUCApp.
- Add a couple of forms in this where the UC would be consumed.
5. Right click on the Toolbox and add components. Choose the UCLib.dll
a. You would notice that the user control that you had created now appears in the Toolbox.
b. You would also notice that references are added in the solution explorer.
6. Now you can use the user control the same way you had done earlier.
a. Test it and enjoy.
b. Why not, perhaps you can build a lot of useful templates and controls in this separate library project for use at a later point.
7. Caution: After adding a user control to an application project, if you make modifications to the original control, the changes are not automatic since the old version of the dll has been localised in the windows forms library - hence you may need to repeat step 5, every time you make a change in the library. There are of course other productive ways of tackling it; these are not discussed here since it does not relate to UI specific learning.

Attachment:- Activity 5.rar

Reference no: EM132991018

Questions Cloud

Discuss the environmental implications of the intake of beef : Read the following article "Avoiding meat and dairy is 'single biggest way' to reduce your impact on Earth" before answering the assignment questions below:
Analyse the effects of globalisation and digitalisation : 1) Critically analyse the effects of globalisation and digitalisation on the industry where the selection firm in operating.
Design windows applications with visual studio : Design Windows Applications with Visual Studio - Design following Marks Calculator on Visual Studio. Use C#.Net to design and develop the functionality.
Idea of customer journey of scooter : Give some idea of customer journey of scooter.
Define the standards for a typical static data maintenance : Define the Standards for a typical static data maintenance screen and Identify the Template Components, i.e., those features that would be common
Define operations management for the car manufacturing : You are an operations manager at a large car manufacturing plant in the United States. Your Chief Operating Office (COO) has sent a request that you write a mem
Primary purposes of organizational communication : -Why is it important to make a distinction between "group" and "team"? What kinds of behaviors might be different in these assemblages?
What is walt disneys current culture and structure : What is Walt Disneys current Culture and Structure?
Create an edm that would consist of movie entity and produce : ITAP3011 Developing Windows Applications - Create an EDM that would consist of Movie entity and Producer Entity.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd