/// <summary> /// ページサイズ設定により、動作モードを変更します。 /// </summary> /// <param name="value">ページサイズ設定</param> /// <param name="height">高さ</param> /// <param name="width">幅</param> public void SetPageSize(PageSizeConstants value, long height, long width) { switch (value) { case PageSizeConstants.Fit: this.ResizeMode = ResizeModeConstants.RatioKeep; this.ResizeHeight = height; this.ResizeWidth = width; break; case PageSizeConstants.FitWidth: this.ResizeMode = ResizeModeConstants.RatioKeep; this.ResizeHeight = -1; this.ResizeWidth = width; break; case PageSizeConstants.Percent050: this.ResizeMode = ResizeModeConstants.Percent; this.ResizePercent = 50; break; case PageSizeConstants.Percent075: this.ResizeMode = ResizeModeConstants.Percent; this.ResizePercent = 75; break; case PageSizeConstants.Percent100: this.ResizeMode = ResizeModeConstants.Percent; this.ResizePercent = 100; break; case PageSizeConstants.Percent150: this.ResizeMode = ResizeModeConstants.Percent; this.ResizePercent = 150; break; case PageSizeConstants.Percent200: this.ResizeMode = ResizeModeConstants.Percent; this.ResizePercent = 200; break; case PageSizeConstants.Percent300: this.ResizeMode = ResizeModeConstants.Percent; this.ResizePercent = 300; break; case PageSizeConstants.Percent400: this.ResizeMode = ResizeModeConstants.Percent; this.ResizePercent = 400; break; } }
/// <summary>画像サイズをフォームに設定します。</summary> /// <param name="value">サイズ</param> private void SetImageSize(PageSizeConstants value) { this.pageSizeMenuItems.Values.ToList().ForEach(m => m.Checked = false); this.shelf.PageSize = value; this.pageSizeMenuItems[value].Checked = true; }