static void ConnectTypeBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ComboBox connectTypeBox   = sender as ComboBox;
            ComboBox buildPyramidsBox = GetBuildPyramidsBox(connectTypeBox);

            if (e.AddedItems.Count == 1 && (e.AddedItems[0] is EnumWrapper) && (e.AddedItems[0] as EnumWrapper).Value is RasM.EConnectType)
            {
                RasM.EConnectType connectType = (RasM.EConnectType)(e.AddedItems[0] as EnumWrapper).Value;
                switch (connectType)
                {
                case Rekod.DataAccess.SourceRastr.Model.EConnectType.Standard:
                {
                    buildPyramidsBox.SelectedItem = Rekod.Properties.Resources.LocNo;
                    buildPyramidsBox.IsEnabled    = false;
                    break;
                }

                case Rekod.DataAccess.SourceRastr.Model.EConnectType.Gdal:
                {
                    buildPyramidsBox.IsEnabled = true;
                    //buildPyramidsBox.SelectedItem = Rekod.Properties.Resources.LocYes;
                    break;
                }
                }
            }
        }
Esempio n. 2
0
        public static RasM.EConnectType GetConnectType(String filePath)
        {
            if (String.IsNullOrEmpty(filePath))
            {
                throw new Exception("File path is empty");
            }
            RasM.EConnectType connectType = RasM.EConnectType.Standard;
            String            extension   = Path.GetExtension(filePath);

            if (_gdalExtensions.Contains(extension.ToLower()))
            {
                connectType = RasM.EConnectType.Gdal;
            }
            return(connectType);
        }