Beispiel #1
0
        private void InitCtor(CharFormatting cf, string theSon,
                              string displayText, SetCharFormResult inCharFormResult)
        {
            logger.ConditionalDebug("InitCtor");

            InitializeComponent();
            if (!HilightForm.CanOperate())
            {
                // We are not in Word
                btnCouleur.Width = 114;
                btnSurl.Visible  = false;
                btnSurl.Enabled  = false;
            }
            mcd = new MyColorDialog();
            mcd.CustomColors = StaticColorizControls.customColors;
            mcd.AnyColor     = true;
            mcd.FullOpen     = true;
            mcd.Color        = cf.color;
            colorSet         = true; // Si le bouton "valider" est cliqué, la couleur doit être la couleur mise.
            inCF             = cf;
            theColor         = cf.color;
            hilightSet       = cf.changeHilight;
            theHilightColor  = cf.hilightColor;
            bold             = cf.bold;
            italic           = cf.italic;
            underscore       = cf.underline;
            son = theSon;

            bHandler = new FormatButtonHandler2(pbxBold, Properties.Resources.Bold, Properties.Resources.BoldSet,
                                                Properties.Resources.BoldPressed, Properties.Resources.BoldSetMouseOn1, SetBold, UnsetBold, bold);
            iHandler = new FormatButtonHandler2(pbxItalic, Properties.Resources.Italic, Properties.Resources.ItalicSet,
                                                Properties.Resources.ItalicPressed, Properties.Resources.ItalicSetOver, SetItalic, UnsetItalic, italic);
            uHandler = new FormatButtonHandler2(pbxUnderscore, Properties.Resources.Underscore, Properties.Resources.UnderscoreSet,
                                                Properties.Resources.UnderscorePressed, Properties.Resources.UnderscoreSetOver, SetUnderscore, UnsetUnderscore, underscore);

            btnCouleur.BackColor = theColor;
            btnSurl.BackColor    = theHilightColor;
            this.Text            = displayText;
            charFormResult       = inCharFormResult;
        }
Beispiel #2
0
 /// <summary>
 /// Ouvre une fenêtre pour le choix des paramètres de formatage des caractères.
 /// </summary>
 /// <param name="cf">La configuration de départ à afficher.</param>
 /// <param name="theSon">Le nom du son à formater. Ne doit pas obligatoirement être un son.
 /// Est utilisé lors de l'appel de la méthode pour stocker le résultat.</param>
 /// <param name="displayText">Le texte à afficher comme titre de la fenêtre.</param>
 /// <param name="inCharFormResult">La méthode à appeler pour communiquer le nouveau
 /// <see cref="CharFormatting"/>. <paramref name="theSon"/> est passé également lors de cet
 /// appel.</param>
 public CharFormatForm(CharFormatting cf, string theSon,
                       string displayText, SetCharFormResult inCharFormResult)
 {
     logger.ConditionalDebug("CTOR CharFormatForm");
     InitCtor(cf, theSon, displayText, inCharFormResult);
 }
Beispiel #3
0
 /// <summary>
 /// Constructeur où il est connu que <paramref name="theSon"/> est effectivement un son.
 /// Le titre de la fenêtre est alors calculé automatiquement en utilisant les possibilités
 /// de <see cref="ColConfWin"/>.
 /// </summary>
 /// <param name="cf">Le formatage initial.</param>
 /// <param name="theSon">Le son (au sens <see cref="ColConfWin"/> pour lequel le formatage
 /// est édité.</param>
 /// <param name="inCharFormResult">La méthode à appeler pour communiquer le nouveau
 /// <see cref="CharFormatting"/>. A noter que <paramref name="theSon"/> est également
 /// transmis à cette méthode.</param>
 public CharFormatForm(CharFormatting cf, string theSon, SetCharFormResult inCharFormResult)
 {
     logger.ConditionalDebug("CTOR CharFormatForm");
     InitCtor(cf, theSon, FormName(theSon), inCharFormResult);
 }
Beispiel #4
0
 /// <summary>
 /// Crée la fenêtre pour la définition du formatage pour une syllabe. Permet de déterminer
 /// </summary>
 /// <param name="cf"></param>
 /// <param name="theSylButton"></param>
 /// <param name="inCharFormResult"></param>
 public SylFormatForm(CharFormatting cf, string theSylButton, SetCharFormResult inCharFormResult)
     : base(cf, theSylButton, inCharFormResult)
 {
 }