/// <summary> /// Set the colors for this subpalette to a set of default colors. /// </summary> public void SetDefaultSubpaletteColors(DefaultColorSet eDefaultColorSet) { switch (eDefaultColorSet) { case DefaultColorSet.None: break; case DefaultColorSet.BlackAndWhite: DefaultPalette_BlackAndWhite(); break; case DefaultColorSet.Color1: DefaultPalette_Color1(); break; case DefaultColorSet.Color2: DefaultPalette_Color2(); break; case DefaultColorSet.GrayScale: DefaultPalette_GrayScale(); break; default: break; } RecordSnapshot(); }
private void Init(Document doc, Palette mgr, int nSubpaletteID, DefaultColorSet eDefaultColorSet) { m_doc = doc; m_mgr = mgr; m_nSubpaletteID = nSubpaletteID; m_data = new PaletteColorData(k_nColors); m_Brush = new SolidBrush[k_nColors]; // Default color = black (index 1) m_data.currentColor = 1; m_snapshot = new PaletteColorData(k_nColors); SetDefaultSubpaletteColors(eDefaultColorSet); }
public ActionResult Index() { try { //Setting up the DropDown listbox on page load DefaultColorSet setInitialValue = new DefaultColorSet(); //Return to view with value to set initial values in dropdown liast box return(View(setInitialValue)); } catch (Exception ex) { // Exception for error return(Json(new { error = "Error while loading the Band Lists " + ex.Message })); } }
public Subpalette(Document doc, Palette mgr, int nSubpaletteID, DefaultColorSet eDefaultColorSet) { Init(doc, mgr, nSubpaletteID, eDefaultColorSet); }