Changeset 585


Ignore:
Timestamp:
11/19/08 01:44:01 (6 years ago)
Author:
lowjoel
Message:

Fully implemented the Custom method editor and its associated error handling code

Location:
branches/eraser6/DefaultPlugins
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/DefaultPlugins/CustomMethodEditorForm.Designer.cs

    r510 r585  
    6363            this.passesMoveDownBtn = new System.Windows.Forms.Button(); 
    6464            this.passGrp = new System.Windows.Forms.GroupBox(); 
    65             this.passTxt = new System.Windows.Forms.TextBox(); 
    66             this.passTypeGrp = new System.Windows.Forms.FlowLayoutPanel(); 
    67             this.passTypeText = new System.Windows.Forms.RadioButton(); 
    68             this.passTypeHex = new System.Windows.Forms.RadioButton(); 
    69             this.passTypeRandom = new System.Windows.Forms.RadioButton(); 
    7065            this.randomizeChk = new System.Windows.Forms.CheckBox(); 
    7166            this.okBtn = new System.Windows.Forms.Button(); 
    7267            this.cancelBtn = new System.Windows.Forms.Button(); 
    7368            this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components); 
     69            this.passEditor = new Eraser.DefaultPlugins.CustomMethodPassEditor(); 
    7470            this.passGrp.SuspendLayout(); 
    75             this.passTypeGrp.SuspendLayout(); 
    7671            ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 
    7772            this.SuspendLayout(); 
     
    146141            //  
    147142            resources.ApplyResources(this.passGrp, "passGrp"); 
    148             this.passGrp.Controls.Add(this.passTxt); 
    149             this.passGrp.Controls.Add(this.passTypeGrp); 
     143            this.passGrp.Controls.Add(this.passEditor); 
    150144            this.passGrp.Name = "passGrp"; 
    151145            this.passGrp.TabStop = false; 
    152             //  
    153             // passTxt 
    154             //  
    155             resources.ApplyResources(this.passTxt, "passTxt"); 
    156             this.passTxt.Name = "passTxt"; 
    157             //  
    158             // passTypeGrp 
    159             //  
    160             resources.ApplyResources(this.passTypeGrp, "passTypeGrp"); 
    161             this.passTypeGrp.Controls.Add(this.passTypeText); 
    162             this.passTypeGrp.Controls.Add(this.passTypeHex); 
    163             this.passTypeGrp.Controls.Add(this.passTypeRandom); 
    164             this.passTypeGrp.Name = "passTypeGrp"; 
    165             //  
    166             // passTypeText 
    167             //  
    168             resources.ApplyResources(this.passTypeText, "passTypeText"); 
    169             this.passTypeText.Checked = true; 
    170             this.passTypeText.Name = "passTypeText"; 
    171             this.passTypeText.TabStop = true; 
    172             this.passTypeText.UseVisualStyleBackColor = true; 
    173             this.passTypeText.CheckedChanged += new System.EventHandler(this.passType_CheckedChanged); 
    174             //  
    175             // passTypeHex 
    176             //  
    177             resources.ApplyResources(this.passTypeHex, "passTypeHex"); 
    178             this.passTypeHex.Name = "passTypeHex"; 
    179             this.passTypeHex.UseVisualStyleBackColor = true; 
    180             this.passTypeHex.CheckedChanged += new System.EventHandler(this.passType_CheckedChanged); 
    181             //  
    182             // passTypeRandom 
    183             //  
    184             resources.ApplyResources(this.passTypeRandom, "passTypeRandom"); 
    185             this.passTypeRandom.Name = "passTypeRandom"; 
    186             this.passTypeRandom.UseVisualStyleBackColor = true; 
    187             this.passTypeRandom.CheckedChanged += new System.EventHandler(this.passType_CheckedChanged); 
    188146            //  
    189147            // randomizeChk 
     
    210168            //  
    211169            this.errorProvider.ContainerControl = this; 
     170            //  
     171            // passEditor 
     172            //  
     173            resources.ApplyResources(this.passEditor, "passEditor"); 
     174            this.passEditor.Name = "passEditor"; 
     175            this.passEditor.PassData = null; 
     176            this.passEditor.PassType = Eraser.DefaultPlugins.CustomMethodPassEditor.PassTypes.TEXT; 
    212177            //  
    213178            // CustomMethodEditorForm 
     
    235200            this.ShowInTaskbar = false; 
    236201            this.passGrp.ResumeLayout(false); 
    237             this.passGrp.PerformLayout(); 
    238             this.passTypeGrp.ResumeLayout(false); 
    239             this.passTypeGrp.PerformLayout(); 
    240202            ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 
    241203            this.ResumeLayout(false); 
     
    255217        private System.Windows.Forms.Button passesMoveDownBtn; 
    256218        private System.Windows.Forms.GroupBox passGrp; 
    257         private System.Windows.Forms.FlowLayoutPanel passTypeGrp; 
    258         private System.Windows.Forms.RadioButton passTypeText; 
    259         private System.Windows.Forms.RadioButton passTypeHex; 
    260         private System.Windows.Forms.RadioButton passTypeRandom; 
    261219        private System.Windows.Forms.CheckBox randomizeChk; 
    262220        private System.Windows.Forms.ColumnHeader passesColNumber; 
     
    264222        private System.Windows.Forms.Button okBtn; 
    265223        private System.Windows.Forms.Button cancelBtn; 
    266         private System.Windows.Forms.TextBox passTxt; 
    267224        private System.Windows.Forms.ErrorProvider errorProvider; 
     225        private CustomMethodPassEditor passEditor; 
    268226    } 
    269227} 
  • branches/eraser6/DefaultPlugins/CustomMethodEditorForm.cs

    r522 r585  
    4040 
    4141        /// <summary> 
    42         /// Holds the CustomErasureMethod object which client code may set to allow 
    43         /// method editing. 
    44         /// </summary> 
    45         private CustomErasureMethod method; 
    46  
    47         /// <summary> 
    4842        /// Sets or retrieves the CustomErasureMethod object with all the values 
    4943        /// in the dialog. 
     
    113107        { 
    114108            ErasureMethod.Pass pass = (ErasureMethod.Pass)item.Tag; 
    115             if (passTypeRandom.Checked) 
     109            if (passEditor.PassType == CustomMethodPassEditor.PassTypes.RANDOM) 
    116110            { 
    117111                pass.Function = ErasureMethod.Pass.WriteRandom; 
     
    121115            else 
    122116            { 
    123                 byte[] passConstant = ParseConstantStr(passTxt.Text, passTypeHex.Checked); 
    124117                pass.Function = ErasureMethod.Pass.WriteConstant; 
    125                 pass.OpaqueValue = passConstant; 
    126                 item.SubItems[1].Text = string.Format("Constant ({0} bytes)", passConstant.Length); 
    127             } 
    128         } 
    129  
    130         /// <summary> 
    131         /// Saves the pass constant currently in the pass constant text field. 
    132         /// </summary> 
    133         /// <param name="text">The text to parse.</param> 
    134         /// <param name="parseHex">Parse the constant in the field as a string of 
    135         /// hexadecimal numbers.</param> 
    136         /// <returns>An array containing the byte-wise representation of the input 
    137         /// string.</returns> 
    138         private static byte[] ParseConstantStr(string text, bool parseHex) 
    139         { 
    140             List<byte> passConstantList = new List<byte>(); 
    141             try 
    142             { 
    143                 if (parseHex) 
    144                 { 
    145                     string str = text.Replace(" ", "").ToUpper(); 
    146  
    147                     for (int i = 0, j = str.Length - 2; i < j; i += 2) 
    148                         passConstantList.Add(Convert.ToByte(str.Substring(i, 2), 16)); 
    149                     passConstantList.Add(Convert.ToByte(str.Substring(str.Length - 2), 16)); 
    150  
    151                     byte[] result = new byte[passConstantList.Count]; 
    152                     passConstantList.CopyTo(result); 
    153                     return result; 
    154                 } 
    155             } 
    156             catch (FormatException ex) 
    157             { 
    158                 MessageBox.Show(ex.Message, 
    159                     "Invalid input string", 
    160                     MessageBoxButtons.OK, MessageBoxIcon.Error); 
    161  
    162                 // return as much as we could comprehend 
    163                 byte[] result = new byte[passConstantList.Count]; 
    164                 passConstantList.CopyTo(result); 
    165                 return result; 
    166             } 
    167  
    168             return Encoding.UTF8.GetBytes(text); 
    169         } 
    170  
    171         /// <summary> 
    172         /// Displays the pass constant stored by the SavePassConstant function. 
    173         /// </summary> 
    174         /// <param name="array">The array containing the constant to display.</param> 
    175         /// <param name="asHex">Sets whether the array should be displayed as a 
    176         /// hexadecimal string.</param> 
    177         /// <returns>A string containing the user-visible representation of the 
    178         /// input array.</returns> 
    179         private static string DisplayConstantArray(byte[] array, bool asHex) 
    180         { 
    181             try 
    182             { 
    183                 if (asHex) 
    184                 { 
    185                     StringBuilder displayText = new StringBuilder(); 
    186                     foreach (byte b in array) 
    187                         displayText.Append(string.Format("{0,2} ", Convert.ToString(b, 16))); 
    188                     return displayText.ToString(); 
    189                 } 
    190             } 
    191             catch (FormatException ex) 
    192             { 
    193                 MessageBox.Show(ex.Message, 
    194                     "Invalid input string", 
    195                     MessageBoxButtons.OK, MessageBoxIcon.Error); 
    196             } 
    197  
    198             return Encoding.UTF8.GetString(array); 
     118                pass.OpaqueValue = passEditor.PassData; 
     119                item.SubItems[1].Text = string.Format("Constant ({0} bytes)", passEditor.PassData.Length); 
     120            } 
     121        } 
     122 
     123        /// <summary> 
     124        /// Displays the pass associated with <paramref name="item"/> in the editing controls. 
     125        /// </summary> 
     126        /// <param name="item">The <see cref="ListViewItem"/> containing the pass to edit.</param> 
     127        private void DisplayPass(ListViewItem item) 
     128        { 
     129            currentPass = item; 
     130            ErasureMethod.Pass pass = (ErasureMethod.Pass)item.Tag; 
     131            passEditor.PassData = (byte[])pass.OpaqueValue; 
     132            passEditor.PassType = pass.Function == EraseCustom.Pass.WriteRandom ? 
     133                CustomMethodPassEditor.PassTypes.RANDOM : 
     134                CustomMethodPassEditor.PassTypes.TEXT; 
    199135        } 
    200136 
     
    215151            passesRemoveBtn.Enabled = passesDuplicateBtn.Enabled = passesMoveUpBtn.Enabled = 
    216152                passesMoveDownBtn.Enabled = passesLv.SelectedItems.Count >= 1; 
    217             passGrp.Enabled = passTypeText.Enabled = passTypeHex.Enabled = 
    218                 passTypeRandom.Enabled = passTxt.Enabled = 
    219                 passesLv.SelectedItems.Count == 1; 
    220  
    221             ListView.SelectedIndexCollection indices = passesLv.SelectedIndices; 
    222             if (indices.Count > 0) 
    223             { 
    224                 int index = indices[indices.Count - 1]; 
    225                 passesMoveUpBtn.Enabled = passesMoveUpBtn.Enabled && index > 0; 
    226                 passesMoveDownBtn.Enabled = passesMoveDownBtn.Enabled && index < passesLv.Items.Count - 1; 
     153            passGrp.Enabled = passEditor.Enabled = passesLv.SelectedItems.Count == 1; 
     154 
     155            ListView.SelectedListViewItemCollection items = passesLv.SelectedItems; 
     156            if (items.Count > 0) 
     157            { 
     158                foreach (ListViewItem item in items) 
     159                { 
     160                    int index = item.Index; 
     161                    passesMoveUpBtn.Enabled = passesMoveUpBtn.Enabled && index > 0; 
     162                    passesMoveDownBtn.Enabled = passesMoveDownBtn.Enabled && index < passesLv.Items.Count - 1; 
     163                } 
    227164            } 
    228165        } 
     
    252189        private void passesDuplicateBtn_Click(object sender, EventArgs e) 
    253190        { 
    254             foreach (ListViewItem index in passesLv.SelectedItems) 
    255             { 
    256                 ListViewItem item = (ListViewItem)index.Clone(); 
    257                 ErasureMethod.Pass pass = (ErasureMethod.Pass)item.Tag; 
    258                 item.Text = (passesLv.Items.Count + 1).ToString(); 
    259                 item.Tag = new ErasureMethod.Pass(pass.Function, pass.OpaqueValue); 
    260                 passesLv.Items.Add(item); 
     191            foreach (ListViewItem item in passesLv.SelectedItems) 
     192            { 
     193                ErasureMethod.Pass oldPass = (ErasureMethod.Pass)item.Tag; 
     194                ErasureMethod.Pass pass = new ErasureMethod.Pass( 
     195                    oldPass.Function, oldPass.OpaqueValue); 
     196                AddPass(pass); 
    261197            } 
    262198        } 
     
    264200        private void passesMoveUpBtn_Click(object sender, EventArgs e) 
    265201        { 
    266             //Get the selection index 
    267             int selectedIndex = passesLv.SelectedIndices[0]; 
    268             if (selectedIndex == 0) 
    269                 return; 
    270  
    271             //Insert the current item into the index before. 
    272             ListViewItem item = passesLv.Items[selectedIndex]; 
    273             passesLv.Items.RemoveAt(selectedIndex); 
    274             passesLv.Items.Insert(selectedIndex - 1, item); 
     202            //Save the current pass to prevent data loss 
     203            SavePass(currentPass); 
     204 
     205            foreach (ListViewItem item in passesLv.SelectedItems) 
     206            { 
     207                //Insert the current item into the index before, only if the item has got 
     208                //space to move up! 
     209                int index = item.Index; 
     210                if (index >= 1) 
     211                { 
     212                    passesLv.Items.RemoveAt(index); 
     213                    passesLv.Items.Insert(index - 1, item); 
     214                } 
     215            } 
     216 
    275217            RenumberPasses(); 
    276218            EnableButtons(); 
     
    279221        private void passesMoveDownBtn_Click(object sender, EventArgs e) 
    280222        { 
    281             //Get the selection index 
    282             int selectedIndex = passesLv.SelectedIndices[0]; 
    283             if (selectedIndex == passesLv.Items.Count - 1) 
    284                 return; 
    285  
    286             //Insert the current item into the index after. 
    287             ListViewItem item = passesLv.Items[selectedIndex]; 
    288             passesLv.Items.RemoveAt(selectedIndex); 
    289             passesLv.Items.Insert(selectedIndex + 1, item); 
     223            //Save the current pass to prevent data loss 
     224            SavePass(currentPass); 
     225 
     226            ListView.SelectedListViewItemCollection items = passesLv.SelectedItems; 
     227            for (int i = items.Count; i-- != 0; ) 
     228            { 
     229                //Insert the current item into the index after, only if the item has got 
     230                //space to move down. 
     231                ListViewItem item = items[i]; 
     232                int index = item.Index; 
     233                if (index < passesLv.Items.Count - 1) 
     234                { 
     235                    passesLv.Items.RemoveAt(index); 
     236                    passesLv.Items.Insert(index + 1, item); 
     237                } 
     238            } 
     239 
    290240            RenumberPasses(); 
    291241            EnableButtons(); 
     
    300250            if (!e.Item.Selected) 
    301251            { 
    302                 if (passesLv.SelectedIndices.Count == 0 && passTxt.Text.Length > 0) 
     252                if (e.Item == currentPass) 
    303253                    SavePass(e.Item); 
    304254            } 
    305             else 
    306             { 
    307                 try 
    308                 { 
    309                     //Disable the pass display events 
    310                     passTypeText.CheckedChanged -= new EventHandler(passType_CheckedChanged); 
    311                     passTypeHex.CheckedChanged -= new EventHandler(passType_CheckedChanged); 
    312                     passTypeRandom.CheckedChanged -= new EventHandler(passType_CheckedChanged); 
    313  
    314                     //Get the pass data from the method structure. 
    315                     passTxt.Text = string.Empty; 
    316  
    317                     //Set the pass type to be undefined, to be set later. 
    318                     passTypeText.Checked = passTypeHex.Checked = passTypeRandom.Checked = false; 
    319                 } 
    320                 finally 
    321                 { 
    322                     //Reenable the pass display events 
    323                     passTypeText.CheckedChanged += new EventHandler(passType_CheckedChanged); 
    324                     passTypeHex.CheckedChanged += new EventHandler(passType_CheckedChanged); 
    325                     passTypeRandom.CheckedChanged += new EventHandler(passType_CheckedChanged); 
    326                 } 
    327  
    328                 //Set the pass type 
    329                 if (pass.Function == ErasureMethod.Pass.WriteRandom) 
    330                     passTypeRandom.Checked = true; 
    331                 else if (pass.Function == ErasureMethod.Pass.WriteConstant) 
    332                 { 
    333                     passTypeHex.Checked = true; 
    334                     passTxt.Text = DisplayConstantArray((byte[])pass.OpaqueValue, true); 
    335                 } 
    336                 else 
    337                     throw new ArgumentException("Unknown pass data."); 
    338             } 
    339  
    340             //Blank the pass text if it is not editable 
    341             if (!passTxt.Enabled) 
    342                 passTxt.Text = string.Empty; 
    343         } 
    344  
    345         private void passType_CheckedChanged(object sender, EventArgs e) 
    346         { 
    347             //Enable the text field if the selected pass type is not random data 
    348             passTxt.Enabled = !passTypeRandom.Checked; 
    349  
    350             //Copy or load the constant into the text field 
    351             if (sender != passTypeRandom && !passTypeRandom.Checked) 
    352             { 
    353                 byte[] constant = null; 
    354                 if (passTxt.Text.Length != 0) 
    355                     constant = ParseConstantStr(passTxt.Text, sender == passTypeHex); 
    356  
    357                 if (constant != null && constant.Length != 0) 
    358                     passTxt.Text = DisplayConstantArray(constant, passTypeHex.Checked); 
    359             } 
    360         } 
    361  
     255            else if (passesLv.SelectedIndices.Count == 1) 
     256            { 
     257                DisplayPass(passesLv.SelectedItems[0]); 
     258            } 
     259        } 
     260         
    362261        private void okBtn_Click(object sender, EventArgs e) 
    363262        { 
     
    387286            } 
    388287 
    389             foreach (ListViewItem item in passesLv.Items) 
    390             { 
    391                 ErasureMethod.Pass pass = (ErasureMethod.Pass)item.Tag; 
    392                 if (pass.Function == ErasureMethod.Pass.WriteConstant && 
    393                     (pass.OpaqueValue == null || ((byte[])pass.OpaqueValue).Length == 0)) 
    394                 { 
    395                     //Select the pass causing the error. 
    396                     passesLv.SelectedIndices.Clear(); 
    397                     passesLv.SelectedIndices.Add(passesLv.Items.IndexOf(item)); 
    398  
    399                     //Highlight the error 
    400                     errorProvider.SetError(passTxt, S._("The pass is supposed to write a " + 
    401                         "constant to the files to be erased, but no constant was defined.")); 
    402                     errorProvider.SetIconPadding(passTxt, -16); 
    403                     hasError = true; 
    404                     break; 
    405                 } 
    406             } 
    407  
    408288            //If there are errors, don't close the dialog. 
    409289            if (!hasError) 
     
    413293            } 
    414294        } 
     295 
     296        /// <summary> 
     297        /// Holds the CustomErasureMethod object which client code may set to allow 
     298        /// method editing. 
     299        /// </summary> 
     300        private CustomErasureMethod method; 
     301 
     302        /// <summary> 
     303        /// Holds the current Erasure pass that is being edited. 
     304        /// </summary> 
     305        private ListViewItem currentPass; 
    415306    } 
    416307} 
  • branches/eraser6/DefaultPlugins/CustomMethodEditorForm.resx

    r510 r585  
    122122    <value>True</value> 
    123123  </data> 
     124  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 
     125  <data name="nameLbl.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> 
     126    <value>NoControl</value> 
     127  </data> 
    124128  <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> 
    125129  <data name="nameLbl.Location" type="System.Drawing.Point, System.Drawing"> 
     
    147151    <value>11</value> 
    148152  </data> 
    149   <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> 
    150153  <data name="nameTxt.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms"> 
    151154    <value>Top, Left, Right</value> 
     
    175178    <value>Top, Bottom, Left, Right</value> 
    176179  </data> 
     180  <data name="passesLv.Location" type="System.Drawing.Point, System.Drawing"> 
     181    <value>12, 60</value> 
     182  </data> 
     183  <data name="passesLv.Size" type="System.Drawing.Size, System.Drawing"> 
     184    <value>254, 139</value> 
     185  </data> 
     186  <data name="passesLv.TabIndex" type="System.Int32, mscorlib"> 
     187    <value>3</value> 
     188  </data> 
     189  <data name="&gt;&gt;passesLv.Name" xml:space="preserve"> 
     190    <value>passesLv</value> 
     191  </data> 
     192  <data name="&gt;&gt;passesLv.Type" xml:space="preserve"> 
     193    <value>System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
     194  </data> 
     195  <data name="&gt;&gt;passesLv.Parent" xml:space="preserve"> 
     196    <value>$this</value> 
     197  </data> 
     198  <data name="&gt;&gt;passesLv.ZOrder" xml:space="preserve"> 
     199    <value>9</value> 
     200  </data> 
    177201  <data name="passesColNumber.Text" xml:space="preserve"> 
    178202    <value>Pass Number</value> 
     
    187211    <value>135</value> 
    188212  </data> 
    189   <data name="passesLv.Location" type="System.Drawing.Point, System.Drawing"> 
    190     <value>12, 60</value> 
    191   </data> 
    192   <data name="passesLv.Size" type="System.Drawing.Size, System.Drawing"> 
    193     <value>254, 139</value> 
    194   </data> 
    195   <data name="passesLv.TabIndex" type="System.Int32, mscorlib"> 
    196     <value>3</value> 
    197   </data> 
    198   <data name="&gt;&gt;passesLv.Name" xml:space="preserve"> 
    199     <value>passesLv</value> 
    200   </data> 
    201   <data name="&gt;&gt;passesLv.Type" xml:space="preserve"> 
    202     <value>System.Windows.Forms.ListView, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
    203   </data> 
    204   <data name="&gt;&gt;passesLv.Parent" xml:space="preserve"> 
    205     <value>$this</value> 
    206   </data> 
    207   <data name="&gt;&gt;passesLv.ZOrder" xml:space="preserve"> 
    208     <value>9</value> 
    209   </data> 
    210213  <data name="passesAddBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms"> 
    211214    <value>Top, Right</value> 
    212215  </data> 
     216  <data name="passesAddBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> 
     217    <value>NoControl</value> 
     218  </data> 
    213219  <data name="passesAddBtn.Location" type="System.Drawing.Point, System.Drawing"> 
    214220    <value>272, 60</value> 
     
    241247    <value>False</value> 
    242248  </data> 
     249  <data name="passesRemoveBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> 
     250    <value>NoControl</value> 
     251  </data> 
    243252  <data name="passesRemoveBtn.Location" type="System.Drawing.Point, System.Drawing"> 
    244253    <value>272, 89</value> 
     
    271280    <value>False</value> 
    272281  </data> 
     282  <data name="passesDuplicateBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> 
     283    <value>NoControl</value> 
     284  </data> 
    273285  <data name="passesDuplicateBtn.Location" type="System.Drawing.Point, System.Drawing"> 
    274286    <value>272, 118</value> 
     
    301313    <value>False</value> 
    302314  </data> 
     315  <data name="passesMoveUpBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> 
     316    <value>NoControl</value> 
     317  </data> 
    303318  <data name="passesMoveUpBtn.Location" type="System.Drawing.Point, System.Drawing"> 
    304319    <value>272, 147</value> 
     
    331346    <value>False</value> 
    332347  </data> 
     348  <data name="passesMoveDownBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> 
     349    <value>NoControl</value> 
     350  </data> 
    333351  <data name="passesMoveDownBtn.Location" type="System.Drawing.Point, System.Drawing"> 
    334352    <value>272, 176</value> 
     
    358376    <value>Bottom, Left, Right</value> 
    359377  </data> 
    360   <data name="passTxt.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms"> 
    361     <value>Top, Bottom, Left, Right</value> 
    362   </data> 
    363   <data name="passTxt.Location" type="System.Drawing.Point, System.Drawing"> 
    364     <value>9, 50</value> 
    365   </data> 
    366   <data name="passTxt.Multiline" type="System.Boolean, mscorlib"> 
    367     <value>True</value> 
    368   </data> 
    369   <data name="passTxt.Size" type="System.Drawing.Size, System.Drawing"> 
    370     <value>332, 86</value> 
    371   </data> 
    372   <data name="passTxt.TabIndex" type="System.Int32, mscorlib"> 
    373     <value>4</value> 
    374   </data> 
    375   <data name="&gt;&gt;passTxt.Name" xml:space="preserve"> 
    376     <value>passTxt</value> 
    377   </data> 
    378   <data name="&gt;&gt;passTxt.Type" xml:space="preserve"> 
    379     <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
    380   </data> 
    381   <data name="&gt;&gt;passTxt.Parent" xml:space="preserve"> 
     378  <data name="passEditor.Location" type="System.Drawing.Point, System.Drawing"> 
     379    <value>6, 13</value> 
     380  </data> 
     381  <data name="passEditor.Size" type="System.Drawing.Size, System.Drawing"> 
     382    <value>335, 123</value> 
     383  </data> 
     384  <data name="passEditor.TabIndex" type="System.Int32, mscorlib"> 
     385    <value>0</value> 
     386  </data> 
     387  <data name="&gt;&gt;passEditor.Name" xml:space="preserve"> 
     388    <value>passEditor</value> 
     389  </data> 
     390  <data name="&gt;&gt;passEditor.Type" xml:space="preserve"> 
     391    <value>Eraser.DefaultPlugins.CustomMethodPassEditor, Eraser.DefaultPlugins, Version=6.0.0.1, Culture=neutral, PublicKeyToken=4411c113eac74bb2</value> 
     392  </data> 
     393  <data name="&gt;&gt;passEditor.Parent" xml:space="preserve"> 
    382394    <value>passGrp</value> 
    383395  </data> 
    384   <data name="&gt;&gt;passTxt.ZOrder" xml:space="preserve"> 
     396  <data name="&gt;&gt;passEditor.ZOrder" xml:space="preserve"> 
    385397    <value>0</value> 
    386   </data> 
    387   <data name="passTypeGrp.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms"> 
    388     <value>Top, Left, Right</value> 
    389   </data> 
    390   <data name="passTypeText.AutoSize" type="System.Boolean, mscorlib"> 
    391     <value>True</value> 
    392   </data> 
    393   <data name="passTypeText.Location" type="System.Drawing.Point, System.Drawing"> 
    394     <value>3, 3</value> 
    395   </data> 
    396   <data name="passTypeText.Size" type="System.Drawing.Size, System.Drawing"> 
    397     <value>47, 19</value> 
    398   </data> 
    399   <data name="passTypeText.TabIndex" type="System.Int32, mscorlib"> 
    400     <value>0</value> 
    401   </data> 
    402   <data name="passTypeText.Text" xml:space="preserve"> 
    403     <value>Text</value> 
    404   </data> 
    405   <data name="&gt;&gt;passTypeText.Name" xml:space="preserve"> 
    406     <value>passTypeText</value> 
    407   </data> 
    408   <data name="&gt;&gt;passTypeText.Type" xml:space="preserve"> 
    409     <value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
    410   </data> 
    411   <data name="&gt;&gt;passTypeText.Parent" xml:space="preserve"> 
    412     <value>passTypeGrp</value> 
    413   </data> 
    414   <data name="&gt;&gt;passTypeText.ZOrder" xml:space="preserve"> 
    415     <value>0</value> 
    416   </data> 
    417   <data name="passTypeHex.AutoSize" type="System.Boolean, mscorlib"> 
    418     <value>True</value> 
    419   </data> 
    420   <data name="passTypeHex.Location" type="System.Drawing.Point, System.Drawing"> 
    421     <value>56, 3</value> 
    422   </data> 
    423   <data name="passTypeHex.Size" type="System.Drawing.Size, System.Drawing"> 
    424     <value>93, 19</value> 
    425   </data> 
    426   <data name="passTypeHex.TabIndex" type="System.Int32, mscorlib"> 
    427     <value>1</value> 
    428   </data> 
    429   <data name="passTypeHex.Text" xml:space="preserve"> 
    430     <value>Hexadecimal</value> 
    431   </data> 
    432   <data name="&gt;&gt;passTypeHex.Name" xml:space="preserve"> 
    433     <value>passTypeHex</value> 
    434   </data> 
    435   <data name="&gt;&gt;passTypeHex.Type" xml:space="preserve"> 
    436     <value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
    437   </data> 
    438   <data name="&gt;&gt;passTypeHex.Parent" xml:space="preserve"> 
    439     <value>passTypeGrp</value> 
    440   </data> 
    441   <data name="&gt;&gt;passTypeHex.ZOrder" xml:space="preserve"> 
    442     <value>1</value> 
    443   </data> 
    444   <data name="passTypeRandom.AutoSize" type="System.Boolean, mscorlib"> 
    445     <value>True</value> 
    446   </data> 
    447   <data name="passTypeRandom.Location" type="System.Drawing.Point, System.Drawing"> 
    448     <value>155, 3</value> 
    449   </data> 
    450   <data name="passTypeRandom.Size" type="System.Drawing.Size, System.Drawing"> 
    451     <value>70, 19</value> 
    452   </data> 
    453   <data name="passTypeRandom.TabIndex" type="System.Int32, mscorlib"> 
    454     <value>2</value> 
    455   </data> 
    456   <data name="passTypeRandom.Text" xml:space="preserve"> 
    457     <value>Random</value> 
    458   </data> 
    459   <data name="&gt;&gt;passTypeRandom.Name" xml:space="preserve"> 
    460     <value>passTypeRandom</value> 
    461   </data> 
    462   <data name="&gt;&gt;passTypeRandom.Type" xml:space="preserve"> 
    463     <value>System.Windows.Forms.RadioButton, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
    464   </data> 
    465   <data name="&gt;&gt;passTypeRandom.Parent" xml:space="preserve"> 
    466     <value>passTypeGrp</value> 
    467   </data> 
    468   <data name="&gt;&gt;passTypeRandom.ZOrder" xml:space="preserve"> 
    469     <value>2</value> 
    470   </data> 
    471   <data name="passTypeGrp.Location" type="System.Drawing.Point, System.Drawing"> 
    472     <value>6, 17</value> 
    473   </data> 
    474   <data name="passTypeGrp.Size" type="System.Drawing.Size, System.Drawing"> 
    475     <value>335, 27</value> 
    476   </data> 
    477   <data name="passTypeGrp.TabIndex" type="System.Int32, mscorlib"> 
    478     <value>3</value> 
    479   </data> 
    480   <data name="&gt;&gt;passTypeGrp.Name" xml:space="preserve"> 
    481     <value>passTypeGrp</value> 
    482   </data> 
    483   <data name="&gt;&gt;passTypeGrp.Type" xml:space="preserve"> 
    484     <value>System.Windows.Forms.FlowLayoutPanel, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 
    485   </data> 
    486   <data name="&gt;&gt;passTypeGrp.Parent" xml:space="preserve"> 
    487     <value>passGrp</value> 
    488   </data> 
    489   <data name="&gt;&gt;passTypeGrp.ZOrder" xml:space="preserve"> 
    490     <value>1</value> 
    491398  </data> 
    492399  <data name="passGrp.Enabled" type="System.Boolean, mscorlib"> 
     
    520427    <value>True</value> 
    521428  </data> 
     429  <data name="randomizeChk.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> 
     430    <value>NoControl</value> 
     431  </data> 
    522432  <data name="randomizeChk.Location" type="System.Drawing.Point, System.Drawing"> 
    523433    <value>15, 35</value> 
     
    547457    <value>Bottom, Right</value> 
    548458  </data> 
     459  <data name="okBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> 
     460    <value>NoControl</value> 
     461  </data> 
    549462  <data name="okBtn.Location" type="System.Drawing.Point, System.Drawing"> 
    550463    <value>206, 353</value> 
     
    573486  <data name="cancelBtn.Anchor" type="System.Windows.Forms.AnchorStyles, System.Windows.Forms"> 
    574487    <value>Bottom, Right</value> 
     488  </data> 
     489  <data name="cancelBtn.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms"> 
     490    <value>NoControl</value> 
    575491  </data> 
    576492  <data name="cancelBtn.Location" type="System.Drawing.Point, System.Drawing"> 
  • branches/eraser6/DefaultPlugins/DefaultPlugins.csproj

    r574 r585  
    5454      <DependentUpon>CustomMethodEditorForm.cs</DependentUpon> 
    5555    </Compile> 
     56    <Compile Include="CustomMethodPassEditor.cs"> 
     57      <SubType>UserControl</SubType> 
     58    </Compile> 
     59    <Compile Include="CustomMethodPassEditor.Designer.cs"> 
     60      <DependentUpon>CustomMethodPassEditor.cs</DependentUpon> 
     61    </Compile> 
    5662    <Compile Include="EraseCustom.cs" /> 
    5763    <Compile Include="EraseDoD.cs" /> 
     
    94100      <DependentUpon>CustomMethodEditorForm.cs</DependentUpon> 
    95101    </EmbeddedResource> 
     102    <EmbeddedResource Include="CustomMethodPassEditor.resx"> 
     103      <DependentUpon>CustomMethodPassEditor.cs</DependentUpon> 
     104    </EmbeddedResource> 
    96105    <EmbeddedResource Include="Strings.en.resx"> 
    97106      <SubType>Designer</SubType> 
  • branches/eraser6/DefaultPlugins/Strings.en.resx

    r384 r585  
    124124    <value>The method needs to have at least one pass defined.</value> 
    125125  </data> 
    126   <data name="The pass is supposed to write a constant to the files to be erased, but no constant was defined." xml:space="preserve"> 
    127     <value>The pass is supposed to write a constant to the files to be erased, but no constant was defined.</value> 
     126  <data name="The pass constant cannot be displayed as text because it contains invalid characters." xml:space="preserve"> 
     127    <value>The pass constant cannot be displayed as text because it contains invalid characters.</value> 
     128  </data> 
     129  <data name="Eraser" xml:space="preserve"> 
     130    <value>Eraser</value> 
     131  </data> 
     132  <data name="The input text is invalid for the current data type. Valid hexadecimal characters are the digits 0-9 and letters A-F" xml:space="preserve"> 
     133    <value>The input text is invalid for the current data type. Valid hexadecimal characters are the digits 0-9 and letters A-F</value> 
    128134  </data> 
    129135  <data name="US DoD 5220.22-M (8-306. / E, C and E)" xml:space="preserve"> 
  • branches/eraser6/DefaultPlugins/Strings.nl.resx

    r374 r585  
    124124    <value>(Untranslated)</value> 
    125125  </data> 
    126   <data name="The pass is supposed to write a constant to the files to be erased, but no constant was defined." xml:space="preserve"> 
     126  <data name="The pass constant cannot be displayed as text because it contains invalid characters." xml:space="preserve"> 
     127    <value>(Untranslated)</value> 
     128  </data> 
     129  <data name="Eraser" xml:space="preserve"> 
     130    <value>(Untranslated)</value> 
     131  </data> 
     132  <data name="The input text is invalid for the current data type. Valid hexadecimal characters are the digits 0-9 and letters A-F" xml:space="preserve"> 
    127133    <value>(Untranslated)</value> 
    128134  </data> 
  • branches/eraser6/DefaultPlugins/Strings.resx

    r374 r585  
    124124    <value>The method needs to have at least one pass defined.</value> 
    125125  </data> 
    126   <data name="The pass is supposed to write a constant to the files to be erased, but no constant was defined." xml:space="preserve"> 
    127     <value>The pass is supposed to write a constant to the files to be erased, but no constant was defined.</value> 
     126  <data name="The pass constant cannot be displayed as text because it contains invalid characters." xml:space="preserve"> 
     127    <value>The pass constant cannot be displayed as text because it contains invalid characters.</value> 
     128  </data> 
     129  <data name="Eraser" xml:space="preserve"> 
     130    <value>Eraser</value> 
     131  </data> 
     132  <data name="The input text is invalid for the current data type. Valid hexadecimal characters are the digits 0-9 and letters A-F" xml:space="preserve"> 
     133    <value>The input text is invalid for the current data type. Valid hexadecimal characters are the digits 0-9 and letters A-F</value> 
    128134  </data> 
    129135  <data name="US DoD 5220.22-M (8-306. / E, C and E)" xml:space="preserve"> 
Note: See TracChangeset for help on using the changeset viewer.