Ejemplo n.º 1
0
        /// <summary>
        /// Brings up a popup to add new characters
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void mAddUnicodeCharsButton_Click(object sender, EventArgs e)
        {
            AddCharactersForm form = new AddCharactersForm();

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                // Compile new list of complete characters
                List <char> chars = form.Characters;
                chars = new List <char>(mGlyphs.OfType <char>().Union(chars).Distinct());

                // Extract previous list of images
                List <FontBuilder.ImageGlyph> images = new List <FontBuilder.ImageGlyph>(mGlyphs.OfType <FontBuilder.ImageGlyph>());

                // New list, add characters and sort
                mGlyphs = new ArrayList(chars);
                mGlyphs.Sort();

                // Add images at the end
                mGlyphs.AddRange(images);

                PopulateDataGrid();
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Brings up a popup to add new characters
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void mAddUnicodeCharsButton_Click(object sender, EventArgs e)
        {
            AddCharactersForm form = new AddCharactersForm();
            if (form.ShowDialog(this) == DialogResult.OK)
            {
                // Compile new list of complete characters
                List<char> chars = form.Characters;
                chars = new List<char>(mGlyphs.OfType<char>().Union(chars).Distinct());

                // Extract previous list of images
                List<FontBuilder.ImageGlyph> images = new List<FontBuilder.ImageGlyph>(mGlyphs.OfType<FontBuilder.ImageGlyph>());

                // New list, add characters and sort
                mGlyphs = new ArrayList(chars);
                mGlyphs.Sort();

                // Add images at the end
                mGlyphs.AddRange(images);

                PopulateDataGrid();
            }
        }