|
For removing lines from a text file, the solution you used is as elegant as your going to get.
|
|
|
|
|
Hi i have a file pdf for to explan dar moprede parametrhaye Array
exampel:
int[] a1=new int[2] {1,2};
a1.{parametr}
pleas
|
|
|
|
|
I"m sorry, but you'll have to ask in English, I have no idea what you're asking. However, if you want to parse a PDF, you need a PDF library for that.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
int param1 = a1[0];
int param2 = a1[1];
if that's not what you wanted to know then you need to specify more clearly.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Hi all,
I have to backup some files, some with readonly attrib.
Is there an other way to open the files with readonly attribute than to reset the "r" attribute, reading and re-setting the attribute again ?
tnx
Frank
|
|
|
|
|
Yes, write code that only asks for read access, then you won't have any problems. I believe I found recently that some .NET libraries ask for full access even if you ask for read only, so I would try using a different class to do what you want, or just use File.Copy to copy the file to the new location.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Thank you,
no can't use copy due to store the files in a database ...
Frank
|
|
|
|
|
Oh, I didn't get they were going into a DB. Well, then change the code you use to read the file. I think File.ReadAllBytes works fine, but using streams does not work, from memory. It's a bug in the framework, essentially.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Christian Graus wrote: using streams does not work ... It's a bug in the framework, essentially.
I disagree. Creating a Stream from a path, without specifying the intended access, assumes read/write intentions. What else should the framework do?
|
|
|
|
|
Hi, I am trying to start an application from my application, which opens a default file, given it's arguments as follow:
Process prc = new Process();
prc.StartInfo.FileName = "azman.msc";
prc.StartInfo.Arguments = "msxml://" + Environment.CurrentDirectory + "\\AuthorizationStore.xml";
prc.Start();
Note the current curectory is:
CurrentDirectory = C:\Users\Hugo\Documents\Visual Studio 2008\Projects\AzManTest\AzManTest\bin
Which contains spaces. For some or other odd reason, it does not like this ...
If this directory is in such a location that there are no spaces in the Directory name, then this works fine...
Can I replace the spaces of the directory with something ? How can I fix this problem.
Any help would be much appreciated!
|
|
|
|
|
It's not odd, the space is used as a delimiter for arguments. Put the path in quotes to get around this.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
LOL .... thanks ^_^
prc.StartInfo.Arguments = "msxml://" + "\"" + Environment.CurrentDirectory + "\\AuthorizationStore.xml" + "\"";
Is this the way to escape a " character?
|
|
|
|
|
Yes. I believe that single quotes work as well, but that's how you escape double ones.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Good morning everybody,
I would like to know how to show in GridViewColumn of pictures of a table of database.
I explain me fill DataSet has leave a request SQL.
In my DataSet I have a column which contains of of the data of type Varbinary.
I would like to know how to show in GridViewColumn of pictures instead of of the data of type Varbinary.
If you can help me please.
Excuse me I am French my English is bad
|
|
|
|
|
Does this[^] help?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Good morning,
Thanks a lot for your help, I achieved show picture in a column of the gate in Asp. Net.
If I could make the same of example that you had me give in XAML the foot would belong.
Here is my code XAML for the Colourful billing of the column
<gridviewcolumn header="Image" width="100" displaymemberbinding="{Binding Path=MyImage}">
<gridviewcolumn.celltemplate>
<datatemplate>
|
|
|
|
|
Hi,
I'm having trouble to obtain the Roles, and the Operations etc. attached to a specific role.
I have a few operations, and a few roles. I want to Iterate through these roles and obtain the operations linked to these roles.
Now I know how to iterate trough these roles and operations individually ... But I don't know how to obtain the link between the two...
I'm using the AZROLESLib.
string storeAddress = "msxml://" + Environment.CurrentDirectory + "\\AuthorizationStore.xml";
AzAuthorizationStoreClass store;
store = new AzAuthorizationStoreClass();
store.Initialize(0, storeAddress, null);
IAzApplication app = store.OpenApplication("Abatis", null);
for (int i = 1; i <= app.Roles.Count; i++)
{
Microsoft.Interop.Security.AzRoles.IAzRole role =
(Microsoft.Interop.Security.AzRoles.IAzRole)app.Roles[i];
String roleName = role.Name;
}
for (int i = 1; i <= app.Operations.Count; i++)
{
Microsoft.Interop.Security.AzRoles.IAzOperation operation =
(Microsoft.Interop.Security.AzRoles.IAzOperation) app.Operations[i];
try
{
String val = operation.Name.Replace(" ", string.Empty);
}
catch (Exception ex)
{
}
}
I can't find the link ... There is an Operations field if you open the roles as follow:
IAzRole roleVal = app.OpenRole(roleName, null);
roleVal.Operations
But I can't iterate through them.
Any help would be much appreciated!
|
|
|
|
|
bonkers123 wrote: I'm using the AZROLESLib.
You probably need to talk to whoever wrote that library then.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
This is a standard Windows (COM) Library ...
modified on Tuesday, May 5, 2009 5:15 AM
|
|
|
|
|
I'm having exactly the sample problem - no operations are shown for a given role.
Seems like a bug to me....
|
|
|
|
|
I am also facing the same problem. has anybody got the fix or is it a known bug?
Is there a workaround for accesing the operations associated witha specific role in Azman?
Also, documentation at this link
http://msdn.microsoft.com/en-us/library/aa375751(v=VS.85).aspx[^]
mentions that there is an interface "IAzRoleDefinition" which I thought of using but this interface is not available in the API for the interop assembly version 1.2. Has anybody faced similar problem?
Please please reply!!! Need a solution quick. Any response is greatly appreciated.
|
|
|
|
|
Hello everyone need yr help once again,
I need to deploy an Application but along with that i need to register few dll's. I have a C# process in install method of custom installer that runs a bat file containing commands to register dll's like
regsvr32 /s "First.dll"
regsvr32 /s "Second.dll"
.
.
.
regsvr32 /s "nTh.dll".
the installer is running successfully on Xp but failed to do it on Windows vista.
giving following exception..
“The Installer has encountered an unexpected error installing this package.
This may indicate a problem with this package” Error Code :2869."
I checked the root cause and it is with the running C# process.
But as i have n't know anything about Windows Xp , i am unable to rectify the issue.
It will be great if you help me in this Issue.
Thanks & Regards
Dattatraya
|
|
|
|
|
you need admin rights to register a dll. Welcome to the hell that is vista.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
thanks a lot for yr reply but how can i get admin rights to register those dll's programatically ..
|
|
|
|
|
The user needs to choose to run the app as admin, or I believe you can set up the manifest file to specify that such rights are required.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|