年度变更建库软件5.0版本
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

97 lines
2.7 KiB

6 months ago
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace KGIS.Plugin.LayerProperty.View
{
public partial class FormLabelScaleRangeSet : Form
{
private double maxScale;
private double minScale;
public double MaxScale
{
get
{
return this.maxScale;
}
set
{
this.maxScale = value;
}
}
public double MinScale
{
get
{
return this.minScale;
}
set
{
this.minScale = value;
}
}
public FormLabelScaleRangeSet()
{
InitializeComponent();
}
public void InitForm(double MaxScale, double MinScale)
{
try
{
this.cmbMinScale.Init();
this.cmbMaxScale.Init();
if (MaxScale + MinScale == 0.0)
{
this.rdgLabelScale.SelectedIndex = 0;
}
else
{
this.rdgLabelScale.SelectedIndex = 1;
}
this.cmbMinScale.ScaleValue = MinScale;
this.cmbMaxScale.ScaleValue = MaxScale;
this.minScale = MinScale;
this.maxScale = MaxScale;
}
catch (Exception ex)
{
//RdbUtil.AddException(ex);
}
}
private void rdgLabelScale_SelectedIndexChanged(object sender, System.EventArgs e)
{
this.cmbMaxScale.Enabled = Convert.ToBoolean(this.rdgLabelScale.SelectedIndex);
this.cmbMinScale.Enabled = Convert.ToBoolean(this.rdgLabelScale.SelectedIndex);
if (!Convert.ToBoolean(this.rdgLabelScale.SelectedIndex))
{
this.minScale = 0.0;
this.maxScale = 0.0;
}
}
private void cmbMinScale_ScaleValueChanged(double scale)
{
this.minScale = this.cmbMinScale.ScaleValue;
}
private void cmbMaxScale_ScaleValueChanged(double scale)
{
this.maxScale = this.cmbMaxScale.ScaleValue;
}
private void btnOK_Click(object sender, System.EventArgs e)
{
base.DialogResult = DialogResult.OK;
base.Close();
}
private void btnCancel_Click(object sender, System.EventArgs e)
{
base.DialogResult = DialogResult.Cancel;
base.Close();
}
}
}