示例#1
0
        private void MethodChangeButton_Click(object sender, EventArgs e)
        {
            Debug.AssertNotNull(_options.MethodManager, "MethodManager not set");

            WipeMethods w = new WipeMethods();
            w.Options = _options;
            w.MethodManager = _options.MethodManager;
            w.SelectedMethod = _options.MethodManager.GetMethodIndex(_file.WipeMethodId);
            w.ShowSelected = true;
            w.ShowDialog(this);

            if(w.SelectedMethod < 0 || w.SelectedMethod >= _options.MethodManager.Methods.Count) {
                _file.WipeMethodId = WipeOptions.DefaultWipeMethod;
            }
            else {
                _file.WipeMethodId = _options.MethodManager.Methods[w.SelectedMethod].Id;
            }

            UpdateMethodInfo();
        }
        private void SelectMethod(Label label, ref int method)
        {
            WipeMethods w = new WipeMethods();
            w.MethodManager = _methodManager;
            w.SelectedMethod = _methodManager.GetMethodIndex(method);
            w.ShowSelected = true;
            w.ShowDialog(this);

            if(w.SelectedMethod < 0 || w.SelectedMethod >= _methodManager.Methods.Count) {
                method = WipeOptions.DefaultWipeMethod;
            }
            else {
                method = _methodManager.Methods[w.SelectedMethod].Id;
            }

            UpdateMethodInfo(label, method);
        }