System.Windows.Forms.Control.Hide()

Here are the examples of the csharp api System.Windows.Forms.Control.Hide() taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1008 Examples 7

19 Source : AreaForm.cs
with MIT License
from 1CM69

private void mouse_Up(object sender, MouseEventArgs e)
    {
      this.LeftButtonDown = false;
      this.activated = true;
      this.Hide();
            }

19 Source : Form1.cs
with MIT License
from 200Tigersbloxed

private void button4_Click(object sender, EventArgs e)
        {
            if (allownext)
            {
                Form2 f2 = new Form2();
                f2.bsl = bsl;
                f2.Show();
                this.Hide();
            }
        }

19 Source : Form2.cs
with MIT License
from 200Tigersbloxed

private void closeForm1_Click(object sender, EventArgs e)
        {
            Form1 f1 = new Form1();
            f1.Show();
            this.Hide();
        }

19 Source : LUTPanelOptions.cs
with MIT License
from a1xd

public override void Hide()
        {
            PointsTextBox.Hide();
            ActiveValuesTextBox.Hide();
            ShouldShow = false;
        }

19 Source : ActiveValueLabel.cs
with MIT License
from a1xd

public void Hide()
        {
            ValueLabel.Hide();
        }

19 Source : ChartXY.cs
with MIT License
from a1xd

public void SetCombined()
        {
            if (!Combined)
            {
                ChartY.Hide();
                Combined = true;
                ChartX.replacedles[0].Text = replacedle;
            }
        }

19 Source : ChartXY.cs
with MIT License
from a1xd

public void Hide()
        {

            if (Visible)
            {
                ChartX.Hide();
                ChartY.Hide();
                Visible = false;
            }
        }

19 Source : Field.cs
with MIT License
from a1xd

public void Hide()
        {
            Box.Hide();
            Box.Enabled = false;
        }

19 Source : DirectionalityOptions.cs
with MIT License
from a1xd

public void Hide()
        {
            if (!IsHidden)
            {
                DirectionalityX.Hide();
                DirectionalityY.Hide();
                DirectionalityActiveValuereplacedle.Hide();
                LpNorm.Hide();
                Domain.Hide();
                Range.Hide();
                WholeCheckBox.Hide();
                ByComponentCheckBox.Hide();
                DirectionalityLabel.Text = Constants.DirectionalityreplacedleClosed;
                DrawHidden();
                IsHidden = true;
            }
        }

19 Source : FieldXY.cs
with MIT License
from a1xd

private void Startup()
        {
            if (AllowCombined)
            {
                SetCombined();
            }
            else
            {
                SetSeparate();
                LockCheckBox.Hide();
                LockCheckBox.Enabled = false;
            }
        }

19 Source : AccelOptionSet.cs
with MIT License
from a1xd

public void Hide()
        {
            Optionsreplacedle.Hide();
            ActiveValuesreplacedle.Hide();
            Options.Hide();
            Hidden = true;
        }

19 Source : AccelOptionSet.cs
with MIT License
from a1xd

public void Hidereplacedle()
        {
            Optionsreplacedle.Hide();

            Options.Top = TopAnchor;
        }

19 Source : AccelTypeOptions.cs
with MIT License
from a1xd

public override void Hide()
        {
            AccelDropdown.Hide();
            AccelTypeActiveValue.Hide();

            GainSwitch.Hide();
            DecayRate.Hide();
            GrowthRate.Hide();
            Smooth.Hide();
            ClreplacedicCap.Hide();
            PowerCap.Hide();
            OutputOffset.Hide();
            InputOffset.Hide();
            InputJump.Hide();
            OutputJump.Hide();
            Limit.Hide();
            PowerClreplacedic.Hide();
            Exponent.Hide();
            Midpoint.Hide();
            LutText.Hide();
            LutPanel.Hide();
            LutApply.Hide();
        }

19 Source : ApplyOptions.cs
with MIT License
from a1xd

public void EnableWholeApplication()
        {
            IsWhole = true;
            ByComponentVectorXYLock.Hide();
            ShowWholeSet();
        }

19 Source : CheckBoxOption.cs
with MIT License
from a1xd

public override void Hide()
        {
            CheckBox.Hide();
            ShouldShow = false;
            CheckBox.Enabled = false;
            ActiveValueLabel.Hide();
        }

19 Source : ComboBoxOptionsBase.cs
with MIT License
from a1xd

public override void Hide()
        {
            Label.Hide();
            OptionsDropdown.Hide();
            ActiveValueLabel.Hide();
            ShouldShow = false;
        }

19 Source : LockableOption.cs
with MIT License
from a1xd

public override void Hide()
        {
            Option.Hide();
            LockBox.Hide();
        }

19 Source : Option.cs
with MIT License
from a1xd

public override void Hide()
        {
            Field.Hide();
            Label.Hide();
            ActiveValueLabel.Hide();
        }

19 Source : OptionXY.cs
with MIT License
from a1xd

public override void Hide()
        {
            Fields.Hide();
            Fields.LockCheckBox.Hide();
            Label.Hide();
            ActiveValueLabels.Hide();
        }

19 Source : SwitchOption.cs
with MIT License
from a1xd

public override void Hide()
        {
            ShouldShow = false;

            Label.Hide();
            First.Hide();
            Second.Hide();
            ActiveValueLabel.Hide();
        }

19 Source : TextOption.cs
with MIT License
from a1xd

public override void Hide()
        {
            Label.Hide();
            ShouldShow = false;
        }

19 Source : AccelGUIFactory.cs
with MIT License
from a1xd

public static AccelGUI Construct(
            RawAcceleration form,
            Chart accelerationChart,
            Chart accelerationChartY,
            Chart velocityChart,
            Chart velocityChartY,
            Chart gainChart,
            Chart gainChartY,
            ComboBox accelTypeDropX,
            ComboBox accelTypeDropY,
            ComboBox lutApplyDropdownX,
            ComboBox lutApplyDropdownY,
            ComboBox capTypeDropdownXClreplacedic,
            ComboBox capTypeDropdownYClreplacedic,
            ComboBox capTypeDropdownXPower,
            ComboBox capTypeDropdownYPower,
            Button writeButton,
            ButtonBase toggleButton,
            ToolStripMenuItem showVelocityGainToolStripMenuItem,
            ToolStripMenuItem showLastMouseMoveMenuItem,
            ToolStripMenuItem streamingModeToolStripMenuItem,
            ToolStripMenuItem autoWriteMenuItem,
            ToolStripMenuItem deviceMenuItem,
            ToolStripMenuItem scaleMenuItem,
            ToolStripTextBox dpiTextBox,
            ToolStripTextBox pollRateTextBox,
            Panel directionalityPanel,
            TextBox sensitivityBoxX,
            TextBox sensitivityBoxY,
            TextBox rotationBox,
            TextBox inCapBoxXClreplacedic,
            TextBox inCapBoxYClreplacedic,
            TextBox outCapBoxXClreplacedic,
            TextBox outCapBoxYClreplacedic,
            TextBox inCapBoxXPower,
            TextBox inCapBoxYPower,
            TextBox outCapBoxXPower,
            TextBox outCapBoxYPower,
            TextBox inputJumpBoxX,
            TextBox inputJumpBoxY,
            TextBox outputJumpBoxX,
            TextBox outputJumpBoxY,
            TextBox inputOffsetBoxX,
            TextBox inputOffsetBoxY,
            TextBox outputOffsetBoxX,
            TextBox outputOffsetBoxY,
            TextBox accelerationBoxX,
            TextBox accelerationBoxY,
            TextBox decayRateBoxX,
            TextBox decayRateBoxY,
            TextBox growthRateBoxX,
            TextBox growthRateBoxY,
            TextBox smoothBoxX,
            TextBox smoothBoxY,
            TextBox scaleBoxX,
            TextBox scaleBoxY,
            TextBox limitBoxX,
            TextBox limitBoxY,
            TextBox powerClreplacedicBoxX,
            TextBox powerClreplacedicBoxY,
            TextBox expBoxX,
            TextBox expBoxY,
            TextBox midpointBoxX,
            TextBox midpointBoxY,
            TextBox domainBoxX,
            TextBox domainBoxY,
            TextBox rangeBoxX,
            TextBox rangeBoxY,
            TextBox lpNormBox,
            CheckBox sensXYLock,
            CheckBox byComponentXYLock,
            CheckBox fakeBox,
            CheckBox wholeCheckBox,
            CheckBox byComponentCheckBox,
            CheckBox gainSwitchX,
            CheckBox gainSwitchY,
            RichTextBox xLutActiveValuesBox,
            RichTextBox yLutActiveValuesBox,
            RichTextBox xLutPointsBox,
            RichTextBox yLutPointsBox,
            Label lockXYLabel,
            Label sensitivityLabel,
            Label yxRatioLabel,
            Label rotationLabel,
            Label inCapLabelXClreplacedic,
            Label inCapLabelYClreplacedic,
            Label outCapLabelXClreplacedic,
            Label outCapLabelYClreplacedic,
            Label capTypeLabelXClreplacedic,
            Label capTypeLabelYClreplacedic,
            Label inCapLabelXPower,
            Label inCapLabelYPower,
            Label outCapLabelXPower,
            Label outCapLabelYPower,
            Label capTypeLabelXPower,
            Label capTypeLabelYPower,
            Label inputJumpLabelX,
            Label inputJumpLabelY,
            Label outputJumpLabelX,
            Label outputJumpLabelY,
            Label inputOffsetLabelX,
            Label inputOffsetLabelY,
            Label outputOffsetLabelX,
            Label outputOffsetLabelY,
            Label constantOneLabelX,
            Label constantOneLabelY,
            Label decayRateLabelX,
            Label decayRateLabelY,
            Label growthRateLabelX,
            Label growthRateLabelY,
            Label smoothLabelX,
            Label smoothLabelY,
            Label scaleLabelX,
            Label scaleLabelY,
            Label limitLabelX,
            Label limitLabelY,
            Label powerClreplacedicLabelX,
            Label powerClreplacedicLabelY,
            Label expLabelX,
            Label expLabelY,
            Label lutTextLabelX,
            Label lutTextLabelY,
            Label constantThreeLabelX,
            Label constantThreeLabelY,
            Label activeValuereplacedleX,
            Label activeValuereplacedleY,
            Label sensitivityActiveLabel,
            Label yxRatioActiveLabel,
            Label rotationActiveLabel,
            Label inCapActiveXLabelClreplacedic,
            Label inCapActiveYLabelClreplacedic,
            Label outCapActiveXLabelClreplacedic,
            Label outCapActiveYLabelClreplacedic,
            Label capTypeActiveXLabelClreplacedic,
            Label capTypeActiveYLabelClreplacedic,
            Label inCapActiveXLabelPower,
            Label inCapActiveYLabelPower,
            Label outCapActiveXLabelPower,
            Label outCapActiveYLabelPower,
            Label capTypeActiveXLabelPower,
            Label capTypeActiveYLabelPower,
            Label inputJumpActiveLabelX,
            Label inputJumpActiveLabelY,
            Label outputJumpActiveLabelX,
            Label outputJumpActiveLabelY,
            Label inputOffsetActiveLabelX,
            Label inputOffsetActiveLabelY,
            Label outputOffsetActiveLabelX,
            Label outputOffsetActiveLabelY,
            Label accelerationActiveLabelX,
            Label accelerationActiveLabelY,
            Label decayRateActiveLabelX,
            Label decayRateActiveLabelY,
            Label growthRateActiveLabelX,
            Label growthRateActiveLabelY,
            Label smoothActiveLabelX,
            Label smoothActiveLabelY,
            Label scaleActiveLabelX,
            Label scaleActiveLabelY,
            Label limitActiveLabelX,
            Label limitActiveLabelY,
            Label powerClreplacedicActiveLabelX,
            Label powerClreplacedicActiveLabelY,
            Label expActiveLabelX,
            Label expActiveLabelY,
            Label midpointActiveLabelX,
            Label midpointActiveLabelY,
            Label accelTypeActiveLabelX,
            Label accelTypeActiveLabelY,
            Label gainSwitchActiveLabelX,
            Label gainSwitchActiveLabelY,
            Label optionSetXreplacedle,
            Label optionSetYreplacedle,
            Label mouseLabel,
            Label directionalityLabel,
            Label directionalityX,
            Label directionalityY,
            Label direcionalityActiveValuereplacedle,
            Label lpNormLabel,
            Label lpNormActiveLabel,
            Label domainLabel,
            Label domainActiveValueX,
            Label domainActiveValueY,
            Label rangeLabel,
            Label rangeActiveValueX,
            Label rangeActiveValueY,
            Label lutApplyLabelX,
            Label lutApplyLabelY,
            Label lutApplyActiveValueX,
            Label lutApplyActiveValueY)
        {
            fakeBox.Checked = false;
            fakeBox.Hide();

            var accelCalculator = new AccelCalculator(
                new Field(dpiTextBox.TextBox, form, Constants.DefaultDPI, 1),
                new Field(pollRateTextBox.TextBox, form, Constants.DefaultPollRate, 1));

            var accelCharts = new AccelCharts(
                                form,
                                new ChartXY(accelerationChart, accelerationChartY, Constants.SensitivityChartreplacedle),
                                new ChartXY(velocityChart, velocityChartY, Constants.VelocityChartreplacedle),
                                new ChartXY(gainChart, gainChartY, Constants.GainChartreplacedle),
                                showVelocityGainToolStripMenuItem,
                                showLastMouseMoveMenuItem,
                                streamingModeToolStripMenuItem,
                                writeButton,
                                accelCalculator);

            var sensitivity = new Option(
                sensitivityBoxX,
                form,
                1,
                sensitivityLabel,
                0,
                new ActiveValueLabel(sensitivityActiveLabel, activeValuereplacedleX),
                "Sens Multiplier");

            var yxRatio = new LockableOption(
                new Option(
                    sensitivityBoxY,
                    form,
                    1,
                    yxRatioLabel,
                    0,
                    new ActiveValueLabel(yxRatioActiveLabel, activeValuereplacedleX),
                    "Y/X Ratio"),
                sensXYLock,
                1);

            var rotation = new Option(
                rotationBox,
                form,
                0,
                rotationLabel,
                0,
                new ActiveValueLabel(rotationActiveLabel, activeValuereplacedleX),
                "Rotation");

            var optionSetYLeft = activeValuereplacedleX.Left + activeValuereplacedleX.Width;

            var directionalityLeft = directionalityPanel.Left;

            var inputJumpX = new Option(
                inputJumpBoxX,
                form,
                0,
                inputJumpLabelX,
                0,
                new ActiveValueLabel(inputJumpActiveLabelX, activeValuereplacedleX),
                "Jump");

            var inputJumpY = new Option(
                inputJumpBoxY,
                form,
                0,
                inputJumpLabelY,
                optionSetYLeft,
                new ActiveValueLabel(inputJumpActiveLabelY, activeValuereplacedleY),
                "Jump");

            var outputJumpX = new Option(
                outputJumpBoxX,
                form,
                0,
                outputJumpLabelX,
                0,
                new ActiveValueLabel(outputJumpActiveLabelX, activeValuereplacedleX),
                "Jump");

            var outputJumpY = new Option(
                outputJumpBoxY,
                form,
                0,
                outputJumpLabelY,
                optionSetYLeft,
                new ActiveValueLabel(outputJumpActiveLabelY, activeValuereplacedleY),
                "Jump");

            var inputOffsetX = new Option(
                inputOffsetBoxX,
                form,
                0,
                inputOffsetLabelX,
                0,
                new ActiveValueLabel(inputOffsetActiveLabelX, activeValuereplacedleX),
                "Offset");

            var inputOffsetY = new Option(
                inputOffsetBoxY,
                form,
                0,
                inputOffsetLabelY,
                optionSetYLeft,
                new ActiveValueLabel(inputOffsetActiveLabelY, activeValuereplacedleY),
                "Offset");

            var outputOffsetX = new Option(
                outputOffsetBoxX,
                form,
                0,
                outputOffsetLabelX,
                0,
                new ActiveValueLabel(outputOffsetActiveLabelX, activeValuereplacedleX),
                "Offset");

            var outputOffsetY = new Option(
                outputOffsetBoxY,
                form,
                0,
                outputOffsetLabelY,
                optionSetYLeft,
                new ActiveValueLabel(outputOffsetActiveLabelY, activeValuereplacedleY),
                "Offset");

            var accelerationX = new Option(
                new Field(accelerationBoxX, form, 0),
                constantOneLabelX,
                new ActiveValueLabel(accelerationActiveLabelX, activeValuereplacedleX),
                0);

            var accelerationY = new Option(
                new Field(accelerationBoxY, form, 0),
                constantOneLabelY,
                new ActiveValueLabel(accelerationActiveLabelY, activeValuereplacedleY),
                optionSetYLeft);

            var decayRateX = new Option(
                new Field(decayRateBoxX, form, 0),
                decayRateLabelX,
                new ActiveValueLabel(decayRateActiveLabelX, activeValuereplacedleX),
                0);

            var decayRateY = new Option(
                new Field(decayRateBoxY, form, 0),
                decayRateLabelY,
                new ActiveValueLabel(decayRateActiveLabelY, activeValuereplacedleY),
                optionSetYLeft);

            var growthRateX = new Option(
                new Field(growthRateBoxX, form, 0),
                growthRateLabelX,
                new ActiveValueLabel(growthRateActiveLabelX, activeValuereplacedleX),
                0);

            var growthRateY = new Option(
                new Field(growthRateBoxY, form, 0),
                growthRateLabelY,
                new ActiveValueLabel(growthRateActiveLabelY, activeValuereplacedleY),
                optionSetYLeft);

            var smoothX = new Option(
                new Field(smoothBoxX, form, 0),
                smoothLabelX,
                new ActiveValueLabel(smoothActiveLabelX, activeValuereplacedleX),
                0);

            var smoothY = new Option(
                new Field(smoothBoxY, form, 0),
                smoothLabelY,
                new ActiveValueLabel(smoothActiveLabelY, activeValuereplacedleY),
                optionSetYLeft);

            var scaleX = new Option(
                new Field(scaleBoxX, form, 0),
                scaleLabelX,
                new ActiveValueLabel(scaleActiveLabelX, activeValuereplacedleX),
                0);

            var scaleY = new Option(
                new Field(scaleBoxY, form, 0),
                scaleLabelY,
                new ActiveValueLabel(scaleActiveLabelY, activeValuereplacedleY),
                optionSetYLeft);

            var limitX = new Option(
                new Field(limitBoxX, form, 2),
                limitLabelX,
                new ActiveValueLabel(limitActiveLabelX, activeValuereplacedleX),
                0);

            var limitY = new Option(
                new Field(limitBoxY, form, 2),
                limitLabelY,
                new ActiveValueLabel(limitActiveLabelY, activeValuereplacedleY),
                optionSetYLeft);

            var powerClreplacedicX = new Option(
                new Field(powerClreplacedicBoxX, form, 2),
                powerClreplacedicLabelX,
                new ActiveValueLabel(powerClreplacedicActiveLabelX, activeValuereplacedleX),
                0);

            var powerClreplacedicY = new Option(
                new Field(powerClreplacedicBoxY, form, 2),
                powerClreplacedicLabelY,
                new ActiveValueLabel(powerClreplacedicActiveLabelY, activeValuereplacedleY),
                optionSetYLeft);

            var exponentX = new Option(
                new Field(expBoxX, form, 2),
                expLabelX,
                new ActiveValueLabel(expActiveLabelX, activeValuereplacedleX),
                0);

            var exponentY = new Option(
                new Field(expBoxY, form, 2),
                expLabelY,
                new ActiveValueLabel(expActiveLabelY, activeValuereplacedleY),
                optionSetYLeft);

            var midpointX = new Option(
                new Field(midpointBoxX, form, 0),
                constantThreeLabelX,
                new ActiveValueLabel(midpointActiveLabelX, activeValuereplacedleX),
                0);

            var midpointY = new Option(
                new Field(midpointBoxY, form, 0),
                constantThreeLabelY,
                new ActiveValueLabel(midpointActiveLabelY, activeValuereplacedleY),
                optionSetYLeft);

            var inCapXClreplacedic = new Option(
                inCapBoxXClreplacedic,
                form,
                0,
                inCapLabelXClreplacedic,
                0,
                new ActiveValueLabel(inCapActiveXLabelClreplacedic, activeValuereplacedleX),
                "Cap: Input");

            var inCapYClreplacedic = new Option(
                inCapBoxYClreplacedic,
                form,
                0,
                inCapLabelYClreplacedic,
                optionSetYLeft,
                new ActiveValueLabel(inCapActiveYLabelClreplacedic, activeValuereplacedleY),
                "Cap");

            var outCapXClreplacedic = new Option(
                outCapBoxXClreplacedic,
                form,
                0,
                outCapLabelXClreplacedic,
                0,
                new ActiveValueLabel(outCapActiveXLabelClreplacedic, activeValuereplacedleX),
                "Cap: Input");

            var outCapYClreplacedic = new Option(
                outCapBoxYClreplacedic,
                form,
                0,
                outCapLabelYClreplacedic,
                optionSetYLeft,
                new ActiveValueLabel(outCapActiveYLabelClreplacedic, activeValuereplacedleY),
                "Cap");

            var capTypeXClreplacedic = new CapTypeOptions(
                capTypeLabelXClreplacedic,
                capTypeDropdownXClreplacedic,
                new ActiveValueLabel(capTypeActiveXLabelClreplacedic, activeValuereplacedleX),
                0);

            var capTypeYClreplacedic = new CapTypeOptions(
                capTypeLabelYClreplacedic,
                capTypeDropdownYClreplacedic,
                new ActiveValueLabel(capTypeActiveYLabelClreplacedic, activeValuereplacedleY),
                optionSetYLeft);

            var clreplacedicCapOptionsX = new CapOptions(
                capTypeXClreplacedic,
                inCapXClreplacedic,
                outCapXClreplacedic,
                accelerationX);

            var clreplacedicCapOptionsY = new CapOptions(
                capTypeYClreplacedic,
                inCapYClreplacedic,
                outCapYClreplacedic,
                accelerationY);

            var inCapXPower = new Option(
                inCapBoxXPower,
                form,
                0,
                inCapLabelXPower,
                0,
                new ActiveValueLabel(inCapActiveXLabelPower, activeValuereplacedleX),
                "Cap: Input");

            var inCapYPower = new Option(
                inCapBoxYPower,
                form,
                0,
                inCapLabelYPower,
                optionSetYLeft,
                new ActiveValueLabel(inCapActiveYLabelPower, activeValuereplacedleY),
                "Cap");

            var outCapXPower = new Option(
                outCapBoxXPower,
                form,
                0,
                outCapLabelXPower,
                0,
                new ActiveValueLabel(outCapActiveXLabelPower, activeValuereplacedleX),
                "Cap: Input");

            var outCapYPower = new Option(
                outCapBoxYPower,
                form,
                0,
                outCapLabelYPower,
                optionSetYLeft,
                new ActiveValueLabel(outCapActiveYLabelPower, activeValuereplacedleY),
                "Cap");

            var capTypeXPower = new CapTypeOptions(
                capTypeLabelXPower,
                capTypeDropdownXPower,
                new ActiveValueLabel(capTypeActiveXLabelPower, activeValuereplacedleX),
                0);

            var capTypeYPower = new CapTypeOptions(
                capTypeLabelYPower,
                capTypeDropdownYPower,
                new ActiveValueLabel(capTypeActiveYLabelPower, activeValuereplacedleY),
                optionSetYLeft);

            var lpNorm = new Option(
                new Field(lpNormBox, form, 2),
                lpNormLabel,
                new ActiveValueLabel(lpNormActiveLabel, direcionalityActiveValuereplacedle),
                directionalityLeft);

            var domain = new OptionXY(
                domainBoxX,
                domainBoxY,
                fakeBox,
                form,
                1,
                domainLabel,
                new ActiveValueLabelXY(
                    new ActiveValueLabel(domainActiveValueX, direcionalityActiveValuereplacedle),
                    new ActiveValueLabel(domainActiveValueY, direcionalityActiveValuereplacedle)),
                false);

            var range = new OptionXY(
                rangeBoxX,
                rangeBoxY,
                fakeBox,
                form,
                1,
                rangeLabel,
                new ActiveValueLabelXY(
                    new ActiveValueLabel(rangeActiveValueX, direcionalityActiveValuereplacedle),
                    new ActiveValueLabel(rangeActiveValueY, direcionalityActiveValuereplacedle)),
                false);


            var lutTextX = new TextOption(lutTextLabelX);
            var lutTextY = new TextOption(lutTextLabelY);
            var gainSwitchOptionX = new CheckBoxOption(
                                            gainSwitchX,
                                            new ActiveValueLabel(gainSwitchActiveLabelX, activeValuereplacedleX));
            var gainSwitchOptionY = new CheckBoxOption(
                                            gainSwitchY,
                                            new ActiveValueLabel(gainSwitchActiveLabelY, activeValuereplacedleY));

            var powerCapOptionsX = new CapOptions(
                capTypeXPower,
                inCapXPower,
                outCapXPower,
                scaleX,
                outputOffsetX,
                gainSwitchOptionX);

            var powerCapOptionsY = new CapOptions(
                capTypeYPower,
                inCapYPower,
                outCapYPower,
                scaleY,
                outputOffsetY,
                gainSwitchOptionY);

            var accelerationOptionsX = new AccelTypeOptions(
                accelTypeDropX,
                gainSwitchOptionX,
                clreplacedicCapOptionsX,
                powerCapOptionsX,
                outputJumpX,
                outputOffsetX,
                decayRateX,
                growthRateX,
                smoothX,
                inputJumpX,
                inputOffsetX,
                limitX,
                powerClreplacedicX,
                exponentX,
                midpointX,
                lutTextX,
                new LUTPanelOptions(xLutPointsBox, xLutActiveValuesBox),
                new LutApplyOptions(
                    lutApplyLabelX,
                    lutApplyDropdownX,
                    new ActiveValueLabel(lutApplyActiveValueX, activeValuereplacedleX)),
                writeButton,
                new ActiveValueLabel(accelTypeActiveLabelX, activeValuereplacedleX));

            var accelerationOptionsY = new AccelTypeOptions(
                accelTypeDropY,
                gainSwitchOptionY,
                clreplacedicCapOptionsY,
                powerCapOptionsY,
                outputJumpY,
                outputOffsetY,
                decayRateY,
                growthRateY,
                smoothY,
                inputJumpY,
                inputOffsetY,
                limitY,
                powerClreplacedicY,
                exponentY,
                midpointY,
                lutTextY,
                new LUTPanelOptions(yLutPointsBox, yLutActiveValuesBox),
                new LutApplyOptions(
                    lutApplyLabelY,
                    lutApplyDropdownY,
                    new ActiveValueLabel(lutApplyActiveValueY, activeValuereplacedleY)),
                writeButton,
                new ActiveValueLabel(accelTypeActiveLabelY, activeValuereplacedleY));

            var optionsSetX = new AccelOptionSet(
                optionSetXreplacedle,
                activeValuereplacedleX,
                rotationBox.Top + rotationBox.Height + Constants.OptionVerticalSeperation,
                accelerationOptionsX);

            var optionsSetY = new AccelOptionSet(
                optionSetYreplacedle,
                activeValuereplacedleY,
                rotationBox.Top + rotationBox.Height + Constants.OptionVerticalSeperation,
                accelerationOptionsY);

            var directionalOptions = new DirectionalityOptions(
                directionalityPanel,
                directionalityLabel,
                directionalityX,
                directionalityY,
                direcionalityActiveValuereplacedle,
                lpNorm,
                domain,
                range,
                wholeCheckBox,
                byComponentCheckBox,
                Constants.DirectionalityVerticalOffset);

            var applyOptions = new ApplyOptions(
                byComponentXYLock,
                optionsSetX,
                optionsSetY,
                directionalOptions,
                sensitivity,
                yxRatio,
                rotation,
                lockXYLabel,
                accelCharts);

            var settings = new SettingsManager(
                accelCalculator.DPI,
                accelCalculator.PollRate,
                autoWriteMenuItem,
                showLastMouseMoveMenuItem,
                showVelocityGainToolStripMenuItem,
                streamingModeToolStripMenuItem);

            var mouseWatcher = new MouseWatcher(form, mouseLabel, accelCharts, settings);

            return new AccelGUI(
                form,
                accelCalculator,
                accelCharts,
                settings,
                applyOptions,
                writeButton,
                toggleButton,
                mouseWatcher,
                scaleMenuItem,
                deviceMenuItem);
        }

19 Source : RemoveInvalidFeature.cs
with Microsoft Public License
from achimismaili

private void btnScopeSelected_Click(object sender, EventArgs e)
        {
            string msgString = string.Empty;
            int featurefound = 0;

            this.Hide();
            try
            {
                if (radioScopeWeb.Checked)
                {
                    scopeWindowScope = SPFeatureScope.Web;
                }
                else
                {
                    if (radioScopeSite.Checked)
                    {
                        scopeWindowScope = SPFeatureScope.Site;
                    }
                    else
                    {
                        if (radioScopeWebApp.Checked)
                        {
                            scopeWindowScope = SPFeatureScope.WebApplication;
                        }
                        else
                        {
                            if (radioScopeFarm.Checked)
                            {
                                scopeWindowScope = SPFeatureScope.Farm;
                            }
                            else
                                msgString = "Error in scope selection! Task canceled";
                            MessageBox.Show(msgString);
                            ((FrmMain)parentWindow).logTxt(DateTime.Now.ToString(FrmMain.DATETIMEFORMAT) + " - " + msgString + Environment.NewLine);

                            return;
                        }
                    }
                }
                featurefound = parentWindow.removeFeaturesWithinFarm(featureID, scopeWindowScope);
                if (featurefound == 0)
                {
                    msgString = "Feature not found in Scope:'" + scopeWindowScope.ToString() + "'. Do you want to try something else?";
                    if (MessageBox.Show(msgString, "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
                    {
                        this.Show();
                    }
                    else
                    {

                    }
                }
                else
                {
                    msgString = "Success! Feature was found and deactivated " + featurefound + " times in Scope:'" + scopeWindowScope.ToString() + "'!";
                    MessageBox.Show(msgString);
                    parentWindow.logTxt(DateTime.Now.ToString(FrmMain.DATETIMEFORMAT) + " - " + msgString + Environment.NewLine);

                    SPFarm.Local.FeatureDefinitions.Remove(featureID, true);
                    parentWindow.logTxt(DateTime.Now.ToString(FrmMain.DATETIMEFORMAT) + " - FeatureDefinition was uninstalled." + Environment.NewLine);

                }
            }
            catch
            {
            }
            finally
            {
                        this.Close();
                        this.Dispose();
            }

        }

19 Source : RemoveInvalidFeature.cs
with Microsoft Public License
from achimismaili

private void btnScopeUnknown_Click(object sender, EventArgs e)
        {
            string msgString = "All scopes will be checked for this feature. This might take a while. Continue?";
            if (MessageBox.Show(msgString, "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
            {
                this.Hide();
                try
                {
                    // search all webs
                    if (!tryToRemove(featureID, SPFeatureScope.Web))
                    {
                        // search all Sites     
                        if (!tryToRemove(featureID, SPFeatureScope.Site))
                        {


                            // search all Web Applications     
                            if (!tryToRemove(featureID, SPFeatureScope.WebApplication))
                            {
                                // search in Farm Scope     
                                tryToRemove(featureID, SPFeatureScope.Farm);
                            }
                        }
                    }

                    SPFarm.Local.FeatureDefinitions.Remove(featureID, true);
                    parentWindow.logTxt(DateTime.Now.ToString(FrmMain.DATETIMEFORMAT) + " - FeatureDefinition was uninstalled." + Environment.NewLine);
                    this.Close();
                    this.Dispose();
                }

                catch
                {
                    parentWindow.logTxt(DateTime.Now.ToString(FrmMain.DATETIMEFORMAT) + " - An error occured iterating through the features ..." + Environment.NewLine);

                }
                finally
                {
                    this.Close();
                    this.Dispose();
                }
            }
        }

19 Source : RemoveInvalidFeature.cs
with Microsoft Public License
from achimismaili

private void btnScopeSelected_Click(object sender, EventArgs e)
        {
            string msgString = string.Empty;
            int featurefound = 0;

            this.Hide();
            try
            {
                if (radioScopeWeb.Checked)
                {
                    scopeWindowScope = SPFeatureScope.Web;
                }
                else
                {
                    if (radioScopeSite.Checked)
                    {
                        scopeWindowScope = SPFeatureScope.Site;
                    }
                    else
                    {
                        if (radioScopeWebApp.Checked)
                        {
                            scopeWindowScope = SPFeatureScope.WebApplication;
                        }
                        else
                        {
                            if (radioScopeFarm.Checked)
                            {
                                scopeWindowScope = SPFeatureScope.Farm;
                            }
                            else
                                msgString = "Error in scope selection! Task canceled";
                            MessageBox.Show(msgString);
                            ((FrmMain)parentWindow).logTxt(DateTime.Now.ToString(FrmMain.DATETIMEFORMAT) + " - " + msgString + Environment.NewLine);

                            return;
                        }
                    }
                }
                featurefound = parentWindow.RemoveFeaturesWithinFarm(featureID, scopeWindowScope);
                if (featurefound == 0)
                {
                    msgString = "Feature not found in Scope:'" + scopeWindowScope.ToString() + "'. Do you want to try something else?";
                    if (MessageBox.Show(msgString, "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
                    {
                        this.Show();
                    }
                    else
                    {

                    }
                }
                else
                {
                    msgString = "Success! Feature was found and deactivated " + featurefound + " times in Scope:'" + scopeWindowScope.ToString() + "'!";
                    MessageBox.Show(msgString);
                    parentWindow.logTxt(DateTime.Now.ToString(FrmMain.DATETIMEFORMAT) + " - " + msgString + Environment.NewLine);

                    SPFarm.Local.FeatureDefinitions.Remove(featureID, true);
                    parentWindow.logTxt(DateTime.Now.ToString(FrmMain.DATETIMEFORMAT) + " - FeatureDefinition was uninstalled." + Environment.NewLine);

                }
            }
            catch
            {
            }
            finally
            {
                        this.Close();
                        this.Dispose();
            }

        }

19 Source : RemoveInvalidFeature.cs
with Microsoft Public License
from achimismaili

private void btnScopeSelected_Click(object sender, EventArgs e)
        {
            string msgString = string.Empty;
            int featurefound = 0;

            this.Hide();
            try
            {
                if (radioScopeWeb.Checked)
                {
                    scopeWindowScope = SPFeatureScope.Web;
                }
                else
                {
                    if (radioScopeSite.Checked)
                    {
                        scopeWindowScope = SPFeatureScope.Site;
                    }
                    else
                    {
                        if (radioScopeWebApp.Checked)
                        {
                            scopeWindowScope = SPFeatureScope.WebApplication;
                        }
                        else
                        {
                            if (radioScopeFarm.Checked)
                            {
                                scopeWindowScope = SPFeatureScope.Farm;
                            }
                            else
                                msgString = "Error in scope selection! Task canceled";
                            MessageBox.Show(msgString);
                            Log.Information(msgString);

                            return;
                        }
                    }
                }
                featurefound = parentWindow.RemoveFeaturesWithinFarm(featureID, scopeWindowScope);
                if (featurefound == 0)
                {
                    msgString = "Feature not found in Scope:'" + scopeWindowScope.ToString() + "'. Do you want to try something else?";
                    if (MessageBox.Show(msgString, "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
                    {
                        this.Show();
                    }
                }
                else
                {
                    msgString = "Success! Feature was found and deactivated " + featurefound + " times in Scope:'" + scopeWindowScope.ToString() + "'!";
                    MessageBox.Show(msgString);
                    Log.Information(msgString );

                    SPFarm.Local.FeatureDefinitions.Remove(featureID, true);
                    Log.Information("FeatureDefinition was uninstalled.");

                }
            }
            catch
            {
            }
            finally
            {
                        this.Close();
                        this.Dispose();
            }

        }

19 Source : RemoveInvalidFeature.cs
with Microsoft Public License
from achimismaili

private void btnScopeUnknown_Click(object sender, EventArgs e)
        {
            string msgString = "All scopes will be checked for this feature. This might take a while. Continue?";
            if (MessageBox.Show(msgString, "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
            {
                this.Hide();
                try
                {
                    // search all webs
                    if (!tryToRemove(featureID, SPFeatureScope.Web))
                    {
                        // search all Sites     
                        if (!tryToRemove(featureID, SPFeatureScope.Site))
                        {


                            // search all Web Applications     
                            if (!tryToRemove(featureID, SPFeatureScope.WebApplication))
                            {
                                // search in Farm Scope     
                                tryToRemove(featureID, SPFeatureScope.Farm);
                            }
                        }
                    }

                    SPFarm.Local.FeatureDefinitions.Remove(featureID, true);
                    Log.Information("FeatureDefinition was uninstalled.");
                    this.Close();
                    this.Dispose();
                }

                catch (Exception ex)
                {
                    Log.Error("An error occured iterating through the features ..." , ex);
                }
                finally
                {
                    this.Close();
                    this.Dispose();
                }
            }
        }

19 Source : NavigationTool.cs
with MIT License
from ahm3tcelik

public static void Open(Form currentForm, Form newForm)
        {     
            currentForm.Hide();
            newForm.ShowDialog();
            currentForm.Close();
        }

19 Source : Dashboard.cs
with GNU General Public License v3.0
from AHosseinRnj

private void MiniBtn_Click(object sender, EventArgs e)
        {
            Hide();
            NotifyIcon.Visible = true;
            NotifyIcon.ContextMenuStrip = CMenu;
            NotifyIcon.ShowBalloonTip(1000);
        }

19 Source : Control.cs
with Mozilla Public License 2.0
from ahyahy

public void Hide()
        {
            M_Control.Hide();
        }

19 Source : DataGridComboBoxColumnStyle.cs
with Mozilla Public License 2.0
from ahyahy

private void ColumnComboBox_Leave(object sender, System.EventArgs e)
        {
            if (_isEditing)
            {
                try
                {
                    SetColumnValueAtRow(_source, _rowNum, ColumnComboBox.Text);
                    _isEditing = false;
                    Invalidate();
                }
                catch { }
            }
            ColumnComboBox.Hide();
            this.DataGridTableStyle.DataGrid.Scroll -= DataGrid_Scroll;
        }

19 Source : DataGridComboBoxColumnStyle.cs
with Mozilla Public License 2.0
from ahyahy

private void DataGrid_Scroll(object sender, System.EventArgs e)
        {
            if (ColumnComboBox.Visible)
            {
                ColumnComboBox.Hide();
            }
        }

19 Source : PriceExternalList.cs
with GNU Affero General Public License v3.0
from alexander-pick

protected override void OnFormClosing(FormClosingEventArgs e)
    {
      base.OnFormClosing(e);
      if (e.CloseReason == CloseReason.UserClosing)
      {
        e.Cancel = true;
        Hide();
      }
    }

19 Source : MainForm.cs
with MIT License
from AlexanderPro

protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            var settingsFileName = Path.Combine(replacedemblyUtils.replacedemblyDirectory, "SmartSystemMenu.xml");
            var languageFileName = Path.Combine(replacedemblyUtils.replacedemblyDirectory, "Language.xml");
            if (File.Exists(settingsFileName) && File.Exists(languageFileName))
            {
                _settings = SmartSystemMenuSettings.Read(settingsFileName, languageFileName);
            }
#if WIN32
            if (Environment.Is64BitOperatingSystem)
            {
                string resourceName = "SmartSystemMenu.SmartSystemMenu64.exe";
                string fileName = "SmartSystemMenu64.exe";
                string directoryName = Path.GetDirectoryName(replacedemblyUtils.replacedemblyLocation);
                string filePath = Path.Combine(directoryName, fileName);
                try
                {
                    if (!File.Exists(filePath))
                    {
                        replacedemblyUtils.ExtractFileFromreplacedembly(resourceName, filePath);
                    }
                    _64BitProcess = Process.Start(filePath);
                }
                catch
                {
                    string message = string.Format("Failed to load {0} process!", fileName);
                    MessageBox.Show(message, replacedemblyUtils.replacedemblyreplacedle, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    Close();
                    return;
                }
            }

            if (_settings.ShowSystemTrayIcon)
            {
                _systemTrayMenu = new SystemTrayMenu(_settings.LanguageSettings);
                _systemTrayMenu.MenuItemAutoStartClick += MenuItemAutoStartClick;
                _systemTrayMenu.MenuItemSettingsClick += MenuItemSettingsClick;
                _systemTrayMenu.MenuItemAboutClick += MenuItemAboutClick;
                _systemTrayMenu.MenuItemExitClick += MenuItemExitClick;
                _systemTrayMenu.Create();
                _systemTrayMenu.CheckMenuItemAutoStart(AutoStarter.IsAutoStartByRegisterEnabled(replacedemblyUtils.replacedemblyProductName, replacedemblyUtils.replacedemblyLocation));
            }

            var moduleName = Process.GetCurrentProcess().MainModule.ModuleName;

            _hotKeyHook = new HotKeyHook();
            _hotKeyHook.Hooked += HotKeyHooked;
            if (_settings.MenuItems.Items.Flatten(x => x.Items).Any(x => x.Type == MenuItemType.Item && x.Key3 != VirtualKey.None && x.Show) || _settings.MenuItems.WindowSizeItems.Any(x => x.Key3 != VirtualKey.None))
            {
                _hotKeyHook.Start(moduleName, _settings.MenuItems);
            }

            _hotKeyMouseHook = new HotKeys.MouseHook();
            _hotKeyMouseHook.Hooked += HotKeyMouseHooked;
            if (_settings.Closer.MouseButton != MouseButton.None)
            {
                _hotKeyMouseHook.Start(moduleName, _settings.Closer.Key1, _settings.Closer.Key2, _settings.Closer.MouseButton);
            }

#endif
            _windows = EnumWindows.EnumAllWindows(_settings.MenuItems, _settings.LanguageSettings, new string[] { SHELL_WINDOW_NAME }).ToList();

            foreach (var window in _windows)
            {
                var processName = "";

                try
                {
                    processName = Path.GetFileName(window.Process.GetMainModuleFileName());
                }
                catch
                {
                }

                if (string.IsNullOrEmpty(processName) || _settings.ProcessExclusions.Contains(processName.ToLower()))
                {
                    continue;
                }

                window.Menu.Create();
                int menuItemId = window.ProcessPriority.GetMenuItemId();
                window.Menu.CheckMenuItem(menuItemId, true);
                if (window.AlwaysOnTop) window.Menu.CheckMenuItem(MenuItemId.SC_TOPMOST, true);
            }

            _getMsgHook = new GetMsgHook(Handle, MenuItemId.SC_DRAG_BY_MOUSE);
            _getMsgHook.GetMsg += WindowGetMsg;
            _getMsgHook.Start();

            _shellHook = new ShellHook(Handle, MenuItemId.SC_DRAG_BY_MOUSE);
            _shellHook.WindowCreated += WindowCreated;
            _shellHook.WindowDestroyed += WindowDestroyed;
            _shellHook.Start();

            _cbtHook = new CBTHook(Handle, MenuItemId.SC_DRAG_BY_MOUSE);
            _cbtHook.WindowCreated += WindowCreated;
            _cbtHook.WindowDestroyed += WindowDestroyed;
            _cbtHook.MoveSize += WindowMoveSize;
            _cbtHook.MinMax += WindowMinMax;
            _cbtHook.Start();

            _mouseHook = new Hooks.MouseHook(Handle, MenuItemId.SC_DRAG_BY_MOUSE);
            var dragByMouseItemName = MenuItemId.GetName(MenuItemId.SC_DRAG_BY_MOUSE);
            if (_settings.MenuItems.Items.Flatten(x => x.Items).Any(x => x.Type == MenuItemType.Item && x.Name == dragByMouseItemName && x.Show))
            {
                _mouseHook.Start();
            }

            Hide();
        }

19 Source : MainForm.cs
with MIT License
from AlexGyver

private void InitializePlotForm()
        {
            plotForm = new Form
            {
                FormBorderStyle = FormBorderStyle.SizableToolWindow,
                ShowInTaskbar = false,
                StartPosition = FormStartPosition.Manual
            };
            this.AddOwnedForm(plotForm);
            plotForm.Bounds = new Rectangle
            {
                X = settings.GetValue("plotForm.Location.X", -100000),
                Y = settings.GetValue("plotForm.Location.Y", 100),
                Width = settings.GetValue("plotForm.Width", 600),
                Height = settings.GetValue("plotForm.Height", 400)
            };

            showPlot = new UserOption("plotMenuItem", false, plotMenuItem, settings);
            plotLocation = new UserRadioGroup("plotLocation", 0, new[] { plotWindowMenuItem, plotBottomMenuItem, plotRightMenuItem }, settings);

            showPlot.Changed += delegate (object sender, EventArgs e)
            {
                if (plotLocation.Value == 0)
                {
                    if (showPlot.Value && this.Visible)
                    {
                        plotForm.Show();
                    }
                    else
                    {
                        plotForm.Hide();
                    }
                }
                else
                {
                    splitContainer.Panel2Collapsed = !showPlot.Value;
                }

                treeView.Invalidate();
            };
            plotLocation.Changed += delegate (object sender, EventArgs e)
            {
                switch (plotLocation.Value)
                {
                    case 0:
                        splitContainer.Panel2.Controls.Clear();
                        splitContainer.Panel2Collapsed = true;
                        plotForm.Controls.Add(plotPanel);

                        if (showPlot.Value && this.Visible)
                        {
                            plotForm.Show();
                        }

                        break;

                    case 1:
                        plotForm.Controls.Clear();
                        plotForm.Hide();
                        splitContainer.Orientation = Orientation.Horizontal;
                        splitContainer.Panel2.Controls.Add(plotPanel);
                        splitContainer.Panel2Collapsed = !showPlot.Value;
                        break;

                    case 2:
                        plotForm.Controls.Clear();
                        plotForm.Hide();
                        splitContainer.Orientation = Orientation.Vertical;
                        splitContainer.Panel2.Controls.Add(plotPanel);
                        splitContainer.Panel2Collapsed = !showPlot.Value;
                        break;

                }
            };

            plotForm.FormClosing += delegate (object sender, FormClosingEventArgs e)
            {
                if (e.CloseReason == CloseReason.UserClosing)
                {
                    // just switch off the plotting when the user closes the form
                    if (plotLocation.Value == 0)
                    {
                        showPlot.Value = false;
                    }

                    e.Cancel = true;
                }
            };

            void MoveOrResizePlotForm(object sender, EventArgs e)
            {
                if (plotForm.WindowState != FormWindowState.Minimized)
                {
                    settings.SetValue("plotForm.Location.X", plotForm.Bounds.X);
                    settings.SetValue("plotForm.Location.Y", plotForm.Bounds.Y);
                    settings.SetValue("plotForm.Width", plotForm.Bounds.Width);
                    settings.SetValue("plotForm.Height", plotForm.Bounds.Height);
                }
            }
            plotForm.Move += MoveOrResizePlotForm;
            plotForm.Resize += MoveOrResizePlotForm;

            plotForm.VisibleChanged += delegate (object sender, EventArgs e)
            {
                Rectangle bounds = new Rectangle(plotForm.Location, plotForm.Size);
                Screen screen = Screen.FromRectangle(bounds);
                Rectangle intersection = Rectangle.Intersect(screen.WorkingArea, bounds);

                if (intersection.Width < Math.Min(16, bounds.Width) || intersection.Height < Math.Min(16, bounds.Height))
                {
                    plotForm.Location = new Point(screen.WorkingArea.Width / 2 - bounds.Width / 2, screen.WorkingArea.Height / 2 - bounds.Height / 2);
                }
            };

            this.VisibleChanged += delegate (object sender, EventArgs e)
            {
                if (this.Visible && showPlot.Value && plotLocation.Value == 0)
                {
                    plotForm.Show();
                }
                else
                {
                    plotForm.Hide();
                }
            };
        }

19 Source : MainForm.cs
with MIT License
from AlexGyver

private void InitializePlotForm() {
      plotForm = new Form {
        FormBorderStyle = FormBorderStyle.SizableToolWindow,
        ShowInTaskbar = false,
        StartPosition = FormStartPosition.Manual
      };
      this.AddOwnedForm(plotForm);
      plotForm.Bounds = new Rectangle {
        X = settings.GetValue("plotForm.Location.X", -100000),
        Y = settings.GetValue("plotForm.Location.Y", 100),
        Width = settings.GetValue("plotForm.Width", 600),
        Height = settings.GetValue("plotForm.Height", 400)
      };

      showPlot = new UserOption("plotMenuItem", false, plotMenuItem, settings);
      plotLocation = new UserRadioGroup("plotLocation", 0,
        new[] { plotWindowMenuItem, plotBottomMenuItem, plotRightMenuItem },
        settings);

      showPlot.Changed += delegate (object sender, EventArgs e) {
        if (plotLocation.Value == 0) {
          if (showPlot.Value && this.Visible) {
            plotForm.Show();
          } else {
            plotForm.Hide();
          }
        } else {
          splitContainer.Panel2Collapsed = !showPlot.Value;
        }
        treeView.Invalidate();
      };
      plotLocation.Changed += delegate (object sender, EventArgs e) {
        switch (plotLocation.Value) {
          case 0:
            splitContainer.Panel2.Controls.Clear();
            splitContainer.Panel2Collapsed = true;
            plotForm.Controls.Add(plotPanel);
            if (showPlot.Value && this.Visible) {
              plotForm.Show();
            }

            break;
          case 1:
            plotForm.Controls.Clear();
            plotForm.Hide();
            splitContainer.Orientation = Orientation.Horizontal;
            splitContainer.Panel2.Controls.Add(plotPanel);
            splitContainer.Panel2Collapsed = !showPlot.Value;
            break;
          case 2:
            plotForm.Controls.Clear();
            plotForm.Hide();
            splitContainer.Orientation = Orientation.Vertical;
            splitContainer.Panel2.Controls.Add(plotPanel);
            splitContainer.Panel2Collapsed = !showPlot.Value;
            break;
        }
      };

      plotForm.FormClosing += delegate (object sender, FormClosingEventArgs e) {
        if (e.CloseReason == CloseReason.UserClosing) {
          // just switch off the plotting when the user closes the form
          if (plotLocation.Value == 0) {
            showPlot.Value = false;
          }
          e.Cancel = true;
        }
      };

      EventHandler moveOrResizePlotForm = delegate (object sender, EventArgs e) {
        if (plotForm.WindowState != FormWindowState.Minimized) {
          settings.SetValue("plotForm.Location.X", plotForm.Bounds.X);
          settings.SetValue("plotForm.Location.Y", plotForm.Bounds.Y);
          settings.SetValue("plotForm.Width", plotForm.Bounds.Width);
          settings.SetValue("plotForm.Height", plotForm.Bounds.Height);
        }
      };
      plotForm.Move += moveOrResizePlotForm;
      plotForm.Resize += moveOrResizePlotForm;

      plotForm.VisibleChanged += delegate (object sender, EventArgs e) {
        Rectangle bounds = new Rectangle(plotForm.Location, plotForm.Size);
        Screen screen = Screen.FromRectangle(bounds);
        Rectangle intersection =
          Rectangle.Intersect(screen.WorkingArea, bounds);
        if (intersection.Width < Math.Min(16, bounds.Width) ||
            intersection.Height < Math.Min(16, bounds.Height)) {
          plotForm.Location = new Point(
            screen.WorkingArea.Width / 2 - bounds.Width / 2,
            screen.WorkingArea.Height / 2 - bounds.Height / 2);
        }
      };

      this.VisibleChanged += delegate (object sender, EventArgs e) {
        if (this.Visible && showPlot.Value && plotLocation.Value == 0) {
          plotForm.Show();
        } else {
          plotForm.Hide();
        }
      };
    }

19 Source : KeyBindForm13Key.cs
with GNU General Public License v2.0
from AmanoTooko

private void KeyBindForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            e.Cancel = true;
            this.Hide();
        }

19 Source : KeyBindForm37Key.cs
with GNU General Public License v2.0
from AmanoTooko

private void KeyBindForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            e.Cancel = true;
            Hide();
        }

19 Source : Message.cs
with MIT License
from Amine-Smahi

private void bunifuFlatButton1_Click(object sender, EventArgs e)
        {
            var f = new Form1();
            f.Hideit(SecretMessageBox2.Text, Btp);
            f.ko = Btp;
            f.MainPictureBox.Image = Imagepath;
            using (TextReader tr = new StreamReader(path))
            {
                var langugeChoused = tr.ReadLine();

                if (langugeChoused == "arabic")
                {
                    f.bunifuTileButton1.LabelText = "إفتح صورة";
                    f.bunifuTileButton2.LabelText = "إحفظ الصورة";
                    f.bunifuTileButton3.LabelText = "أكتب الرسالة";
                    f.bunifuTileButton4.LabelText = "أظهر الصورة";
                    f.about_us.LabelText = "عن البرنامج";
                    f.bunifuTileButton6.LabelText = "إعداداتي";
                }
            }
            f.bunifuTileButton7.Enabled = true;
            f.Show();
            Hide();
        }

19 Source : Form1.cs
with MIT License
from Amine-Smahi

private void bunifuTileButton3_Click(object sender, EventArgs e)
        {
            var ms = new Message();
            ms.Btp = (Bitmap) MainPictureBox.Image;
            ms.Imagepath = MainPictureBox.Image;
            using (TextReader tr = new StreamReader(path))
            {
                var langugeChoused = tr.ReadLine();

                if (langugeChoused == "arabic")
                {
                    ms.bunifuCustomLabel1.Text = "أكتب الرسالة التي تريد إخفائها";
                    ms.bunifuFlatButton1.Text = "إخفاء الصورة";
                }
            }
            ms.Show();
            Hide();
        }

19 Source : loading.cs
with MIT License
from Amine-Smahi

private void t_Tick(object sender, EventArgs e)
        {
            g = Graphics.FromImage(bmp);
            g.Clear(Color.White);
            var myBrush = new SolidBrush(Color.FromArgb(37, 155, 36));
            g.FillRectangle(myBrush, new Rectangle(0, 0, (int) (pbComplete * pbUnit), pbHEIGHT));


            if (pbComplete == 60)
            {

                FileInfo fi = new FileInfo(@".\a\lang.txt");
                DirectoryInfo di = new DirectoryInfo(@".\a");
                if (!di.Exists)
                {
                    di.Create();
                }
                if (!fi.Exists)
                {
                    fi.Create().Dispose();
                }

                /* if (!File.Exists(path))
                 {
                     File.Create(path).Dispose();
                     using (TextWriter tw = new StreamWriter(path))
                     {
                         tw.WriteLine("english");
                         tw.Close();
                     }
                 }
                 */
            }

            if (pbComplete == 70)
                if (File.Exists(path))
                    using (TextReader tr = new StreamReader(path))
                    {
                        var langugeChoused = tr.ReadLine();

                        if (langugeChoused == "arabic")
                        {
                            fom.bunifuTileButton1.LabelText = "إفتح صورة";
                            fom.bunifuTileButton2.LabelText = "إحفظ الصورة";
                            fom.bunifuTileButton3.LabelText = "أكتب الرسالة";
                            fom.bunifuTileButton4.LabelText = "أظهر الصورة";
                            fom.about_us.LabelText = "عن البرنامج";
                            fom.bunifuTileButton6.LabelText = "إعداداتي";
                        }
                    }

            picboxPB.Image = bmp;
            pbComplete++;

            if (pbComplete > 100)
            {
                g.Dispose();
                t.Stop();
                Hide();

                fom.Show();
            }
        }

19 Source : MetroDropShadow.cs
with MIT License
from arsium

private void shadowTargetForm_ResizeBegin(object sender, EventArgs e)
		{
			Visible = false;
			Hide();
		}

19 Source : MainForm.cs
with GNU General Public License v3.0
from arunsatyarth

void MainForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            e.Cancel = true;
            Hide();
        }

19 Source : Notepad.cs
with MIT License
from ASHTeam

private void NoteSheetsFormClosing(object sender, FormClosingEventArgs e)
        {
            char delim = Path.DirectorySeparatorChar;
            String filename = "notes.xml";
            if (File.Exists(filename))
                File.Delete(filename);
            Xml ExportFile = new Xml(filename);
            try
            {
                ExportFile.RootName = "notesheet";

                String secname;
                int pagecount = SheetSelection.TabPages.Count;
                for (int i = 0; i < pagecount; i++)
                {
                    Sheet sheet = (Sheet)SheetSelection.TabPages[i].Tag;
                    secname = "sheet" + (i + 1).ToString();
                    ExportFile.SetValue(secname, "name", sheet.replacedle);
                    ExportFile.SetValue(secname, "content", sheet.content);
                }
            }
            finally
            {
                e.Cancel = true;
                Hide();
            }
        }

19 Source : Notepad.cs
with MIT License
from ASHTeam

private void NoteSheets_FormClosing(object sender, FormClosingEventArgs e)
        {
            char delim = Path.DirectorySeparatorChar;
            String filename = "notes.xml";
            if (File.Exists(filename))
                File.Delete(filename);
            Xml ExportFile = new Xml(filename);
            try
            {
                ExportFile.RootName = "notesheet";

                String secname;
                int pagecount = SheetSelection.TabPages.Count;
                for (int i = 0; i < pagecount; i++)
                {
                    Sheet sheet = (Sheet)SheetSelection.TabPages[i].Tag;
                    secname = "sheet" + (i + 1).ToString();
                    ExportFile.SetValue(secname, "name", sheet.replacedle);
                    ExportFile.SetValue(secname, "content", sheet.content);
                }
            }
            finally
            {
                e.Cancel = true;
                Hide();
            }
        }

19 Source : QuickStartForm.cs
with GNU General Public License v3.0
from aurelitec

private void EventOkButtonClick(object sender, EventArgs e)
        {
            this.Hide();
        }

19 Source : QuickStartForm.cs
with GNU General Public License v3.0
from aurelitec

private void EventQuickStartFormFormClosing(object sender, FormClosingEventArgs e)
        {
            if (e.CloseReason == CloseReason.UserClosing)
            {
                this.Hide();
                e.Cancel = true;
            }
        }

19 Source : WebBrowserBrowser.cs
with Apache License 2.0
from auth0

public async Task<BrowserResult> InvokeAsync(BrowserOptions options, CancellationToken cancellationToken = default)
        {
            using (var form = _formFactory.Invoke())
            using (var browser = new ExtendedWebBrowser()
            {
                Dock = DockStyle.Fill
            })
            {
                var signal = new SemapreplacedSlim(0, 1);

                var result = new BrowserResult
                {
                    ResultType = BrowserResultType.UserCancel
                };

                form.FormClosed += (s, e) =>
                {
                    signal.Release();
                };

                browser.NavigateError += (s, e) =>
                {
                    // Windows Server secure browsing requires this
                    if (e.Url.StartsWith(options.EndUrl))
                    {
                        e.Cancel = true;
                        result.ResultType = BrowserResultType.Success;
                        result.Response = e.Url;
                        signal.Release();
                    }
                };

                browser.DoreplacedentCompleted += (s, e) =>
                {
                    if (e.Url.AbsoluteUri.StartsWith(options.EndUrl))
                    {
                        result.ResultType = BrowserResultType.Success;
                        result.Response = e.Url.ToString();
                        signal.Release();
                    }
                };

                try
                {
                    form.Controls.Add(browser);
                    browser.Show();
                    form.Show();

                    browser.Navigate(options.StartUrl);

                    await signal.WaitAsync();
                }
                finally
                {
                    form.Hide();
                    browser.Hide();
                }

                return result;
            }
        }

19 Source : FormBackground.cs
with MIT License
from AutoItConsulting

private void FormBackground_Shown(object sender, EventArgs e)
        {
            if (_customBackgroundEnabled)
            {
                // Let the form finish showing (so if we kill a previous running version no flicker)
                Refresh();

                // Start the refresh timer
                timerRefresh.Interval = (int)TimeSpan.FromSeconds(TimerIntervalSecs).TotalMilliseconds;
                timerRefresh.Start();
            }
            else
            {
                Hide();
            }

            // Register a global keyboard hook to bring up the tools menu - can only do this after killing previous instances
            try
            {
                _keyboardHook.KeyPressed += KeyboardHook_OnPressed;
                _keyboardHook.RegisterHotKey(Background.ModifierKeys.Control | Background.ModifierKeys.Alt, Keys.F12);
            }
            catch (Exception)
            {
                MessageBox.Show(Resources.UnableToRegisterHotkey, Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
                Close();
            }
        }

19 Source : FormBackground.cs
with MIT License
from AutoItConsulting

private void KeyboardHook_OnPressed(object sender, KeyPressedEventArgs e)
        {
            // Ignore if quit in progress
            if (_eventShutdownRequested.WaitOne(0))
            {
                return;
            }

            // Ignore if already showing the tools form
            if (ShowingPreplacedwordOrTools)
            {
                return;
            }

            // Ignore if there are no possible tabs enabled
            if (_userToolsEnabled == false && _taskSequenceVariablesEnabled == false)
            {
                return;
            }

            ShowingPreplacedwordOrTools = true;

            // Hide the background window because it causes issues when the user clicks on it
            if (_customBackgroundEnabled)
            {
                Activate();
                BringToFront();
                Hide();
            }

            // Hide TS dialog
            TaskSequence.CloseProgressDialog();

            // Ask for preplacedword if needed
            PreplacedwordMode preplacedwordMode;

            using (var formPreplacedword = new FormPreplacedword(_options))
            {
                formPreplacedword.ShowDialog();
                preplacedwordMode = formPreplacedword.PreplacedwordMode;
            }

            // If preplacedword is ok, launch the tools
            if (preplacedwordMode != PreplacedwordMode.None)
            {
                _formTools = new FormTools(_options, preplacedwordMode, _osdBackgroundDir);
                DialogResult result = _formTools.ShowDialog(this);
                _formTools.Dispose();
                _formTools = null;

                // Check if closed via the "Close App" button 
                if (result == DialogResult.Abort)
                {
                    // Queue the quit signal
                    _eventShutdownRequested.Set();
                }
            }

            // Reshow the background and push it to the back again
            if (_customBackgroundEnabled)
            {
                Show();
            }

            // Push the Win7/Win10 progress screen to the bottom, then put our form on top of that
            BringToFrontOfWindowsSetupProgress();

            // Reshow TS progress
            TaskSequence.ShowTsProgress();

            ShowingPreplacedwordOrTools = false;
        }

See More Examples