|
Hi,
I have a tree view, and I provided drag and drop from one node to another. When I am moving the cursor after dragging one node(selecting), I want to highligh the node which gets the focus, I wouldlike to replicate the explorer functionality.
In explorer when we drag something and move across nodes it will highlight the node which has got current focus and if we release the mouse the dragged node contents will be dropped on to the highlighted node. In this case user will know where he is dropping exactly.
Thanks,
Sreepathi
|
|
|
|
|
Anyone know of a decent free syntax highlighting edit control for .NET?
Ryan
|
|
|
|
|
http://www.icsharpcode.net/OpenSource/SD/Default.aspx
from SharpDevelop. Pretty easily to extend and the editor itself is seperate dll that can be used.
|
|
|
|
|
Excelent thanks, should have thought of sharpdevelop, doh
Ryan
|
|
|
|
|
|
|
and DotGNU
http://www.dotgnu.org/
|
|
|
|
|
So, it's possible to run a .NET program compiled in MSVC# on a linux system? Can the same executeable be used? Do you know of any Linux distributions that include DotGNU?
|
|
|
|
|
Anybody got any idea's how retrieve the motherboards CPU and case temperature etc. in .net?
|
|
|
|
|
|
Dosn't the Win32_TemperatureProbe class just return information about the "thermometers" in you computer?
/\ |_ E X E GG
|
|
|
|
|
|
|
i tried to use FileStream Class but it only supports writing byte[] not even byte[,]..
anyone has a clue ?
thanx
shakooosh
|
|
|
|
|
Suppose wr is your BinaryWriter , your multidimensional (rectangular) array, theArray is 2D. Store and write the dimensions out thus (C#):
int mupper = theArray.GetUpperBound(0);
int nupper = theArray.GetUpperBound(1);
ws.Write(mupper);
ws.Write(nupper);
Then write out the bytes:
for (int i = 0; i < mupper; i++)
{
for (int j = 0; j < nupper; i++)
wr.Write(theArray[i, j]);
}
To read it back in, you do the reverse:
int mupper = rdr.ReadInt32();
int nupper = rdr.ReadInt32();
byte[,] theArray = new byte[mupper, nupper];
for (int i = 0; i < mupper; i++)
{
for (int j = 0; j < nupper; i++)
theArray[i, j] = rdr.ReadByte();
}
The problem is that this is not that efficient. If, however, you used a jagged array (actually, the secondary array never differs in length so for all purposes it's still rectangular not jagged,) you can define theArray 2d, m,n like this:
byte[][] theArray = new byte[m][];
for (int i = 0; i < theArray.Length; i++)
theArray[i] = new byte[n];
You access the byte at x, y thus: theArray[x][y]
Saving is a lot more efficient using a jagged array:
wr.Write(theArray.Length);
wr.Write(theArray[0].Length);
for (int i = 0; i < theArray.Length; i++)
wr.Write(theArray[i]);
Reading back in is also more efficient:
int m = rdr.ReadInt32();
int n = rdr.ReadInt32();
byte[][] theArray = new byte[m][];
for (int i = 0; i < theArray.Length; i++)
theArray[i] = rdr.ReadBytes(n);
The jagged array code will also save non-rectangular arrays without modification.
|
|
|
|
|
the problem is the array is not an array of bytes..
it's an array of type double, declared this way:
" double arr[,] x; "
and the method "Write()" takes array of bytes as an argument...
thanx for replying
shakoosh
|
|
|
|
|
Using a jagged array instead of a rectangular one as above will do the trick. You just use double[][] x instead of double[,] x . See above. The code that would change would be the array initializers and accessors. If this is too much retrofit for the code, use the rectangular dual for loop method above.
|
|
|
|
|
you need to devise your own save/load algorithm
for example
<br />
for ( int i = myArray.GetLowerBound(0); i <= myArray.GetUpperBound(0); i++ )<br />
for ( int j = myArray.GetLowerBound(1); j <= myArray.GetUpperBound(1); j++ )<br />
myFileStream.WriteByte(byte.Parse(myArray.GetValue( i, j ).ToString()) );<br />
don't take my word on the syntax .... but you get the idea
|
|
|
|
|
Hi i want to access exchane server services through .NET ,
Does it have some object model sort
please guide
P.S. PATWAL
|
|
|
|
|
Hi,
I have an application which opens and saves word document from vb.net(windows) application.
I open a document directly let us say TestReport.doc, I didn't closed and minimised the same. Now I run the .NET application and in the save dialog box I gave the same file name and path, then the application is hang up. Can any one guide me how to handle the same.
Thanks,
Sreepathi
|
|
|
|
|
Im not entirely sure what your problem is. Are you saying that the program will not close or minimise? What did you give the file name and path to - was it TestReport.doc?
"Can anyone guide me how to handle the same."
this sentence makes no sense - handle the same what???
Regards,
Pete
|
|
|
|
|
In simple I would like to know whether the Word document is already open or not before opening a document. I want a boolean which tells the document is open or not.
Thanks.
|
|
|
|
|
the reason it hangs is that your instance of word is trying to show a dialog. this is because its trying to tell you that the docoument is already open.
a better way round this is to chage your code to open the document in word as READONLY.
"When the only tool you have is a hammer, a sore thumb you will have."
|
|
|
|
|
Does anyone know what's the equivalent of SQL Server Notification Services in Oracle?
I'm primarily looking to maintain the consistency of the data caches obtained from reading the database to be sync'ed with any changes made to the database. i.e, need a way for apps to register interest & be notified when a row changes for e.g. Are there any classes/add-ons in the .NET framework that works with the Oracle database? Any pointers would be appreciated.
Chen Venkataraman
|
|
|
|
|
XmlDocument doc = ...
doc.createProcessingInstruction(...);
My peers and I have discovered that in the 1.1 framework this method does not work. In 1.0 it worked, but not 1.1.
Does anyone have a work around, or have anymore insight into this bug?
Thanks!
|
|
|
|