|
A well designed solution should be good Maybe you can try some source control software. I personally, name classes appropriately so I do not have to search a lot for what I need.
|
|
|
|
|
Sometimes as a simple .snippet[^]-file, or as an item-template[^] if it's a complete class. One can share the locations to these snippets and paths in a team
If both categories don't fit, I'll most likely write another article; since an article would describe the problem that's being solved and probably would have example-code.
I are Troll
|
|
|
|
|
Tons of simple notepad files.
However, this is a very generic topic and not an ideal topic for discussion in the C# forum.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
|
|
|
|
|
yes, I am actually using this idea with txt files. But I also search for alternatives...that's why this topic.
I am not sure if im doing it right, but at some level it seem that is the best way of storing my custom codes.
I am curious if anybody have such a code library in the txt file format.... I wish to see how you do it. An example is great. thx.
|
|
|
|
|
I think what you are looking for is what I use, it's a program called notetab (www.notetab.com). It's not free but cheap, and the best advantage is that you can create outline files. In an outline file you have at the left the table of content and you can jump to that page. If you organise your notes in appropiate outlines (tabbed at the top of the page) you can quickly jump to the correct note.
I use this tool for "howto's" like push this button, and choose this checkbox etc.
An example of this; if I need to display PDF's in a solution I choose my csharp outline, and click the page "pdf", there I have collected all my notes on how to handle pdf files (including links to my FTP notes).
As I use a version of about 10 years old, I can't advise between the standard and pro version of the tool, but you definiately need outlines.
Pure reusable code I have in a utilities DLL that is linked to every project. E.g. I use MySql as a database in almost all my projects, so code to connect to the database and manage the connection is all in the utilities DLL.
Hope this helps.
Rob
|
|
|
|
|
Notetab definitely is a great help. Thank you for pointing it to me. I was trying a lot of editing software (MS.Word, MindManager, Dreamweaver,ysitebuilder,html editors even C#-as a editing tool , but in time i give up and I return to the old txt files.)
Why? -Because I needed a fast way to look/search/edit visually and explicitly.
Changing the subject from notetab a bit,...The best wysiwyg software I encounter until now remain MS.Word - I have worked with it a lot and tried other variants of wysiwyg's but Word remain the no# 1...for me. So, if they could manage to make some search capabilities between docx files (not only infile)... then I will be not so stressed...but until that will appear, I'll stick with the oldies. Why I specify about that, is because the txt files are the inexpensive files for search inside them with minimum of hardware stress and with great speed (manual or automatic). That is the only reason I come back for them...though my heart is crying after wysiwyg friendliness. This is my "of".
|
|
|
|
|
I have the XML below coming from a SQL table. I want to display the data in a 2 column grid, so that the user can edit the values. Anyone know how to do this?
<CustomerSettings xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/WALZ.DataTransformation.PlugIn">
<_customerSettingsDictionary xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:KeyValueOfstringanyType>
<d2p1:Key>DepartmentID</d2p1:Key>
<d2p1:Value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int">7</d2p1:Value>
</d2p1:KeyValueOfstringanyType>
<d2p1:KeyValueOfstringanyType>
<d2p1:Key>Delimiter</d2p1:Key>
<d2p1:Value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">~</d2p1:Value>
</d2p1:KeyValueOfstringanyType>
<d2p1:KeyValueOfstringanyType>
<d2p1:Key>ReferenceColumn</d2p1:Key>
<d2p1:Value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int">0</d2p1:Value>
</d2p1:KeyValueOfstringanyType>
<d2p1:KeyValueOfstringanyType>
<d2p1:Key>DelimiterCount</d2p1:Key>
<d2p1:Value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:int">22</d2p1:Value>
</d2p1:KeyValueOfstringanyType>
<d2p1:KeyValueOfstringanyType>
<d2p1:Key>SupplimentalTableConnString</d2p1:Key>
<d2p1:Value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">Data Source=san-qa-db-01;Initial Catalog=NOI_Registration;Integrated Security=True</d2p1:Value>
</d2p1:KeyValueOfstringanyType>
<d2p1:KeyValueOfstringanyType>
<d2p1:Key>LogFileName</d2p1:Key>
<d2p1:Value xmlns:d4p1="http://www.w3.org/2001/XMLSchema" i:type="d4p1:string">c:\temp\NOILogFile.txt</d2p1:Value>
</d2p1:KeyValueOfstringanyType>
</_customerSettingsDictionary>
</CustomerSettings>
Everything makes sense in someone's mind
|
|
|
|
|
Why are you getting xml from the database instead of using a datatable or dataset?
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Other apps are using this data. Right now it's manually entered using a script. I'm writing a UI for it.
Everything makes sense in someone's mind
|
|
|
|
|
This brings up even more questions, but whatever...
If you can't query the database and use a DataTable you can create a XSLT to transform this format into a different structure then either use DataSet.ReadXml[^]
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
I can get the data back as XML, I just need to put it in an editable format.
Everything makes sense in someone's mind
|
|
|
|
|
I must be missing something.
I'm telling you, take the xml you have, transform it to a different structure (without the garbage), load it into a DataSet using ReadXml, then bind the DataSet to grid in edit mode, or any other controls you want.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Sounds like he needs to write it back in the same format, so by "removing the garbage", he loses that info.
|
|
|
|
|
Tht's correct. And, each row's XML will be different.
Everything makes sense in someone's mind
|
|
|
|
|
I was typing out a response when you answered, so I'll just throw that out and respond to this since you answered most of my questions.
You could use xsd to generate a schema and then use xsd again to generate wrapper class(es) from the schema, but the end result here will be that you'll end up with a typed DataTable, etc. which wouldn't really be 2-way bindable directly. You'd also end up with a ~50k to ~100k C# wrapper class. EDIT: Not sure about part of my answer here, maybe DataGrid has a method to bind to a DataTable? EDIT #2: Even if DataGrid does have a method to bind to a DataTable, getting the XML out of a DataTable in the precise way you want it is often a practice in futility.
So, your best bet would be to use the C# XML parser to parse the file yourself into an ObservableCollection<> or whatever and then write it back out to the DB after you are done editing.
|
|
|
|
|
Ya, that was my thinking. I was hoping for a canned solution instead of coding it all myself. But hey,. I'v got nothing better to do today
Thanks
Everything makes sense in someone's mind
|
|
|
|
|
I have a ListView in my main window which displays data from a bound List<T> . This List is re-sorted according to different criteria according to user actions.
I want to apply conditional formatting to this ListView for both Font and Background , based on the contents of two different fields of the <T> objects.
At least the values of the field responsible for the Font formatting can change during run time.
I don't have any idea how to code this...
Hopefully
---Dirk Bock
|
|
|
|
|
|
Uups...
[Moving this thread]
Dirk Bock
|
|
|
|
|
I need to Open Excel Work book in my Wpf Form is it Possible and if yes then How can I Do it?
|
|
|
|
|
It isn't really possible to embed a worksheet in your form, but you can use a DataGrid to view and edit the values. To use excel in your app, google excel interop or ADO.Net and you should get lots of results. Good Luck
|
|
|
|
|
Hi all,
I have made an application in which i need to save my data in excel sheet, for doing this i have used
using Microsoft.Office.Core;
using Excel = Microsoft.Office.Interop.Excel;
as namespace and its functions..
My problem is my exe run's fine on windows vista and higher version but it is not running on windows xp. When i run it on xp it gives exception.
I am not getting what i am missing in my application.
Thanks in advance
|
|
|
|
|
Do you have Excel installed on the XP machine? Is it the right version, or higher?
If not, it won't work...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Manfred R. Bihy: "Looks as if OP is learning resistant."
|
|
|
|
|
|
Did you install the correct .NET framework? Did you install the correct Interop DLL's[^]?
I are Troll
|
|
|
|