/// <summary> /// Get configuration from string and draw graph /// </summary> /// <param name="text">XML configuration represented as string</param> /// <param name="ownerSize">Owner size.</param> /// <param name="context">Configuration context.</param> public void SetConfigurationFromText(string text, Size ownerSize, object context) { using (MemoryStream stream = new MemoryStream(System.Text.Encoding.UTF8.GetBytes(text))) { stream.Seek(0, SeekOrigin.Begin); SetConfiguration(TableConfiguration.LoadFromXml(stream), ownerSize, context); } }
/// <summary> /// Load configuration from XML in stream and draw graph /// </summary> /// <param name="stream">Xml configuration stream</param> /// <param name="ownerSize">Owner size.</param> /// <param name="context">Configuration context.</param> public void SetConfiguration(Stream stream, Size ownerSize, object context) { SetConfiguration(TableConfiguration.LoadFromXml(stream), ownerSize, context); }
/// <summary> /// Load configuration from XML file and draw graph /// </summary> /// <param name="fileName">XML configuration filename</param> /// <param name="ownerSize">Owner size.</param> /// <param name="context">Configuration context.</param> public void SetConfiguration(string fileName, Size ownerSize, object context) { SetConfiguration(TableConfiguration.LoadFromXml(fileName), ownerSize, context); }