HI,
We have a pretty large application with hundreds of forms in it. Now some of our new clients request
us to make some custom screens(forms), which basicly comes to rearranging controls on our standard
forms - moving existing text boxes, grids, etc. around. We currently are creating custom versions of
forms for them and put some sort of flag in their database, so that application knows which version
of a form to load depending on client.
But obviousely it can't go this way any longer as we are unable to support multiple screens of same
nature, so we want to add certain functionality to be able to rearrange components on a form on
run-time, without rebuilding the app. Something like: user clicks a button "Redesign form" and then
he/she is able to move controls around on a form. Then they click "Save" and current positions and
size of controls is saved somewhere in teh database, so that the next time the form is pulled up, it
rearranges the controls per values in database.
SO my problem here is how to provide the app with form editing ability.
Any ideas/coments would be HIGHLY!!! appreciated...
Thank you,
Andrey 7 1585
Andrey:
Without going into a great deal of detail, any object can be configured
to respond to drag-drop events. So, at the click of a button, you
could make all objects read-only and force them to only respond to drag
drop events, changing the top & left properties based on where the
object gets dropped.
The functionality could be as sophisticated as you're willing to make
it. Bear in mind that you'd need some kind of engine to logically
re-assign the tab order.
Personally, I think it would be easier for you to move things around
according to a specification. The solution proposed above could be
subject to a great deal of un-expected behavior and your company could
spend a great deal of time creating this "customizat ion" piece and, if
your client is as they seem to be, the client is likely to be
dissatisfied with your solution.
I think a better solution would be to design a routine where you could
analyze a form prior to a build and record the arrangement of the
objects in a client specific file. That way, you'd really only need to
maintain a single form and then, just prior to building the build for a
particular client, you could run your script to read the object
configurations and then move everything around automatically.
Does that solution sound to esoteric? If you think that might be
do-able, I'd be happy to brainstorm with you a bit.
I agree. Some sort of scheme whereby you create an XML config file
holding attributes based on the name of the control. Then all you need
is a base class that reads the config file in the form's OnLoad method
and moves / sizes / hides / shows controls based on what's in the XML
file.
Throw in some inherited controls that have an editing mode that allows
them to be repositioned, resized, etc at run time, and ways for the
user to change other properties (visibility, tab order, perhaps a
default value if invisible, etc).
Then a save operation that your base class form recognizes as a signal
to regenerate the XML config file.
Sounds like fun. :-)
PMGuy wrote: Andrey:
Without going into a great deal of detail, any object can be configured to respond to drag-drop events. So, at the click of a button, you could make all objects read-only and force them to only respond to drag drop events, changing the top & left properties based on where the object gets dropped.
The functionality could be as sophisticated as you're willing to make it. Bear in mind that you'd need some kind of engine to logically re-assign the tab order.
Personally, I think it would be easier for you to move things around according to a specification. The solution proposed above could be subject to a great deal of un-expected behavior and your company could spend a great deal of time creating this "customizat ion" piece and, if your client is as they seem to be, the client is likely to be dissatisfied with your solution.
I think a better solution would be to design a routine where you could analyze a form prior to a build and record the arrangement of the objects in a client specific file. That way, you'd really only need to maintain a single form and then, just prior to building the build for a particular client, you could run your script to read the object configurations and then move everything around automatically.
Does that solution sound to esoteric? If you think that might be do-able, I'd be happy to brainstorm with you a bit.
Thankyou for your responces, guys! Well, that was the idea "behind the scene" - to have only one
"template" form and keep customization parameters like location and size of controls in a
client-specific table. The problem is that we need to somehow create such table/xml schema - so the
easiest way would be to design such a schema using a run-time designer, which could be used by
non-programmers in our company - obviousely we wouldn't give such a tool to clients.
So i still in problem of getting a designer to rearrange the form and then "flush" the custom
parameters to a table/xml.
Any ideas?
Thank you,
Andrey
Since functionality/behavior would need to be the same, I would assume
that the only information that you'd need to save for each object would
be the following:
..top
..left
..width
..height
..{font} - there are a handful of font properties
..TabOrder
PMGuy wrote: Since functionality/behavior would need to be the same, I would assume that the only information that you'd need to save for each object would be the following: .top .left .width .height .{font} - there are a handful of font properties .TabOrder
Right, but to get those i need to have some sort of an IDE, otherwize it's a tricky task to manually
get those parameters if i have couple hundreds of controls on my form. So again, i would need some
kind of visual tool to arrange those.
Any ideas in this directions?
Thank you
Andrey
Andrey:
I'm not sure what exactly you're asking and I don't understand why it's
tricky.
If you build a recursive function (GetGUIProps()) which starts at the
form and drills into each object/container and simply write these
properties out to an XML file, then you can create another function
(SetGUIProps()) which does the same, only in reverse (read the XML and
set the property value). This is the one that gets run just prior to
displaying the form (call it from InitializeCompo nent()? perhaps)
Your visual tool is Visual Studio. I'm assuming that you're using
version control, so simply check out the form and make your edits. You
could hard-code your app so that GetGUIProps() can only be run in debug
mode. So you can move everything around according to client specs and
then run GetGUIProps() to create/update your XML file when you run the
app from VS.
I suppose for future support, you'll need to write an alternate version
of SetGUIProps() which does a search and replace on the .cs file.
Does that make sense?
I believe that the idea here is to give the _users_ the ability to do
this, without buying each of them a Visual Studio license, which would
not only be pricey but a security nightmare.
MuZZy... I'm sure that there are ways to give controls "handles" at run
time so that they can be sized and dragged, and a little cleverness
would allow users to hide controls, set default values for them, etc.
Yes, in effect, you have to build a simple IDE, but I think that there
are ways to make controls manipulable at run-time, which is the hardest
part.
Perhaps the people over in microsoft.publi c.dotnet.window sforms or
....windowsform s.controls would be able to help you there. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Wayne Gibson |
last post by:
Hi all,
Please ignore the other post.. The cat jumped on the machine and sent it
before I could stop it!!
Was wondering if anybody has expericence this problem..
I am writting an application in C# using windows forms, to create windows
user profiles and then updating the registry information for the new
profiles.
I have managed to create the user successfully and thought that I was
|
by: Robert Howells |
last post by:
Perhaps I'm just too new at this to pull it off, or perhaps it's just bad
architecture. I'd appreciate some feedback on the the wisdom (or lack
thereof) in attempting the following:
I'm not new to programming, but I am new to ASP.NET and Web application
design in general... loved the concept of user controls and dynamically
adding them to a page. So what I wound up with was an application that
dynamically loads two user controls directly...
|
by: Razak |
last post by:
Hi,
I have a class which basically do Impersonation in my web application. From
MS KB sample:-
++++++++++++++++++++code starts
Dim impersonationContext As
System.Security.Principal.WindowsImpersonationContext
Dim currentWindowsIdentity As System.Security.Principal.WindowsIdentity
|
by: Alphonse Giambrone |
last post by:
I am building a web app for users to add/edit data. They may add/edit
several records during a session.
When they are done (not necessarily immediately, could be 10 or more minutes
later), I need to send an email with some summary info of what was
added/edited.
I can keep track of the records by using the sessionid or user's login, but
how can I determine when to send the email and who the user was since there
is no session info available...
|
by: Andrew Chalk |
last post by:
My application attempts to connect to an SQL Server database as name ASPNET
and Login Name SERVERNAME/ASPNET in response to these commands:
SqlConnection myConnection = new SqlConnection("Data Source=(local);Initial
Catalog=MCSCRE;Integrated Security=SSPI");
myConnection.Open();
However, the user of this database is ASPNET. I can't create a user ASPNET
with a login name SERVERNAME/ASPNET, SQL Enterprise Manager always keeps the
name...
| |
by: fernandezr |
last post by:
I would like to use a user control as a template inside a repeater.
Some of the fields in the control should be hidden depending on whether
or not there is data. I'm still a ASP .Net newbie so the way I'm going
about doing this might be a little off. I'd appreciate some help.
Below is the code I have thus far but I'm not sure how to reference the
user control within the foreach loop.
<asp:Panel ID="pnlRosterProfile" runat="Server" />
|
by: zeya_bakhtyar |
last post by:
Here is the page architecture:
Page loads multiple user controls (including nested user controls)
dynamically based on parameters provided into place holders. Note: The
page only has the logic to load the user controls and subscribe to
custom event exposed in the user controls.
Scenario:
User comes to this page fills the fields generated by multiple user
controls and then hits "Save" button in one of the forms.
|
by: rbukkara |
last post by:
Hi,
I have got the following error while trying to add a user in the LDAP Directory.
javax.naming.NameNotFoundException: ; remaining name 'uid=vassila,ou=People,dc=cs,dc=uno,dc=edu'
I have given all the attributes which are needed, for the user, in the code and also the proper path where the user has to be added. Please have a look at my code
CODE]
// This is a class file which stores all the info required for the user
|
by: Gordon |
last post by:
I want to add a feature to a project I'm working on where i have
multiple users set up on my Postgres database with varying levels of
access. At the bare minimum there will be a login user who only has
read access to the users table so that users can log in. Once a user
has been logged in successfully I want to escalate that user's access
level to one appropriate to their role, which will include switching
the postgres user they are...
|
by: chromis |
last post by:
Hi,
I've been trying to implement a more OOP oriented approach to dealing with user security on one of my websites, and I am trying to validate the user against an array of roles, however I am struggling with a type error:
The argument ROLES passed to function setRoles() is not of type array.
If the component name is specified as a type of this argument, the reason for this error might be that a definition file for such component...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |