|
isn't that methods rather than members? Without checking the books I wouldn't have thought you could have any members in an interface. I presume we consider members and fields are the same thing in this context..
Regards,
Rob Philpott.
|
|
|
|
|
Hi Goodmorning,
yaaa in this context members & fields are same..
Sridevi
|
|
|
|
|
...hey guys ..
I m working on the search engine project.....
I urgently need any algorithm to index my database...
I can't store it using STL hash table....anyone knows ..plz tell me....
Aditya Kumar Agrawal
B. Tech. Final Year
MNNIT Allahabad
India-211004
|
|
|
|
|
First, make sure you're in the right forum (C# programming language).
There are lots of articles on the web as well as several open source search libraries that might help you out if you study them. One that comes to mind is Lucene (and the .NET port, DotLucene).
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Bought a House!
Judah Himango
|
|
|
|
|
..Thanks for this great guidence ... really i didn't have any info regarding DotLucene ... and as i m coding my engine in C# .. so I prefer to put this question in this forum ......
once again thanks a lot
Aditya Kumar Agrawal
B. Tech. Final Year
MNNIT Allahabad
India-211004
|
|
|
|
|
Hi!
I am developing a software using c# for windows platform, and i need to know if there is any possibility of knowing when a system or user process is invoked that is before it's execution.
I will be very grateful for any help.
take care
SAM
SAM
|
|
|
|
|
Well you have a couple options depending on how much control you have over the system and/or user processes. For example, if these processes are also your own source code, then you can design some sort of Health protocol used by all the processes and the Master Service/Process. This would actually pretty fun and easy to do depending on your expertise.
Conversely if you are talking about genuine 3rd party processes, this includes Windows processes then I am afraid we have a complety different cat to skin. You know when you press CTRL+ALT+DEL to bring up the Task List, well get ready cause that is basically what you have to build (aside from the interface). If that is the case, I would have to say that doing so in C# for the sake of using C# would be kinda silly and not advised with all of the marshalling and workarounds to access system data structures`. But under Win32 and VC++ you are in the right element at least. Get the drift?
Finally unless you happen to have lying around, one computer interface to the human brain, it may be slighlty difficult to tell the future. But if your scenario matches the first option then you can ensure the first thing the processes do is use the Health protcol. If you are left with the second option remember the process that scans the Active Task List is probably a high priority process so if your application is polling this list you need to decide how often to interrogate it versus becoming intrusive to the system performance.
Mike
|
|
|
|
|
I have a project that I am working on that requires me to dynamically create the connection string to a SQL Server database. All of our SQL Servers are published within Active Directory. Within SQL Server there is a tab that allows you to add the instance of SQL to Active Directory. This can also be done for a database after SQL has been added to AD (the options tab at the bottom within SQL 2000).
With the database and the SQL instance published in AD I should be able to query AD to find the location of the database, i.e., What server is database X on?, I have looked through System.DirectoryServices and have been able to find how to do this. Any help/leads is greatly appreciated.
|
|
|
|
|
Hi again!
Well i got just the smallest of problems right now. I'm creating a sprite engine in C# and have ran into a problem when creating layers to my screen. The idea was to have a terrian layer, Object layer, and Control layer. Object layer being anything directly related to the game world and Controls being the GUI. The purpose of layers is so if only the controls changed i would only compute the change of the controls and just redraw what i had drawn previous with the past layers. Creating something of "Dirty Sprite" theory- ("Only redrawn what has changed - changed = dirty")
But the problem is before i was using these layers my program wiped the previous layer by filling it with white. I dont believe this will work anymore.
Is there a way to wipe a layer "clear"? So if i draw the layers on top of each other you'll be able to see the layers drawn first through the holes in the top most layers?
Thanks for your help in Advanced!
-- modified at 20:43 Thursday 1st December, 2005
|
|
|
|
|
I am having a lot of issues with this in VS2003 - programming in C#
I am trying to update one field in an XML file using a dataset
The code for the updating is
_______________________________________________________________
<br />
DataRow selectedRow = contacts.Tables[0].Rows[contactlist.SelectedIndex];<br />
selectedRow.BeginEdit();<br />
selectedRow["Service_Release_SQL"] =sr_sql.Text;<br />
selectedRow.EndEdit();<br />
contacts.WriteXml(@"contacts.xml");
______________________________________________________________
where "contactlist.SelectedIndex" gives me the XML row to update, and the field in that row is called "Service_Release_SQL"
This complies OK, and runs without throwing an exception but the result always is that my XML file loses all field after the "Service_Release_SQL"
field.
Can anyone indicate where I am going wrong
Thank you for your time
|
|
|
|
|
Should consult MSDN for this one, copied from there. You may be missing parts of this.
private void WriteXmlToFile(DataSet thisDataSet) {
// Create a file name to write to.
string filename = "myXmlDoc.xml";
// Create the FileStream to write with.
System.IO.FileStream myFileStream = new System.IO.FileStream
(filename, System.IO.FileMode.Create);
// Create an XmlTextWriter with the fileStream.
System.Xml.XmlTextWriter myXmlWriter =
new System.Xml.XmlTextWriter(myFileStream, System.Text.Encoding.Unicode);
// Write to the file with the WriteXml method.
thisDataSet.WriteXml(myXmlWriter);
myXmlWriter.Close();
}
|
|
|
|
|
Thanks
I suspect that my trouble is that the dataset is "set" to a different XML schema that the file being loaded (a previous version of the XML file), hence ignoring the columns after the ones it "knows about".
I suspect I will need to specifically load the schema, and save the schema as well as the data.
Will try it out on Monday when I get back to the office
|
|
|
|
|
I want to know how to control windows audio with C#
|
|
|
|
|
When your question is that broad, your best bet is google.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
This is my first time trying to work with a database. Let me explain what I've done real quick, then post my code, and you can tell me how I'm retarded. (Please)
First, I added an existing database to the project as a new data source. I did not have it automatically generate a typed dataset.
Next, in the design window, I added an untyped dataset to my form window. Then I placed a datagridview object in the window.
Under the DataGridView properties, I set the datasource to my untyped dataset.
I then modified my form code, as so:
<br />
public partial class PTAnalyzer : Form<br />
{<br />
public OleDbConnection conn;<br />
public OleDbDataAdapter dAdapter;<br />
public DataSet dSet;<br />
public string conString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=..\\..\\ptrack6.mdb";<br />
<br />
public PTAnalyzer()<br />
{<br />
InitializeComponent();<br />
<br />
try<br />
{<br />
conn = new OleDbConnection(conString);<br />
dAdapter = new OleDbDataAdapter("SELECT * FROM game WHERE player_id = 11", conn);<br />
dSet = new DataSet();<br />
dAdapter.Fill(dataSetPT, "game");<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show("Error : " + ex.Message);<br />
}
}<br />
}<br />
<br />
No errors, it runs fine. But nothing is displayed within the datagridview object. What am I doing wrong here? Thanks.
|
|
|
|
|
budidharma wrote: dSet = new DataSet();
//refreshes rows in the DataSet
dAdapter.Fill(dataSetPT, "game");
Did you mean dSet in that last line?
Jared Parsons
jaredp@beanseed.org
http://spaces.msn.com/members/jaredp/
|
|
|
|
|
Sorry, that dSet isn't actually used. I should delete that line. The data set is "dataSetPT."
|
|
|
|
|
|
Sure. I'm using VS 2005 rc3. The code was autogenerated by the IDE.
Here's the entire two files, most was autogenerated, excluding the stuff I posted in that first post.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace PTAnalyzer
{
public partial class PTAnalyzer : Form
{
// DATA ACCESS CODE
public OleDbConnection conn;
public OleDbDataAdapter dAdapter;
public DataSet dSet;
public string conString = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=..\\..\\ptrack6.mdb";
public PTAnalyzer()
{
InitializeComponent();
// DATA ACCESS INITIALIZATION
try
{
conn = new OleDbConnection(conString);
dAdapter = new OleDbDataAdapter("SELECT * FROM game WHERE player_id = 11", conn);
dAdapter.Fill(dataSetPT, "game");
}
catch (Exception ex)
{
MessageBox.Show("Error : " + ex.Message);
} //try-catch
}
}
}
namespace PTAnalyzer
{
partial class PTAnalyzer
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// <param name="disposing" />true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.dataSetPT = new System.Data.DataSet();
this.dataGridViewResults = new System.Windows.Forms.DataGridView();
((System.ComponentModel.ISupportInitialize)(this.dataSetPT)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewResults)).BeginInit();
this.SuspendLayout();
//
// dataSetPT
//
this.dataSetPT.DataSetName = "PTDataSet";
//
// dataGridViewResults
//
this.dataGridViewResults.AutoGenerateColumns = false;
this.dataGridViewResults.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridViewResults.DataSource = this.dataSetPT;
this.dataGridViewResults.Location = new System.Drawing.Point(12, 47);
this.dataGridViewResults.Name = "dataGridViewResults";
this.dataGridViewResults.Size = new System.Drawing.Size(654, 325);
this.dataGridViewResults.TabIndex = 0;
//
// PTAnalyzer
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(678, 384);
this.Controls.Add(this.dataGridViewResults);
this.Name = "PTAnalyzer";
this.Text = "PT Analyzer";
((System.ComponentModel.ISupportInitialize)(this.dataSetPT)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewResults)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Data.DataSet dataSetPT;
private System.Windows.Forms.DataGridView dataGridViewResults;
}
}
|
|
|
|
|
Specifically, in the second file, this is where the datagridview's datasource is set.
this.dataGridViewResults.DataSource = this.dataSetPT;
Really though, I'm trying to stumble through this and have no idea what I'm doing.
|
|
|
|
|
Finally just figured it out. I had to specifically set the datagridview datasource to a table index contained within the dataset. I was just setting it to the dataset.
|
|
|
|
|
Please can anyone tell me how to create Windows Services and deal with it(installing and running) coz it's not clear in the MSDN,
and there's another issue,
i want to make a Windows Service that let me control the Audio Volume of the Windows via short cut keys(like: Fn+UP or FN+DOWN),
how can i make it via C# and specialy in Windows Services....
thanks in advance.
|
|
|
|
|
|
Just a question, probably something easy...
I have a tab control setup with a user control in the tab. I want to have it so when a user makes their selection in the user control it will change tabs and load information in the new tab based on their selection... how would i reference the tab control from the user control? any thoughts? Thanks!
|
|
|
|
|
In my opinion, this is backwards. Your user control should be ignorant of its container, just like all of the other standard WinForm controls.
A better approach would be to have your user control raise an event when a selection was made. Your form would then catch that event and then change the tab selection.
|
|
|
|