I am creating a application using Composite UI Application Block(CAB).I have taken a TabWorkspace.
My problem is that I am taking a handle of a cam device in one tab and want to pass the handle in other tab.
Any one can suggest how to pass the value in one tab to other.
Make a common.cs file. you have to assign first in an bvariable in cs file and get it
Related
In our current application there is a new requirement of our client.As they told that they need n numbers of forms at different stages of their business and those are changing time to time. Even a new forms can be added. Their requirement is once the product is delivered to them they will not come back to us again and again for each change and will create those form by their own.
Simply they want a user interface where they can create the form by drag and drop manner.
What they want :
In our application there will be a form building section where a non technical person can be able to create a form.
Mapping the controls with existing data of their existing database so that the form is populated with the corresponding data ( data will be inserted into the database using another user interface).
Once the data is populated they will take the print out of the filled up form and will proceed as per their business flow.
As they introduce new form time to time we can't provide any predefined template to them and they are not agree to design the form in HTML.
Is there any way of doing this in Asp.Net MVC (without using any CMS ).
there are a number of asp.net forms builders. And I been wanting to build my own for years. (you store the control, the location etc in a database, or even as xml, and then on page load, read the xml, and crank out the controls and layout into the page. We all built these for desktop, and you can do the same for the web.
The open source evolutility project has a FANTASTIC system for this, but it does NOT include the GUI part. But, it would be a good start. You would have to build the GUI part, but the rendering part, and save of the forms layout is all done for you. So, your forms builder would offer a set of controls to drop and move around in the form. When you save, you would have a corresponding "xml" markup bit that you save to the one "forms layout" file. On forms load, you read that xml file and produce the form (that's the part evolutility does for you). So, you need the part that has each control in a tool box (along with the xml for that control). you drop control into form, and add the xml to the "form layout in xml".
As I stated, evolutility has all the parts to render forms and layout and place controls on the final finished form for display - it just don't have a GUI for doing this part.
You can look at the project here:
http://evolutility.com/
there are others. But, it really depends on how complex of a form builder or content builder you wish to make.
But, a xml, or json based layout and definition of the controls placed on a page is a good start. You could store such "layout" information in a database. Heck have a classic master to child table, and thus save each control in evolutiity format, and simple append then all together, and then have evolutility render that xml into a working form for you.
I don't know of a open source project that combines both the "layout" and "define" of the controls AND ALSO has a GUI to build the forms. But, to be fair, the hard part (how to layout, and how to have each control defined in some json (or xml) is done for you.
I've got a main class which on user event shows the settings window. There are some textboxes, radiobuttons etc. After pressing the Save button, I want to store the data to some file.
I think that the saving process should be inside the main class and settings window only takes care of displaying the current config data, validate the new data and then send them back to the main class. Is this right?
How can I "send" the current config data from main class (which knows where the config file is etc.) to the window and then "send" the new data from window to main class to be stored?
Thanks
In WPF you can use Properties.Settings (Best solution for storing any application settings). See this.
Or you can create your own settings file, as an example, you may create xml file, and store your data into it.
See:
XmlSerializer
DataContractSerializer
I'm currently creating an application that will hold multiple images, I've decided that on an image I would like a context menu to appear when right clicking and have an option to send to an image editing application such as Photoshop, Gimp, Paint etc...
I know how to create a context menu, however I am unsure on the code to use in order to send the image to the application itself.
If you want to open the file in the default application then that was already answered. If you want to do the same the Explorer is doing on "Edit" context menu item, then add these two lines in "Original, complicated answer" from the link above:
if (psi.Verbs.Contains("Edit", StringComparer.OrdinalIgnoreCase))
psi.Verb = "edit";
You should check the existence of the verb you want in psi.Verbs as per the MSDN. If there's no "edit" verb then the code calls default app.. by default.
If you want to give the user a list of all image editing apps that the user have installed then you would have to have a hardcoded database of such apps together with their installation GUIDs, check if they are installed, find out where they are installed (maybe not in the default place), and make a list of them, calling each with your file as a command line argument. It's too complicated to give code for that.
In C# I would like to take TWO different projects of windows form application and inserting record in one exe i.e one form and automatic shows the inserted data into another form just like refresh, but I will not using any control like Button Refresh, update.
You have many options to solve your problem.
1) Either use a database, when the 1st app inserts into it, the 2nd app periodically looks for new records in the database, and displays them.
2) Or use a file, in the same way. The first app writes into it, and the second app reads the file periodically and display the rows.
You may need to use a Timer for this purpose.
I am using a localization in my project, But my question is when user install a project
they choose a either English or Marathi language from the radio button option in set up time and my whole project run on that particular language only?
How to set this on set up time?
You'll need to create two files (or static arrays/lists of strings, but this is not recommended as the application will keep both ready in RAM, and this can take up quite some memory if the application contains a lot of text) and then a static List of type string.
Whenever the user selects an option, you'll have to make your application load the appropriate file (by calling List.Add for each row of your file, depending on how you built it).
There is a downside, obviously: Instead of just assigning a string to a control, you'll have to add it to the lang file, and when creating said control, you'll need to pass it the corresponding element in your list.
I think that this is the best option, otherwise you could create two lists containing both languages when the application starts, and dispose of the unused one after the user applies the new configuration.