|
Thanks for your reply, actually I want to keep the same order in which items are inserted, this is why SortedListed and SortedDictionary are not suitable for the job ..
|
|
|
|
|
Greetings!
I'd like to do this:
I have a Button which defines the value of a bool Parameter:
public bool ListenMode { get; set; }
private void Button_Click(object sender, RoutedEventArgs e)
{
ListenMode = !ListenMode;
}
Further I have a Grid which can contain certain Items.
What I want to do is, that if ListenMode is true, and the next element clicked on is one of those Items, get the item.
The problem (if it is one) is, that I don't know how to catch all the next clicks while ListenMode is true.
Any suggestions would be apreciated.
PS: It's done in WPF if this is of any matter.
Thank you in advance,
eza
|
|
|
|
|
hi friends
i am working on a project. in this project we simulate a search engine to achieve some specific information about our users.
in this search engine i want to save the rank of a site in the database. but i dont know how can i get the rank of a site programmatically??? i write this application with c#.net
thank you for your reply.
nobody help you...
you have to help you yourself
and this is success way.
|
|
|
|
|
First you have to specify what the rank for a web site should be in your application.
After that you should know what the input data needs to be so that you can collect it, and what formula to use to calculate the rank from the input data.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
thank you
but i did it, i calculate rank t any site with my formula
but i want to save google page rank( with google formula) too.
there are some site to get u a google page rank if u enter the url address on it.
i want get the google page rank in win application with c#.net
nobody help you...
you have to help you yourself
and this is success way.
|
|
|
|
|
I want to get the data while single or double clicking the row in the view grid in C#.NET2.0.
|
|
|
|
|
Use event DoubleClick from DataGridView.
If the event comes, then read the value, for example :
dataGridView1.SelectedRows[0].Cells[0].Value
|
|
|
|
|
Can someone give me an search and replacement pattern to regular expression for this convertion.
From text:
for (<br />
; rs.Read(); <br />
)<br />
{<br />
AddFromRecordSet(rs);<br />
}
To text:
while(rs.Read())<br />
{<br />
AddFromRecordSet(rs);<br />
}
Thanks.
With greate code, comes greate complexity, so keep it simple stupid...
|
|
|
|
|
I don't see any candidate for a regex here, what are you trying to do ?
Christian Graus
No longer a Microsoft MVP, but still happy to answer your questions.
|
|
|
|
|
|
I think I found the answer, let me know if its wrong:
Search pattern: \bfor\b \((.*?);\s(.*?)\;(.*?)\)
Replace pattern: while($2)
RegOption.Singleline = on
With greate code, comes greate complexity, so keep it simple stupid...
|
|
|
|
|
Is it possible to create a installer/setup file and make it as a CD and we should use this CD in one PC. If that CD is already used in particular PC and that CD should not support other PC. Is this possible.
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
1. That is no possibilities to write to CD (except if you have a CD Recorder)...
2. It's like Mission Impossible ... this CD will be explode in 5 sec..
Change your application, that the user must be register first.
If you create a serial number for that PC, you must take for example MAC-Address for the serial number.
That means, that serial number is valid only for that MAC-Address. Not for other PC.
|
|
|
|
|
I have saw some software CD's that can be used in only one PC. If that CD is used in one machine you cannot use that CD in another machine. I heared that they have used embedded systems. I did not find any clue please advice
Thanks
Warm Regards
Prakash-B
|
|
|
|
|
I found one implementation here[^]. But I need similar functionality in C#.
Any Ideas?
Thanks
Sukhjinder...
|
|
|
|
|
|
Another Link I found on the above mentioned page http://msdn.microsoft.com/en-us/library/ms996463.aspx[^]
It seems I need to work with low level implementations (Windows Messages/Hooks, etc.). I'm looking for something which works well with MS .NET runtime and possibly with Mono as well.
It would be great if I can find some custom (not extended) implementation of OpenFileDialog with Preview box...
Thanks for all the information...
Looking for help on my OpenSource Media Player LetsYo
|
|
|
|
|
The OpenFileDialog Class is also using Windows API.
That means, you must search it again. Until now, I don't found any 100% .NET Codes of FileDialog.
|
|
|
|
|
Hi All
Already developed client(Developing for OPC) I am having code like below
1. OPCserverObj = Activator.CreateInstance( typeofOPCserver );
2. ifServer = (IOPCServer) OPCserverObj;
// connect all interfaces
3. ifCommon = (IOPCCommon) OPCserverObj;
4.ifBrowse = (IOPCBrowseServerAddressSpace) ifServer;
5.ifItmProps = (IOPCItemProperties) ifServer;
6.cpointcontainer= (UCOMIConnectionPointContainer) OPCserverObj;
Create different types of objects(type castings) with the same source object.
Note: IOPCServer, IOPCCommon, IOPCBrowseServerAddressSpace ..etc are different Interfaces.
How to achive this? How to decalre to object to get all 6 points.
Thanks in advance for your help
Satya
|
|
|
|
|
How about:
typeofOPCserver OPCserverObj = (typeofOPCserver)Activator.CreateInstance( typeofOPCserver ); ??
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.
|
|
|
|
|
AFAIK, there is no method to do what you are asking. If you know the instance OPCserverObj has all the interfaces implemented, why not use the OPCserverObj instead of casting to each type ?
|
|
|
|
|
Or create an interface that includes all the others and try to cast to that?
|
|
|
|
|
I have the usual layers UI, objects, DAL and SQL Server.
In VB I instantiate the DAL in the object layer using a friend variable in a module. This allows me to use the DAL in any class in the object layer without exposing the DAL to the UI. DAL stays alive as long as the app is in process.
Now C# does not have the module concept and I do not want to pass the DAL to the UI to pass to each class in the object layer. I assume it is done with a static class but I am struggling to get it just right.
[edit] What you can do is to create a public static variable on a class and use it like...
The only problem is static classes cannot have constructors, so can I declare the static class, pass values to a method that instantiates the static DAL? Then use the static DAL var in the other classes
[/edit]
Never underestimate the power of human stupidity
RAH
modified on Tuesday, July 29, 2008 2:17 AM
|
|
|
|
|
I guess C# equivalent for friend is internal .
Mycroft Holmes wrote: Now C# does not have the module concept and I do not want to pass the DAL to the UI to pass to each class in the object layer
So multiple classes in the object layer shares a same DAL ? Your question is not clear. Posting some code would be helpful.
|
|
|
|
|
Thanks - I got it.
Declare a static class (clsMain) in the object layer with a static method to accept the credentails. Static method instantiates the DAL (gDBO) as internal using the creds.
ORM classes get at the at the DAL by using the clsMain.gDBO.????. Untested yet but it compiles
public static class clsMain
{
internal static dbOps.clsDBOps gDBO;
public static void SetCredentials(Credentials oCreds)
{
dbOps.Credentials _Creds = new dbOps.Credentials();
_Creds.Server = oCreds.Server;
_Creds.Database = oCreds.Database;
_Creds.UserID = oCreds.UserID;
_Creds.Password = oCreds.Password;
gDBO = new dbOps.clsDBOps(_Creds);
}
Never underestimate the power of human stupidity
RAH
|
|
|
|