Tpmc4smBaseLoadSmartObjects(Stream) Method |
Load a smart object given a reference to a stream for the SGD file.
Namespace: Crestron.SimplSharpPro.UIAssembly: Crestron.SimplSharpPro.UI (in Crestron.SimplSharpPro.UI.dll) Version: 2.21.121
Syntax
Exceptions
Example
The following will load SmartObjects from a MemoryStream.
MemoryStream memStream;
using (var filestream = new FileStream(Directory.GetApplicationDirectory() + "\\xPanel.sgd", FileMode.Open, FileAccess.Read))
{
var fileBytes = new byte[filestream.Length];
filestream.Read(fileBytes, 0, (int)filestream.Length);
memStream = new MemoryStream((int)filestream.Length);
memStream.Write(fileBytes, 0, (int)filestream.Length);
memStream.Seek(0, SeekOrigin.Begin);
}
var sgPanel = new XpanelForSmartGraphics(0x30, this);
sgPanel.LoadSmartObjects(memStream);Version Information
.NET
Supported in: 6.0
.NET Compact Framework
Supported in: 3.5
See Also