Beispiel #1
0
        public void Init()
        {
            IMxDocument        mxDocument      = AppSingleton.Instance().MxDocument;
            IMap               map             = mxDocument.FocusMap;
            int                layerCount      = map.LayerCount;
            List <LayerObject> LayerObjectList = new List <LayerObject>();

            for (int i = 0; i < layerCount; i++)
            {
                ILayer        layer  = map.get_Layer(i);
                IFeatureLayer fLayer = layer as IFeatureLayer;
                if (fLayer != null)
                {
                    IFeatureClass fclass = fLayer.FeatureClass;

                    LayerObject lObject = new LayerObject();
                    lObject.layer = layer;
                    lObject.Name  = layer.Name;
                    LayerObjectList.Add(lObject);
                }
            }
            UpdateComboboxWithLayers(cmbProjectArea, LayerObjectList);
            UpdateComboboxWithLayers(cmbVeriAylik, LayerObjectList);
            UpdateComboboxWithLayers(cmbVeriYillik, LayerObjectList);
        }
Beispiel #2
0
        private void AddToDatagrid(LayerObject item)
        {
            List <string> fieldList         = new List <string>();
            IFeatureLayer fLayer            = item.layer as IFeatureLayer;
            List <string> normalizasyonTipi = new List <string>();

            normalizasyonTipi.Add("x/Maks");
            normalizasyonTipi.Add("1-(x/Maks)");
            normalizasyonTipi.Add("(x-Min)/(Maks-Min)");
            normalizasyonTipi.Add("(Maks-x)/(Maks-Min)");
            DataGridViewTextBoxCell tbKatmanAdi = new DataGridViewTextBoxCell();

            tbKatmanAdi.Value = fLayer.Name;

            DataGridViewComboBoxCell mormalCombo = new DataGridViewComboBoxCell();

            mormalCombo.DataSource = normalizasyonTipi;
            // metodTipiCombo.Value = metodTipi[0];

            DataGridViewRow dataGridRow = new DataGridViewRow();

            dataGridRow.Cells.Add(tbKatmanAdi);
            dataGridRow.Cells.Add(mormalCombo);
            dataGridView1.Rows.Add(dataGridRow);
        }
Beispiel #3
0
        public void Init()
        {
            ArcMap.Application.CurrentTool = null;
            IMxDocument        mxDocument       = ArcMap.Document;
            IMap               map              = mxDocument.FocusMap;
            int                layerCount       = map.LayerCount;
            List <LayerObject> LayerObjectList  = new List <LayerObject>();
            List <LayerObject> LayerObjectList2 = new List <LayerObject>();

            for (int i = 0; i < layerCount; i++)
            {
                ILayer       layer  = map.get_Layer(i);
                IRasterLayer rLayer = layer as IRasterLayer;
                if (rLayer != null)
                {
                    LayerObject lObject = new LayerObject();
                    lObject.layer = layer;
                    lObject.Name  = layer.Name;
                    LayerObjectList.Add(lObject);
                }

                IFeatureLayer fLayer = layer as IFeatureLayer;
                if (fLayer != null)
                {
                    LayerObject lObject = new LayerObject();
                    lObject.layer = layer;
                    lObject.Name  = layer.Name;
                    LayerObjectList2.Add(lObject);
                }
            }
            UpdateComboboxWithLayers(cmbEkolojikSitAlani, LayerObjectList);
            UpdateComboboxWithLayers(cmbIklimSiniri, LayerObjectList);
            UpdateComboboxWithLayers(cmbProjectArea, LayerObjectList2);
        }
Beispiel #4
0
        private void cmbUygulamaKatmani_SelectedIndexChanged(object sender, EventArgs e)
        {
            LayerObject layerObject = (LayerObject)cmbUygulamaKatmani.SelectedItem;

            if (layerObject != null)
            {
                List <string> fieldList = new List <string>();
                IFeatureLayer fLayer    = layerObject.layer as IFeatureLayer;
                for (int j = 0; j < fLayer.FeatureClass.Fields.FieldCount; j++)
                {
                    IField field = fLayer.FeatureClass.Fields.get_Field(j);
                    fieldList.Add(field.Name);
                }

                FillCmboboboxWithFieldList(cmbYillikSuEksigi, fieldList);
                FillCmboboboxWithFieldList(cmbYillikSuFazlasi, fieldList);
                FillCmboboboxWithFieldList(cmbETP, fieldList);
                FillCmboboboxWithFieldList(cmbPETP, fieldList);
                FillCmboboboxWithFieldList(cmbPETPAgustos, fieldList);
                FillCmboboboxWithFieldList(cmbPETPHaziran, fieldList);
                FillCmboboboxWithFieldList(cmbPETPTemmuz, fieldList);
                FillCmboboboxWithFieldList(cmbSuEksigiKis, fieldList);
                FillCmboboboxWithFieldList(cmbSuEksigiYaz, fieldList);
                FillCmboboboxWithFieldList(cmbSuFazlasiKis, fieldList);
                FillCmboboboxWithFieldList(cmbSuFazlasiYaz, fieldList);
            }
        }
Beispiel #5
0
        public void InitForm(IMxDocument mxDocument)
        {
            IMap map        = mxDocument.FocusMap;
            int  layerCount = map.LayerCount;
            List <LayerObject> LayerObjectList = new List <LayerObject>();

            for (int i = 0; i < layerCount; i++)
            {
                ILayer        layer  = map.get_Layer(i);
                IFeatureLayer fLayer = layer as IFeatureLayer;
                if (fLayer != null)
                {
                    IFeatureClass fClass = fLayer.FeatureClass;

                    LayerObject lObject = new LayerObject();
                    lObject.layer = layer;
                    lObject.Name  = layer.Name;
                    listBoxTumKatmanlar.Items.Add(lObject);
                }
                else if (layer is IRasterLayer)
                {
                    LayerObject lObject = new LayerObject();
                    lObject.layer = layer;
                    lObject.Name  = layer.Name;
                    listBoxTumKatmanlar.Items.Add(lObject);
                }
            }
            updateComboBox();
        }
Beispiel #6
0
        public void Init()
        {
            ArcMap.Application.CurrentTool = null;
            IMxDocument        mxDocument      = ArcMap.Document;
            IMap               map             = mxDocument.FocusMap;
            int                layerCount      = map.LayerCount;
            List <LayerObject> LayerObjectList = new List <LayerObject>();

            for (int i = 0; i < layerCount; i++)
            {
                IFeatureLayer layer = map.get_Layer(i) as IFeatureLayer;
                if (layer != null)
                {
                    if (layer.FeatureClass.ShapeType != esriGeometryType.esriGeometryPolygon)
                    {
                        LayerObject lObject = new LayerObject();
                        lObject.layer = layer;
                        lObject.Name  = layer.Name;
                        LayerObjectList.Add(lObject);
                    }
                }
            }

            UpdateKatmanList(LayerObjectList);
        }
Beispiel #7
0
        private void AddToDatagrid(LayerObject item)
        {
            List <string> fieldList = new List <string>();
            IFeatureLayer fLayer    = item.layer as IFeatureLayer;

            List <string> islemTipi = new List <string>();



            if (fLayer != null)
            {
                try
                {
                    DataGridViewComboBoxCell fieldListCombo = new DataGridViewComboBoxCell();
                    fieldListCombo.DataSource = fieldList;

                    DataGridViewTextBoxCell tbKatmanAdi    = new DataGridViewTextBoxCell();
                    DataGridViewTextBoxCell tbTamponDegeri = new DataGridViewTextBoxCell();

                    tbKatmanAdi.Value = fLayer.Name;
                    DataGridViewRow dataGridRow = new DataGridViewRow();
                    dataGridRow.Cells.Add(tbKatmanAdi);
                    //dataGridRow.Cells.Add(fieldListCombo);
                    dataGridRow.Cells.Add(tbTamponDegeri);
                    dataGridView1.Rows.Add(dataGridRow);
                }
                catch (Exception ex)
                {
                }
            }
        }
Beispiel #8
0
        private void CmbSinirKatmani_SelectedIndexChanged(object sender, EventArgs e)
        {
            LayerObject LayerObject = CmbSinirKatmani.SelectedItem as LayerObject;

            if (LayerObject != null)
            {
                AppSingleton.Instance().SinirLayer = LayerObject.layer;
            }
            else
            {
                AppSingleton.Instance().SinirLayer = null;
            }
        }
Beispiel #9
0
        private void cmbInputLayer_SelectedIndexChanged(object sender, EventArgs e)
        {
            LayerObject layerObject = (LayerObject)cmbInputLayer.SelectedItem;

            if (layerObject != null)
            {
                List <string> fieldList = new List <string>();
                IFeatureLayer fLayer    = layerObject.layer as IFeatureLayer;
                for (int j = 0; j < fLayer.FeatureClass.Fields.FieldCount; j++)
                {
                    IField field = fLayer.FeatureClass.Fields.get_Field(j);
                    fieldList.Add(field.Name);
                }
                //Sıcaklık Comboları
            }
        }
Beispiel #10
0
        private void cmbVeriAylik_SelectedIndexChanged(object sender, EventArgs e)
        {
            LayerObject layerObject = (LayerObject)cmbVeriAylik.SelectedItem;

            if (layerObject != null)
            {
                List <string> fieldList = new List <string>();
                IFeatureLayer fLayer    = layerObject.layer as IFeatureLayer;
                for (int j = 0; j < fLayer.FeatureClass.Fields.FieldCount; j++)
                {
                    IField field = fLayer.FeatureClass.Fields.get_Field(j);
                    fieldList.Add(field.Name);
                }
                //Sıcaklık Comboları
                FillCmboboboxWithFieldList(cmbOrtalamaSicaklikAylik, fieldList);
                FillCmboboboxWithFieldList(cmbToplamYagisAylik, fieldList);
            }
        }
        private void AddToDatagrid(LayerObject item)
        {
            List <string> hedefTipi = new List <string>();

            hedefTipi.Add("Eğim");
            hedefTipi.Add("Nüfus");
            List <string> metodTipi = new List <string>();

            metodTipi.Add("-");
            metodTipi.Add("IDW");
            metodTipi.Add("Kriging");
            List <string> fieldList = new List <string>();
            IFeatureLayer fLayer    = item.layer as IFeatureLayer;

            for (int j = 0; j < fLayer.FeatureClass.Fields.FieldCount; j++)
            {
                IField field = fLayer.FeatureClass.Fields.get_Field(j);
                fieldList.Add(field.Name);
            }
            DataGridViewTextBoxCell tbKatmanAdi = new DataGridViewTextBoxCell();

            tbKatmanAdi.Value = fLayer.Name;
            DataGridViewComboBoxCell fieldListCombo = new DataGridViewComboBoxCell();

            fieldListCombo.DataSource = fieldList;
            DataGridViewComboBoxCell hedefTipiCombo = new DataGridViewComboBoxCell();

            hedefTipiCombo.DataSource = hedefTipi;
            hedefTipiCombo.Value      = hedefTipi[0];
            DataGridViewComboBoxCell metodTipiCombo = new DataGridViewComboBoxCell();

            metodTipiCombo.DataSource = metodTipi;
            // metodTipiCombo.Value = metodTipi[0];

            DataGridViewRow dataGridRow = new DataGridViewRow();

            dataGridRow.Cells.Add(tbKatmanAdi);
            dataGridRow.Cells.Add(fieldListCombo);
            dataGridRow.Cells.Add(hedefTipiCombo);

            dataGridRow.Cells.Add(metodTipiCombo);
            dataGridView1.Rows.Add(dataGridRow);
        }
        private void cmbInputLayer_SelectedIndexChanged(object sender, EventArgs e)
        {
            LayerObject layerObject = (LayerObject)cmbInputLayer.SelectedItem;

            if (layerObject != null)
            {
                List <string> fieldList = new List <string>();
                IFeatureLayer fLayer    = layerObject.layer as IFeatureLayer;
                for (int j = 0; j < fLayer.FeatureClass.Fields.FieldCount; j++)
                {
                    IField field = fLayer.FeatureClass.Fields.get_Field(j);
                    fieldList.Add(field.Name);
                }
                //Sıcaklık Comboları
                FillCmboboboxWithFieldList(cmbYillikOrtSic, fieldList);
                FillCmboboboxWithFieldList(cmbAylikSicOcak, fieldList);
                FillCmboboboxWithFieldList(cmbAylikSicSubat, fieldList);
                FillCmboboboxWithFieldList(cmbAylikSicMart, fieldList);
                FillCmboboboxWithFieldList(cmbAylikSicNisan, fieldList);
                FillCmboboboxWithFieldList(cmbAylikSicMayis, fieldList);
                FillCmboboboxWithFieldList(cmbAylikSicHaziran, fieldList);
                FillCmboboboxWithFieldList(cmbAylikSicTemmuz, fieldList);
                FillCmboboboxWithFieldList(cmbAylikSicAgustos, fieldList);
                FillCmboboboxWithFieldList(cmbAylikSicEylul, fieldList);
                FillCmboboboxWithFieldList(cmbAylikSicEkim, fieldList);
                FillCmboboboxWithFieldList(cmbAylikSicKasim, fieldList);
                FillCmboboboxWithFieldList(cmbAylikSicAralik, fieldList);
                //Yağış Comboları
                FillCmboboboxWithFieldList(cmbYillikTopYag, fieldList);
                FillCmboboboxWithFieldList(cmbAylikYagOcak, fieldList);
                FillCmboboboxWithFieldList(cmbAylikYagSubat, fieldList);
                FillCmboboboxWithFieldList(cmbAylikYagMart, fieldList);
                FillCmboboboxWithFieldList(cmbAylikYagNisan, fieldList);
                FillCmboboboxWithFieldList(cmbAylikYagMayis, fieldList);
                FillCmboboboxWithFieldList(cmbAylikYagHaziran, fieldList);
                FillCmboboboxWithFieldList(cmbAylikYagTemmuz, fieldList);
                FillCmboboboxWithFieldList(cmbAylikYagAgustos, fieldList);
                FillCmboboboxWithFieldList(cmbAylikYagEylul, fieldList);
                FillCmboboboxWithFieldList(cmbAylikYagEkim, fieldList);
                FillCmboboboxWithFieldList(cmbAylikYagKasim, fieldList);
                FillCmboboboxWithFieldList(cmbAylikYagAralik, fieldList);
            }
        }
Beispiel #13
0
        private void cmbUygulamaKatmani_SelectedIndexChanged(object sender, EventArgs e)
        {
            LayerObject layerObject = (LayerObject)cmbUygulamaKatmani.SelectedItem;

            if (layerObject != null)
            {
                List <string> fieldList = new List <string>();
                IFeatureLayer fLayer    = layerObject.layer as IFeatureLayer;
                for (int j = 0; j < fLayer.FeatureClass.Fields.FieldCount; j++)
                {
                    IField field = fLayer.FeatureClass.Fields.get_Field(j);
                    fieldList.Add(field.Name);
                }

                FillCmboboboxWithFieldList(cmbNn, fieldList);
                FillCmboboboxWithFieldList(cmbS, fieldList);
                FillCmboboboxWithFieldList(cmbY, fieldList);
                FillCmboboboxWithFieldList(cmbGs, fieldList);
            }
        }
Beispiel #14
0
        private void cmbVeriSeti_SelectedIndexChanged(object sender, EventArgs e)
        {
            LayerObject layerObject = (LayerObject)cmbVeriSeti.SelectedItem;

            if (layerObject != null)
            {
                List <string> fieldList = new List <string>();
                IFeatureLayer fLayer    = layerObject.layer as IFeatureLayer;
                for (int j = 0; j < fLayer.FeatureClass.Fields.FieldCount; j++)
                {
                    IField field = fLayer.FeatureClass.Fields.get_Field(j);
                    fieldList.Add(field.Name);
                }

                FillCmboboboxWithFieldList(cmbOrtSic, fieldList);
                FillCmboboboxWithFieldList(cmbOrtYag, fieldList);
            }
            else
            {
                cmbOrtSic.DataSource = null;
                cmbOrtYag.DataSource = null;
            }
        }