예제 #1
0
        public void SetShowTypeContent(ThumbnailSetting thumSetting)
        {
            this.thumSetting = thumSetting;
            PreviewStyle style = (PreviewStyle)Enum.Parse(typeof(PreviewStyle), ClientData.PreviewStyle);

            switch (style)
            {
            case PreviewStyle.Thumbnail:
                this.tspBtnShowType.Checked      = true;
                this.tspBtnShowType.Text         = "缩略图";
                this.tspBtnShowType.Visible      = false;
                this.toolStripSeparator1.Visible = false;
                break;

            case PreviewStyle.Visualization:
                this.tspBtnShowType.Checked      = false;
                this.tspBtnShowType.Text         = "可视化";
                this.tspBtnShowType.Visible      = false;
                this.toolStripSeparator1.Visible = false;
                break;
            }
            if (style == PreviewStyle.Thumbnail2Visualization)
            {
                if ((this.thumbnailFiles != null) && (this.thumbnailFiles.Count != 0))
                {
                    this.tspBtnShowType.Checked      = true;
                    this.tspBtnShowType.Text         = "缩略图";
                    this.tspBtnShowType.Visible      = (this.visualizationFiles != null) && (this.visualizationFiles.Count != 0);
                    this.toolStripSeparator1.Visible = true;
                }
                else if ((this.visualizationFiles != null) && (this.visualizationFiles.Count != 0))
                {
                    this.tspBtnShowType.Checked      = false;
                    this.tspBtnShowType.Text         = "可视化";
                    this.tspBtnShowType.Visible      = false;
                    this.toolStripSeparator1.Visible = false;
                }
            }
            if (((this.visualizationFiles == null) || (this.visualizationFiles.Count == 0)) && ((this.thumbnailFiles == null) || (this.thumbnailFiles.Count == 0)))
            {
                this.tspBtnShowType.Checked      = true;
                this.tspBtnShowType.Text         = "缩略图";
                this.tspBtnShowType.Visible      = false;
                this.toolStripSeparator1.Visible = false;
            }
            this.SetPageBtnsVisible();
        }
예제 #2
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     base.DialogResult = DialogResult.OK;
     if (this.radVisualization.Checked)
     {
         this.Enum_PreviewStyle = PreviewStyle.Visualization;
     }
     if (this.radThumbnail2Visualization.Checked)
     {
         this.Enum_PreviewStyle = PreviewStyle.Thumbnail2Visualization;
     }
     if (this.radThumbnail.Checked)
     {
         this.Enum_PreviewStyle = PreviewStyle.Thumbnail;
     }
     base.Close();
 }