/// <summary> /// 新しいLayerSetViewControlを構築する。 /// </summary> public LayerSetViewControl() { renderer = new LayerSetRenderer(); renderCenterLine = false; InitializeComponent(); renderer.RenderSizeChanged += OnImageSizeChanged; renderer.NeedRedraw += OnLayerNeedRedraw; DoubleBuffered = true; }
/// <summary> /// 新しいFormMainを構築する。 /// </summary> public FormMain() { layerSet = new LayerSet(); renderer = new LayerSetRenderer(); renderer.LayerSet = layerSet; isLayerSetMouseDragging = false; isLayerSetAdjustMode = false; layerSetDragLocation = new Point(0, 0); scrollPosX = 0; scrollPosY = 0; InitializeComponent(); layerSet.Added += OnLayerAdded; layerSet.Removed += OnLayerRemoved; layerSetViewControl.LayerSetRenderer = renderer; layerSet.DataChanged += OnLayerSetDataChanged; layerSet.PropertyChanged += OnLayerSetPropertyChanged; numericUpDownRenderingScale.Minimum = (decimal)(LayerSet.MinRenderScale); numericUpDownRenderingScale.Maximum = (decimal)(LayerSet.MaxRenderScale); }