Exemple #1
0
 public frmStringEdit(IEditItem _EditItem, string _EditValue, System.Drawing.Point _Location, int _Width, string editType)
 {
     InitializeComponent();
     m_EditType          = editType;
     this.Size           = new System.Drawing.Size(_Width, FormWidth);
     this.txtValue.Size  = new System.Drawing.Size(this.Width, 21);
     this.Location       = _Location;
     txtValue.LostFocus += new EventHandler(StringEdit_LostFocus);
     m_EditItem          = _EditItem;
     txtValue.Text       = _EditValue;
 }
Exemple #2
0
 private void InitEditor(IEditItem _EditItem, double _EditValue, Point _Location, int _Width, double _MinValue, double _MaxValue)
 {
     InitializeComponent();
     this.Size                 = new Size(_Width, FormWidth);
     this.doubleInput.Size     = new Size(this.Width, 21);
     this.doubleInput.MinValue = _MinValue;
     this.doubleInput.MaxValue = _MaxValue;
     this.Location             = _Location;
     doubleInput.LostFocus    += new EventHandler(DoubleEdit_LostFocus);
     m_EditItem                = _EditItem;
     doubleInput.Value         = _EditValue;
 }
Exemple #3
0
        public frmSymbolEdit(IEditItem _EditItem, ESRI.ArcGIS.Display.ISymbol _EditValue, string editType)
        {
            InitializeComponent();
            m_SymbolObject = Class.SymbolObject.CreateClassSymbol(_EditValue);
            m_EditType     = editType;
            string sInstall = ModuleCommon.ReadRegistry("SOFTWARE\\ESRI\\CoreRuntime");

            if (sInstall == "") //added by chulili 2012-11-13 ƽ̨ÓÉArcGIS9.3»»³ÉArcGIS10£¬ÏàÓ¦µÄ×¢²á±í·¾¶ÒªÐÞ¸Ä
            {
                sInstall = ModuleCommon.ReadRegistry("SOFTWARE\\ESRI\\Engine10.0\\CoreRuntime");
            }
            if (sInstall == "")
            {
                sInstall = ModuleCommon.ReadRegistry("SOFTWARE\\ESRI\\Desktop10.0\\CoreRuntime");
            }   //added by chulili 2012-11-13  end
            System.IO.DirectoryInfo pDic  = new System.IO.DirectoryInfo(sInstall + "\\Styles\\");
            System.IO.FileInfo[]    files = pDic.GetFiles("*.ServerStyle");
            cmbStyleFiles.Items.Clear();
            for (int i = 0; i < files.Length; i++)
            {
                cmbStyleFiles.Items.Add(sInstall + "\\Styles\\" + files[i].ToString());
            }
            int index = cmbStyleFiles.Items.IndexOf(sInstall + "\\Styles\\ESRI.ServerStyle");

            if (index != -1)
            {
                cmbStyleFiles.SelectedIndex = index;
            }
            else if (cmbStyleFiles.Items.Count > 0)
            {
                cmbStyleFiles.SelectedIndex = 0;
            }


            m_EditItem       = _EditItem;
            labelPreview.Tag = _EditValue;
            if (labelPreview.Image != null)
            {
                labelPreview.Image.Dispose();
                labelPreview.Image = null;
            }
            labelPreview.Image = ModuleCommon.Symbol2Picture(_EditValue, ModuleCommon.ImageWidth, ModuleCommon.ImageHeight);

            advGridSymbol.SelectedObject = m_SymbolObject;
        }
Exemple #4
0
 public frmDoubleEdit(IEditItem _EditItem, double _EditValue, Point _Location, int _Width, double _MinValue, double _MaxValue)
 {
     InitEditor(_EditItem, _EditValue, _Location, _Width, _MinValue, _MaxValue);
 }
Exemple #5
0
 public frmDoubleEdit(IEditItem _EditItem, double _EditValue, Point _Location, int _Width, string editType)
 {
     m_EditType = editType;
     InitEditor(_EditItem, _EditValue, _Location, _Width, -1.7976931348623157E+308, 1.7976931348623157E+308);
 }