|
|
|
Hi Miguel Sarafana,
After reading Q? , i belive the best & easy way will be integrating with c# application. Matlab version 7.2(6b) comes with builder for .net , so u can write algorithms in matlab ( m file or mex) can be easily converted .net assemblies(dlls).
Details about matlab builder .net is here
http://www.mathworks.com/access/helpdesk/help/toolbox/dotnetbuilder/index.html?/access/helpdesk/help/toolbox/dotnetbuilder/rn/bq24_kz.html&http://www.mathworks.com/products/new_products/latest_features.html?s_cid=HP_RH_2007a
Happy coding !!!!!
Pls feel free to mail me baijumax@yahoo.com Or reply back to this thread for more info.
By
BAIJUMAX
"believe it or not , i'm always right"
|
|
|
|
|
Dear Sir,
Is there a way to create event in Matlab that will be seen/captured in C#
Thanks
Beni
|
|
|
|
|
yes, checkout this post
Happy coding
cheers
BAIJUMAX
www.baijumax.blogspot.com
|
|
|
|
|
Hi, I have a listview with some items:
ColumnHeader columnHeader1 = new ColumnHeader();
ColumnHeader columnHeader2 = new ColumnHeader();
listView.FullRowSelect = true;
listView.Columns.AddRange(new ColumnHeader[] {
columnHeader1,
columnHeader2,
});
columnHeader1.Text = "Name";
columnHeader1.Width = 150;
columnHeader2.Text = "Note";
columnHeader2.Width = 100;
List<string> items = new List<string>();
items.Add("Some Name");
items.Add("Some Note");
List<string> items2 = new List<string>();
items2.Add("Some Name");
items2.Add("Some Note");
ListViewItem item;
item = new ListViewItem(items.ToArray());
listViewProjects.Items.Add(item);
ListViewItem item2;
item2 = new ListViewItem(items2.ToArray());
listViewProjects.Items.Add(item2);
Now I have a combobox where I want to display the note text from the selected item in the listview. How can I do this? Many thanks for any help.
|
|
|
|
|
SelectedItems returns selected items. SelectedIndices gets selected indexes
|
|
|
|
|
So I'm writing an app to help me take care of a wireless network.
There are multiple APs and multiple clients.
I want to create an app that will help me diagnose various user issues.
Right now, the problem I'm having is getting any wireless info from the user. So I want to add a little feature that will give me the following info from the wireless connection:
1. The MAC Address of the AP
2. The IP Address of the AP
3. The MAC Address of all network adapters (wired and wireless) on the client's machine
4. The IP Address of all network adapters (wired and wireless) on the client's machine
And for all the network connections, I would like to grab all the accessible data like the default gateway and DNS servers and if the address is DHCP or static, etc...
I think it should be fairly easy, no?
The problem that I have been experiencing is finding the info I need to get this done. Thus far, my searches have turned up nothing. And any help/pointers would be greatly appreciated.
|
|
|
|
|
I have string that i recieve and if it is over 1000 bytes i need to split it. I checked out the String.Split() but it only splits by a paticular string or char. i also tried going through a for loop and use the substring but i couldn't get it right. could someone please show me a good way of doing this?
Thanks in advance,
Don't be overcome by evil, but overcome evil with good
|
|
|
|
|
Hi,
I think the best way will be spliting it on the basis of count, the way u have tried in a for loop. The other and better way will be trying to take LEFT most of size say "n" count, and get it split.
so, we want to split a string of 1000 char in 10 strings of size 100 char each.
First take left 100 char, the rest 900 char you can get using "Right". If u repeat this u can split it successfully.
Manoj
Never Give up
|
|
|
|
|
teejayem wrote: if it is over 1000 bytes
Did you mean over 1000 characters? In .NET, a character is 2 bytes, so you need to account for that when calculating the size.
That aside, what's wrong with
string str = "Your long string ...";
if (str.Length > 1000)
{
string firstPart = str.SubString(0, 1000);
string secondPart = str.SubString(1000, str.Length);
}
|
|
|
|
|
Check out String's Substring() method.
Cheers,
Vıkram.
Déjà moo - The feeling that you've seen this bull before.
Join the CP group at NationStates. Password: byalmightybob
|
|
|
|
|
Hello My name is Guy .
I want to ask something maybe you can help me in C#.
I want to pass some Controllers & Buttons I build in Windows.Form , in to a method that can made them Enable & change there Background perhaps.
.
Any way what I Tryed all night is how to pass a Control / Button / Object to a method without ( Object Sender... , Event...) ,in to other function.
I want to take the Control object for example and send his name property trough string to a function and then to cast him into Object type or Basetype.
Something like :
this.TurnControlActive( UrlFile.Name ); // * UrlFile =// System.Windows.Forms.Control *//
and then pass in to ....
private void TurnControlActive( ....... )
{
// Here the Control / Object need to become Enabled //
}
Who to pass an Object / Control / Or how to retrieve a Control by his string name ..?
Thank a lot.
Guy D.
By the way how do I get all my controls in my form into Array ?
|
|
|
|
|
Form parent = Form1.ActiveForm;
foreach (Control c in parent.Controls)
{
c.Enabled = true;
c.BackColor = System.Drawing.Color.Blue;
c.Show();
}
I've try this eiter but it's give me only one control and I've got alot of Button and ComboBox in my Form .
Any suggestions ?
|
|
|
|
|
If the controls are contained in another control (e.g. a panel) then you must also iterate that control's Controls list:
foreach (Control c in parent.Controls)
{
DoControls(c);
}
void DoControls (Control c)
{
c.Enabled = true;
c.BackColor = Color.Blue;
c.Show()
if(c.Controls.Count > 0)
{
foreach( Control cc in c.Controls)
{
DoControls(cc);
}
}
}
|
|
|
|
|
Wow Rob it was brilliant;
Can I get your email ?
|
|
|
|
|
hi friends..
How to fire text changed event for combobox.
|
|
|
|
|
Have you tried changing the text in the ComboBox??
Seriously, why are you trying to fire this event? Why not just call it's method with a couple of faked parameters?
|
|
|
|
|
When i try to find a regular expression in a string, if the expression isn't in the string the program just gets stuck =\
how can i fix it?
example:
<br />
Match find = Regex.Match(downloadPageSource, @"(\w?\d?)+\.site\.com/access(\d+)\.jpg");<br />
if the expression isn't there the program just freezes =\
|
|
|
|
|
I have some images. I want to construct an avi file using these images. Is it possible to do it using C#.
Anyone please help me. I am badly in need of a quick solution.
Thanks in advance
Enamul Hoque
|
|
|
|
|
Hi All, i has a solution with many projects inside, on of the projects is windows application and the other is windows class lib.
i want from the windows application project create an object of the class lib. and from the class lib. call methods in the windows application, i add the class lib. project as ref. to the windows application to make the object but how to call methods in the windows application from the class lib.??
|
|
|
|
|
We can do this with the help of delegates.
Regards,
Arun Kumar.A
|
|
|
|
|
Try this:
<code>
class lib
{
public delegate void myDel();
public myDel objDel;
public void Execute()
{
if (objDel != null)
objDel();
}
}
From the Window Application:
lib objLib = new lib();
objLib.objDel = new lib.myDel(sample);
objLib.Execute();
</code>
<pre>
<div class="ForumSig">Regards,
Arun Kumar.A</div>
|
|
|
|
|
That's me ..
public partial class Form1 : Form
{
RegistryKey key;
public Form1()
{
InitializeComponent();
key = Registry.CurrentUser.OpenSubKey(@"HKEY_CURRENT_USER\Software\NanoSoft\Preferences",true);
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (checkBox1.Checked)
{
key.SetValue("Assistant", "1", RegistryValueKind.String);
}
else
key.SetValue("Assistant", "0", RegistryValueKind.String);
Nothing happens
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Muammar© wrote: key = Registry.CurrentUser.OpenSubKey(@"HKEY_CURRENT_USER\Software\NanoSoft\Preferences",true);
Thats current_user twice.
|
|
|
|