|
no its too different, i tried, i had an idea but that idea became useless
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Oh at last i did, now going to optimize the code
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87??6?N8?BcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-i?TV.C\y<p?jxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
Hi.
I want to convert rechTextBox's content to HTML code.
How can I do it ?
Are you have a suggestion ?
Freshman
|
|
|
|
|
If you can't find code to do this, you need to write something that parses the RTF format and creates HTML. Word will do it, if you don't mind your user having to have word installed.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
Christian Graus wrote: Word will do it
Wow
Please explain more .
Freshman
|
|
|
|
|
You can control word from C# code. Word can save and load RTF and can save HTML, so you could load a RTF and save as HTML, by using the Microsoft tools for office to control Word on the client machine.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
Christian Graus wrote: by using the Microsoft tools for office to control Word on the client machine.
What do we search to find the reference about it ?
Freshman
|
|
|
|
|
|
Thank you Luc .
Regards.
Freshman
|
|
|
|
|
Hi All,
How to Append images and text in RichText Box .Thanks In Advance.
|
|
|
|
|
|
Hi everybody!
How to elegantly give the same effect as
Element last = getLastElementOfType<typeof(elem)>();
should give, but seems not to work? Without using reflection of course.
elem is an object of a type which derives from Element , but the type itself is unknown as it is passed to the method just as an Element.
I solved it by a switch statment which cases are all types deriving from Element , but it is ugly because it needs to be modified everytime a new derivative class is created.
Thanks in advance.
Greetings - Gajatko
Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
modified on Sunday, July 6, 2008 7:03 AM
|
|
|
|
|
|
There is no generic class here. There is a generic method only. Sorry for bad title.
Greetings - Gajatko
Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
|
|
|
|
|
I am not really sure what you are trying to do
Sounds to me like a visitor pattern, but I am not sure how generics will fit in. Maybe supply some more detail, and we can solve the problem
|
|
|
|
|
Situation has changed, because it turned out that different types requiere different methods, so a bunch of "is" cases was needed anyway.
But the subject is interesting, so assuming that I need the same thing which I needed before, the situation comes out as follows.
Let be an Element class and a set A of n XElement classes deriving from Element .
Let be a sequence of objects s and for each object o in s { type of o is in A }.
Let be a method M(start, end) .
Let be a function f(o) which returns some data related to an object o from sequence s.
The method M iterates through a part [start,end] of s and needs some information of every element o. So it calls function f(o) for each o in s. f is defined as follows:
internal T lastElementOfType<T>(int start) where T : Element
{
int index = elements.FindLastIndex(start, el => el is T);
return index == -1 ? null : (T)elements[index];
}
internal T lastElementOfType<T>(Element start) where T : Element
{
return lastElementOfType<T>(findIndex(start));
}
int findIndex(Element element)
{
return elements.FindIndex(el => object.ReferenceEquals(el, element));
}
Now.
In the implementation, s is a list of Element s, but objects of this list aren't of type Element but of one of types from A (from the definition of s given above). So I made f generic method which takes typeof(o) as a generic parameter. Unfortunately, passing an expression typeof(o) as T generates a compilation error. This is reasonable because typeof is evaluated at runtime. So what to do?*
* - I've got some ideas but I don't want to be a killjoy you know.
Greetings - Gajatko
Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
|
|
|
|
|
gajatko wrote: I've got some ideas but I don't want to be a killjoy you know.
Interesting problem, but I am not sure I understand completely. Sometimes generics are not worth it IMO
|
|
|
|
|
Hi,
I've been able to generate RSA key pair, and exporting them to XML files, (thanks to tutorials found in this forum)
The problem I'm facing is that I want to send the public key via socket communication to another server.
I will then use the public key to encrypt a password, which will be use for symmetric encryption communication between the two hosts.
I try sending the xml file, but I cannot seem to be able convert back to XML in the other end.
so then I thought if I could send the public key as a "string" which I could just load on the other end.
is this possible?
or is there a better way to share this "password key" for symmetric encryption.
Sorry if this is simple, I'm completely new to c# and programming.
Thanks,
JC
|
|
|
|
|
I am just starting to learn about creating custom controls using the book "GDI+ Custom Controls with Visual C# 2005". I am a little confused about overriding the control's OnPaint function. As a test, I created a custom control that has just a label. I then created the following code:
protected override void OnPaint(PaintEventArgs e)
{
}
I figured that since I am not calling the base.OnPaint(e), that the label would not get displayed, however when I run this, the label still shows up. Can someone explain why overriding a custom control and not calling base.OnPaint(e) does not effect and controls that are part of the custom control?
|
|
|
|
|
When you create a label control, a new window is created and as every window it's receiving it's own messages from the main message loop, including the paint message. A method Label.OnPaint is not invoked from the UserControl.OnPaint . It's called by Control.WmPaint(ref Message m) , which is called by (...), which is called by Application.ThreadContext.RunMessageLoop(int reason, ApplicationContext context) .
Try to make a "user control", which derives from Label , like this:
class MyControl : Label
{
...
override OnPaint { }
}
Then the label will not be drawn.
Greetings - Gajatko
Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.
|
|
|
|
|
Hi, i got a Main form which is called FrmMain and the IsMDIContainter is set to true;
When the application is executed, the Form_load i got this code
FrmLogin childLogin = new FrmLogin();
childLogin.ShowDialog(this);
and my constructor i got
public FrmMain()
{
InitializeComponent();
allData = new AllData();
}
this is my AllData.cs
public class AllData
{
private Hashtable ht;
public AllData()
{
ht = new Hashtable();
}
}
Inside my FrmLogin constructor i got
public FrmLogin()
{
InitializeComponent();
staff = new Staff("Admin", "S123456I", "pass123", "13 April 1988", "ADDRESS", 91234567, 61234567, true, true, false, true);
}
how do i add the staff to my hashtable which is declare in the main form?
|
|
|
|
|
|
Inside my FrmMain (parent)
I have this
public Hashtable staffTable;
public FrmMain()
{
InitializeComponent();
staffTable = new Hashtable();
}
And inside my FrmLogin (child)
private FrmMain ParentForm;
private Staff staff;
public FrmLogin()
{
InitializeComponent();
staff = new Staff("Admin", "S123456A", "pass123", "13 April 1988", "ADDRESS", 912346678, 12345678, true, true, false, true);
((FrmMain)ParentForm).staffTable.Add("S8812466I", staff);
}
When the application is run, i get this error
"NullReferenceException was unhandled"
Object reference not set to an instance of an object.
modified on Sunday, July 6, 2008 6:26 AM
|
|
|
|
|
In FrmLogin create a delegate/event/event method, and a public class that inherits from EventArgs. In FrmMain, after FrmLogin is insanciated (but before it's shown), subscribe to the event in FrmLogin. Then, FrmLogin can raise the event and pass the Staff object in the eventargs, which will be received by FrmMain because it's listening for it.
Dave
|
|
|
|
|
Omg. erm i am new to C#, can u make it a little simpler?
probably u can give me some example?
modified on Sunday, July 6, 2008 7:48 AM
|
|
|
|