|
Diana Fernandez wrote: Because base class implementation should not be used on the object of derived class.
It's a feature of OO ( and the whole point of inheritance ) that derived classes DO inherit the base methods. The best you could do is make SetName virtual on the base class, and override it on the derived, so it calls the new method with a default condition, or have it throw an error.
public override SetName(string Name)
{
SetName(name, true);
}
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Or use aggregation instead of inheritance - maybe in combination with an interface.
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
Hi All,
The requirement is to create factory class that implements a set of cross-cutting aspect classes and provides configuration to create user defined implementations for them at runtime. The user defined assemblies implement the Command pattern, and are invoked in the order they are configured. This requires using Enterprise library for handling configuration data in an external configuration file.
The factory is a singleton class. It references each aspect by an interface. The factory also defines wrapper class to invoke aspect method calls, and load the assemblies on demand.
Please Provide the necessary code and material.
Thanks,
Ramesh Bhojan
|
|
|
|
|
rameshbhojan wrote: Please Provide the necessary code and material.
OK, this is what's called homework. Your teacher is allowed to say this to you, but when you ask people you don't know, to do your homework for you, it's not really the right approach to take.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Don't Cross Post.
Regards,
Satips.
|
|
|
|
|
Hi friends!!.can you help me work with timer control in the web form......
Hi,Im Razana
|
|
|
|
|
You can't, because the timer runs on the server, and your page runs on the client. You can write a timer in javascript, which will execute on the client.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
As CG said timer runs on the server side and the control pages runs on the Client side so please try to implement the Javascript, which will execute on the client.
Here is the Code for the Timer control using Javascript.
Regards,
Satips.
|
|
|
|
|
Thank You Graus and Satips...
Hi,Im Razana
|
|
|
|
|
Glad to Help always.
Regards,
Satips.
|
|
|
|
|
could you tell what do you want to do ??
When you get mad...THINK twice that the only advice
Tamimi - Code
|
|
|
|
|
I have made one User Control which exposes some properties. All these properties are browseable. Hence, when I put my user control on any form and selected the user control, I am able to see the custom properties in property pan at design time.
At design time, I want the button to be displayed against the property item for setting its value. So when user wants to modify the value of this property, user will click the button available. Clicking of button will open up custom form which assist user in configuring the property value.
In framework 2.0, there is control named Masked Text box. This control has got Mask property. I want something similar to this Mask property configuration.
Pls Help.
|
|
|
|
|
First time I didn't get any help from this board but ultimately I got the solution. Type 'IWindowsFormsEditorService' in MSDN for more detail on solution
|
|
|
|
|
hi i refered to an website this[^]
exactly and create an console application however the program only pop up an console and when i try to key in something in it. an run time error occur : Index was outside the bounds of the array.
could some one please aid me in this..
how come its not working??
|
|
|
|
|
|
hey,
I want to use MouseWheel for my drawing application...Idea is to expand and contract a circle depending upon the direction of wheel motion...which function/property to use..?
thanks
|
|
|
|
|
It will take more than a function or property to do that. You can use Mouse Move for sure but will have to add drawing and all those things. Try to do a research on System.Drawing.
|
|
|
|
|
Hi,
there are at least two approaches to do such things.
1.
Every shape (line, rectangle, circle, ...) could be a (user-defined) Control;
in that case you create and select a shape, then it gets its events fired
such as MouseWheel.
2.
In a lightweight approach (which I prefer) only one Control is involved (say a Panel)
on which you create your drawing. Now it is the Panel itself that gets the events,
such as MouseWheel.
In both cases, the MouseEventArgs.Delta property will tell you how much the wheel
has moved (and the sign of that will tell the direction). You should follow UI design rules
as explained in MSDN, concerning SystemInformation.MouseWheelScrollLines
|
|
|
|
|
hi i am currently trying to make an console application with c# which telnet and use the command line : "show cdp neighbour" is that possible? if it is pleaswe show me the way please i feel its a veri useful skill
|
|
|
|
|
Hi,
I need to do the following:
DataRow[] dr = this.myDataSet.Tables[tr[0]].Select("c-ip" = '12.12.12.12');
How can I escape the " so that the select statement reads correctly.
I would have thought (""c-ip""" = '12.12.12.12') would work but it doesn't. Keep getting compiler warnings regarding newlines, ; or ) expected. Neither does \" .
I need to pass the " as the column name is c-ip (as in a w3c log).
Thanks,
Glen Harvy
|
|
|
|
|
\" will translate to " in C#, unless you put an @ in front of the string. Then, nothing is escaped, and quotes are "".
DataRow[] dr = this.myDataSet.Tables[tr[0]].Select(@"""c-ip"" = '12.12.12.12'");
If what you've got now, is meant to be what's ultimately passed in. Not sure why c-ip is in quotes, tho, if it's a column name, I'd expect ("c-ip = '12.12.12.12'") to be what you wanted.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: \" will translate to " in C#, unless you put an @ in front of the string. Then, nothing is escaped, and quotes are "".
DataRow[] dr = this.myDataSet.Tables[tr[0]].Select(@"""c-ip"" = '12.12.12.12'");
Thanks for your suggestion.
That was my understanding as well BUT this is the result:
DataRow[] dr = this.myWebLoggerDataSet.Tables[tr[0]].Select(@"""c-ip"" = '70.87.3.226'");
Cannot interpret token "" at position 6
I have tried combination after combination without success.
Christian Graus wrote: Not sure why c-ip is in quotes,
the ' - ' is not permitted in column names (at least in SQL CE) so I need to put the column name into double quotes. Naturally I could change the column name but that is going to be a big task when the w3c log format includes the dash.
Glen Harvy
|
|
|
|
|
No, you put the column name in [] in order to override a name that's not standard.
DataRow[] dr = this.myWebLoggerDataSet.Tables[tr[0]].Select(@"[c-ip] = '70.87.3.226'");
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
I have defined an interface called ICustomControl that all of my controls implement. One property in the interface is...
bool LockControl { get; set; }
This property exists so that I can iterate through a collection of ICustomControls and lock them or unlock them. The definition of "locking" a control is control specific.
For a textbox the property looks like this...
public bool LockControl { get { return ReadOnly; } set { ReadOnly = value; } }
For most controls the property looks like this...
public bool LockControl { get { return !Enabled; } set {Enabled = !value; } }
When in the designer I am able to change the LockControl property of a textbox and the ReadOnly property changes along with it. This does not work for controls whose LockControl property tries to change the Enabled property. In fact, the designer does not even allow me to change the value of LockControl.
Is there an attribute I have to put on the property to get this to work correctly in the designer?
|
|
|
|