|
Hi,
I would like to ask how can I implement a binary validation file which my C# application will check everytime on startup to make sure the application is activated on the valid machine?
Technology News @ www.JassimRahma.com
|
|
|
|
|
This is an age old issue and there are entire libraries written about it, only you can define the requirements but you need to manage all the scenarios of your clients. What happens when they want to install a new machine? What happens if a system goes tits up and needs to be replaced? No internet?
Asking a question in forum does not represent research and you will need to do some o this subject.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
In principle it's simple, hash a few machine specific things (MAC address, hard drive serial number etc) which you can get with P/Invoke calls, and park it in a known location.
Your problem will come in trying to protect the known location and hash algorithm, if you want something that's even vaguely crack proof.
The best implementation of this for most applications is 'ask your users nicely to respect the licence agreement', frankly.
|
|
|
|
|
Hi.what Is Best Book For Socket Programming With C#?
|
|
|
|
|
The one YOU can read and understand. What I consider the "best" book and what you consider the best book will be two very different things.
Start browsing Amazon[^].
|
|
|
|
|
itprs,
Adding to Dave K's comments there's one book I've found to be a good introduction. Om Amazon:
Tcp/ip sockets in c# by makofske, donahoo, calvert
Isbn-13: 978-0-12-466051-9
Isbn-10: 0-12-466051-7
It's a good book. As they say, YMMV.
If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.
|
|
|
|
|
By replying to Dave, itprs doesn't get notified that you've added a message.
|
|
|
|
|
Quite correct, Pete. I overlooked that...
If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.
|
|
|
|
|
Repost of my reply below for your attention:
itprs,
Adding to Dave K's comments (below) there's one book I've found to be a good introduction. Om Amazon:
Tcp/ip sockets in c# by makofske, donahoo, calvert
Isbn-13: 978-0-12-466051-9
Isbn-10: 0-12-466051-7
If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.
|
|
|
|
|
I want to Bind two Columns and populate a ComboBox with it in C#..My code is printing just one. the FirstName. Have tried concatenating the LastName with it but its not working. Can anyone show me how to go about it. Here is my code. Thanks
OleDbCommand cmd = new OleDbCommand("SELECT * FROM ADb", myCon);
OleDbDataAdapter d = new OleDbDataAdapter(cmd);
d.SelectCommand.CommandText = cmd.CommandText.ToString();
DataTable dt = new DataTable();
d.Fill(dt);
cmbNames.DataSource = dt;
cmbNames.DisplayMember = "FirstName";
|
|
|
|
|
You meant two rows? Whats the other value you want to bind or data in your table? If it the ID add it as Value Member
cmbNames.ValueMember = "id";
Bombo box will bind row by row from your table.
I remain joe!
|
|
|
|
|
You have just provided the code and query for the Firstname, please provide the same code for Lastname too.
|
|
|
|
|
One approach is to retrieve the data in the format you want:
OleDbCommand cmd = new OleDbCommand("SELECT id, FirstName + ' ' + LastName as Name FROM ADb", myCon);
OleDbDataAdapter d = new OleDbDataAdapter(cmd);
d.SelectCommand.CommandText = cmd.CommandText.ToString();
DataTable dt = new DataTable();
d.Fill(dt);
cmbNames.DataSource = dt;
cmbNames.DisplayMember = "Name";
I took a guess at the name of your ID column. You still need to select that if you use the combo for selecting things elsewhere.
|
|
|
|
|
Thanks BobJanova. Thanks Everyone...
|
|
|
|
|
You can append two columns in SQL query and use that column as display Member
SELECT Firstname + ' ' + Lastname,* FROM ADb
|
|
|
|
|
Hi all,
Just got a view and a viewmodel to wire-up. The view needs to be bound to some properties that will be resolved asyncly after the execution of a certain command.
Ok, I wrote all the stuff but now i'm confused with how to declare the binding???
Any ideas????
Here's just a skeleton
View -
initially just a textbox and a ok button. On clicking the ok button, the results are displayed and the command to resolve values are sent to the viewmodel.
In viewmodel,
public class MainViewModel : ViewModelBase<MainViewModel>
{
private string _data;
private int _time;
public string Data
{
get
{
return _data;
}
set
{
_data = value;
NotifyPropertyChange("Data");
}
}
}
I need the value of a Textblock to be bound with "Data". But that will be resolved after a while...
Out of ideas! Please help.
modified 4-Jun-13 12:51pm.
|
|
|
|
|
Try <textblock text="{Binding" data}=""> from within the view.
|
|
|
|
|
<Textblock Text="{Binding Data}" />
This will be enough? so simple!
Ofcourse, the confusion was that it was to be resolved asyncly.
|
|
|
|
|
I am still not getting it, how exactly do you want to bind your data with the ViewModel.
|
|
|
|
|
Binding to that property in the normal way should work fine. Data binding is essentially asynchronous all the time, in that the view's updated by notification events and not directly by code, so it should work just the same.
Make sure that the VM sends a value that the view can deal with before the asynchronous call returns, though (this might mean making the view accept null).
|
|
|
|
|
Thank you,
Here's my solution,
<Textblock x:Name="result" Text="{Binding Data, TargetNullValue=Loading..." />
|
|
|
|
|
My final year project is to find the distance and height of image from camera(webcam). Is there some way in C# to find the angle of pointing image from the camera ? Please help me I have few time only
bishwazeet
|
|
|
|
|
Bishwajit Nepali wrote: Please help me I have few time only One can't build a castle in a day. You're lucky though; we have an article[^] on images and distances.
For an angle, one would need a reference-point.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thnx but I did using the reference point .Thanks for ur suppoort
|
|
|
|
|
The concept that you are talking about is like a program that can't be developed within a day.
|
|
|
|