Пример #1
0
            public void UpdateLocation(int xx, int yy)
            {
                x = xx;
                y = yy;

                updateLoc(x, y);

                var mas = ma.ToString();

                if (mas.EndsWith("DOWN"))
                {
                    //Console.WriteLine("1");
                    var n = Parent.GetLinkedWithOffset(this, 1);
                    if (n != null && n.Type == Type)
                    {
                        //Console.WriteLine("2");
                        var nM   = (KeyframeM)n;
                        var nmas = nM.ma.ToString();
                        if (mas.Substring(0, mas.Length - 4).Equals(nmas.Replace("UP", "")))
                        {
                            nM.UpdateLocation(xx, yy);
                        }
                    }
                }
            }
Пример #2
0
    public static string Convert(MouseAction ma)
    {
        string a = ma.ToString();
        string r = a.StartsWith("WM_L") ? "Left" : a.StartsWith("WM_R") ? "Right" : a.StartsWith("WM_MB") ? "Middle" : "Move";

        return(r.StartsWith("Mo")? r : r + ", ");
    }
        private void UpdateDisplay()
        {
            var modifiers = Modifiers == ModifierKeys.None ? "" : Modifiers.ToString();
            var key       = Key == Key.None ? "" : KeyboardInteropHelper.GetDisplayString(Key) ?? Key.ToString();
            var mouse     = MouseAction == ExtendedMouseAction.None ? "" : MouseAction.ToString();

            string display;

            if (recordingKeyCombination)
            {
                if (!string.IsNullOrEmpty(key) && !string.IsNullOrEmpty(modifiers))
                {
                    display = modifiers + " + " + key;
                }
                else
                {
                    display = modifiers + key; //Don't add a '+' as one of them is empty.
                }
            }
            else
            {
                if (!string.IsNullOrEmpty(mouse) && !string.IsNullOrEmpty(modifiers))
                {
                    display = modifiers + " + " + mouse;
                }
                else
                {
                    display = modifiers + mouse; //Don't add a '+' as one of them is empty.
                }
            }
            RecordedInput.Content = display;
        }
Пример #4
0
    public static string GetType(MouseAction ma)
    {
        string a = ma.ToString();

        return(a.EndsWith("N") ? " down" : !a.EndsWith("E")? " up" : "");
    }