Exemple #1
0
        /// <summary>
        /// Call this function to select a quick accent - copying it to the clipboard and notifying the user.
        /// </summary>
        /// <param name="accent">The accent.</param>
        /// <param name="shifted">if set to <c>true</c> set the shifted accent.</param>
        static void SelectAccent(Accent accent, bool shifted)
        {
            //  Get the accent to copy.
            var accentToCopy = shifted ? accent.ShiftAccentValue : accent.AccentValue;

            //  Copy the accent.
            Clipboard.SetText(accentToCopy);

            //  Are we showing a tip-balloon?
            if (ApplicationContext.Instance.Settings.ShowBalloonWhenAccentSelected)
            {
                trayIcon.ShowBalloonTip(300, accentToCopy + " Copied", "The text " + accentToCopy + " has been copied to your clipboard", ToolTipIcon.Info);
            }
        }
        /// <summary>
        /// Handles the Load event of the FormEditAccent control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void FormEditAccent_Load(object sender, EventArgs e)
        {
            switch (editMode)
            {
                case EditMode.NewAccent:
                    Text = "New Accent";
                    break;
                case EditMode.EditAccent:
                    Text = "Edit Accent";
                    break;
                default:
                    throw new ArgumentOutOfRangeException();
            }

            //  Do we have an accent?
            if (Accent != null)
            {
                textBoxDisplayName.Text = Accent.DisplayName;
                textBoxShiftedDisplayName.Text = Accent.ShiftDisplayName;
                textBoxAccentValue.Text = Accent.AccentValue;
                textBoxShiftedAccent.Text = Accent.ShiftAccentValue;
                textBoxAltKey.Text = Accent.AltCode;
                textBoxShiftedAltKey.Text = Accent.ShiftAltCode;
                textBoxTags.Text = Accent.Tags;
            }
            else
            {
                Accent = new Accent();
            }
        }
Exemple #3
0
        /// <summary>
        /// Call this function to select a quick accent - copying it to the clipboard and notifying the user.
        /// </summary>
        /// <param name="accent">The accent.</param>
        /// <param name="shifted">if set to <c>true</c> set the shifted accent.</param>
        static void SelectAccent(Accent accent, bool shifted)
        {
            //  Get the accent to copy.
            var accentToCopy = shifted ? accent.ShiftAccentValue : accent.AccentValue;

            //  Copy the accent.
            Clipboard.SetText(accentToCopy);

            //  Are we showing a tip-balloon?
            if (ApplicationContext.Instance.Settings.ShowBalloonWhenAccentSelected)
            {
                trayIcon.ShowBalloonTip(300, accentToCopy + " Copied", "The text " + accentToCopy + " has been copied to your clipboard", ToolTipIcon.Info);
            }
        }