public MainFormVM() { enable_update = true; Labels = new DropShadownLabelVM[info_count]; for (int i = 0; i < Labels.Length; i++) { Labels[i] = new DropShadownLabelVM(); Labels[i].Text = "N/A"; } LeftBar = new PlainVerticalBarVM(); MiddleBar = new PlainVerticalBarVM(); RightBar = new PlainVerticalBarVM(); Pump = new PlainVerticalBarVM(); Pump.Min = 0; Pump.Max = 4096; Pump.Value = 0; LeftBar.Min = 0; LeftBar.Max = 900; LeftBar.Value = 0; MiddleBar.Min = 0; MiddleBar.Max = 400; MiddleBar.Value = 0; RightBar.Min = 0; RightBar.Max = 400; RightBar.Value = 0; }
void InitializeComponent() { if (model == null) { model = new DropShadownLabelVM(); } suppress_invalidate = false; Size = new Size(baseline_width, baseline_height); mBackgroundColor = Colors.Transparent; mForeColor = Colors.White; mShadowColor = Colors.Black; shadowBrush = new SolidBrush(mShadowColor); textBrush = new SolidBrush(mForeColor); model.PropertyChanged += Model_PropertyChanged; /// create our canvas and attach the paint function.. d = new Drawable(); d.ToolTip = model.ToolTip; d.Paint += OnPaint; use_creategraphics = d.SupportsCreateGraphics; Content = d; }
public DropShadowLabel(DropShadownLabelVM M) { model = M; InitializeComponent(); }