/// <summary> /// add a minMax info of a dimesion to the list /// </summary> /// <param name="minVal"></param> /// <param name="maxVal"></param> public void Add(double minVal, double maxVal) { List <MinMaxInfo> bbList = null; if (minMaxList != null) { bbList = new List <MinMaxInfo> (minMaxList); } else { bbList = new List <MinMaxInfo> (); } MinMaxInfo minMax = new MinMaxInfo(); minMax.maximum = maxVal; minMax.minimum = minVal; bbList.Add(minMax); minMaxList = new MinMaxInfo [bbList.Count]; bbList.CopyTo(minMaxList); }
protected override void WndProc(ref Message m) { if (m.Msg == WM_WINDOWPOSCHANGING) { WindowPos windowPos = (WindowPos)m.GetLParam(typeof(WindowPos)); // Make changes to windowPos // Then marshal the changes back to the message Marshal.StructureToPtr(windowPos, m.LParam, true); } base.WndProc(ref m); // Make changes to WM_GETMINMAXINFO after it has been handled by the underlying // WndProc, so we only need to repopulate the minimum size constraints if (m.Msg == WM_GETMINMAXINFO) { MinMaxInfo minMaxInfo = (MinMaxInfo)m.GetLParam(typeof(MinMaxInfo)); minMaxInfo.ptMinTrackSize.x = this.MinimumSize.Width; minMaxInfo.ptMinTrackSize.y = this.MinimumSize.Height; Marshal.StructureToPtr(minMaxInfo, m.LParam, true); } }
private void SetChartRange(ChartAxis axis, MinMaxInfo range) { axis.ValueType = ChartValueType.Double; axis.RangeType = ChartAxisRangeType.Set; axis.Range = range; }