¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

c# development


Bradley Seman
 

I did a search for c# in the Crestron group and it returned no results.? Maybe i'm doing it wrong, but i'm new here.
?
We are trying to write a program in c# and part of the functionality needed to for it to be able to connect to a DMPS or MC2E and upload a new program for it and it's connected touch panel.
?
Our attempts at connecting to a device on the local network have not been successful.
?
The code we have been using is this (this is just test code, the actual code will use variable names instead of hard coded info):
?
VptSessionset = newVptSession();
?
??????? private void btn_Load_Click(object sender, EventArgs e)
??????? {
??????????? DialogResult result;
??????????? Form LoadForm = new LoadForm(listboxLoadList,
txtControlPanel.Text, txtTPProgram.Text, txtWebInterface.Text,
txtControlFirmware.Text, txtTPFirmware.Text);
??????????? result = LoadForm.ShowDialog();
??????????? if (result == System.Windows.Forms.DialogResult.OK)
??????????? {
????????????????//Here is
where we load the list
??????????????? Console.WriteLine("New VtpSession created!");
??????????????? set.OpenSession("tcp
10.25.146.126", "C# test");
??????????????? Console.WriteLine("Session opened!");
??????????????? int TransID = 0;
??????????????? String program = ;//fill in your own path/file here
??????????????? set.AsyncActivateStr(0, program, 10000, TransID, 0, 0);
??????????????? Console.WriteLine("Session program send!");
??????????? }
??????????? else if (result ==
System.Windows.Forms.DialogResult.Cancel)
??????????? {
??????????????? // Don't load the list
??????????????? ;
??????????? }
??????? }
?The program string is blank since you guys will have a different file and directory to use.
?
after this function is called the set_OnActivateStrComplete function is called:
??????? private void set_OnActivateStrComplete(int nTransactionID, int nAbilityCode, byte bSuccess, string pszOutputs, int nUserPassBack)
??????? {
??????????? Console.WriteLine("Inside
of the complete!");
??????????? Console.WriteLine(bSuccess);
??????????? Console.WriteLine(pszOutputs);
??????? }
?
when bSuccess is output to the Console, a zero is printed, indicating failure.
does anyone have any suggestions??

[Non-text portions of this message have been removed]


 

You need to check on creatronlabs.com

Full c# programming is very much in beta still

On 2013-06-10, at 4:45 PM, Bradley Seman <el_perro_azul@...> wrote:

I did a search for c# in the Crestron group and it returned no results. Maybe i'm doing it wrong, but i'm new here.

We are trying to write a program in c# and part of the functionality needed to for it to be able to connect to a DMPS or MC2E and upload a new program for it and it's connected touch panel.

Our attempts at connecting to a device on the local network have not been successful.

The code we have been using is this (this is just test code, the actual code will use variable names instead of hard coded info):

VptSessionset = newVptSession();

private void btn_Load_Click(object sender, EventArgs e)
{
DialogResult result;
Form LoadForm = new LoadForm(listboxLoadList,
txtControlPanel.Text, txtTPProgram.Text, txtWebInterface.Text,
txtControlFirmware.Text, txtTPFirmware.Text);
result = LoadForm.ShowDialog();
if (result == System.Windows.Forms.DialogResult.OK)
{
//Here is
where we load the list
Console.WriteLine("New VtpSession created!");
set.OpenSession("tcp
10.25.146.126", "C# test");
Console.WriteLine("Session opened!");
int TransID = 0;
String program = ;//fill in your own path/file here
set.AsyncActivateStr(0, program, 10000, TransID, 0, 0);
Console.WriteLine("Session program send!");
}
else if (result ==
System.Windows.Forms.DialogResult.Cancel)
{
// Don't load the list
;
}
}
The program string is blank since you guys will have a different file and directory to use.

after this function is called the set_OnActivateStrComplete function is called:
private void set_OnActivateStrComplete(int nTransactionID, int nAbilityCode, byte bSuccess, string pszOutputs, int nUserPassBack)
{
Console.WriteLine("Inside
of the complete!");
Console.WriteLine(bSuccess);
Console.WriteLine(pszOutputs);
}

when bSuccess is output to the Console, a zero is printed, indicating failure.
does anyone have any suggestions?

[Non-text portions of this message have been removed]


 

Neil,

OP is trying to do C# from his computer, you'll notice he's trying to create a viewport (toolbox) session to upload files. Not on a controller.

Also... SIMPL# - the ability to write libraries in C# and call them from your SIMPL+ modules - is released. It's not in beta.

--- In Crestron@..., Neil Dorin <neildorin@...> wrote:

You need to check on creatronlabs.com

Full c# programming is very much in beta still

Sent from my iPhone

On 2013-06-10, at 4:45 PM, Bradley Seman <el_perro_azul@...> wrote:

I did a search for c# in the Crestron group and it returned no results. Maybe i'm doing it wrong, but i'm new here.

We are trying to write a program in c# and part of the functionality needed to for it to be able to connect to a DMPS or MC2E and upload a new program for it and it's connected touch panel.

Our attempts at connecting to a device on the local network have not been successful.

The code we have been using is this (this is just test code, the actual code will use variable names instead of hard coded info):

VptSessionset = newVptSession();

private void btn_Load_Click(object sender, EventArgs e)
{
DialogResult result;
Form LoadForm = new LoadForm(listboxLoadList,
txtControlPanel.Text, txtTPProgram.Text, txtWebInterface.Text,
txtControlFirmware.Text, txtTPFirmware.Text);
result = LoadForm.ShowDialog();
if (result == System.Windows.Forms.DialogResult.OK)
{
//Here is
where we load the list
Console.WriteLine("New VtpSession created!");
set.OpenSession("tcp
10.25.146.126", "C# test");
Console.WriteLine("Session opened!");
int TransID = 0;
String program = ;//fill in your own path/file here
set.AsyncActivateStr(0, program, 10000, TransID, 0, 0);
Console.WriteLine("Session program send!");
}
else if (result ==
System.Windows.Forms.DialogResult.Cancel)
{
// Don't load the list
;
}
}
The program string is blank since you guys will have a different file and directory to use.

after this function is called the set_OnActivateStrComplete function is called:
private void set_OnActivateStrComplete(int nTransactionID, int nAbilityCode, byte bSuccess, string pszOutputs, int nUserPassBack)
{
Console.WriteLine("Inside
of the complete!");
Console.WriteLine(bSuccess);
Console.WriteLine(pszOutputs);
}

when bSuccess is output to the Console, a zero is printed, indicating failure.
does anyone have any suggestions?

[Non-text portions of this message have been removed]


[Non-text portions of this message have been removed]


Eric Williams
 

Where are people purchasing vs 2008 pro from. I'm finding nothing but shady looking resources (old software). I'm not seeing it on Microsoft. I've been told that vs 2012 pro would include down grade rites?

-----Original Message-----
From: "Neil Dorin" <neildorin@...>
Sent: ?6/?10/?2013 6:55 PM
To: "Crestron@..." <Crestron@...>
Subject: Re: [Crestron] c# development


You need to check on creatronlabs.com

Full c# programming is very much in beta still
On 2013-06-10, at 4:45 PM, Bradley Seman <el_perro_azul@...> wrote:

I did a search for c# in the Crestron group and it returned no results. Maybe i'm doing it wrong, but i'm new here.

We are trying to write a program in c# and part of the functionality needed to for it to be able to connect to a DMPS or MC2E and upload a new program for it and it's connected touch panel.

Our attempts at connecting to a device on the local network have not been successful.

The code we have been using is this (this is just test code, the actual code will use variable names instead of hard coded info):

VptSessionset = newVptSession();

private void btn_Load_Click(object sender, EventArgs e)
{
DialogResult result;
Form LoadForm = new LoadForm(listboxLoadList,
txtControlPanel.Text, txtTPProgram.Text, txtWebInterface.Text,
txtControlFirmware.Text, txtTPFirmware.Text);
result = LoadForm.ShowDialog();
if (result == System.Windows.Forms.DialogResult.OK)
{
//Here is
where we load the list
Console.WriteLine("New VtpSession created!");
set.OpenSession("tcp
10.25.146.126", "C# test");
Console.WriteLine("Session opened!");
int TransID = 0;
String program = ;//fill in your own path/file here
set.AsyncActivateStr(0, program, 10000, TransID, 0, 0);
Console.WriteLine("Session program send!");
}
else if (result ==
System.Windows.Forms.DialogResult.Cancel)
{
// Don't load the list
;
}
}
The program string is blank since you guys will have a different file and directory to use.

after this function is called the set_OnActivateStrComplete function is called:
private void set_OnActivateStrComplete(int nTransactionID, int nAbilityCode, byte bSuccess, string pszOutputs, int nUserPassBack)
{
Console.WriteLine("Inside
of the complete!");
Console.WriteLine(bSuccess);
Console.WriteLine(pszOutputs);
}

when bSuccess is output to the Console, a zero is printed, indicating failure.
does anyone have any suggestions?

[Non-text portions of this message have been removed]






[Non-text portions of this message have been removed]


 

I believe your best bet is to get an MSDN subscription.

--- In Crestron@..., Eric Williams <ewilliams0305@...> wrote:

Where are people purchasing vs 2008 pro from. I'm finding nothing but shady looking resources (old software). I'm not seeing it on Microsoft. I've been told that vs 2012 pro would include down grade rites?

-----Original Message-----
From: "Neil Dorin" <neildorin@...>
Sent: ?€?6/?€?10/?€?2013 6:55 PM
To: "Crestron@..." <Crestron@...>
Subject: Re: [Crestron] c# development


You need to check on creatronlabs.com

Full c# programming is very much in beta still

Sent from my iPhone

On 2013-06-10, at 4:45 PM, Bradley Seman <el_perro_azul@...> wrote:

I did a search for c# in the Crestron group and it returned no results. Maybe i'm doing it wrong, but i'm new here.

We are trying to write a program in c# and part of the functionality needed to for it to be able to connect to a DMPS or MC2E and upload a new program for it and it's connected touch panel.

Our attempts at connecting to a device on the local network have not been successful.

The code we have been using is this (this is just test code, the actual code will use variable names instead of hard coded info):

VptSessionset = newVptSession();

private void btn_Load_Click(object sender, EventArgs e)
{
DialogResult result;
Form LoadForm = new LoadForm(listboxLoadList,
txtControlPanel.Text, txtTPProgram.Text, txtWebInterface.Text,
txtControlFirmware.Text, txtTPFirmware.Text);
result = LoadForm.ShowDialog();
if (result == System.Windows.Forms.DialogResult.OK)
{
//Here is
where we load the list
Console.WriteLine("New VtpSession created!");
set.OpenSession("tcp
10.25.146.126", "C# test");
Console.WriteLine("Session opened!");
int TransID = 0;
String program = ;//fill in your own path/file here
set.AsyncActivateStr(0, program, 10000, TransID, 0, 0);
Console.WriteLine("Session program send!");
}
else if (result ==
System.Windows.Forms.DialogResult.Cancel)
{
// Don't load the list
;
}
}
The program string is blank since you guys will have a different file and directory to use.

after this function is called the set_OnActivateStrComplete function is called:
private void set_OnActivateStrComplete(int nTransactionID, int nAbilityCode, byte bSuccess, string pszOutputs, int nUserPassBack)
{
Console.WriteLine("Inside
of the complete!");
Console.WriteLine(bSuccess);
Console.WriteLine(pszOutputs);
}

when bSuccess is output to the Console, a zero is printed, indicating failure.
does anyone have any suggestions?

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]




[Non-text portions of this message have been removed]


 

Foo,

I was referring to SIMPL# Pro which is not yet released.
On 2013-06-10, at 5:15 PM, "RobK" <fooguy89@...> wrote:

Neil,

OP is trying to do C# from his computer, you'll notice he's trying to create a viewport (toolbox) session to upload files. Not on a controller.

Also... SIMPL# - the ability to write libraries in C# and call them from your SIMPL+ modules - is released. It's not in beta.

--- In Crestron@..., Neil Dorin <neildorin@...> wrote:

You need to check on creatronlabs.com

Full c# programming is very much in beta still

Sent from my iPhone

On 2013-06-10, at 4:45 PM, Bradley Seman <el_perro_azul@...> wrote:

I did a search for c# in the Crestron group and it returned no results. Maybe i'm doing it wrong, but i'm new here.

We are trying to write a program in c# and part of the functionality needed to for it to be able to connect to a DMPS or MC2E and upload a new program for it and it's connected touch panel.

Our attempts at connecting to a device on the local network have not been successful.

The code we have been using is this (this is just test code, the actual code will use variable names instead of hard coded info):

VptSessionset = newVptSession();

private void btn_Load_Click(object sender, EventArgs e)
{
DialogResult result;
Form LoadForm = new LoadForm(listboxLoadList,
txtControlPanel.Text, txtTPProgram.Text, txtWebInterface.Text,
txtControlFirmware.Text, txtTPFirmware.Text);
result = LoadForm.ShowDialog();
if (result == System.Windows.Forms.DialogResult.OK)
{
//Here is
where we load the list
Console.WriteLine("New VtpSession created!");
set.OpenSession("tcp
10.25.146.126", "C# test");
Console.WriteLine("Session opened!");
int TransID = 0;
String program = ;//fill in your own path/file here
set.AsyncActivateStr(0, program, 10000, TransID, 0, 0);
Console.WriteLine("Session program send!");
}
else if (result ==
System.Windows.Forms.DialogResult.Cancel)
{
// Don't load the list
;
}
}
The program string is blank since you guys will have a different file and directory to use.

after this function is called the set_OnActivateStrComplete function is called:
private void set_OnActivateStrComplete(int nTransactionID, int nAbilityCode, byte bSuccess, string pszOutputs, int nUserPassBack)
{
Console.WriteLine("Inside
of the complete!");
Console.WriteLine(bSuccess);
Console.WriteLine(pszOutputs);
}

when bSuccess is output to the Console, a zero is printed, indicating failure.
does anyone have any suggestions?

[Non-text portions of this message have been removed]


[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]


Bradley Seman
 

I was hoping you guys could help me find out what was wrong with my code.? Why isn't it working?

[Non-text portions of this message have been removed]


Heath Volmer
 

You are trying to control toolbox loads from another application, correct?

I spent way more time than I should have looking at the snippet you posted and I'm not entirely clear where it actually does anything other that start up a Toolbox session. BUT, I don't know enough about it. I did find that there is a function that will give you the last error reported, but at that point I realized that I was a bit over my head.

Can you do this using toolbox scripting or is there a need for an application?

Heath Volmer
Digital Domain Systems
Littleton, CO

Sent from my iTypo 4

On Jun 11, 2013, at 3:59 PM, Bradley Seman <el_perro_azul@...> wrote:

I was hoping you guys could help me find out what was wrong with my code. Why isn't it working?




[Non-text portions of this message have been removed]