|
Web services have provided the best abstraction for middle-tier architecture that I have seen. Depending on the number of users and the difficulty up updating you may be able to get away with your middle-tier class library existing on client machines (poor man's 3 tier apps)
A man said to the universe:
"Sir I exist!"
"However," replied the Universe, "The fact has not created in me A sense of obligation."
-- Stephen Crane
|
|
|
|
|
If you are using .NET 2.0 you have the option to distribute your app using ClickOnce. This would give the best of best worlds sort of. The app lives and breaths on the client but updates are available on a server.
Web Services are also a good idea but you have to consider the usage of the app and frequency of updates. Obviously if you only plan to update your app once a year ditributing a new version with the latest code isn't to much of hassle, relatively speaking. On the other hand if your app may need to work in a disconnected or limited connection environment then WebServices wouldn't work.
|
|
|
|
|
Okay I have this Interface:
interface myInterface
{
public void visible(bool view);
}
I was implementing the visible method in my other classes like this:
visible(bool view)
{
if(view)
{
this.Left = -500000;
blah blah blah
}
else
{
this.left = 0;
blah blah blah
}
}
Okay I need to change my interface to an abstract class, so i can just implement the visible method one time in the abstract, but i can't use "this.Left" in the abstract because it doesnt contain a method for "Left".
It is probably a simple solution to this but how do I get this.Left, this.dock etc. to be available for use in my abstract class?
|
|
|
|
|
Make an abstract property get-set called Left which the derived classes override.
:josh:
My WPF Blog[^]
|
|
|
|
|
further to Josh's suggestion, the point of an abstract class is to abstract the functionality (as the name implies). Something like this would satisfy
public abstract class AbstractThing : myInterface
{
protected abstract void SetVisible();
protected abstract void SetInvisible();
public void Visible(bool view)
{
if(view)
SetVisible();
else
SetInvisible();
}
}
then your derived class, which has the Left property defined.
public DerivedThing : AbstractThing
{
protected override void SetInvisible(){ this.Left = -50000; }
protected override void SetVisible(){ this.Left = 0; }
}
or say you derive it and you wantr different behaviour for SetVisible and SetInvisible..eg/
public OtherDerivedThing : AbstractThing
{
protected override void SetInvisible(){ this.Visible= false; }
protected override void SetVisible(){ this.Visible = true; }
}
---
How to get answers to your questions[^]
-- modified at 10:36 Friday 14th July, 2006
|
|
|
|
|
Hi,
I have the following problem when trying to use Custom Controls published here at CodeProject with the full source code:
1.) I add the control source to my project
2.) Project compiles, everythings fine.
When I now want to add the control using the designer, I have to import it from the binary assembly the project has created ( so I'm referencing myself). Is there another way of registering in the toolbox just using the sourcecode ?
Its a bit annoying, because I get a warning that I'm using a different type. The most ExampleProjects have all integrated, but don't reference the outputbinary for having designer support.
I don't want to create a separate assembly containing all controls at the moment and I didn't found another solution yet.
Many thanks,
Florian
|
|
|
|
|
I think VS 2005 hadnles this issue better than VS 03. For VS2003 and if the control is inheriting from UserControl than double clicking it (so that the designer view pops up) then it should automatically being added to the toolbox.
|
|
|
|
|
Hi Robert,
if I click on the control sourcecode item ( e.g. Control.cs) i get a screen with the follwing text (window tab says "Control.cs [Design]":
To add components to your class, drag them from the Toolbox and use the Properties window to set their properties. To create events for your class, click here to switch to code view.
Well, that pretty obvious, but I have no idea how to convince the toolbox when editing a form to display the control which is only existing in sourcecode at that moment. Ok, it seems that the Control I use is not inherited from UserControl, so it may not work here.
But you mean, if doubleclicking the sourcefile in the project should be enough if it is inherited from UserControl ?
Thanks,
Florian
|
|
|
|
|
Keep the control code seperate from your own. Make the control it's own seperate Project, then you can have it show up in the ToolBox.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Silly Question~
Which Component Reference do I need to use the StreamWriter Class?
Thanks in advance.
|
|
|
|
|
No reference needed.
Juz include
System.IO Namespace
|
|
|
|
|
Hi, all.
I'm trying to create an RFID application and related hardware using C# but couln't find any resource. Could anyone please tell me where I can learn about these stuffs. I've been searching for quite awhile but couldn't find it. When it comes to firmware programming, they mostly use C++, not C#. Please help.
KiT
|
|
|
|
|
Hi KiT,
do you want to program a firmware using C# or do you just want to acess functions using an existing SDK for your hardware ?
Firmware Programming using C# doesn't works at the moment I suppose, because you would need a CLR (common language runtime) for your desired microcontroller. But the most microcontrollers have a C/C++ compiler generating native code, which can be executed by them, so I suppose you have at the least to use C/C++, which is very common in the embedded world (despite a few native java processors).
Bye,
Florian
|
|
|
|
|
I see. Thank you very much, Florian. I've understood correctly that I intended to use only C# for embeded programming. But, aww... okay, I'll try C++ (I hate pointers -_-"). Thank you again for your help.
KiT
|
|
|
|
|
Just be glad that you've got C and don't have to write in asm. Specialty embedded hardware is one of the asm programmers last bastians.
|
|
|
|
|
Hi KiT,
well, if you want to do embedded programming you shouldn't rely too much on the garbage collection, as you've usually very limited resources. So it's a great benefit knowing what is going on in the system and having everthying under control. Otherwise you may be in trouble with running out of resources. So it's very helpful to do some things the hard way, it's usually easier then being effective on managed languages as well.
Bye,
Florian
|
|
|
|
|
hello all. i have a probelm in getting user input during installation wizard.
after getting the values iam trying to store it in a configuration file. using an exe. where the exe contains installer class. i register AfterInstall event in installer class
<br />
void Installer1_AfterInstall(object sender, InstallEventArgs e)<br />
{<br />
XmlDocument configXml = XmlDocument ()<br />
configXml.Load(Application.StartupPath+"\\ConfigurationXML.xml")<br />
XmlNode xmlNd = configXml.SelectSingleNode("//Periperals/MES/Ethernet/IPAddress");<br />
xmlNd.InnerText = Context.Parameters["IP"].ToString();<br />
xmlNd = configXml.SelectSingleNode("//Periperals/MES/Ethernet/Port");<br />
xmlNd.InnerText = Context.Parameters["PORT"].ToString();<br />
xmlNd = configXml.SelectSingleNode("//Periperals/MES/Ethernet/VirtualDirectory");<br />
xmlNd.InnerText = Context.Parameters["WEB"].ToString();<br />
configXml.Save();<br />
}<br />
here IP,WEB,PORT are the inputs that iam getting using the wizard during installation
ConfigurationXML is the xml file where i want to write the user inputs.
but during istallation i getting the following error.
"Exception occured in OnAfterInstall event handler ConfigurationXML.xml not found on the location C:\WINDOWS\system32\ConfigurationXML.xml"
Why it so? i have specified as Application.Startup path right!
|
|
|
|
|
Obviously, the installer's Application.StartupPath must be "C:\WINDOWS\system32", in which case you want something like the Installation Path - which I do not know offhand how you would get from the installer. Someone im sure will answer with that knowledge, but you could search the docs if you're in a hurry.
---
How to get answers to your questions[^]
|
|
|
|
|
How CTI/IVR (Computer telephony integration/interactive voice response) applications can be developed in C# .net 2003. Is C# .net supports Dll like Visual C++ 6.0?
|
|
|
|
|
I think your first step is to some classes or read some books on .NET and C# before asking such a question.
Yes, .NET uses dll's, they are called assemblies.
|
|
|
|
|
hi
i am testing whther a device is connected or not to the usb.i want the status to be displayed dynamically in a label.if i use Thread.sleep() only the final status is getting displayed.intermediate statusus r not visible.
could u plz help me out.
thank u
sincerly
cynthia
|
|
|
|
|
Try to put your method in a separate Thread.
|
|
|
|
|
You could check the connection status in a timer tick (quick and dirty) or a separate thread (recommended).
/ravi
My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib(at)ravib(dot)com
|
|
|
|
|
I think UI thread doesn't get time to redraw.
On every updation of status put the following code
<br />
yourLabel.Text="status";<br />
mainForm.Refresh();
this refresh method will repaint the GUI
|
|
|
|
|
hi all,in my web application i use form authentication mode it works fine in my local system, but in server it wont work and wont allow me to log in (when i click on the link it load the login page again)what willbe the problem .here is my webconfig file ....
authentication mode="Forms">
<forms name=".auth" loginurl="login.aspx" path="/">
/authentication>
authorization>
deny users="?" />
/authorization>
help me to solve this prob........
Regards,
ayyp
-- modified at 7:34 Friday 14th July, 2006
|
|
|
|