示例#1
0
        private void FillStyleActions(TreeNode top, Parameters parameter, bool withCustom = false)
        {
            TreeNode folder = top.Nodes.Add(ParameterSupport.GetParameterTypeName(parameter));

            // the first entry selects the palette, but limited for one or two parameters where they share a palette
            if (Mode != Modes.Button)             // buttons on palettes don't switch to other palettes
            {
                switch (parameter)
                {
                case Parameters.LineWidth:
                    break;

                default:
                    AddAction(folder, new PaletteAction(parameter), Strings.Item("Config_SwitchToPalette"), "CursorClick");
                    break;
                }
            }
            foreach (int value in ParameterSupport.GetStandardParameterValues(parameter))
            {
                AddAction(folder, Action.Create(parameter, value), ParameterSupport.GetParameterValueName(parameter, value));
            }
            if (withCustom)
            {
                AddAction(folder, new ParameterAction(parameter, 0, true), Strings.Item("Custom_Style_Value"));
            }
        }
示例#2
0
 private void RoundButton_MouseEnter(object sender, EventArgs e)
 {
     // mostly implemented in base class
     if (m_Parameter != Parameters.None)
     {
         Globals.SetHover(Action.Create(m_Parameter, m_ParameterValue));
     }
 }