|
OK, I get it now. Unfortunately, I can't help you with that, sorry!
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
I want to communicate with serial port on client side system via asp pages.I think silverlight is the best solution,but there is no asp.net sample about this topic.
would you please tell me if there is a sample in this site or other web pages?
thanks
|
|
|
|
|
Silverlight is not the best option for what you are trying to do.
Silverlight runs in a sandboxed environment where accessing serial ports is not possible.
|
|
|
|
|
|
|
This site needs to sign in but I don’t know why I can’t sigup
|
|
|
|
|
Create a webservice on the server side that accepts the port data and a desktop app on the client side that reads the serial port and sends the data to the webservice.
Or; use automation (via MSHTML or a webbrowser control) to update the ASP page from a desktop app that reads the serial port.
Or; create a webservice on the client side that reads the serial port; a Siverlight app on the client side can then access the webservice to get port data.
|
|
|
|
|
Thanks for your answer.
Is there any sample about these ideas?
|
|
|
|
|
I gave you 3 options; you first need to decide which option you are going to use, and then break out it's components.
After that, there are plenty of examples out there (including on this site) to:
1) create a web service (server and/or client side)
2) read a serial port
3) browser automation using MSHTML
4) browser automation using the web browser component
5) calling javascript on a page and passing parameters
|
|
|
|
|
What hapened if there was a sample including this five issues together?
I'll try again to achieve my purpose.
But I hope I would make a component,when user connects to my website an activex download pops up and he accept it then every thing will be solved through internet borrowser.
Is that possible?i'm sure but it's too difficult for me.
|
|
|
|
|
First off, I wouldn't use an ActiveX control - that will limit you to PCs. Secondly, what exactly are you expecting from us?
|
|
|
|
|
Everything is possible (if you want it bad enough).
|
|
|
|
|
Thank you.
modified 29-Jun-12 6:16am.
|
|
|
|
|
But how does other commercial components work?like active comport.
|
|
|
|
|
Hello everyone
I have two images, image1 represent lunch and image2 represents dinner. When I run my application the image1 is displayed on main window.
How can I change image1 to image2 corresponding time of day (at run-time)?
For instance: lets say
from 12:00 to 17:00 I want my image1 to be displayed at main window, and
from 17:00 to 23:00 I want to display image2 at main window.
could someone please help me solve this problem, Hence: I'm new to WPF...
thanks in advance
kind regards
lapeci
|
|
|
|
|
Presumably you have a property representing the image to be displayed and bind your xaml to the property.
You then need a timer in your code (code behind or ViewModel). In the timers tick event you check the datetime.now and change the image property to the image you want to display.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello Mycroft Holmes
Thanks for replying to my question...
Is there any way you can help me with a sample code because I don't have a clue how to do it
I'm very new to wpf... thanks in advance.
kind regards
lapeci
|
|
|
|
|
Sorry, I don't do code, you are going to have to work it out! If you get stuck with something then come back and we will help.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I am developing a paint application. I am using Canvas control as whiteboard.
I want to use InkCanvas kind of functionality in WPF canvas, means I want to draw a free hand shape on Canvas. How can I do this ? I also want to save in as *.JPG
Thanking You !!!
|
|
|
|
|
Fortunately for you, Code Project legend and all round good guy Sacha Barber wrote an article on this very topic here[^].
|
|
|
|
|
Thank you so much, but that samples uses InkCanvas control I want to use Canvas control
|
|
|
|
|
|
I have a WPF application using MVVMlight. I wanted to use a new WPF skin from a dll. I added a ResourceDictionary in the App.Xaml to the Application.Resources section as shown...
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Assembly;component/NewSkin.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
Building it throws an error saying "Program does not contain a static 'Main' method suitable for an entry point". If I remove the ResourceDictionary entry, it compiles fine.
Found the following potential issues when I searched.
1. Has the "Build action" been set to "Application Definition" - yes, it is an existing project with the App.xaml build action set to "Application Definition"
2. Does the app.g.cs file exist - I checked the app.g.cs file. it does have a Main method
Additional information:
1. I am using Visual Studio 2010
2. I am also using MVVM Light. There is one other entry in the Application.resources section of App.xaml.
<!--Global View Model Locator-->
<vm:ViewModelLocator x:Key="Locator"
d:IsDataSource="True" />
which is the ViewModelLocator for MVVMLight toolkit.
Appreciate any help!
|
|
|
|
|
Hello,
Ive created a dependency property:
class FrameworkElement : UIElement
{
public static readonly DependencyProperty NumberProperty;
public FrameworkElement() { }
static FrameworkElement()
{
FrameworkPropertyMetadata metadata =
new FrameworkPropertyMetadata(Double.NaN,
FrameworkPropertyMetadataOptions.AffectsMeasure);
NumberProperty = DependencyProperty.Register("Number",
typeof(Double),
typeof(FrameworkElement),
metadata,
new ValidateValueCallback(FrameworkElement.IsNumberValid));
}
public Double Number
{
set { SetValue(NumberProperty, value); }
get { return (Double)GetValue(NumberProperty); }
}
private static Boolean IsNumberValid(object value)
{
Double number = (Double)value;
if ((number < 0) || (number > 100))
return false;
return true;
}
}
and i added to it a validation callback.
When i set an out of range number to that proprty i get an:ArgumentException.
How can i do that instead of an exception the propertie will get some default value when i try to set out of range number?
Thanks
|
|
|
|
|
hi all
i want to use DirectShowLib.Dll(The .Net base dll) in
my Silverlight app.can anyone help me how do that?!!!
Thanks
|
|
|
|