|
Hi.
You can use
string[] availablePorts = SerialPort.GetPortNames();
Standards are great! Everybody should have one!
|
|
|
|
|
Hello my problem i have vss schedular, it is designed with asp.net and .
vb.net, what i want is this vss schedular is running everyday night 12.00am.
i want to get sms is it running or not ,
how to do this one
, please any one can help me
srinivas
|
|
|
|
|
VSS Schedular?? What is that? Is it Microsoft Visual SourceSafe?
|
|
|
|
|
Yes Michael Sync
srinivas
|
|
|
|
|
I didn't see this feature in SourceSafe. Is it in Visual Sourcesafe 2005??
|
|
|
|
|
Hi,
First a bit of common info.
This can't be done directly. You should contact your mobile operator, because you will have to use the SMPP server of the celular service provider. It's also possible that you need a VPN connection to their computer (but I'm not sure about this). To use SMPP, you will need to use WinSock for the connection.
More info on how to use the SMPP can be found on the SMSForum : http://www.smsforum.net/.
You can also use a SMS Modem, but I don't have more info on this one.
A bit of advantages and disadvantages :
The SMPP option gives you these advantages and disadvantages:
- Massive amounts of SMS. Perfect for SMS spammers.
- Lower costs, depending whether your provider charges you for SMPP and how much.
- Providers rarely release access to SMPP to individuals. Sometimes not even companies.
The GSM Modem option gives you these other advantages:
- Freedom from the provider. Just insert the SIM and you are ready.
- It will handle (outgoing or incoming) only 1 message every 4.5 seconds.
Now todo this with .Net, here is a bit of info :
An example in C# : http://www.emant.com/681002.page
There are also a few examples on the codeproject itself :
http://www.codeproject.com/cs/webservices/SendSmsThroughWS.asp
http://www.codeproject.com/vb/net/PDUEncoder.asp
http://www.codeproject.com/smartclient/phoneat.asp
Several code examples : http://www.csoft.co.uk/sms/example_code/index.htm
So I hope this helps you with your problem.
|
|
|
|
|
Thank you now iam searching about the related sites
srinivas
|
|
|
|
|
srinivassam wrote: schedular
Check the spelling. It is misspelt everywhere.
|
|
|
|
|
Hello everyone,
If I wish few line of codes to be run during the run time (I mean all the time) as it is checking for something, where should I place the code?
Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
Use BackGroundWorker component so that your piece of code runs in a new thread. Or you can set up a timer to run the code in other thread.
|
|
|
|
|
Hello,
A timer event would seem to me the write place!
Now you have do decite if you whant to run it in the GUI thread or start an other thread for this checking.
A independend thread would have the posibiliy to run it in lower priority which doesn't effect your GUI to much!
If you whant to run it in GUI thread the Forms.Timer is the write one.
If not, use Threading.Timer or Timers.Timer.
Hope it helps!
All the best,
Martin
|
|
|
|
|
Hi all,
I've been looking at the MVP pattern recently, and it impressed me so much that I've converted my ASP.Net application to make extensive use of it. However, I'm wondering about the best way in which to incorporate validation into the pattern.
Formally I was using the Regex validator in the aspx page; clearly, this is was an inflexible approach - and wouldn't be at all feasible as and when I update the application to Silverlight or roll it as a Winforms app. MVP does solve this problem on a page by page basis, however I can't help but think that in terms of the application I've simply moved a problem up a level, rather than solved it.
In my application some areas of validation are common across different pages. For example, a number of pages are required to validate that the user has entered curreny values and not stupid stuff like "Mike is Ace!" etc. Now I can code this directly in the "presentor", but by doing so I prevent the same code being shared throughout the application.
A thought I had was to create an abstract CustomValidator object, and then make each presentor implement an IValidatable interface which could be passed into the concrete CustomValidator. Is this a good approach, or can anyone suggest a better way?
One other thing that is giving me pause for thought is the ASP.Net Session. Without coupling the presentor to the "web", how can I access the session and maintain portability if (when!) I need to convert to other platforms?
Thanks,
Martin.
|
|
|
|
|
I've done this in the past with the Command pattern. Imagine that you have implemented a base command:
public interface IValidatorCommand
{
void Execute();
}
public class ValidationOutcome
{
public bool Passed = true;
public Type FailureType;
public string Reason;
}
public abstract class ValidatorCommand : IValidatorCommand
{
public ValidatorCommand()
{
}
public override ValidationOutcome Execute() {}
}
public class RegexValidatorCommand : ValidatorCommand
{
protected string regex;
protected string text;
protected RegexValidatorCommand(string regex, string text)
{
this.text = text;
this.regex = regex;
}
public static RegexValidatorCommand Validator(string regex, string text)
{
return new RegexValidatorCommand(regex, text);
}
public override ValidationOutcome Execute()
{
ValidationOutcome outcome = new ValidationOutcome();
outcome.Type = this;
if (...)
{
outcome.Reason = "The regex didn't match your input.";
outcome.Passed = false;
}
}
} Then, all you need do in your code is
ValidationOutcome outcome = RegexValidatorCommand.Validator("regex", txtMyTextbox.Text).Execute();
if (outcome.Passed)
{
}
else
{
}
|
|
|
|
|
|
No problem. Glad to help.
|
|
|
|
|
Are you rolling your own MVP or are you using the Web Client Software Factory? I've only just started looking at this approach myself. Anyway, the latest Enterprise Library has a Validation block, which I've also only just started looking at - today in fact.
Kevin
|
|
|
|
|
I am starting to research obsfucation. I have started to look at different products and they all claim to be perfect and better than the others. Can some of you share your experience with any of the products out there. I know that none of them are perfect, but some should be better than none.
Thanks!
Hogan
|
|
|
|
|
They're all absolute crap. Honestly, I haven't found one that always works on our WinForms rich client.
The best I've seen is SmartAssembly and XenoCode. However, they're both crap in that they still fail often, just a lot less than the others.
|
|
|
|
|
Thanks for the reply Judah. After my research today, the two that I thought might fit best are the two you mentioned. SmartAssembly was first on my list. That being said, can you be more specific about them failing often? If you mean that the application breaks while it is running, that is one thing, but if you mean that it breaks the code that is released, then that is a big concern for me.
Thanks a ton for responding!
Hogan
|
|
|
|
|
It breaks the code. More often than not, we'll obfuscate and suddenly our app won't run at all, but will crash upon startup because the obfuscator's IL writing is crap.
Frankly, I feel obfuscation is a big hack that doesn't fit well in the .NET world. It tries to solve a problem that exists only in the minds of paranoid software managers.
|
|
|
|
|
I don't have any experience with them myself, but nearly everything I've heard about them is negative. The general consensus seems to be that if you have a piece of code you'd really like to protect, you have two options:
1. Put it in an unmanaged DLL, then invoke its methods from your managed program. This isn't perfect, but disassembling unmanaged code is less trivial than disassembling managed code.
2. Don't even ship the secure binary. Keep it in a safe location - i.e. on your web server, and have the client make web calls to your service. This is the ideal solution, as you don't have to worry about obfuscation. The client never even has access to your binary! Of course, this solution is only appropriate for a very limited number of scenarios. Your clients need constant network access to make this work.
Good luck!
|
|
|
|
|
Is there a way to draw a rectangle on top of a loaded image that a user can drag to create a selection area? I can make a rectangle and have it follow the mouse movements, but i don't know how to redraw the underlying image to clear the dragging effect. The image in the picturebox is rather large (10000x10000 pix give or take).
Any help or pointers is much appreciated.
R.Myers
|
|
|
|
|
R.Myers wrote: can make a rectangle and have it follow the mouse movements, but i don't know how to redraw the underlying image to clear the dragging effect.
Do you use double buffering? First draw both the image and the rectangle to an offscreen surface and then present it on the screen.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
If you're drawing onto the actual Image in the picturebox (IE through Graphics.FromImage() ) then the actual image is going to be edited and you won't be able to "clear" it without loading the image again (expensive for a huge image like that!).
Instead what you should do is override the OnPaint event of the PictureBox and take its graphic region from the PaintEventArgs (PaintEventArgs.Graphics), and then do your drawing there.
|
|
|
|
|
Thanks PhilDanger & greeeg
I'll take a look into these ideas
R.Myers
|
|
|
|