The abstract class from where all wipe steps must derive.
상속: ICloneable
예제 #1
0
        private void SelectStep(int index, bool select)
        {
            Debug.AssertNotNull(activeMethod, "ActiveMethod not set");

            activeStep = activeMethod.Steps[index];
            activeStepIndex = index;
            loadingSteps = true;

            if(select) {
                StepList.SelectedIndices.Clear();
                StepList.SelectedIndices.Add(index);
            }

            PatternTextbox.Enabled = false;
            PatternTextbox.Text = string.Empty;
            UncheckOptionboxes();

            // disable complement on first position
            ComplementOptionbox.Enabled = index > 0;

            if(activeStep.Type == WipeStepType.Pattern) {
                PatternOptionbox.Checked = true;
                byte[] pattern = ((PatternWipeStep)activeStep).Pattern;

                PatternTextbox.Text = string.Empty;
                PatternTextbox.Enabled = true;
                if(pattern != null && pattern.Length > 0) {
                    for(int i = 0; i < pattern.Length; i++) {
                        PatternTextbox.Text += pattern[i].ToString() + (i < (pattern.Length - 1) ? " " : string.Empty);
                    }
                }
            }
            else if(activeStep.Type == WipeStepType.Random) {
                RandomOptionbox.Checked = true;
            }
            else if(activeStep.Type == WipeStepType.RandomByte) {
                RandombyteOptionbox.Checked = true;
            }
            else {
                ComplementOptionbox.Checked = true;
            }

            loadingSteps = false;
        }
예제 #2
0
        private void RandomOptionbox_CheckedChanged(object sender, EventArgs e)
        {
            if(loadingSteps == true) {
                return;
            }

            PatternOptionbox.Checked = false;
            RandombyteOptionbox.Checked = false;
            ComplementOptionbox.Checked = false;

            activeStep = new RandomWipeStep(activeStep.Number);
            activeMethod.Steps[activeStepIndex] = activeStep;
            UpdateStepName(activeStepIndex);
            methodModified = true;
            HandleMethodModified();
        }