How to import the TemperatureModel.cs through MainPage.xaml.cs

Hi,
I Suppose your TemperatureModel.cs file looks like this.

using .....
using .....

namespace TizenApp.Model
{
    class Class1
   {
        public void X()
        {
           .........
        }
   }
}

Now You can access the function X() from the MainPage.xaml.cs by following way.

var Class1 = new TizenApp.Model.Class1();
Class1.X();

Please let me know if this helps you.

Hi~


you means that I have to replace the _0304(line 5) to TizenApp.Model??? And the class Class1
{
public void X() {}
} Or I just replace the TemperatureModel : BaseSensorModel (line 10) to Class1 ?
I think this project can not work.

Therefore, I found another sample code from (https://github.com/Samsung/Tizen-CSharp-Samples/tree/master/Wearable/Sensors/src/Sensors/Pages),
And I just download the whole project and open it by Visual Studio, and click Sensors.sln


And then run the project




image.png
image.png
And I want to write a another model about sleep, and I found that it is similar to HRMModel.cs / HRMPage.xaml / HRMPage.xaml.cs ,
there is a problem now, I don’t know the class name about sleepdata, is there any reference ? Thanks a lot.

by the way, I put the hole project on this website(https://drive.google.com/drive/folders/1JYk53jzWkwV0UXPCFlK1qen2cr-fMnDy?usp=sharing)

the file name is Tizen-CSharp-Samples-master

Best regards,
Ruby

spacelinkers via Samsung Developers Community Forums & Tech Support <samsung@discoursemail.com> 於 2021年3月15日 週一 下午7:28寫道:

Exclude both . xaml and . xaml . cs from your project (Right click files => exclude Visual studio should now import both files and ‘couple’ them!

Does Tizen .NET support an API for tracking REM sleep?