示例#1
0
 private void EditPalette()
 {
     try
     {
         Palette palette = SelectedPalette;
         if (palette != null)
         {
             PaletteForm form = new PaletteForm(palette);
             if (form.ShowDialog() == DialogResult.OK)
             {
                 UpdatePalettesListBox();
             }
         }
     }
     catch (Exception ex)
     {
         Log.Exception(ex);
     }
 }
示例#2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            try
            {
                Palette     palette = new Palette();
                PaletteForm form    = new PaletteForm(palette);
                if (form.ShowDialog() == DialogResult.OK)
                {
                    App.Config.palettes.Add(palette);

//          palette.Save();

                    UpdatePalettesListBox();
                }
            }
            catch (Exception ex)
            {
                Log.Exception(ex);
            }
        }