|
Hey, thanks allot for your reply, it worked exactly as I wanted!
But anyway, when I reopened c#, it gave me an error on "new Htmldocument();"
but il figure that out.
Thanks again!
|
|
|
|
|
Hello everyone!
My English is very poor,so if there are anything make u confused ,it's my fault.
I got a serious problem with CodeDom...here it is
I wrote a ScriptEngine with CodeDom,it can compile&run c# script file
that on the disk,something like this:
MyScriptEngine.cs
namespace HostApplication
{
public class MyScriptEngine
{
public void runScript(string fileOnDisk)
{
}
public int someElseMethod()
{
}
}
}
in the script file,i want to communication with Host Application
using System;
...
using HostApplication
public class scirpt
{
public void entryPoint()
{
MyScriptEngine.getInstance().someElseMethod();
}
}
it's possible to this?
any reply will be helpful!!
|
|
|
|
|
[Edit] Is your script class in a different namespace?[\Edit]
Yes, why not? Did you test it and got any exception?
When you're alone in the Dark, Fear will protect you...
modified on Thursday, November 6, 2008 1:59 PM
|
|
|
|
|
I already try:
1."using HostApplication" in script file -> ICodeCompiler report "can't find class or namespace..."
2.give script a namespace same with HostApplication namespace
namespace sameWithHostApplicationNamespace
{
public someclass
}
still can't access HostApplication ns class,CodeCompiler can't fint it
|
|
|
|
|
I'm using the Graphics.DrawString method to draw a string on a graphics context that has a transformation applied to it. Problem is, although the transformation gets the string to the proper location, it also scales the font size to something ridiculously large.
I know that you can force the Graphics methods to not scale line width if you create a Pen of width 0. Is there a similar way to prevent font size from being scaled?
(Not sure if this makes a difference, but the graphics context I'm drawing to is attached to a Bitmap object.)
modified on Thursday, November 6, 2008 9:50 AM
|
|
|
|
|
If you don't want to resize the text, do you really want to use a transformation? Why not just change the coordinates where you draw the text?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I have to check, the transformation doesn't involve scale does it? No?
Ok, the simplest method I can think of is to draw the string to a temporary buffer and the draw this buffer with the transformations you want.
My current favourite word is: Nipple!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
HI,
Can any one guide me how to run commands from a .Net Application developed in C# at Command prompt(i.E C:\>)
Any links on it would also be helpful
|
|
|
|
|
Check out this thread[^].
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
hai all,
we developed windows service and we tried to deploy this using installer Class(visual studio 2005 & Custom Actions),this service properly installed in client machine ,but this service status started option is not visible,when we try to start this service manually ,we are getting bellow error,
here my service name "myservice" ,this service start type Automatic & Acount Type LocalSystem
" Could not start the myservice service on local Computer
Error 193:Ocx1 "
Thanks & Regards,
Vishnu.
|
|
|
|
|
Hi,
I am trying to open a large xml file into an xml document as follows:
string xmlFilePath = "c:\\myXMLfile.xml";
XmlDocument doc = new XmlDocument();
doc.Load(xmlFilePath);
I get the following error on doc.Load(xmlFilePath);
the error is:
{"'', hexadecimal value 0x1E, is an invalid character. Line 1116997, position 1."}
Question:
How do I find this error in the xml file and how do I correct it.
Note that this is a large file of 300 MB.
Thanks
|
|
|
|
|
Hi,
From MSDN:
XmlDocument..::.Load Method[^]
If you want validation to occur, you can create a validating XmlReader instance by using the XmlReaderSettings class and the Create method. For more information, see Validating XML Data with XmlReader.
The Load method always preserves significant white space. The PreserveWhitespace property determines whether or not insignificant white space, that is white space in element content, is preserved. The default is false; white space in element content is not preserved.
Regards,
The only programmers that are better those C# programmers are those who code in 1's and 0's |
Programm3r
My Blog: ^_^
|
|
|
|
|
If the file weren't so large I'd open it in Notepad to fix it.
I would hesitate to write a program that blindly replaces the character(s) without further investigation.
You could write a simple console program to read each line, keeping count, and display the 1116997th line (or all lines that contain invalid characters).
Fixing the problem may be more difficult. Ideally, once you know what's going on, you can provide that information to whoever creates the file and tell them that their process is buggy and they can fix it on their end (I've had to do that).
|
|
|
|
|
|
Hi,
I have written a small reporting application which makes use of Microsoft.Office.Interop.Excel.dll and OFFICE.dll
The application retrieves data from a database and creates excel charts based on the data. It runs fine on my development machine where I have got Ms Office installed. The problem is that it needs to run on a DB Server so that it can execute as part of an SSIS package, however company policies do not permit the installation of MS Office on the servers.
I have got the dll's and included it in the bin folder of my project and then referenced them by adding reference and then browsing to the folder where they are located, instead of adding a COM reference in Visual Studio, however it still does not work.
I have read on other forums that you must have Office installed for it to work or does somebody here possibly have a solution
Kind Regards,
Robert
|
|
|
|
|
No, if you want to use their dlls then it must be installed.
I'm pretty sure (could be wrong though) that MS do not give permission for those dlls to be redistributed, so by doing so you may be breaking the law.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
No. Office must be installed.
InFrA007 wrote: company policies do not permit the installation of MS Office on the servers
Well, if the company wants to use the functionality you built, then they have no real choice but to install Office on the server. No reason not to allow Office to be installed on the server.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Paul Conrad wrote: No reason not to allow Office to be installed on the server.
Except that Microsoft strongly advise against using Office automation server-side. Look here[^] for details.
|
|
|
|
|
Hmmmm, some good points, especially that one about redistributing the dll's.
Never thought about that...
Thanks Paul for the link, Im sure I have come across it in the past too, when beginning with the app.
Maybe putting everything in one SSIS package, although more convenient, is not the best direction...
|
|
|
|
|
Hi
what should i use to get datashape work
using System.????????????
also some programs gives
using System.Data.Metadata.Edm
does not exist
what should i do to make those working
Thx
modified on Thursday, November 6, 2008 6:54 AM
|
|
|
|
|
seen18max wrote: datashape
I don't know about this. did you mean DataSpace[^]?
seen18max wrote: using System.Data.Metadata.Edm
does not exist
You need to add a reference to the System.Data.Entity assembly.
Simon
|
|
|
|
|
Datashape for Immediate Fetching datacontext..
Thank you for Metadata.Edm
it is working now
|
|
|
|
|
DataShape has been replaced by DataLoadOptions
System.Data.Linq.DataLoadOptions
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
For System.Data.Metadata.Edm it is working now thank you
for datashape
System.Data.Linq.DataLoadOptions
doesn't exist
what is the reference should i add to get it work??
|
|
|
|
|
seen18max wrote: System.Data.Linq.DataLoadOptions
doesn't exist
what is the reference should i add to get it work??
Google can help you with that
Google: "System.Data.Linq.DataLoadOptions assembly"[^]
The first result tells you what assembly reference is needed.
Simon
|
|
|
|