using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DataPerformer.Interfaces;
namespace DataPerformerUI.UserControls
{
/// <summary>
/// Header control for measurements
/// </summary>
public partial class UserControlMeaHeader : UserControl
{
/// <summary>
/// Defualt constructor
/// </summary>
public UserControlMeaHeader()
{
InitializeComponent();
}
internal void Set(IDataConsumer consumer, IMeasurements measurements)
{
int h = userControlTopObject.Height;
userControlTopObject.Set(consumer, measurements);
int dh = userControlTopObject.Height - h;
panelTop.Height += dh;
Height += dh;
userControlTopObject.Dock = DockStyle.Fill;
h = userControlMeasureContainer.Height;
userControlMeasureContainer.SetAll(consumer, measurements);
dh = userControlMeasureContainer.Height - h;
panelBottom.Height += dh;
Height += dh;
userControlMeasureContainer.Dock = DockStyle.Fill;
}
internal void Add(Dictionary<string, IMeasure> dict)
{
userControlMeasureContainer.Add(dict);
}
internal void Add(Dictionary<IMeasure, Color> dict)
{
userControlMeasureContainer.Add(dict);
}
internal Dictionary<IMeasure, object> Dictionary
{
set
{
userControlMeasureContainer.Dictionary = value;
}
}
internal Dictionary<string, Color> Colors
{
set
{
userControlMeasureContainer.Colors = value;
}
}
internal Dictionary<string, bool> Steps
{
set
{
userControlMeasureContainer.Steps = value;
}
}
}
}