What is the name space of conversion.val in C#? - c#-3.0

I have one text box in C# window application.And i wants to set a initial value of this text box is zero.
so i use conversion.val(textbo1.text) method.
But it gives a error in name space.
I use Using Microsoft.visulbasic; name space but it is not working.
So which name space i use for conversion.val().
Please help me.
Thank you.

The namespace you are adding is correct.
Refer: http://msdn.microsoft.com/en-us/library/9da280t0.aspx
Only adding namespace might not work, you will have to manually add Reference to Microsoft.VisualBasic.dll.
You can add the reference as follows:
- Goto the Solution Explorer panel.
- Right click on References > Add Reference.
- Select the tab ".Net"
- Select Component "Microsoft.VisualBasic"
- Click OK.
Now you can use the Conversion class.
Note: You can find Solution Explorer in the View menu.
Good luck!

Related

Tag prefix Win CC

I am busy with a C script in Siemens WinCC.
I would like to open a faceplate on in which I can open other faceplates.
Howerver, I would like to use the Tagprefix from the first faceplate in the second. Does anybody have an idea how I can give the tag prefix through?
Thanks in advance!
Tom
As You know, the tag prefix is a property of the screen window. You need to provide that data to the script running in the context of the picture inside the picture window from the parent screen window.
One solution is by using a text field "tagname" in the "faceplate" and use that as a source of the tag-prefix name. The tag-prefix can be transferred by a simple vbs script that runs "on open".
Use VBS "Item.parent.TagPrefix" and then give the result to the text field.
Or just from a button in the picture "Item.parent.parent.TagPrefix" is also ok.
The same in C would use the functions "GetParentPictureWindow", and return a string(lpsz) containing the name of the picture window. This name can be used to read the property of the object with this name using "GetPropChar" using "Tagprefix" as the property.
//PerD

Custom content assist for default java editor in Eclipse

I'm currently trying to develop an Eclipse Plugin to support code replacement, like what the default content assist in Eclipse do. What I want to implement is something like "insert argument names automatically on method completion with visualized box around the argument" and I can "use the Tab key to navigate between the inserted names" and "while navigating, list of optional variables for current argument can be displayed and be chosen".
In short, it comes to two questions:
How to add the visualized box around the already existed variable or even Java keywords that need replacement? And at the meanwhile I can use Tab key to switch between these boxes.
How to display a list of candidates to select from when I trigger on the box?
By now I only figure out the extension point : org.eclipse.jdt.ui.javaCompletionProposalComputer may be useful, but I have no idea where to start at? Thanks in advance.
Oh, finally I've solved it myself...
For the 'box', it should be the LinkedModeModel, this class should work with LinkedPositionGroup and LinkedPosition to add mutiple boxes. And we should use LinkedModeUI to set it up.
For the content assistant, there's no need to use the extension point. There is a ProposalPosition class which extends LinkedPosition for you to add your proposals for the 'box' in its constructor. And we can simply use the CompletionProposal to construct a ICompletionProposal array as the argument of ProposalPosition's constructor.

using alt in sequence diagrams for starUML

i am not able to discover how to use the alt/combined fragment correctly in starUML,as in there is no way that i am able to provide the condition after the alt fragment appears.can any1 just list down the procedure as to how to do it or a link to some good tutorial.
If you are using StarUML 2 (Beta), you can go through these simple steps:
Add Combined fragment to your sequence diagram:
If you try to add operand(alt partition) through context menu, you'll see that there's no option to add new operand:
3.To achieve this, you can simple copy the already defined operand and paste it under Combined Fragment:
After that, simply add condition clauses in "guard" property of operands and adjust operand heights:
I had just found the steps as following.
Please refer how to set "alt combinedFragment at starUML due to I have no 10 reputation to post image.
1.create a sequence diagram.
2.add a CombinedFragment1 into diagram.
3.change the "seq CombinedFragment1 " to "alt CombinedFragment1 "
4.select the "Interaction Operand"
5.left-click at the "atl CombinedFragment1 ",you will found the one "InteractionOperand1" added into the "alt CombinedFragment1 ".
6.add the 2nd "InteractionOperand", same with step 4,step5, there will a parting line like the following.
7.set the InteractionOperand's Guard data,my is "isInit",you will found it at the alt frame.
8.add the 2nd Guard data,same with the step7.
9.move the diagram to the proper location.
while,I still have something unknown, for example, how to make the frame located at the top front and add a relationship with the "B method".
Wish it helpful to u.
Add an Interaction Operand to a Combined Fragment. When you select the Interaction Operand you should see in the Properties Inspector a 'Guard' field. You can type your condition just there.
Many thanks for your posts.
By the way, I noticed when adding a Combined Fragment from the left Pane,
that the alt keyword could be displayed as shown below,
after selecting the interactionOperator from the right pane,
NB: other useful keywords such as the "loop" one are also available from the above list
When you add a 'Combined Fragment' double click on the name on the diagram
Then you get a small icon with 3 horizontal lines to the left of the name
When you click on that you can get as much interaction operands as you wish

eclipse - how to change package explorer sorting order (don't want lexicographic sorting)?

Is there a way I can have it:
Sonication1,
Sonication2,
Sonication3...
I think you can't. Change naming if possible: Sonication01, Sonication02, ..., Sonication10, Sonication11 to get wanted order.
I believe that it is possible but it is a long and manual process.
You can select the properties of the Java project and click properties. Then, go to Java Build Path and selecting 'Order and Export.' There, you would move the wanted file up and down using the buttons and clicking apply.
I hope that this would answer your question.

Find button in a EXT JS form

I can do myForm.getForm().findField('myFld'); to find a field by name. What's the equivalent of finding a button?
Fields exept name can also have ref propety:
name: 'fieldID',
ref: 'your_reference',
this way you do not need to find them - to access this.your_reference
you can do it with button also. Trick is: if button is on toolbar (top or bottom) use ref: '../your_btn_ref' to get 1 level up 9direct will go to toolbar)
Do you mean find? "Find a component under this container at any level by property."
More generally, you can use findBy.
Try this:
getItemByItemId(btnId)
using "ref" doesnt always work, it is abit hit and miss.
I would recommend either giving the button and ID and using Ext.getCmp(buttonid);
or
Search for the button class using Ext.select and select the approriate array key, Ext.select();