Beispiel #1
0
        //Note that the custom code goes in this method the rest of the class stays the same.
        //It will trap if BOTH keys are pressed down.
        private static int HookCallback(int nCode, IntPtr wParam, IntPtr lParam)
        {
            if (nCode < 0)
            {
                return((int)CallNextHookEx(_hookID, nCode, wParam, lParam));
            }
            else
            {
                if (nCode == HC_ACTION)
                {
                    Keys keyData = (Keys)wParam;

                    // CTRL + SHIFT + N
                    if ((BindingFunctions.IsKeyDown(Keys.ControlKey) == true) &&
                        (BindingFunctions.IsKeyDown(Keys.ShiftKey) == true) &&
                        (BindingFunctions.IsKeyDown(keyData) == true) && (keyData == Keys.N))
                    {
                        ZMethodClass.add_lf();
                    }

                    // CTRL + SHIFT + K
                    if ((BindingFunctions.IsKeyDown(Keys.ControlKey) == true) &&
                        (BindingFunctions.IsKeyDown(Keys.ShiftKey) == true) &&
                        (BindingFunctions.IsKeyDown(keyData) == true) && (keyData == Keys.K))
                    {
                        ZMethodClass.renumber(Properties.Settings.Default.記に続けて);
                    }

                    // CTRL + SHIFT + J
                    if ((BindingFunctions.IsKeyDown(Keys.ControlKey) == true) &&
                        (BindingFunctions.IsKeyDown(Keys.ShiftKey) == true) &&
                        (BindingFunctions.IsKeyDown(keyData) == true) && (keyData == Keys.J))
                    {
                        ZMethodClass.jump_column(ZExcelAddIn.Globals.Ribbons.Ribbon1.editBox1_8.Text);
                    }
                }
                return((int)CallNextHookEx(_hookID, nCode, wParam, lParam));
            }
        }
Beispiel #2
0
 private void button1_7_Click(object sender, RibbonControlEventArgs e)
 {
     ZMethodClass.renumber(editBox1_7.Text);
 }
Beispiel #3
0
 private void button1_9_Click(object sender, RibbonControlEventArgs e)
 {
     ZMethodClass.jump_column(editBox1_8.Text);
 }
Beispiel #4
0
 private void button2_1_Click(object sender, RibbonControlEventArgs e)
 {
     ZMethodClass.reset_zoom(int.Parse(zoom1_5.Text), cursor1_5.Text);
 }
Beispiel #5
0
 private void button1_6_Click(object sender, RibbonControlEventArgs e)
 {
     ZMethodClass.add_lf();
 }
Beispiel #6
0
 private void button1_5_Click(object sender, RibbonControlEventArgs e)
 {
     ZMethodClass.delete_group();
 }
Beispiel #7
0
 private void button1_4_Click(object sender, RibbonControlEventArgs e)
 {
     ZMethodClass.delete_displaygridlines();
 }
Beispiel #8
0
 private void button1_3_Click(object sender, RibbonControlEventArgs e)
 {
     ZMethodClass.delete_freezepanes();
 }
Beispiel #9
0
 private void button1_2_Click(object sender, RibbonControlEventArgs e)
 {
     ZMethodClass.delete_autofilter();
 }
Beispiel #10
0
 private void button1_1_Click(object sender, RibbonControlEventArgs e)
 {
     ZMethodClass.delete_customviews();
 }