|
Hi,
IIRC what you want is in the DescriptionAttribute class.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 9:19 AM
|
|
|
|
|
Yes, this gave me a clue on how to do what I want.
Thanks
|
|
|
|
|
WPF APPLICATION NOT A WINDOWS FORM
i made a style of a button that got an image in his gridand i saved it to a ReasourceDictoinary.xmal
i use this style to create buttons in my application (i use an array of buttons)
the button content presentor gets a string from an xml file, that gives it name.
i like to give the source of an image from a string too(it should go to the image i put in the grid of the styled button)
i can put the image insted of a string in the content presentor but not both
help plz
<br />
int i=0;<br />
Button btNew = new Button();<br />
btNew[i] = new Button[5];<br />
btNew[i].Height = 132;<br />
btNew[i].Width = 132;<br />
BitmapImage bit = new BitmapImage(new Uri(@"D:\BACKGROUND-.png", UriKind.Relative));<br />
ResourceDictionary res = (ResourceDictionary)Application.LoadComponent(new Uri("Dictionary1.xaml", UriKind.Relative));<br />
Style style = (Style)res["btn2"];<br />
btNew[i].Style = style;<br />
btNew[i].Content = "string from xml";<br />
LayoutRoot.Children.Add(btNew[i]);<br />
i++;<br />
i thought about somthing like that:
<br />
btNew[i].Style.Reasource["Image"] = bit;<br />
THANKS
|
|
|
|
|
Hi Guys,
I'm experiencing the following problem with DataGridViewComboBoxCell:
When clicking the arrow that opens the combo box for the first time, everything is fine. However, when clicking it again (as long as the cell is still in focus) the list drops (opens) and closes immediately. The only way to change its value is to select another component so it loses focus, and then click it once again.
Does anyone has an idea how to solve it?
Thanks,
Eyal.
modified on Tuesday, March 10, 2009 6:19 AM
|
|
|
|
|
Hi! I would like know how can I show videos in web service using C#. I have a Sql Server database and I inserted videos like a varbinary(max)following instructions from:
http://www.codeproject.com/KB/aspnet/VideoUploaderControl.aspx , so I can insert videos in a Sql Server database, but I want show them in web service. How can I do that?
Please help me. Thanks !
|
|
|
|
|
|
Thanks for the suggestions. We tried to do that, but we can´t show videos. We have a GenericHandler:
]]>
using System;
using System.Web;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
public class VideoHandler : IHttpHandler
{
private localhost.wsDataReader ejemplo;
public void ProcessRequest (HttpContext context)
{
ejemplo = new localhost.wsDataReader();
context.Response.BinaryWrite((byte[]) ejemplo.MostrarDatos() );
}
public bool IsReusable
{
get {
return false;
}
}
}
If we only execute it shows a window for download the video: open, save or cancel.
This .ashx uses the WebMethod called MostrarDatos():
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Data.SqlClient;
[WebService(Namespace = "http://localhost/wsDataReader/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class wsDataReader : System.Web.Services.WebService
{
public SqlConnection ConexionConBD;
public SqlCommand Orden;
public SqlDataReader Lector;
[WebMethod(Description = "Este método devuelve un video utilizando DataReader")]
public byte[] MostrarDatos()
{
string Conexion ="Data Source=.\\SQLEXPRESS;AttachDbFilename=\"|DataDirectory|\\BDvideos.mdf\";Integra" +
"ted Security=True;User Instance=True";
ConexionConBD = new SqlConnection(Conexion);
string Consulta = "SELECT Video FROM Videos";
Orden = new SqlCommand(Consulta, ConexionConBD);
ConexionConBD.Open();
Lector = Orden.ExecuteReader();
Lector.Read();
return (byte[]) Lector["Video"];
}
}
We don´t want download the video. We only want show the video in a WindowsFormsApplication or in a Website (.aspx)...
What code we should use?
|
|
|
|
|
Javier Aballay wrote: but I want show them in web service.
Web Services, like all services, don't have any user interface, thus they show nothing. Perhaps you need to reword your question?
|
|
|
|
|
Hi everybody.
I'm going to work on Face Recognition with C#, I'm green on it.
So , do you know any references for algorithms or samples about it ?
I've searched Google , but I've not found anything special.
Could you post some samples about it ?
Many thanks in advance.
|
|
|
|
|
Mohammad Dayyan wrote: I'm going to work on Face Recognition with C#, I'm green on it.
Then you probably aren't aware of how increadibly difficult a problem domain this is. People have worked for years trying to get face regognition to the point is is today... And it still isn't anywhere near perfect.
Mohammad Dayyan wrote: Could you post some samples about it ?
This is an area of computer science that is still mostly in the academic sphere. You might want to try searching university libraries and academic publications.
|
|
|
|
|
Colin Angus Mackay wrote: Then you probably aren't aware of how increadibly difficult a problem domain this is.
Yeah, you're right. But we should start to aware of them.
Hope springs eternally
|
|
|
|
|
|
Hi,
I was working on that one (in c# actually) for about 6 months. As Colin has pointed out - this is a difficult problem. Many methods have been developed, none works even close to what I would call acceptable .
Anyway, you have 2 problems:
- Face detection - There is an OpenCV library which works nice with their haar detectors and there is a lightweight library somewhere on net that tracks faces (if you have a video stream) using ANN, combining those two can give you nice results of tracking faces on video. (At least that worked grat for me).
- Face recognition - Here, I would start with articles from universities, but don't expect too much (complete how-to? - no way, method that works almost always? - no way). Good place to start would be IEEE or good old friend Google .
ANN, LBP, Eigenface, Fisherface - good keywords to start searching.
|
|
|
|
|
Hello.
I have this:
this.webBrowser1.Document.Window.Frames[2].Document.Body;
Which gives me the HTML source of the main body of the frame.
But I need the source of the whole site, including HEAD and all the other tags.
Hope your guys can help
|
|
|
|
|
Excluding the server-side scripting, off course. Take a look here[^]
I are troll
|
|
|
|
|
Off couse.. I could have said that myself..
Thanks alot!
|
|
|
|
|
Hello,
.. I had signed a dll (a .NET Control for Windows Form) using a snk file that was created in my old computer where I had XP. But in my new machine, with VISTA, I cannot build the dll with the old snk file. I get error “The key file ***.snk does not contain private/public key pair”. Ok then I tried to create a new key using the Visual Studio 2008 Signing Section, I choosed to create a new key file, but I get error “The operation could not be completed”. Please help.
|
|
|
|
|
HI
Hi,
I have requirement where when I click a button a rectangle should be displayed. One more click on the button 1 more rectangle shoud be drawn, without over writing my previous rectangle. In the code which I have the rectangle is getting overwritten which i dont want.
Thanks i advance
|
|
|
|
|
You just need to take care of coordinates. Keep track of coordinates and make sure you draw next rectangle in empty space.
|
|
|
|
|
two options for you to consider.
1. Keep a 'Global' Graphics class that you do all your drawing to. then in your paint event (assuming your doing that way with a panel?) just draw the graphics class.
2. Keep a Collection of rectangles, in which you add a new one to it each time the button is clicked(with desired location, size, colour etc.) then in you paint event just draw each rectangle in the collection
Option 2 is a much better solution because you can manipulate rectangles individually if future developments require
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
What about using STACK structure to store the rect you need to draw? So the latest one will alway be displayed firtly.
I Love KongFu~
|
|
|
|
|
I want to use TcpClient and connect with a proxy like HttpWebRequest.
Can I add a proxy to the TcpClient-object?
|
|
|
|
|
Hi,
I'd like to save a combination of username and password in a XML file, so the user won't be bothered to type his username and password every time he runs the program.
So far I have followed this article http://www.codeproject.com/KB/security/ProtectYourXmlData.aspx and written some piece of code, which encrypts and writes the username and password to a XML file. It also decrypts them after reading from the file.
Big disadvantage of my code is, that the password is hard-coded into my application
Is there a best practice where the "master-password" should be put? Perhaps into the application.config or the user.config?
Greetz,
Francis
|
|
|
|
|
francis-09 wrote: Is there a best practice where the "master-password" should be put?
How about database?
Yusuf
Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]
|
|
|
|
|
Instead of saving the password, calculate a hash-value based on the password. Once the user enters his/her password, calculate a new hash. Compare this calculated value against the hash-value that you have stored (and encrypted).
You might want to adapt the example from MSDN[^] for your purpose
I are troll
|
|
|
|