|
Well what I was thinking is since my current code is giving me an issue with resetting the dataset inside a foreach loop I was gonna do the following to populate a tree view.
string[] AuthorNames = new string[bookdbDataSet.Tables[0].Rows.Count];
int row=0;
foreach (DataRow Row in bookdbDataSet.Tables[0].Rows)
{
AuthorNames[row] = Row["AuthorFirst"].ToString() + " " + Row["AuthorLast"].ToString();
TreeNode [DYNAMIC NAME HERE] = new TreeNode(Row["AuthorLast"].ToString() + ',' + Row["AuthorFirst"].ToString());
rootNode.Nodes.Add(tn);
row++;
}
for (int counter = 0; counter < AuthorNames.Length; counter++)
{
string[] splitarray = null;
string Aname = AuthorName[i].tostring();
splitarray = Aname.split(" ");
bookListTableAdapter.FillByFirstandLast(bookdbDataSet.BookList, SplitArray[1].ToString(), SplitArray[0].ToString());
foreach (DataRow ChildRow in bookdbDataSet.Tables[0].Rows)
{
TreeNode child = [DYNAMIC NAME HERE].Nodes.Add(ChildRow["Title"].tostring());
}
[DYNAMIC NAME HERE].nodes.add(child);
}
So basically I get all the unique author names first and put them in an array
Then I fill the dataset one at a time for each author and then run a foreach to get the titles and then I assign them to the node of the Rootnode's dynamic name
|
|
|
|
|
Well clearly you can't do that, even if "dynamic names" were possible they would go out of scope..
Idea 0: Why don't you just fill and array with them?
Idea 1: Couldn't you nest the loops? Then you would only need 1 temporary variable to hold the current TreeNode.
|
|
|
|
|
well, here is what i was originally thinking but of course I can't do the second fill with the foreach. Thats why I went a different route. I'm sure I'm doing this all wrong but hey I'm learning so what the heck...
http://csharp.pastebin.com/m58597462[^]
|
|
|
|
|
Why can't you do that? As far as I can see you're not changing the collection that the foreach loops over
|
|
|
|
|
Hi all, i'm asking how to use a socket class to listening to all ports and reciving all packets...
Regards
|
|
|
|
|
i think if you make (for) loop to make threads of all ports
|
|
|
|
|
If any one know then guide me.
|
|
|
|
|
|
Actually i made a window application , in which play a video file using window media player. now i want to take a snapshot image. the link you tell me its all about Webcam Service.aspx. i am not working in aspx. so do you have any idea how can i take snapshot using window media player api.
|
|
|
|
|
I don't kownw!
But by using either of WPFMediaKit[^] or Slimdx[^] you should be able to gather more information...
Who knows they might even have a sample.. or they might know if you ask on their discussion list?!
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
Hi all
I have a C header file which describes a plug-in interface. Now, I'd like to implement plug-ins in C#. How would I go about doing that?
The interface uses C native types including callback functions.
Any tips or pointers?
Thanks in advance
Niklas
|
|
|
|
|
I think this might get you started:
Microsoft Add-in Framework[^]
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Are you trying to implement a plug-in in C# for a program that expects native plug-ins?
|
|
|
|
|
Yes, that's what I'm trying to do. I want to do that to be able to create some wizards for visual studio, so that others can create plug-ins easily. Today I have wizards for C++, but I think I'm missing a lot of developers that way.
Edit: The plug-in is just a DLL.
modified on Sunday, January 24, 2010 3:31 AM
|
|
|
|
|
Hi.
I have an (.EXE) file(CrystallReport2005.exe)or anything else.
Can you tell me how can i add this file to my install Shield project to run and install it.
Thank you.
CanI
|
|
|
|
|
create a setup project
then from application folder right click--->Add
then select your files you want to add them in your (exe) file
after that build or press Ctrl+Shift+B
go where the project you created and look in the bin file
|
|
|
|
|
You can use the vs tool:
File > New > Other project types > Setup and deployment
One more thing..
This's not the right place for such question
|
|
|
|
|
Hi Roya Rayane:
When you add all the project output file into your InstallShiled setup & deployment project… There was an option where you can confirm the existing dependencies … InstallShiled has a features to add your desire object from a list of object…For example you build a .Net app setup in that case you can add the .Net framework into your setup & deployment project so when you install your app the .Net framework will install silently if .Net framework is not available in the target machine …
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
We (my son and I) are working on a program and live 800 km / 500 miles apart. We each work n different parts of the program. Our opening page have 10 tabs where 10 different parts of the program must be dislayed. We created the 10 pages as 10 different designs, and must nou link each design to a different tab on the first page. How do we do it?
|
|
|
|
|
It would be helpful to know the technology, web or Windows. With web use CSS to assign different designs to each page.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
It is a program - not an web design. In the program we want to use data (mySQL) to generate different forms.
We have squre eyes searching our books...
|
|
|
|
|
It would help to get the termonology correct. You are trying to make a Windows application, not a program. It seems you are well beyond your skill set. I would suggest something less challenging at first, then work your up after you have learned some basic concepts and terms.
You can create different layouts by adding controls to the controls collection of a container; however, windows forms don't typically do this. It can be very complex and again seemingly more than you should tackle at the moment.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
You are correct indeed - it is a Windows Application and it is beyong my skills and experience.
I do have a very basic idea of C#. BUT! My friend wtrote an Application in Delphi 4, and then died. He solf an few hundred of the applications, and we have many people using the application on a daily basis. There are sone bugs in the Application, AND is does not work on Vista! I inherited this project, so - it is trial and error, suffering through books and books and code!
At this stage I try to simulate the Application in C#. I know - wrong! But! Please tollorate my stupidty - the goal is noble!
The are several databases, and several parts of using the databases. That is why I have different tab pages, already up and running in a way. I just want to use the tab pages to open the different designs in one window.
Thanks for you help.
|
|
|
|
|
I wonder if this[^] would have been of any help to you when you started development - its probably too late now.
|
|
|
|
|