 |
|
 |
Great control. Good work.
|
|
|
|
 |
|
|
 |
|
 |
Thanx for a very nice control, just started using it in one of my projects. Very nice work
Poul L.
|
|
|
|
 |
|
 |
Very nice. I've been in the process of developing my own 7 segment LED control for a project I'm working on and ran across your control. Lots of thought and effort went into this. Wonderful job!
|
|
|
|
 |
|
 |
Good work!
|
|
|
|
 |
|
|
 |
|
 |
I can't read it, I can't copy and paste.
|
|
|
|
 |
|
|
 |
|
 |
Liu Xia wrote: do you mean that you want to copy the text on the control?
Yes, I should be able to copy the value and paste it into something else.
|
|
|
|
 |
|
 |
Thanks for your reply! I will work on it and update the downloads as soon as possible
|
|
|
|
 |
|
 |
The updated downloads are sent to the editor. Many thanks to PIEBALDconsult ! The download link might be updated the day after tomorrow.
Update:
(1) The text on the control now can be copied to clipboard.
(2) The color of the control border will change (defined by user) when the control has focus.
(3) Bug fixed: The anti-alias effect disappears when the bound is a regular rectangle.
----- Wellcome to Beijing for the summer Olympics -----
|
|
|
|
 |
|
 |
Maybe I'm missing something, but if the program sends information to the LED for display then that value is already contained in a variable. Reading it from the LED would add another step to the process and seems redundant. But, thanks for adding more functionality to the control!
|
|
|
|
 |
|
 |
First let me say this is a great control. When using the control, I noticed that the following English letters don't render; K, W, and X.
How do I get these letters to render?
Thanks
|
|
|
|
 |
|
 |
Thanks for your question. Yes, this control is currently a 7-segment led displayer and there are some letters that can't be rendered, e.g. 'K' or 'X' or 'W'.
|
|
|
|
 |
|
 |
Hi,
I'm trying to use this project in VS2005, but i receive a message 'import key file' and need to fill in a password (file LedctlKey.pfx). Could you please give us the password?
Thanks.
|
|
|
|
 |
|
 |
I'm sorry for the inconvenience. In fact, you can create a empty project and add the source into it, or using the password 'detectiveconan' in the project downloaded.
|
|
|
|
 |
|
|
 |
|
 |
What did you use to generate the grapics in your article... This is what is really impressive, the clarity and ease of which each of your pictures describes visibly what is happening in your UI drawing functions.
wahoo
|
|
|
|
 |
|
 |
I'm setting the Text with a timer every second to simulate a clock. Each time I set the Text my memory is growing.
I tried to debug, but I can't get it start, because I don't know the password of the key file.
Live is to short to be angered about lost chances!
|
|
|
|
 |
|
 |
Hi KenGuru
Thanks for your reply! But in dotNet framework, even you call dispose for the object which implements the IDisposable interface, the resource of the object may be just marked, not collected. The GC will collect them when it is necessary to do that.
Sorry for the strong named key but you can just create a new project and copy the source file into it.
|
|
|
|
 |
|
|
 |
|
 |
I really liked this. Good article.
|
|
|
|
 |
|
 |
You may defines ASCII char with table as:
const int Sa = 0x01; // ....Sa....
const int Sb = 0x02; // Sf......Sb
const int Sc = 0x04; // ....Sg....
const int Sd = 0x08; // Se......Sc
const int Se = 0x10; // ....Sd......Sh
const int Sf = 0x20;
const int Sg = 0x40;
const int Sh = 0x80;
static char[] Tcar =
{
'1' , '2' , '3' ,
'4' , '5' , '6' ,
'7' , '8' , '9' ,
'0' , 'A' , 'B' ,
'C' , 'D' , 'E' ,
'F' , '.' , ' ' ,
'H' , 'I' , 'L' ,
'O' , 'P' , 'R' ,
'U' , '-' , '=' ,
'a' , 'b' , 'c' ,
'd' , 'e' , 'f' ,
'h' , 'i' , 'n' ,
'o' , 'r' , 't' ,
'u'
};
static int[] Tval =
{
Sb+Sc, Sa+Sb+Sd+Se+Sg, Sa+Sb+Sc+Sd+Sg,
Sb+Sc+Sf+Sg, Sa+Sc+Sd+Sf+Sg, Sa+Sc+Sd+Se+Sf+Sg,
Sa+Sb+Sc, Sa+Sb+Sc+Sd+Se+Sf+Sg, Sa+Sb+Sc+Sd+Sf+Sg,
Sa+Sb+Sc+Sd+Se+Sf, Sa+Sb+Sc+Se+Sf+Sg, Sc+Sd+Se+Sf+Sg,
Sa+Sd+Se+Sf, Sb+Sc+Sd+Se+Sg, Sa+Sd+Se+Sf+Sg,
Sa+Se+Sf+Sg, Sh, 0x00,
Sb+Sc+Se+Sf+Sg, Se+Sf, Sd+Se+Sf,
Sc+Sd+Se+Sg, Sa+Sb+Se+Sf+Sg, Se+Sg,
Sc+Sd+Se, Sg, Sd+Sg,
Sa+Sb+Sc+Se+Sf+Sg, Sc+Sd+Se+Sf+Sg, Sa+Sd+Se+Sf,
Sb+Sc+Sd+Se+Sg, Sa+Sd+Se+Sf+Sg, Sa+Se+Sf+Sg,
Sc+Se+Sf+Sg, Se, Sc+Se+Sg,
Sc+Sd+Se+Sg, Se+Sg, Sd+Se+Sf+Sg,
Sc+Sd+Se
};
So, your DrawSingleChar() Procedure becomes:
private void DrawSingleChar(Graphics g, Rectangle rectBound, Color colCharacter, char car, float bevelRate, float segmentWidth, float segmentInterval)
{
int emme = Tcar.Length;
int i;
for (i = 0; i < emme; i++)
{
if (Tcar[i] == car)
{
int segm = Tval[i];
for (int k = 0; k < 8; k++)
{
if ((segm & (1 << k)) != 0)
{
DrawSegment(g, rectBound, colCharacter, k+1, bevelRate, segmentWidth, segmentInterval);
}
}
break;
}
}
}
And DrawSingleCharWithFadedBk() becomes:
private void DrawSingleCharWithFadedBk(Graphics g, Rectangle rectBound, Color colCharacter,
Color colFaded, char car, float bevelRate, float segmentWidth, float segmentInterval)
{
int emme = Tcar.Length;
int i;
for (i = 0; i < emme; i++)
{
if (Tcar[i] == car)
{
int segm = Tval[i];
for (int k = 0; k < 8; k++)
{
if ((segm & (1 << k)) != 0)
{
DrawSegment(g, rectBound, colCharacter, k + 1, bevelRate, segmentWidth, segmentInterval);
}
else
{
DrawSegment(g, rectBound, colFaded, k + 1, bevelRate, segmentWidth, segmentInterval);
}
}
break;
}
}
}
Ciao
Nicola
|
|
|
|
 |
|
 |
Hey, just saw this.
I believe that I learnt this 7-segment led display when I was doing some native C programming for DIP micro processor back to my college time.
Nice binary manipulation, inspiring.
Someone was born greatness;
Someone achieved greatness;
Someone have the greatness thrust upon him;
|
|
|
|
 |
|
 |
yeah, i quite agree with your habit of coding. i will prefer "Array.IndexOf()" to instead of the linear searching loop .
|
|
|
|
 |
|