Exemple #1
0
        private void btnBorderInfo_Click(object sender, EventArgs e)
        {
            IStyleGalleryItem selectStyleGalleryItem = this.cboBorder.GetSelectStyleGalleryItem();
            IBorder           item = null;

            if (selectStyleGalleryItem != null)
            {
                item = selectStyleGalleryItem.Item as IBorder;
            }
            if (item != null)
            {
                frmElementProperty       property = new frmElementProperty();
                BorderSymbolPropertyPage page     = new BorderSymbolPropertyPage();
                property.AddPage(page);
                if (property.EditProperties(item))
                {
                    this.bool_0            = false;
                    selectStyleGalleryItem = this.cboBorder.GetStyleGalleryItemAt(this.cboBorder.Items.Count - 1);
                    if (selectStyleGalleryItem != null)
                    {
                        if (selectStyleGalleryItem.Name == "<定制>")
                        {
                            selectStyleGalleryItem.Item = item;
                        }
                        else
                        {
                            selectStyleGalleryItem = new MyStyleGalleryItem
                            {
                                Name = "<定制>",
                                Item = item
                            };
                            this.cboBorder.Add(selectStyleGalleryItem);
                            this.cboBorder.SelectedIndex = this.cboBorder.Items.Count - 1;
                        }
                    }
                    else
                    {
                        selectStyleGalleryItem = new MyStyleGalleryItem
                        {
                            Name = "<定制>",
                            Item = item
                        };
                        this.cboBorder.Add(selectStyleGalleryItem);
                        this.cboBorder.SelectedIndex = this.cboBorder.Items.Count - 1;
                    }
                    this.bool_0 = true;
                }
            }
        }
Exemple #2
0
 private void btnBorderInfo_Click(object sender, EventArgs e)
 {
     if (this.iborder_0 != null)
     {
         frmElementProperty       property = new frmElementProperty();
         BorderSymbolPropertyPage page     = new BorderSymbolPropertyPage();
         property.AddPage(page);
         if (property.EditProperties(this.iborder_0))
         {
             this.bool_0 = false;
             this.method_2();
             IStyleGalleryItem styleGalleryItemAt =
                 this.cboBorder.GetStyleGalleryItemAt(this.cboBorder.Items.Count - 1);
             if (styleGalleryItemAt != null)
             {
                 if (styleGalleryItemAt.Name == "<定制>")
                 {
                     styleGalleryItemAt.Item = this.iborder_0;
                 }
                 else
                 {
                     styleGalleryItemAt = new MyStyleGalleryItem
                     {
                         Name = "<定制>",
                         Item = this.iborder_0
                     };
                     this.cboBorder.Add(styleGalleryItemAt);
                     this.cboBorder.SelectedIndex = this.cboBorder.Items.Count - 1;
                 }
             }
             else
             {
                 styleGalleryItemAt = new MyStyleGalleryItem
                 {
                     Name = "<定制>",
                     Item = this.iborder_0
                 };
                 this.cboBorder.Add(styleGalleryItemAt);
                 this.cboBorder.SelectedIndex = this.cboBorder.Items.Count - 1;
             }
             this.bool_0 = true;
             this.method_0();
         }
     }
 }