private void btnshadowInfo_Click(object sender, EventArgs e) { IStyleGalleryItem selectStyleGalleryItem = this.cboBackground.GetSelectStyleGalleryItem(); IShadow item = null; if (selectStyleGalleryItem != null) { item = selectStyleGalleryItem.Item as IShadow; } if (item != null) { frmElementProperty property = new frmElementProperty(); ShadowSymbolPropertyPage page = new ShadowSymbolPropertyPage(); property.AddPage(page); if (property.EditProperties(item)) { this.bool_0 = false; selectStyleGalleryItem = this.cboShadow.GetStyleGalleryItemAt(this.cboShadow.Items.Count - 1); if (selectStyleGalleryItem != null) { if (selectStyleGalleryItem.Name == "<定制>") { selectStyleGalleryItem.Item = item; } else { selectStyleGalleryItem = new MyStyleGalleryItem { Name = "<定制>", Item = item }; this.cboShadow.Add(selectStyleGalleryItem); this.cboShadow.SelectedIndex = this.cboShadow.Items.Count - 1; } } else { selectStyleGalleryItem = new MyStyleGalleryItem { Name = "<定制>", Item = item }; this.cboShadow.Add(selectStyleGalleryItem); this.cboShadow.SelectedIndex = this.cboShadow.Items.Count - 1; } this.bool_0 = true; } } }
private void btnshadowInfo_Click(object sender, EventArgs e) { if (this.ishadow_0 != null) { frmElementProperty property = new frmElementProperty(); ShadowSymbolPropertyPage page = new ShadowSymbolPropertyPage(); property.AddPage(page); if (property.EditProperties(this.ishadow_0)) { this.bool_0 = false; this.method_4(); IStyleGalleryItem styleGalleryItemAt = this.cboShadow.GetStyleGalleryItemAt(this.cboShadow.Items.Count - 1); if (styleGalleryItemAt != null) { if (styleGalleryItemAt.Name == "<定制>") { styleGalleryItemAt.Item = this.ishadow_0; } else { styleGalleryItemAt = new MyStyleGalleryItem { Name = "<定制>", Item = this.ishadow_0 }; this.cboShadow.Add(styleGalleryItemAt); this.cboShadow.SelectedIndex = this.cboShadow.Items.Count - 1; } } else { styleGalleryItemAt = new MyStyleGalleryItem { Name = "<定制>", Item = this.ishadow_0 }; this.cboShadow.Add(styleGalleryItemAt); this.cboShadow.SelectedIndex = this.cboShadow.Items.Count - 1; } this.bool_0 = true; this.method_0(); } } }