|
Try with SelectedItem property.It seem's that the property doesn't works fine ^.
Life is a stage and we are all actors!
modified on Wednesday, August 19, 2009 6:47 AM
|
|
|
|
|
i am supposed work with SelectedValue Property....
dipak
|
|
|
|
|
Did you remember to set the ValueMember of the ComboBox?
|
|
|
|
|
|
First change the SUBJECT TITLE then peoples may answer your question.
|
|
|
|
|
Hi,
We have some import data files which we will release along with our software which we don't want any of our client to access it , copy it, cut it, read it, etc...
After searching in google, I am getting an impression that we can keep our important data in USB. This USB we will given to user along with the application. Application should be able to access the contents of USB, but our client should not be able to see anything in USB or atleast could open it.
Is it possible... How to achieve this through coding...
alternatively I also thought an idea of encrypting and decrypting the file... there are two issues with it..
a) Encrpting and decrypting will take more time..
b) There are chances that user may able to compy decrpyted files.
Thanks in advance
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
I think, if you want something like that, you must encrypt the data in it. If you open the data using windows explorer -> it is encrypted. And in your application, you must decrypt the data to see it.
|
|
|
|
|
I can't do that because data is very huge... decrypting is going to take nearly 10 min... User waiting for 10 min to launch an application is not a good idea.
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
maybe create your own propertiary binary fileformat to store the data in, obfuscate the data in the binary file, throw in som red herrings.
If you have time and resources, maybe create your own file system format (Maybe take a look at the FUSE API?), that windows isn't able to read from, and format the usb sticks to that format, have an implementation of a "yourWackyFS"-reader in your app, this probably means that you need to write a dll to access the files on your filesystem in ASM (to get the low level Red/write access you need), or a dll writen in c/c++ whit alot of inline ASM and p/invoke the dll into your C# application .
Maybe encrypt the important data in the file, and not the whole file, and decypt only the data you need when you need it?
An another posibilty is at setup of your application, create a virtuel disk on the users computer, that is not visible for the user and only accessable by the proper processes, and save the file to that virtual disk. (Maybe take a look at this product: http://www.eldos.com/solfs)
modified on Wednesday, August 19, 2009 6:52 AM
|
|
|
|
|
Case is we have ArcGIS shape and grid file... We are using map window OCX control to load and show the shape file... OCX controls wants the physical file path of the shape file to open it... I cannot change the format of the file because it is ESRI standard format... We want to protect these shape files from being copied, getting deleted...
Creating virtual disk is not possible in C#
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
Isn't ArcGIS shape just a renamed zip-file containing a dbase database and some text files with meta data?
maybe it is posible to create your own format, and recreate the zip/shape file in-memory using sharpziplib and stream the in-memory shape file to the OCX control? and then you can encrypt key data in the binary file.
"Creating virtual disk is not possible in C#" - yes it is, it's just a matther of what dll's you p/invoke, and ...huhum...
C:\Program Files\EldoS\SolFS\dotNET\Managed, or if eldos isn't your thing, maybe This is?
modified on Wednesday, August 19, 2009 9:52 AM
|
|
|
|
|
thanks for reply...
I am using map window ocx control whose API requires fullpath of shape file to passed as paramter to be loaded.. I can't pass stream to it.
Can you help me by giving the link of source code about how to create virtual drive in C#
Is there any alternate way to handle it....
thanks again
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
Here is what you are looking for Eterlogic virtual Drive SDK
Quote:
"Virtual Drive SDK allows you to create and manage virtual disks that appear in Windows as regular disks. Virtual disk can be located anywhere: on hard disk, network, random access memory, database etc. To do this on your own you need to develop a driver that requires deep knowledge of operating system internals, and a lot of time for debugging and testing it. Virtual Drive SDK makes possible to implement read/write operations without having to develop your own kernel driver. All necessary part of boring work is done, so you can focus on storage, encryption etc. "
Quote:
" * Simultaneous work with up to 8 virtual disks
* Simple user mode API for kernel driver management
* User application freeze/crash detection
* Automatic removal of dead volumes
* Read-only volumes support
* Built-in formatting support
* Samples for C++, C#, Delphi, Python
* Special distribution mode (does not require separate SDK installation)"
|
|
|
|
|
Hello everyone.
I'm googling a lot of sites but none gives me a near answer to my requirements.
I'm am about to work on a project which requires me to use excel sheet to handle the inputs and computation... and later all values inputed and computed will be stored in a database....
below are the steps...
1. store or embed an excel file as one(1) record in a database. Every record has different computations and inputs... in short, embeded excel sheet will serve as templates for future data entry
2. Data entry proper.
a. embeded excel sheet will display only the columns "A and B".
hidding the rest of colums which has the formulas in it.
b. upon losing the focus, columns "A and B" will be computed
based on the formulas from the hidden columns.
c. Save the updated template in another table as new record.
d. Read the inputed and computed values from embeded excel,
then store it in a table as new record.
Hope some can guide or can give me a sample of the above requirement... Thank you in advance...
xxx
|
|
|
|
|
|
thank you for your emmediate reply... how can i display only columns A and B... hidding the rest of the columns?
xxx
|
|
|
|
|
Hi guys,
does anyone know how to underline just one word within a lable?
|
|
|
|
|
You'd need to create your own control to do that.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Subclass System.Windows.Forms.Label control and override OnPaint method. Use the graphics object and work with DrawString()[^] method.
|
|
|
|
|
|
i don't suppose you know of any good tutorials on this?
|
|
|
|
|
Until now i used a "List<student>" to going over a lot of students (not from DB) and i want to keep to best 10 student (maybe later i will want to save 10,000 and more) .
I used to list<student> and every time im insert a student and then sort the list. After the sorting im checking if there is more then 10 student and then take out the lower grade in the list.
The problem is that every iteration im sorting the list that is allready sorted because there is one new stduent that been insert to the list.
Is there ant other way to do it?
(i tryed to use SortList and you can see the problem , the key is the grade and it's possible that 2 student will have the same grade).
What is the best option?
If i have SortList and i want to save 10 object with the best result how can i do it?
For example if i have a student class and the comparison function between 2 stduent is by grade how can i save a list with the best 10 stduent?
(if 2 stduent have the same grade i have a problem with the key).
class Student : IComparable
{
public int id;
public int grade;
public string studentName;
public int CompareTo(object obj)
{
Student std = (Student)obj;
return std.grade - this.grade;
}
}
public SortedList GetTheBest10Student()
{
SortedList sortList = new SortedList();
for (int i = 0; i < StudentNumber; i++)
{
Student std = GetThisStudent(i);
sortList.Add(i, std);
if (sortList.Count > 10)
sortList.RemoveAt(10);
}
return sortList;
}
Thanks and regards,
Shai, Bonzai.
modified on Wednesday, August 19, 2009 5:12 AM
|
|
|
|
|
bonzaiholding wrote: The problem is that every iteration im sorting the list that is allready sorted because there is one new stduent that been insert to the list.
You need insertion sort and don't sort the whole list for each insertion. When adding an item, compare with all the items in the list and find a suitable position for that new item. Complexity of this will be O(n).
bonzaiholding wrote: (i tryed to use SortList and you can see the problem , the key is the grade and it's possible that 2 student will have the same grade).
What is the best option?
I don't see any problem here.
bonzaiholding wrote: If i have SortList and i want to save 10 object with the best result how can i do it?
Take the last or first 10 elements from the list depending on your sort order.
|
|
|
|
|
Thanks.
I tryed some other methods but in the end i just use this function :
private void InsertThisStudent(Student std, List<Student> List)
{
for (int i = 0; i < List.Count; i++)
{
if (std.CompareTo(List[i]) < 0)
{
List.Insert(i, std);
return;
}
}
List.Add(std);
}
thanks
|
|
|
|
|
Hi,
I have developed an application in C# i have done the GUI interaction.
But i want to invoke the API's through CMD.Please gaide me how to do C# application through command line.
With Regards
Mahesh
|
|
|
|