|
oh don't get me wrong if I was coding it myself I would know the match had failed as I would have had the parameters in the right order.
But I did not spot that it is the second param that is the search pattern and the third is the replace just by looking at his code. Mainly because I dont use the Regex function often (but we have had that discussion[^] before )
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
Yeah, it was another regex abuse, there wasn't any real pattern to match, or special substitution going on, just a simple string.Replace; and my view on regex hasn't changed since our last encounter on the subject
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
i want to know how i can access to sectors used by typical file to read and write directly them in c#
and i need the methods that read and write hard disk sectors directly
thanks
|
|
|
|
|
Use PInvoke. OpenFile(@"\\.\A:", ...), where A: is the drive you want to read. SetFilePointer(startSector). ReadFile(512*numberOfSectors)
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
Why would you need to do this??
|
|
|
|
|
so what your saying is you don't know...
|
|
|
|
|
Yes, I do know how to read/write disk sectors. No, I have no idea why he would want to do this.
|
|
|
|
|
well I do not know why he would want to read / write directly to the FAT / NTFS but I would like to tag files with extra infomation, that my compnay would find helpful...
so if you know how Ican do this from c# then that would be handy.
|
|
|
|
|
Hi,
Can anybody have anyidea about to get stream or video from a Ip Camera using URL in C#.Net
Thanks in advance.
Dinker
|
|
|
|
|
This question is incredibly confusing to me, define 'Ip Camera' (access a webcam remotely?) and what do you mean URL? Is it a video feed through the internet or through a network?
|
|
|
|
|
hi
with GraphicsPath.AddEllipse i created ellipse,if i use GetBounds() i get the bounds of the ellipse,
now if i want to rotate the ellipse keeping the same bounding rectangle how do i calculate the new ellipse to create?
|
|
|
|
|
Hello,
I have a problem, i have created a form and a user control. I have a database on SQL server. I have a combobox on my usercontrol and i would like to implement my combobox with my database. i've used the properties of the combobox to choose the datasource and choose my database and the right table but my combobox is empty.
Whereas if i create a combobox in my form and did the same things with my combobox i have the data inside.
I've tried lot of things but nothing is working , if someone know how to do this i would be very grateful
Thanks
|
|
|
|
|
Can we see some code to see where the error is?
|
|
|
|
|
I don't have any error, it just that i have no data in my combobox.
For the code i'm using the wizard datasource in the combobox propriété in Visual Studio.
The wizard create a dataset ( with the name of my database), a Bindingsource and a TableAdapter ( with the name of the table i want)
I can show you some code of one of this composant if you want?
Thanks
|
|
|
|
|
Without seeing how you're binding your data source to your control there could be many things going wrong...
|
|
|
|
|
this code can help you ?
It's in the designer of my combobox
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.licenceDataSet = new test_datasource.licenceDataSet();
this.companyBindingSource = new System.Windows.Forms.BindingSource(this.components);
this.companyTableAdapter = new test_datasource.licenceDataSetTableAdapters.companyTableAdapter();
this.licenceDataSet1 = new test_datasource.licenceDataSet1();
this.companyBindingSource1 = new System.Windows.Forms.BindingSource(this.components);
this.companyTableAdapter1 = new test_datasource.licenceDataSet1TableAdapters.companyTableAdapter();
((System.ComponentModel.ISupportInitialize)(this.licenceDataSet)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.companyBindingSource)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.licenceDataSet1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.companyBindingSource1)).BeginInit();
this.SuspendLayout();
this.comboBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.companyBindingSource, "nom", true));
this.comboBox1.DataSource = this.companyBindingSource1;
this.comboBox1.DisplayMember = "nom";
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Location = new System.Drawing.Point(28, 24);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(121, 21);
this.comboBox1.TabIndex = 0;
this.comboBox1.ValueMember = "cid";
this.licenceDataSet.DataSetName = "licenceDataSet";
this.licenceDataSet.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
this.companyBindingSource.DataMember = "company";
this.companyBindingSource.DataSource = this.licenceDataSet;
this.companyTableAdapter.ClearBeforeFill = true;
this.licenceDataSet1.DataSetName = "licenceDataSet1";
this.licenceDataSet1.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema;
this.companyBindingSource1.DataMember = "company";
this.companyBindingSource1.DataSource = this.licenceDataSet1;
this.companyTableAdapter1.ClearBeforeFill = true;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.comboBox1);
this.DataBindings.Add(new System.Windows.Forms.Binding("Tag", this.companyBindingSource, "nom", true, System.Windows.Forms.DataSourceUpdateMode.Never));
this.Name = "combo";
((System.ComponentModel.ISupportInitialize)(this.licenceDataSet)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.companyBindingSource)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.licenceDataSet1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.companyBindingSource1)).EndInit();
this.ResumeLayout(false);
|
|
|
|
|
hi
i am having a tree view having images as it nodes.
i am doin drag and drop using mouse events to the win form.(not using any drag drop events)
the thing i am to implememt is that i must be able to drag and drop across apllications(two instances of forms are running then i can drag from 1 and drop to 2 form);
thanks in advance
can any one help me regarding this
|
|
|
|
|
DoDragDrop() is the method you need to call to make this work. You can either put a string (of the filename of the image) into the drag drop object, or stuff the whole bitmap in, depending on whether you just want to drag between instances of your application, or with any app that supports dragdrop
|
|
|
|
|
Rahul106 wrote: not using any drag drop events
Why not use the supported events? They make drag and drop incredibly easy to implement, and trying to do it without using them means you're effectively writing them yourself anyway.
And, as benjymous mentions above, if you want to interact with other applications, you should definitely use them.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
hi all,
let's suppose
var result = DataContext.Student.Select(s=>s).ToList();
Can i store above 'result' into the an xml file?If yes then suggest me
thanks
|
|
|
|
|
Why not? You can store anything in an xml file. Just use your favourite flavour of XML serialization. Or just do it manually to make sure it works exactly the way you want it to work.
Your Select does not really make sense to me, why did you put that in?
|
|
|
|
|
after executing the query 'result' fills as
result[0].FName = A<br />
result[0].LName = X<br />
result[1].FName = B<br />
result[1].FName = y<br />
result[2].FName = C<br />
result[2].FName = y<br />
i just create xml file as
.......
....
........
<Student><br />
<FName> A </FName><br />
<LName> X </LName><br />
</Student><br />
<Student> <br />
<FName> B </FName><br />
<LName> y </LName><br />
</Student><br />
<FName> C </FName><br />
<LName> y </LName><br />
<Student>
or is it possible as DataSet directly create the xml file as
MyDataSet.WriteXml(Server.MapPath("MyXMLFile.xml"));
result.WriteXml..????
|
|
|
|
|
If you had googled you would have found DataSet.GetXml()
It returns a string, just write it to the file.
|
|
|
|
|
i don't want to use dataset
|
|
|
|
|
Alright up to you, you're just making it harder though
|
|
|
|