Resources in cBot

Created at 25 May 2022, 04:55
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
NO

noppanon

Joined 17.05.2017

Resources in cBot
25 May 2022, 04:55


Hi Support,

   When I added sound file to newly created "cBot01", I can not access the sound resources. It said the Properties does not exists. 

 

It had worked on cTrader 4.1x. 

 

However, found this thing.

 

The "Resources.Designer.cs" has cBot01.Properties name space. So I add "using cBot01.Properties;". Now it works. Is it your intension to have same using resource name space and cBot class name. It causes name crashing. Should I change the cBot class name?
Please advise.

Noppanon

 


@noppanon
Replies

amusleh
25 May 2022, 09:13

Hi,

You can change the namespace of your Resources.Designer.cs file to cAlgo.Robots and then you will be able to access the properties directly without adding any namespace using.

The resource file is generated by Visual Studio, and the name space is also set based on your project name, so it's not related to cTrader Automate.

 


@amusleh

noppanon
28 May 2022, 13:53

RE:

amusleh said:

Hi,

You can change the namespace of your Resources.Designer.cs file to cAlgo.Robots and then you will be able to access the properties directly without adding any namespace using.

The resource file is generated by Visual Studio, and the name space is also set based on your project name, so it's not related to cTrader Automate.

 

Hi Amusleh, 

   Thanks for your advice. 

Noppanon


@noppanon