Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Simple Text Editors in C#

streamwriter

  • Please log in to reply
2 replies to this topic

#1 ztc1234

ztc1234

    CC Lurker

  • Just Joined
  • Pip
  • 1 posts
  • Programming Language:C#
  • Learning:C#

Posted 16 September 2012 - 02:59 AM

1. Complete the following programming exercise (SIMPLE TEXT EDITOR WITH ONE LARGE RICH TEXT BOX). You will use the OpenFileDialog, StreamReader and StreamWriter objects; the Close, Peek, ReadLine, ShowDialog and WriteLine methods.
Create a simple text editor that has one large rich text box (with its Multiline property set to true). Set the text control to fill the form and set its Anchor property to all four edges so that the control fills the form even when it is resized.
Allow the user to save the contents of the text box in a data file and load a data file into the text box using the Open File dialog box.
Use a StreamWriter and StreamReader or File.WriteAllText and File. ReadAllText.
Make sure you close your project when complete. Make a copy of the project folder, compress it to a single file, and submit it.

2. Complete the following programming exercise (WRITE AN MDI PROJECT THAT IS A SIMPLE TEXT EDITOR). You will use the IsMdiContainer and MdiWindowListItem properties; the LayoutMdi method. Refer back to the previous required assignment from Lesson K08-5 (SIMPLE TEXT EDITOR WITH ONE LARGE RICH TEXT BOX) as a base for this assignment.
Write an MDI application that is a simple text editor. Allow the user to open multiple documents, each in a separate child form. For the text editor, use one big TextBox control with its Multiline property set to true or a RichTextBox control. Set the control's Anchor property to all four edges so the control fills its form.
The main form should have an Open menu item to open previously saved files; the child forms should have a Save menu item to save their text to a file. Use the file handling that you learned and display the name of the file in the form's title bar.
Make sure you close your project when complete. Make a copy of the project folder, compress it to a single file, and submit it.
  • 0

#2 kernelcoder

kernelcoder

    CC Devotee

  • Expert Member
  • PipPipPipPipPipPip
  • 990 posts
  • Location:Dhaka
  • Programming Language:C, Java, C++, C#, Visual Basic .NET
  • Learning:Objective-C, PHP, Python, Delphi/Object Pascal

Posted 16 September 2012 - 03:46 AM

Those tasks are really two simple one. I know you are just a starter but believe me you just need to know how to create a C# WinForm app and how to drag/drop user controls on the form and change it's properties. Read the following tutorials which will help you to come to your tasks done.Read those tutorials, start your homework step by step and if you face any problem in any step, ask here and we'll help you.
  • 0

#3 BlackRabbit

BlackRabbit

    CodeCall Legend

  • Expert Member
  • PipPipPipPipPipPipPipPip
  • 3871 posts
  • Location:Argentina
  • Programming Language:C, C++, C#, PHP, JavaScript, Transact-SQL, Bash, Others
  • Learning:Java, Others

Posted 18 September 2012 - 05:14 PM

How did it go ?
  • 0





Also tagged with one or more of these keywords: streamwriter

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download