|
Try this:
<code>
//DEPT[@CODE="DC1"]/EMP[@NAME="A"]
</code>
----------------------
~hamster1
|
|
|
|
|
Hi everybody,
I actually work on a big application (VC6, MFC), and I need working with the Viamichelin Web Service through SOAP (http://ws.viamichelin.com/wswebsite/fra/jsp/tec/MaDocumentationGeo.jsp).
My first idea is the development of a VSNET 2005 dll, in C++, to do the bridge between the 2 worlds. Some try are ok, with very simple WSDL (input string -> output string). Unfortunally, Viamichelin WSDL are too complex (or I don't understand something...) to be used from C++ (error SDL1030 when adding Web Reference).
WSDL example is here...
http://www.viamichelin.com/ws/services/GenerateMap?wsdl
JScript cannot be a solution too, there is an error in the MSSoapInit.
Other try is a C# project. The web reference is ok, but how can I do :
- a 'true' dll from the C# project ?
- export some functions which are accessibles from my VC6 project ?
Do you have an idea to do what I need ? The answer "do all the portage of VC6 to VSNET 2005" is not a solution, we cannot have such time to redo our non-regressions tests...
Thanks in advance
Thierry Maurel
Isotools Project Manager
|
|
|
|
|
You can host the CLR in your app. You will then be able to load and call into managed dlls. Try searching for hosting and CLR. If you don't find what you're looking for, post back and I'll try to hook you up with an example.
--
Joel Lucsy
|
|
|
|
|
In the C# DLL do something like
using System;
using System.Windows.Forms;
using System.Data;
using System.Collections;
namespace TestDotNet
{
///
/// Summary description for Class1.
///
[Guid("43A8EB80-A566-4985-BEDE-58312478029D")]
public interface ISearch
{
string ShowAdvancedSearch();
string[] GetSearchData(string inputXml);
string GetXmlSearch();
}
}
Implement the interface. When you build it, the DLL is automatically registered. It uses tlbexp.exe internally.
Hope this helps.
Live Life King Size
Alomgir Miah
Live Life King Size
Alomgir Miah
|
|
|
|
|
Hi,
I have written a cutsom TypeConverter which derives ExpandableObjectConverter which is used for a custom type descriptor. The custom type descriptor overrides the GetProperties function to return a dynamically created PropertyDescriptorCollection.
This call works great in that when I set my custom object into a property grid it all displays dynamically as expected, except for one little annoyance: Even if I return an empy PropertyDescriptorCollection in the GetProperties function of my derived ICustomTypeDescriptor class, I still get the little plus sign next to the property! So in other words, I just can't seem to get the plus sign to disappear on types which have no properties.
Can anyone please shed any light on this for me?
Shane
|
|
|
|
|
|
I am reading an XML file in using XmlDocument. The XML file may contain comments that I want to capture and deal with. When I look at the nodes that XmlDocument returns, though, there are no XmlComment nodes. I can see how to create comments using the CreateComment method, but how do I preserve them when I read them in?
|
|
|
|
|
Hi Lannie,
XmlDocument contains all comments if you load an xml document.
But the most access functions ignore comments.
But following simple code shows message boxes with both comments:
string xmlstring = @"<test><!-- super tip --><tip>Close a application with the cross in the right top corner of the window.</tip><!-- stupid tip --><tip>1+2=3</tip></test>";
XmlDocument doc = new XmlDocument();
doc.LoadXml(xmlstring);
XmlNode node = doc.SelectSingleNode("/test");
for (XmlNode subnode = node.FirstChild; subnode != null; subnode = subnode.NextSibling)
{
XmlComment comment = subnode as XmlComment;
if (comment != null)
MessageBox.Show(comment.Value);
}
That the XmlDocument contains all comments you see if you look at the OuterXml property of the XmlDocument or save the document in a file.
The Comment direct before a XmlElement you get with element.PreviousSibling as XmlComment.
The Comment direct behind a XmlElement you get with element.NextSibling as XmlComment.
Hope it's help
Niedzi
|
|
|
|
|
Hello,
I got a problem with DataGrid events. I have an event:
private void GridTextBoxLeave (object sender, System.EventArgs e)<br />
{<br />
DataGridCell cell = this.dataGridStages.CurrentCell;<br />
int r = cell.RowNumber;<br />
int c = cell.ColumnNumber;<br />
this.dataGridStages.EndEdit(this.dataGridStages.TableStyles["Stages"].GridColumnStyles[c], r, false);<br />
<br />
<br />
object val = this.dataGridStages[r,c];<br />
Debug.WriteLine("Leaving Cell Row: "+r+" - Column: "+c+" - Value: "+val);<br />
<br />
}
and definition of an event:
foreach( DataGridTextBoxColumn dataGridTextBoxColumn in this.styleStages.GridColumnStyles ) <br />
{<br />
dataGridTextBoxColumn.TextBox.Leave += new EventHandler(this.GridTextBoxLeave);<br />
<br />
}<br />
<br />
this.dataGridStages.DataSource = this.dataview;
The problem is, every time I add new row (adds it automatically in the grid if you click on the last row) no events are fired, which is good. Then, the moment I start typing in any cell of a new row, new row added (with * beside it) and Leave event fires, although I am still in the cell.
And when I leave the cell it fires again. What can I do to suppress the first fire of an event (while I am still in the cell).
Thank you
|
|
|
|
|
Hi
As a quick example take the following expression:
int temp = (int)((4.5f - 1.0f)/0.1f);
The value 34 is assigned to temp. To be honest, I expected the value 35. So what's going on under the hood?
I appreciate any comments.
Cheers,
Goebel
|
|
|
|
|
Floating point numbers can seldom represent a value exactly. The result of the calculation is probably something like 34.99999999999999999999. When you type cast this to an integer, the decimal part is discarded, giving you only 34.
Use Math.Round to round the value to the nearest whole number, then type cast it.
---
b { font-weight: normal; }
|
|
|
|
|
Alright, I'll use the Math.Round.
Anyway, if I ask the debugger it says 35.0 for the following expression:
float temp = (4.5f - 1.0f)/0.1f;
Weird, isn't it?
|
|
|
|
|
It's me again. I think I've found the problem.
In the known expression
int temp = (int)((4.5f - 1.0f)/0.1f);
((4.5f - 1.0f)/0.1f) seems to be treated as a double value (to be more precise, this kind of double: 34.9999...). But why? Every single number has a nice f as suffix, it should be treated as a float.
Any ideas?
Cheers,
Christoph
|
|
|
|
|
It's only the debugger that uses double values for the calculation. I don't know why.
If you try this:
((4.5f - 1.0f)/0.1f).GetType().FullName
it will give the result "System.Single".
---
b { font-weight: normal; }
|
|
|
|
|
Hi everybody,
i want create a setup surface for an installer. My problem is that i want to select the folder, in which the program should install. For that i want button to select the folder. I´ve one DLL and one Form.cs. How could i do that?
THX
Mamudo
PS: Sorry for my english
|
|
|
|
|
hi
i've a form with buttons at the left and tabpages of information at the right of the form.. my problem is, how can i load my form without the tabcontrol at runtime? i juz want to show what's available at the left of the form at runtime. only after pressing the buttons then the right of my form (tabpages) will be shown..
thanks
|
|
|
|
|
you can make it invisible and set it visible when you need them
but if you need to load them at run time you can do this
remove the tab from InitializeComponent
and write the method that initialize it when you need
call it when you need to load the tab
|
|
|
|
|
Hi!
Unfortunately, TabPage s don't have a Visible property, so you can either make the whole TabControl invisible or remove all unwanted TabPage s from the TabPages collection of TabControl .
You can also add TabPage s to the TabControl at runtime when a menu item is selected.
Regards,
mav
|
|
|
|
|
this code sample load control at run time
Button b=new Button();
b.Name="b1";
b.Text="Text";
b.Location=new Point(25,25);
//add to form
this.Controls.Add(b);
|
|
|
|
|
what do you want to hide at runtime tab control or tab page if you need to hide tab page like mav.northwind said
|
|
|
|
|
hi
at runtime i want tabcontrol to be invisible.. only after i click on some buttons then the tabpage will show.. (i made it to be a particular button will call a particular tab page)
thanks =)
|
|
|
|
|
//to make tabcontrol invisible
tabControl.Visible=false;
//to select particular tabpage
tabControl.SelectedTab=tabPage2;
|
|
|
|
|
I need to add colums to a datagrid.Anybody can tell me how can I do that?
|
|
|
|
|
hi all,
I need to change the Background Color of DateTime Picker.But in the properties, There is no place to change it..
Can any one tell me how to change the Background Color of DateTime Picker using C# ?
thanks in advance..
|
|
|
|
|
Hi all:
Im using Office Programming for my Automation App.
Everything is ok but there is a little problem. I've added an event on BeforeSave for my opened word from App. (the instance from Word.Application) then in BeforeSave even I save the content in a database & its ok then I close the word & then quit the word as follow:
Doc.SaveAs(.........);<br />
Doc.Close(ref TempObj, ref TempObj, ref TempObj);<br />
dbWord.Quit(ref TempObj, ref TempObj, ref TempObj);
TempObj = System.Reflection.Missing.Value
It saves, close & quit word but Office gives me an error.
does anybody seen it!
Always ,
Hovik Melkomian.
|
|
|
|