void IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.This = (NewFeatureClass)target;
                return;

            case 2:
                this.tbName = (TextBox)target;
                return;

            case 3:
                this.cbType = (ComboBox)target;
                return;

            case 4:
                this.lblErrorMessage = (Label)target;
                return;

            case 5:
                ((Button)target).Click += new RoutedEventHandler(this.OnClickNext);
                return;

            case 6:
                ((Button)target).Click += new RoutedEventHandler(this.OnClickCancel);
                return;

            default:
                this._contentLoaded = true;
                return;
            }
        }
        private void OnClickNext(object sender, RoutedEventArgs e)
        {
            this.lblErrorMessage.Content = "";
            if (string.IsNullOrEmpty(this.tbName.Text))
            {
                this.lblErrorMessage.Content = AfaStrings.NameCannotBeBlank;
                return;
            }
            string text = this.tbName.Text;

            if (!string.IsNullOrEmpty(text))
            {
                text = text.Trim();
            }
            if (string.IsNullOrEmpty(text))
            {
                this.lblErrorMessage.Content = AfaStrings.NameCannotBeBlank;
                return;
            }
            text = NewFeatureClass.FixFeatureClassName(text);
            MSCDataset      docDataset      = AfaDocData.ActiveDocData.DocDataset;
            MSCFeatureClass mSCFeatureClass = new MSCFeatureClass(docDataset);

            this.tbName.Text     = text;
            mSCFeatureClass.Name = text;
            mSCFeatureClass.SetGeometryType(this.cbType.SelectedValue.ToString());
            mSCFeatureClass.Query = new ResultBuffer(new TypedValue[]
            {
                new TypedValue(8, "*")
            });
            mSCFeatureClass.Write(AfaDocData.ActiveDocData.Document);
            docDataset.FeatureClasses.Add(mSCFeatureClass.Name, mSCFeatureClass);
            docDataset.FeatureClassViewList.Add(new FCView(mSCFeatureClass));
            base.Close();
            FeatureClassProperties featureClassProperties = new FeatureClassProperties(mSCFeatureClass);

            try
            {
                Application.ShowModalWindow(featureClassProperties);
            }
            catch (Exception)
            {
            }
            AfaDocData.ActiveDocData.SetActiveFeatureClass(mSCFeatureClass);
            ArcGISRibbon.SetActiveFeatureClass(mSCFeatureClass);
        }