private void btnBackgroundInfo_Click(object sender, EventArgs e) { IStyleGalleryItem selectStyleGalleryItem = this.cboBackground.GetSelectStyleGalleryItem(); IBackground item = null; if (selectStyleGalleryItem != null) { item = selectStyleGalleryItem.Item as IBackground; } if (item != null) { frmElementProperty property = new frmElementProperty(); BackgroundSymbolPropertyPage page = new BackgroundSymbolPropertyPage(); 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.cboBackground.Add(selectStyleGalleryItem); this.cboBackground.SelectedIndex = this.cboBackground.Items.Count - 1; } } else { selectStyleGalleryItem = new MyStyleGalleryItem { Name = "<定制>", Item = item }; this.cboBackground.Add(selectStyleGalleryItem); this.cboBackground.SelectedIndex = this.cboBackground.Items.Count - 1; } this.bool_0 = true; } } }
private void btnBackgroundInfo_Click(object sender, EventArgs e) { if (this.ibackground_0 != null) { frmElementProperty property = new frmElementProperty(); BackgroundSymbolPropertyPage page = new BackgroundSymbolPropertyPage(); property.AddPage(page); if (property.EditProperties(this.ibackground_0)) { this.bool_0 = false; this.method_3(); IStyleGalleryItem styleGalleryItemAt = this.cboBorder.GetStyleGalleryItemAt(this.cboBorder.Items.Count - 1); if (styleGalleryItemAt != null) { if (styleGalleryItemAt.Name == "<定制>") { styleGalleryItemAt.Item = this.ibackground_0; } else { styleGalleryItemAt = new MyStyleGalleryItem { Name = "<定制>", Item = this.ibackground_0 }; this.cboBackground.Add(styleGalleryItemAt); this.cboBackground.SelectedIndex = this.cboBackground.Items.Count - 1; } } else { styleGalleryItemAt = new MyStyleGalleryItem { Name = "<定制>", Item = this.ibackground_0 }; this.cboBackground.Add(styleGalleryItemAt); this.cboBackground.SelectedIndex = this.cboBackground.Items.Count - 1; } this.bool_0 = true; this.method_0(); } } }