|
Ok, No problem at all... I agree with what you say as far as learning is concerned !!!
Regards,
Jaiprakash M Bankolli
jaiprakash.bankolli@gmail.com
http://jaiprakash.blog.com/
|
|
|
|
|
Mental no. Ignorant Yes.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Yeah, so it would seem. I mean, does he not want to solve the problem ? One has to assume he's achieved nothing at work for several days, while he waits for the laws of computing to change, so that a different answer suddenly solves his issues.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: One has to assume he's achieved nothing at work for several days, while he waits for the laws of computing to change, so that a different answer suddenly solves his issues.
It's this attitude that really bugs me. With several of the consultancies churning out "developers", this is the end result. Give them a problem to solve, or a chance to learn and they flounder hopelessly out of their depth.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Initially XML file is like this
<lasers>
<laser lasername="Laser1" modelname="Nufern v1.0" serialno="1" manufacturername="Nufern v1.0" maximumpower="200w">
<properties">
CW-Waveform.jpg
<wavetypes>
<wavetype name="CW Ramp" url="ramp.html" isavailable="true">
<wavetype name="CW Analog" url="analog.html" isavailable="true">
<tabular>
<property id="228" name="BRM" currval="0" prgbar="true" selected="true" min="0" max="100" pwd="true" units="C" gauge="false" thresholdval="10">
<property id="200" name="Output power" currval="0" prgbar="true" selected="true" min="0" max="100" pwd="false" units="C" gauge="true" thresholdval="10">
then
>>>>>>>>>>>>>>>>>>>>namespace is EncryptDecrypt
XmlDocument xmldoc = new XmlDocument();
xmldoc.Load(Application.StartupPath + @"\laserProp.xml");
XmlNamespaceManager mgr = new XmlNamespaceManager(xmldoc.NameTable);
mgr.AddNamespace(string.Empty, "urn:MyNamespace");
XmlNodeList xmlnodelist;
XmlElement ele = xmldoc.DocumentElement;
xmlnodelist= ele.SelectNodes("//lasers//laser//properties//tabular//property",mgr);
Is working fine but, to validate xml with xsd i made changes to the xml as
<lasers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <u="">xmlns:ns="urn:MyNamespace" xsi:schemaLocation="urn:MyNamespace laserProp.xsd">
<laser lasername="Laser1" modelname="Nufern v1.0" serialno="1" manufacturername="Nufern v1.0" maximumpower="200w" <u="">xmlns:ns="urn:MyNamespace">
<properties <u="">xmlns:ns="urn:MyNamespace">
CW-Waveform.jpg
<wavetypes>
<wavetype name="CW Ramp" url="ramp.html" isavailable="true">
<wavetype name="CW Analog" url="analog.html" isavailable="true">
<tabular>
<property id="228" name="BRM" currval="0" prgbar="true" selected="true" min="0" max="100" pwd="true" units="C" gauge="false" thresholdval="10">
<property id="200" name="Output power" currval="0" prgbar="true" selected="true" min="0" max="100" pwd="false" units="C" gauge="true" thresholdval="10">
Now the same xpath is working fine but getting validation errors
my xml scheema file(xsd file) is
<xs:schema attributeformdefault="unqualified" elementformdefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetnamespace="urn:MyNamespace">
<xs:element name="lasers">
<xs:complextype>
<xs:sequence>
<xs:element name="laser">
<xs:complextype>
<xs:sequence>
<xs:element name="properties">
<xs:complextype>
<xs:sequence>
<xs:element name="image" type="xs:string">
<xs:element name="WaveTypes">
<xs:complextype>
<xs:sequence>
<xs:element maxoccurs="unbounded" name="WaveType">
<xs:complextype>
<xs:attribute name="Name" type="xs:string" use="required">
<xs:attribute name="url" type="xs:string" use="required">
<xs:attribute name="isavailable" type="xs:boolean" use="required">
<xs:element name="tabular">
<xs:complextype>
<xs:sequence>
<xs:element maxoccurs="unbounded" name="property">
<xs:complextype>
<xs:attribute name="id" type="xs:integer" use="required">
<xs:attribute name="name" type="xs:string" use="required">
<xs:attribute name="currval" type="xs:integer" use="required">
<xs:attribute name="prgbar" type="xs:boolean" use="required">
<xs:attribute name="selected" type="xs:boolean" use="required">
<xs:attribute name="min" type="xs:integer" use="required">
<xs:attribute name="max" type="xs:integer" use="required">
<xs:attribute name="pwd" type="xs:boolean" use="required">
<xs:attribute name="units" type="xs:string" use="required">
<xs:attribute name="gauge" type="xs:boolean" use="required">
<xs:attribute name="thresholdval" type="xs:integer" use="required">
<xs:attribute name="LaserName" type="xs:string" use="required">
<xs:attribute name="ModelName" type="xs:string" use="required">
<xs:attribute name="SerialNo" type="xs:integer" use="required">
<xs:attribute name="ManufacturerName" type="xs:string" use="required">
<xs:attribute name="Maximumpower" type="xs:string" use="required">
please help me on this
thanks in advance
praveenkumar palla
|
|
|
|
|
Will you please, please, please stop spamming this board. You have had the answer many times, but you seem incapable of doing any research on your own. Will you get it through your head? People aren't here to write your code for you - they're here to help.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
hi all,
How can i create a tree which allow me to drag the tree childs and drop it in to the textbox.Is it possible? can any one help me to do this?
ayyp
|
|
|
|
|
You should ask in the ASP.NET forum. It can be done, it involves a lot of javascript, and no real C# code.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi all,
I am having a problem with my report. i have a dataset which gets fill while it is in run mode. I wanna create a report out of this. plz help me.
Regards
Ruwandi
rkherath
|
|
|
|
|
You question is too vague to give a meaningful answer.
What problems in particular are you having with creating a report? Have you looked at Crystal Reports or any of the many reporting SDKs on the web?
|
|
|
|
|
Hi... I'm writing my own panel class which of cause inherited from Panel. And the code here works just fine BUT if I make a property where the return type to fx int, it fails. And the exception I get is useless. Is this something with TypeConverters?
public class TestCell
{
public static readonly DependencyProperty WidthProperty = DependencyProperty.RegisterAttached(
"Width",
typeof(double),
typeof(TestCell),
new FrameworkPropertyMetadata(
0d,
FrameworkPropertyMetadataOptions.None));
public static void SetWidth(UIElement element, double value)
{
element.SetValue(WidthProperty, value);
}
public static double GetWidth(UIElement element)
{
return (double)element.GetValue(WidthProperty);
}
}
public class TestPanel : Panel
{
protected override Size MeasureOverride(Size availableSize)
{
Size childSize = availableSize;
foreach (UIElement child in InternalChildren)
{
child.Measure(childSize);
}
return availableSize;
}
protected override Size ArrangeOverride(Size finalSize)
{
foreach (UIElement child in InternalChildren)
{
double x = TestCell.GetWidth(child);
double y = 50;
child.Arrange(new Rect(new Point(x, y), child.DesiredSize));
}
return finalSize;
}
}
<Window x:Class="WPFApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="clr-namespace:MyAssembly;assembly=MyAssembly"
Title="Window1" Height="300" Width="300">
<mc:TestPanel>
<Button Width="100" Height="100"/>
</mc:TestPanel>
</Window>
-- modified at 8:59 Monday 16th April, 2007
Best regards
Lasse Espeholt
|
|
|
|
|
I am boring with instantly going inside Add/Remove Program, selecting my uncomplete program and removing. When making Setup file, I can't find any item mentioning Uninstall in Program Files .
Someone help me solving my problem. How should I do ?
Thanks in advance
It seem to be a solution or an answer.
|
|
|
|
|
There are installers that create an uninstall exe, but msi's do not, AFAIK.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
What are some installers you mentioned ? Thanks
It seem to be a solution or an answer.
|
|
|
|
|
Try to change the current version of your exe. Then you can set the option "remove previous versions" to true.
The system will automatically replace your previous application
My small attempt...
|
|
|
|
|
How do I change my current version of exe ?
It seem to be a solution or an answer.
|
|
|
|
|
you can it will be 1.0.0
you can change it to 1.0.1 or more
My small attempt...
|
|
|
|
|
Is it possible to for one exe(.net) to contain another exe(not .net created)?
The purpose of the parent .net exe is to check a condition and then execute the exe contained within it.
I know the .net exe can call another exe which is present separatley in the system. but is it possible for the .net executable to encapsulate the other exe file such that it doen't need it separately . Any help would be apppreciated .
Thanks for u'r time
|
|
|
|
|
It could contain it as a resource, but I'm not sure you could run it without writing it to disc first.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
thanks , but can u give me an example for using as resource or anyother article which i can learn abt using the exe as a resource
|
|
|
|
|
No, I've nevr done it, and I can't imagine wanting to. But, you can add anything as an embedded resource.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=75 here you go
Best regards
Lasse Espeholt
|
|
|
|
|
Thank You very much espeholt_jr.
|
|
|
|
|
hi,
I am using richtextbox control and in button click this is the code
if (richTextBox1.CanUndo == true)
{
richTextBox1.Undo();
richTextBox1.ClearUndo();
}
This code clearing the entire text in richtextbox in single click.
But I want it should undo chratcer by chracter.
pls help me
with regards
prasad
|
|
|
|
|
Search the articles for "undo"; there are some here on CP that cover the support of undo/redo actions.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|