|
that's right you understand me, the EUI is a long type number, and it's not just a sequence.
this dictionary you are talking about I am not quite familiar with it.
I will take up some reading about the dictionary.
thank you very much.
|
|
|
|
|
A dictionary is an associative container. So, you define two types, one is the type of the key, the other is the type of the value. I'm imagining something like this:
Dictionary<int, List<Object>>
Then, the trick is, you can look up your list like this:
List<Object> items = myDict[EUI];
The main thing is, when you add your first item for a given EUI, that is, when you're adding and the key does not exist, you need to do this:
myDict[EUI] = new List<Object>()
as it will start as null. Then you can add items like this:
myDict[EUI].Add(item);
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have this Access Hyperlink field bound, (which I tried as a text field), to a DataList as follows…
asp:DataList ID="DataList1" runat="server" DataSourceID="AWAccessDataSource" DataKeyField="ID">
ItemTemplate>
asp:HyperLink ID="HyperLink1" runat="server" Text='<%# Eval("SiteName") %>' NavigateUrl='<%# Eval("Weblink") %>'>/asp:HyperLink>
/ItemTemplate>
(* some of the <'s are intentionally mising to get this to show up, pre tags made it look even worse)
The link it produces on the webpage is preceded by the local server URL..
Example:
http://localhost/AutumnWoodsAJAX/HomesForSale.aspx#http://www.delmars.com/flwtrip/ada,s,.htm#
Same is true for my host site…
http://www.autwoods.com/HomesForSale.aspx#http://www.delmars.com/flwtrip/ada,s,.htm#
I also tried…
<asp:hyperlink id="HyperLink1" runat="server" text="<%# Eval("SiteName") %>" navigateurl="<%# DataBinder.Eval(Container.DataItem, "Weblink")%>">
Checked for Hyperlink properties, etc., nothing apparently useful there.
Then I tried to do some stripping with a function…
<asp:hyperlink id="HyperLink1" runat="server" text="<%# Eval("SiteName") %>" navigateurl="<%# StripLocal(Eval("Weblink")) %>">
protected string StripLocal(object URL)
{
this.TextBox1.Text = URL.ToString();// which displays #http://www.delmars.com/flwtrip/roberts.htm#
return (string)URL; // which displays #http://www.delmars.com/flwtrip/roberts.htm#
}
So the preceding host link isn’t showing up in the function and still even after the return value the link rendered on the page has the local host link preceding the actual link. Anyone tell me what’s up with this wonkieness?
|
|
|
|
|
I was able to make this work by changing the Access datatype from Hyperlink to Text, which was inserting the before and after # symbols. In my DataList I put...
asp:HyperLink runat="server" NavigateUrl ='<%# DataBinder.Eval(Container.DataItem, "Weblink").ToString()%>' ID="Hyperlink2">
%#DataBinder.Eval(Container.DataItem, "SiteName")%> </asp:HyperLink>
Some Syntax is intentionally missing so it shows up on this forum, <'s are missing
|
|
|
|
|
I know how to close a form, but how do you close the MAIN form? An example is, you have a form start the program with Application.Run(Form2); , and then you have a button on Form2 (Form1 is the main form) that closes the main/and or all forms in the project. I hope it wasn't THAT confusing; thanks in advance.
The most knowledge doesn't mean the most wise...
|
|
|
|
|
Form1.Close(); . Application.Exit();
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Thanks... But I ust got another question. How do you make it so when you hit the little X at the top right that everything closes?
The most knowledge doesn't mean the most wise...
|
|
|
|
|
If that's the main form then it will automatically start the close process. If you want to do special things with child forms, you can hook into the main forms Closing event and fire off processing in the open child forms before they are closed. For instance, you could check the child forms to see if anything needs saving.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
I'm not that advanced yet... Internet and I/O have got a while... Isn't there like a FormClosing event or something? Can I close all there?
The most knowledge doesn't mean the most wise...
|
|
|
|
|
Oh, yes there is. Thanks for the advice; ... ... another one bites the dust...
(That means I got it...)
The most knowledge doesn't mean the most wise...
|
|
|
|
|
Not a problem. That's why we're here. Although I'm now about to not be here - logging off for the night that is. Good luck with the rest of your project.
BTW - your questions are getting better.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
|
Try form1.Closing()
you can implement it on all the forms, there you can call Application.Exit();
|
|
|
|
|
i need to know how made a macro recorder?
i want to move the mouse cursor and click on a textBox and enter a value and so click on button!!
but computer must do this! not user!
how?
Imposible is Imposible...
|
|
|
|
|
Do you want the user to record a macro, or should the application just run a pre-recorded macro?
Virtual1ty "Any fool can learn from his own mistakes, but a wise man learns from mistakes of others"
|
|
|
|
|
mmm...
i want the program runs the macro! but i don't know what is the macro really?
Imposible is Imposible...
|
|
|
|
|
A macro is a set of instructions, that makes the app do something.
A macro can basically do everything - move the mouse cursor, type some text,
open other programs etc.
I don't know to make a macro recorder, but I know what you can do, if the app just should do the same thing every time:
Simply just hard code the "macro", so it runs everytime the application is executed. It can take some time, but it works.
Virtual1ty "Any fool can learn from his own mistakes, but a wise man learns from mistakes of others"
|
|
|
|
|
Have a look at the Command Pattern: http://www.codeproject.com/books/DesignPatterns.asp[^]
This should give you some ideas on how to record a users actions...
Me: Can you see the "up" arrow?
User:Errr...ummm....no.
Me: Can you see an arrow that points upwards?
User: Oh yes, I see it now!
-Excerpt from a support call taken by me, 08/31/2007
|
|
|
|
|
Is there a way to add a reference from Paint.NET or something that allows me to change the properties of a picture in a picturebox? What I mean, for example, is to have pictureBox1 and int x . The example being, based on the value of x, (x could be controlled by a timer; just an example...), the pictures motion blur would raise or drop. I know this sounds like a hard concept for a beginner, but in Paint.NET there's a simple way to change it, so I figured there might be a way in C#, without exceeding memory standards... Thanks in advance.
The most knowledge doesn't mean the most wise...
|
|
|
|
|
You might want to consider WPF. It has a steeper learning code than WinForm (not surprisingly as WinForm is just an object oriented wrapper on a 20 year old technology that should have been replaced ages ago) but then things like this becomes trivial. Actually so trival code isn't really required - it can be done in XAML markup).
Example effects[^]
Don't mind it's a button being blured, it obviously does not matter if you apply the effect to an image, a button, a treeview, or whatever you like.
You can make individual controls in WPF and host them in WinForm applications - I tend to do this with my old projects when I can see it's easier to do a user control in WPF than in WinForm.
|
|
|
|
|
It's .NET 3.0. You will need some CTP plugins to Visual Studio 2005, or the beta release of VS2008.
While it is pretty new, the plans for it are not. There is a reason the temporary WinForm hack was stuffed into the System.Windows.WinForm namespace - it left the main namespace System.Windows free for WPF.
|
|
|
|
|
Thanks; do you know anything else, I mean, simpler, (I'm fairly new), with no downloads or anything, just a ref or something?
The most knowledge doesn't mean the most wise...
|
|
|
|
|
Nope, sorry.
Maybe being new to this is just more of a reason to go to WPF. I have been using WinForm since the betas of .NET 1.0 and unlearning the stupidity and completely outdated methodology of it is a challenge.
|
|
|
|
|
Have a read of Christian Graus' here on CodeProject about graphics and GDI+. He goes into the theory of how to do effects based graphical stuff in C#. They are very good.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
hey, thanks. Do I just look at his articles?
The most knowledge doesn't mean the most wise...
|
|
|
|