|
So does it mean that the content of the instatiated DataSet cannot be changed anywhere in the program? what exactly?
//obinnaaj Eof
|
|
|
|
|
You can change the DataSet, but then you have to use locking for every access to it, so that one thread can't read it while another thread is changing it.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi Obinna,
Going back a bit because you're probably not familiar with multiple threading yet, the static keyword marks the variable as being shared across all instances of the class.
so for instance if you have a class member which is an int:
public class MyClass
{
int z;
}
each and every instance of that class you create (new MyClass() ) will have its own z, which can and usually will be different.
when its static:
public class MyClass
{
static int z;
}
then each and every instance shares just a single z. If you change it in one instance, it will change in all instances. As said previously, this could be useful if you wanted to maintain a count of how many instances are in existence and have that variable in class scope.
Similiarly, if you had a database connection string, that would be the same for each instance so you would mart it static so that you didn't create multiple copies of the same thing but instead just have one which each instance can access.
Regards,
Rob Philpott.
|
|
|
|
|
Hi,
I've posted this on the Microsoft forums as well but have not received any usable answer. I have a storyboard in XAML (in a DataTemplate) that I need to start from code. Now I've given up on that idea and rather went with an event to start it. Note: This is WPF.
instead of:
<code>
<Border.Triggers>
<EventTrigger RoutedEvent="Grid.MouseRightButtonDown">
<BeginStoryboard>
</code>
I now have:
<code>
<Border.Triggers>
<EventTrigger RoutedEvent="local:TouchActor.gestureMade">
<BeginStoryboard>
</code>
gestureMade is an event I created. Which is defined in code as:
<code>
public static readonly RoutedEvent gestureMadeEvent = EventManager.RegisterRoutedEvent("gestureMade", RoutingStrategy.Bubble, typeof(gestureMadeHandler), typeof(TouchActor));
public delegate void gestureMadeHandler( object sender, GestureEventArgs e );
public event gestureMadeHandler gestureMade
{
add { AddHandler(gestureMadeEvent, value); }
remove { RemoveHandler(gestureMadeEvent, value); }
}
</code>
I know the event gets raised because I have a MessageBox that pops up in the handler. The problem is that it doesn't trigger the animation. Am I missing something?
rather have something you don't need, than need something you don't have
|
|
|
|
|
WPF forums on MSDN are close to useless unless you have a week to wait, in my experience.
The way to start a storyboard in code is something like this:
BeginStoryboard storyboardShow = Resources["showAnimation"] as BeginStoryboard;
storyboardShow.Storyboard.Begin(this);
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 )
|
|
|
|
|
thanks for the reply. The problem is that the BeginStoryboard is in a Trigger, which is far nested into a DataTemplate so I cannot give it a key.
I got to the BeginStoryboard through code by navigating through the template and registering everything that I need. So when I finally call story.Storyboard.Begin(this); I get no errors, the code is run (checked via tracing through it) but the animation doesn't happen. Any reason for this? Wrong containingObject?
rather have something you don't need, than need something you don't have
|
|
|
|
|
Hello guys,
Can we call a specific part of a function?? I tried regions, code blocks, any suggestion?? Are inner classes supported in C# dont tell me "why dont you try it then" because I dont even remember using them else than event handling.
Thank you guys.
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Muammar© wrote: Are inner classes supported in C#
Yes, but how would that help ?
You can have a function that returns half way through, but it sounds like you need to break your function in to two, if it does two different things and you only want one to occur.
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 )
|
|
|
|
|
|
Hello,
I am trying to figure out a way to convert a PDF to an HTML file. I have a need to convert various different files to html files. So far the program I have written (in C#) will convert .doc and .xls to .html. The next thing I need is .pdf to .html.
The way that seems easiest is to open an instance of acrobat in the background, open the pdf, and do a saveas html file. How can I do that? Is there a reference I can import to "control" Acrobat like you can for Word and Excel?
Any help is much appreciated. Thanks!
--Shea
|
|
|
|
|
I don't believe so. There are third party controls that give you access to a PDF to varying degrees, tho.
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 )
|
|
|
|
|
Thanks for the response.
So far all I have found on "controlling" Acrobat is an AutoIt-script UDF (class) that has only been under development for 3 weeks or so, and has no support thus far for a "Save As".
I am surprised there is no class for this in C# already.
|
|
|
|
|
Why ? Microsoft wrote Office, they didn't write Acrobat, and when they put PDF functionality in Office, Adobe sued them, even though it's a public standard.
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 )
|
|
|
|
|
What I mean is that I can't be the only person wanting to do this. I'm just surprised that some random person (Not necessarily MS or Adobe) has not created a class or something to automate Acrobat.
I'm relatively new to C# so i'm not really sure how to go about it, or i'd take a stab at it myself.
Creating a class to do whatever using the Office PIA's was easy, but without a handy PIA for Adobe, i'm lost...
|
|
|
|
|
Many moons ago, when I had no programming tools bar a copy of VBA hosted in Excel I had a similar quandry. With no budget to speak of, the fools I worked for wanted to do exactly the same...
...What I ended up doing was a whole bunch of crappy/hacky things such as using SendKeys to control Acrobat. It's a cruddy solution, but it works. After a fashion. I just had to put a big warning in place that said "DO NOT TOUCH THE KEYBOARD OR MOUSE WHILST THIS PROGRAM IS RUNNING". As far as I know, some sap still spends most of his days looking at that warning.
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
|
|
|
|
|
Hard to answer. I mean, you're basically asking for an article, not a forum reply. What do you know already ? Do you know SQL ? Do you intend to write a professional application, or just use the CRUD stuff that can be built into the presentation layer ? You really should buy a book for this anyhow, but if you're going to get any reply at all, you need to be more specific. Explaining why the tons of hits google would give you have not helped, would be a bonus.
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 )
|
|
|
|
|
|
MaCheNomeVuoi wrote: I need to bypass the latter creation: clsRS232.cs when I'm working with clsSprintFormat.cs.
Impossible. Your best bet is to create methods in the top class that hide the methods you don't want to call in the absolute base class.
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 )
|
|
|
|
|
|
God you come off sounding imperative.
Try this clicker[^]
Consider searching before posting.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook
"There is no wealth like knowledge, no poverty like ignorance." Ali ibn Abi Talib
|
|
|
|
|
S.S.Sivaprasad wrote: Please tel me follwing question.
Code for Insert,view,update,delete in sql server2005 and c#.net web application.
Geez, people can't ask questions these days or what?
Oh well, here you go:
"I want to Insert, View, Update delete data with SQL server 2005 in C# web application. I've googled and find this and that in docs. My code looks like this:
Some code = is here();
blahblah;
However I have following problem, it's giving me this error.
....
What did I do wrong, or do you have any good tips regarding something?"
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
I see you're unable to learn your lesson. Please, please read the sticky post about how to ask questions before asking this for the third time.
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 got the following errors
In the first reprt.
1- Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
this error in the line
oRpt.SetParameterValue("@Groupn", "%");
In the second report
2-Logon failed.
Details: ADO Error Code: 0x
Source: Microsoft SQL Native Client
Description: Login failed for user 'AHMEDMANSOUR\Guest'.
SQL State: 28000
Native Error:
Error in File H:\DOCUME~1\marwaa\LOCALS~1\Temp\AllGroupEmail {FD058C6D-B9FE-4508-AD73-86E793E7E5B3}.rpt:
Unable to connect: incorrect log on parameters.
merwa
|
|
|
|
|
Hi,
I prepared a funtionality for generate cyrstal report.
But the column data is not resizeing while at runtime.
Example:
The first column contain data aside that the second one is not perfect alignment.
So, plz provide suggestion if any...?
Regards
Tarun Singh
Sr. Software Engineer.
mailto:tksingh@zenta.com
|
|
|
|
|
i want to download images from the website. when i open the website then i can see number of thumb nail of images. which when click gives shows the original image. now i want to write a code which when given url of page containing thumbnails download all the real images of the page page.
Suppose i have a thumb nail named thumb1.gif ,thumb2.gif , thumb3.gif which when clicked opens image1.jpeg ,image2.jpeg and image3.jpeg .so wehn i give the url which have iamges of the thumb1,thumb2,thumb3 downloads all the images image1 image2 and image3.
thank you
|
|
|
|