0
Answer

Need Help With C# and Visual Studio

aa

aa

17y
2k
1

Hi

I am a total noob at writing c# applications. I have only really worked with visual studios and C# in the terms of web related stuff (even though I am a noob in that too I know how to use visual studios, write c# that is needed for my site and write the asp).

I however need to make a C# application and like I said I have not really made any applications using visual studio.

What I need to make.

1. A toolbar that will let me open up a file(an .xml file).
2. This will extract parts of of the xml and display it. Like the xml file I have is not a true xml file as it has html stuff in it(don't ask its a long story). The xml that is part of this file is called mathml(writes equations for math).

so there will be a file like this
<html>
<head>
</head>
<body>
<math xmlns='http://www.w3.org/1998/Math/MathML'>
some more math tags would be here.
</math>
<body>
</html>
So I could have in a file like 30 of these start and close math tags(once for each equation). So what I want is when the file is open it looks for all the <math> tags and takes all the crap and I guess stores it in a tmp file(or maybe memory). It then in my program displays math question1 , math question 2, etc(depending on how many tags it finds so if the file had 30 it would have 30 of them).Also where the math tag was(in the original  xml file code) it replaces it with a tag to remember its location like in comments it would go math question 1 goes here.

3. They will be able to click on one of these and they will be able to see what the question looks like (I see they have something in the visual studios tool bar that allows u to have an inline browser so this might work otherwise I might have to take the mathml and generate a image out of it).

4. An import button that loads up another program (webeq). So say the user chooses math question 1 and hits the import button that will go off and take open that webeq program and insert the mathml code into it(how webeq works is there is a big blank space where you make your equation and you can paste mathml code into it and it will generate the image of it then you can make changes to it or you can use their root signs and make an equation and save the output as a mathml file).

                   Or
When the user has selected say math question 1 and hits the import button it just saves math question 1 as a webeq file(file extension unkown at this time it does not seem to have one). Then it would launch that file. So it sort of is like if you got a word file and you double click it opens up that file in word and displays it.

5. The user makes the changes to the file and hits the save button(in the webeq program). My program (the program that extracted the mathml code shoud look at the file every x seconds and reloads it in. So the user chances say 5 to 3 my program sees that and reloads the file that was used that has the change in it.

6. When the user comes back to my program there should be an option that merges all the mathml code back into the original xml file(by using the markers that were left behind to insert everything in the right area).

7. I would like also to try to get a backup feature so like when a user opens an xml file it just makes a backup file.

Now what I need (I am sure this sounded like I want you to do my assignment). I need some sites or a book that will help me achieve this.

So I think I need some sort of tutorials(or a book) that do this.

1.       How to upload a file

2.       How to load a file into a program(with filtering)

3.       How to simulate a double click on a document

4.       How I could somehow to get the filter text to be pasted into the program(incase the double click approach does not work)

5.       How to monitor a file(saw something called filesystemwatcher.filter this might be what I am looking for).

6.       Make backups of a file

7.       Re merge a file back into the original file looking for  pointers.

Anything other tips or tricks would be nice too like I said I understand how to write C# code but I am not an expert but I am not a total beginner at c# either.