Subversion Repositories DevTools

Rev

Rev 2094 | Rev 2104 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2094 ghuddy 1
using System;
2
using System.Drawing;
3
using System.Collections;
4
using System.ComponentModel;
5
using System.Windows.Forms;
6
 
7
namespace EA_DocGen
8
{
9
	/// <summary>
10
	/// Summary description for EA_DocGenOptionsForm.
11
	/// </summary>
12
	public class EA_DocGenOptionsForm : System.Windows.Forms.Form
13
	{
14
      private System.Windows.Forms.Button buttonCancel;
15
      private System.Windows.Forms.Button buttonOK;
16
      private System.Windows.Forms.GroupBox groupBoxRequirements;
17
      private System.Windows.Forms.RadioButton radioButtonReqDefault;
18
      private System.Windows.Forms.RadioButton radioButtonReqSections;
19
      private System.Windows.Forms.RadioButton radioButtonReqFormat;
20
      private System.Windows.Forms.TextBox textBox_ReqFormat;
21
      private System.Windows.Forms.GroupBox groupBoxElementTypes;
22
      private System.Windows.Forms.Button button_ET_All;
23
      private System.Windows.Forms.Button button_ET_None;
24
      private System.Windows.Forms.CheckedListBox checkedListBox_ETs;
25
      private System.Windows.Forms.Button buttonDefault;
26
      private System.Windows.Forms.Label label1;
27
      private System.Windows.Forms.TextBox textBoxNumParaTransition;
28
      private System.Windows.Forms.CheckBox checkBox_SuppressEleDescMissWarn;
29
      private System.Windows.Forms.CheckBox checkBox_SuppressPrivateClasses;
30
      private System.Windows.Forms.CheckBox checkBox_SuppressPrivateMethods;
31
      private System.Windows.Forms.CheckBox checkBox_SuppressPrivateAttrs;
32
		/// <summary>
33
		/// Required designer variable.
34
		/// </summary>
35
		private System.ComponentModel.Container components = null;
36
 
37
		public EA_DocGenOptionsForm()
38
		{
39
			//
40
			// Required for Windows Form Designer support
41
			//
42
			InitializeComponent();
43
 
44
			//
45
			// TODO: Add any constructor code after InitializeComponent call
46
			//
47
		}
48
 
49
		/// <summary>
50
		/// Clean up any resources being used.
51
		/// </summary>
52
		protected override void Dispose( bool disposing )
53
		{
54
			if( disposing )
55
			{
56
				if(components != null)
57
				{
58
					components.Dispose();
59
				}
60
			}
61
			base.Dispose( disposing );
62
		}
63
 
64
		#region Windows Form Designer generated code
65
		/// <summary>
66
		/// Required method for Designer support - do not modify
67
		/// the contents of this method with the code editor.
68
		/// </summary>
69
		private void InitializeComponent()
70
		{
71
         this.buttonCancel = new System.Windows.Forms.Button();
72
         this.buttonOK = new System.Windows.Forms.Button();
73
         this.groupBoxRequirements = new System.Windows.Forms.GroupBox();
74
         this.textBox_ReqFormat = new System.Windows.Forms.TextBox();
75
         this.radioButtonReqFormat = new System.Windows.Forms.RadioButton();
76
         this.radioButtonReqSections = new System.Windows.Forms.RadioButton();
77
         this.radioButtonReqDefault = new System.Windows.Forms.RadioButton();
78
         this.checkedListBox_ETs = new System.Windows.Forms.CheckedListBox();
79
         this.groupBoxElementTypes = new System.Windows.Forms.GroupBox();
80
         this.buttonDefault = new System.Windows.Forms.Button();
81
         this.button_ET_None = new System.Windows.Forms.Button();
82
         this.button_ET_All = new System.Windows.Forms.Button();
83
         this.label1 = new System.Windows.Forms.Label();
84
         this.textBoxNumParaTransition = new System.Windows.Forms.TextBox();
85
         this.checkBox_SuppressEleDescMissWarn = new System.Windows.Forms.CheckBox();
86
         this.checkBox_SuppressPrivateClasses = new System.Windows.Forms.CheckBox();
87
         this.checkBox_SuppressPrivateMethods = new System.Windows.Forms.CheckBox();
88
         this.checkBox_SuppressPrivateAttrs = new System.Windows.Forms.CheckBox();
89
         this.groupBoxRequirements.SuspendLayout();
90
         this.groupBoxElementTypes.SuspendLayout();
91
         this.SuspendLayout();
2098 ghuddy 92
         //
2094 ghuddy 93
         // buttonCancel
2098 ghuddy 94
         //
2094 ghuddy 95
         this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
96
         this.buttonCancel.Location = new System.Drawing.Point(328, 584);
97
         this.buttonCancel.Name = "buttonCancel";
98
         this.buttonCancel.Size = new System.Drawing.Size(96, 24);
99
         this.buttonCancel.TabIndex = 0;
100
         this.buttonCancel.Text = "Cancel";
2098 ghuddy 101
         //
2094 ghuddy 102
         // buttonOK
2098 ghuddy 103
         //
2094 ghuddy 104
         this.buttonOK.DialogResult = System.Windows.Forms.DialogResult.OK;
105
         this.buttonOK.Location = new System.Drawing.Point(216, 584);
106
         this.buttonOK.Name = "buttonOK";
107
         this.buttonOK.Size = new System.Drawing.Size(96, 24);
108
         this.buttonOK.TabIndex = 1;
109
         this.buttonOK.Text = "OK";
2098 ghuddy 110
         //
2094 ghuddy 111
         // groupBoxRequirements
2098 ghuddy 112
         //
2094 ghuddy 113
         this.groupBoxRequirements.Controls.Add(this.textBox_ReqFormat);
114
         this.groupBoxRequirements.Controls.Add(this.radioButtonReqFormat);
115
         this.groupBoxRequirements.Controls.Add(this.radioButtonReqSections);
116
         this.groupBoxRequirements.Controls.Add(this.radioButtonReqDefault);
117
         this.groupBoxRequirements.Location = new System.Drawing.Point(16, 24);
118
         this.groupBoxRequirements.Name = "groupBoxRequirements";
119
         this.groupBoxRequirements.Size = new System.Drawing.Size(408, 120);
120
         this.groupBoxRequirements.TabIndex = 2;
121
         this.groupBoxRequirements.TabStop = false;
122
         this.groupBoxRequirements.Text = "Requirement Element Handling";
2098 ghuddy 123
         //
2094 ghuddy 124
         // textBox_ReqFormat
2098 ghuddy 125
         //
2094 ghuddy 126
         this.textBox_ReqFormat.Location = new System.Drawing.Point(176, 82);
127
         this.textBox_ReqFormat.Name = "textBox_ReqFormat";
128
         this.textBox_ReqFormat.Size = new System.Drawing.Size(216, 22);
129
         this.textBox_ReqFormat.TabIndex = 3;
130
         this.textBox_ReqFormat.Text = "[REQUIREMENT: %s]";
2098 ghuddy 131
         //
2094 ghuddy 132
         // radioButtonReqFormat
2098 ghuddy 133
         //
2094 ghuddy 134
         this.radioButtonReqFormat.Location = new System.Drawing.Point(16, 80);
135
         this.radioButtonReqFormat.Name = "radioButtonReqFormat";
136
         this.radioButtonReqFormat.Size = new System.Drawing.Size(152, 24);
137
         this.radioButtonReqFormat.TabIndex = 2;
138
         this.radioButtonReqFormat.Text = "Display with format:";
2098 ghuddy 139
         //
2094 ghuddy 140
         // radioButtonReqSections
2098 ghuddy 141
         //
2094 ghuddy 142
         this.radioButtonReqSections.Location = new System.Drawing.Point(16, 56);
143
         this.radioButtonReqSections.Name = "radioButtonReqSections";
144
         this.radioButtonReqSections.Size = new System.Drawing.Size(376, 24);
145
         this.radioButtonReqSections.TabIndex = 1;
146
         this.radioButtonReqSections.Text = "Display as sections (each requirement is a section)";
2098 ghuddy 147
         //
2094 ghuddy 148
         // radioButtonReqDefault
2098 ghuddy 149
         //
2094 ghuddy 150
         this.radioButtonReqDefault.Checked = true;
151
         this.radioButtonReqDefault.Location = new System.Drawing.Point(16, 32);
152
         this.radioButtonReqDefault.Name = "radioButtonReqDefault";
153
         this.radioButtonReqDefault.Size = new System.Drawing.Size(152, 24);
154
         this.radioButtonReqDefault.TabIndex = 0;
155
         this.radioButtonReqDefault.TabStop = true;
156
         this.radioButtonReqDefault.Text = "Default (style based)";
2098 ghuddy 157
         //
2094 ghuddy 158
         // checkedListBox_ETs
2098 ghuddy 159
         //
2094 ghuddy 160
         this.checkedListBox_ETs.Location = new System.Drawing.Point(32, 192);
161
         this.checkedListBox_ETs.Name = "checkedListBox_ETs";
162
         this.checkedListBox_ETs.Size = new System.Drawing.Size(272, 208);
163
         this.checkedListBox_ETs.TabIndex = 3;
2098 ghuddy 164
         //
2094 ghuddy 165
         // groupBoxElementTypes
2098 ghuddy 166
         //
2094 ghuddy 167
         this.groupBoxElementTypes.Controls.Add(this.buttonDefault);
168
         this.groupBoxElementTypes.Controls.Add(this.button_ET_None);
169
         this.groupBoxElementTypes.Controls.Add(this.button_ET_All);
170
         this.groupBoxElementTypes.Location = new System.Drawing.Point(16, 160);
171
         this.groupBoxElementTypes.Name = "groupBoxElementTypes";
172
         this.groupBoxElementTypes.Size = new System.Drawing.Size(408, 256);
173
         this.groupBoxElementTypes.TabIndex = 4;
174
         this.groupBoxElementTypes.TabStop = false;
175
         this.groupBoxElementTypes.Text = "Element Types to be serialised to document";
2098 ghuddy 176
         //
2094 ghuddy 177
         // buttonDefault
2098 ghuddy 178
         //
2094 ghuddy 179
         this.buttonDefault.Location = new System.Drawing.Point(304, 128);
180
         this.buttonDefault.Name = "buttonDefault";
181
         this.buttonDefault.Size = new System.Drawing.Size(88, 23);
182
         this.buttonDefault.TabIndex = 2;
183
         this.buttonDefault.Text = "Defaults";
184
         this.buttonDefault.Click += new System.EventHandler(this.buttonDefault_Click);
2098 ghuddy 185
         //
2094 ghuddy 186
         // button_ET_None
2098 ghuddy 187
         //
2094 ghuddy 188
         this.button_ET_None.Location = new System.Drawing.Point(304, 72);
189
         this.button_ET_None.Name = "button_ET_None";
190
         this.button_ET_None.Size = new System.Drawing.Size(88, 23);
191
         this.button_ET_None.TabIndex = 1;
192
         this.button_ET_None.Text = "DeSelect All";
193
         this.button_ET_None.Click += new System.EventHandler(this.button_ET_None_Click);
2098 ghuddy 194
         //
2094 ghuddy 195
         // button_ET_All
2098 ghuddy 196
         //
2094 ghuddy 197
         this.button_ET_All.Location = new System.Drawing.Point(304, 32);
198
         this.button_ET_All.Name = "button_ET_All";
199
         this.button_ET_All.Size = new System.Drawing.Size(88, 24);
200
         this.button_ET_All.TabIndex = 0;
201
         this.button_ET_All.Text = "Select All";
202
         this.button_ET_All.Click += new System.EventHandler(this.button_ET_All_Click);
2098 ghuddy 203
         //
2094 ghuddy 204
         // label1
2098 ghuddy 205
         //
2094 ghuddy 206
         this.label1.Location = new System.Drawing.Point(16, 528);
207
         this.label1.Name = "label1";
208
         this.label1.Size = new System.Drawing.Size(224, 40);
209
         this.label1.TabIndex = 5;
210
         this.label1.Text = "Transition to NumPara style at level (0 denotes no transition)";
2098 ghuddy 211
         //
2094 ghuddy 212
         // textBoxNumParaTransition
2098 ghuddy 213
         //
2094 ghuddy 214
         this.textBoxNumParaTransition.Location = new System.Drawing.Point(248, 528);
215
         this.textBoxNumParaTransition.Name = "textBoxNumParaTransition";
216
         this.textBoxNumParaTransition.Size = new System.Drawing.Size(40, 22);
217
         this.textBoxNumParaTransition.TabIndex = 6;
218
         this.textBoxNumParaTransition.Text = "0";
2098 ghuddy 219
         //
2094 ghuddy 220
         // checkBox_SuppressEleDescMissWarn
2098 ghuddy 221
         //
2094 ghuddy 222
         this.checkBox_SuppressEleDescMissWarn.Location = new System.Drawing.Point(16, 496);
223
         this.checkBox_SuppressEleDescMissWarn.Name = "checkBox_SuppressEleDescMissWarn";
224
         this.checkBox_SuppressEleDescMissWarn.Size = new System.Drawing.Size(336, 16);
225
         this.checkBox_SuppressEleDescMissWarn.TabIndex = 7;
226
         this.checkBox_SuppressEleDescMissWarn.Text = "Suppress Element Description Missing Warnings";
2098 ghuddy 227
         //
2094 ghuddy 228
         // checkBox_SuppressPrivateClasses
2098 ghuddy 229
         //
2094 ghuddy 230
         this.checkBox_SuppressPrivateClasses.Location = new System.Drawing.Point(16, 464);
231
         this.checkBox_SuppressPrivateClasses.Name = "checkBox_SuppressPrivateClasses";
232
         this.checkBox_SuppressPrivateClasses.Size = new System.Drawing.Size(192, 24);
233
         this.checkBox_SuppressPrivateClasses.TabIndex = 8;
234
         this.checkBox_SuppressPrivateClasses.Text = "Suppress Private Classes";
2098 ghuddy 235
         //
2094 ghuddy 236
         // checkBox_SuppressPrivateMethods
2098 ghuddy 237
         //
2094 ghuddy 238
         this.checkBox_SuppressPrivateMethods.Location = new System.Drawing.Point(16, 432);
239
         this.checkBox_SuppressPrivateMethods.Name = "checkBox_SuppressPrivateMethods";
240
         this.checkBox_SuppressPrivateMethods.Size = new System.Drawing.Size(184, 24);
241
         this.checkBox_SuppressPrivateMethods.TabIndex = 9;
242
         this.checkBox_SuppressPrivateMethods.Text = "Suppress Private Methods";
2098 ghuddy 243
         //
2094 ghuddy 244
         // checkBox_SuppressPrivateAttrs
2098 ghuddy 245
         //
2094 ghuddy 246
         this.checkBox_SuppressPrivateAttrs.Location = new System.Drawing.Point(216, 432);
247
         this.checkBox_SuppressPrivateAttrs.Name = "checkBox_SuppressPrivateAttrs";
248
         this.checkBox_SuppressPrivateAttrs.Size = new System.Drawing.Size(192, 24);
249
         this.checkBox_SuppressPrivateAttrs.TabIndex = 10;
250
         this.checkBox_SuppressPrivateAttrs.Text = "Suppress Private Attributes";
2098 ghuddy 251
         //
2094 ghuddy 252
         // EA_DocGenOptionsForm
2098 ghuddy 253
         //
2094 ghuddy 254
         this.AutoScaleBaseSize = new System.Drawing.Size(6, 15);
255
         this.ClientSize = new System.Drawing.Size(440, 624);
256
         this.Controls.Add(this.checkBox_SuppressPrivateAttrs);
257
         this.Controls.Add(this.checkBox_SuppressPrivateMethods);
258
         this.Controls.Add(this.checkBox_SuppressPrivateClasses);
259
         this.Controls.Add(this.checkBox_SuppressEleDescMissWarn);
260
         this.Controls.Add(this.textBoxNumParaTransition);
261
         this.Controls.Add(this.label1);
262
         this.Controls.Add(this.checkedListBox_ETs);
263
         this.Controls.Add(this.groupBoxRequirements);
264
         this.Controls.Add(this.buttonOK);
265
         this.Controls.Add(this.buttonCancel);
266
         this.Controls.Add(this.groupBoxElementTypes);
267
         this.Name = "EA_DocGenOptionsForm";
268
         this.Text = "EA_DocGenOptionsForm";
269
         this.groupBoxRequirements.ResumeLayout(false);
270
         this.groupBoxElementTypes.ResumeLayout(false);
271
         this.ResumeLayout(false);
272
 
273
      }
274
		#endregion
275
 
276
 
277
      public void populate(EA.Repository EA_Repository, EA_DocGenOptions options)
278
      {
279
         EA.ObjectType objType;
280
         object obj;
281
 
282
         objType = EA_Repository.GetTreeSelectedItem( out obj );
283
         if (objType == EA.ObjectType.otElement)
284
         {
285
            EA.Element ele = (EA.Element)obj;
286
            if (0 == ele.Name.CompareTo(EA_Constants.EA_DocGenBaseName))
287
            {
288
               if (options.opt_DisplayRequirementElementsAsSections == true)
289
               {
290
                  radioButtonReqSections.Checked = true;
291
               }
292
               else if (options.opt_DisplayRequirementsWithStatus == true)
293
               {
294
                  radioButtonReqDefault.Checked = true;
295
               }
2098 ghuddy 296
               else
2094 ghuddy 297
               {
298
                  radioButtonReqFormat.Checked = true;
299
                  textBox_ReqFormat.Text = options.opt_RequirementElementDisplayFormat;
300
               }
301
 
302
               textBoxNumParaTransition.Text = options.opt_ElementHeadingTransitionLevel.ToString();
303
 
304
               CheckState defState;
305
               if (options.opt_ElementTypes.Count > 0)
306
                  defState = CheckState.Unchecked;
307
               else
308
                  defState = CheckState.Checked;
309
 
2098 ghuddy 310
               // Items marked with a ? are things that do not appear in the New Element dialogs drop down list yet they
311
               // are mentioned in the on-line help files. Not sure why this is so. Perhpas such element types are created
312
               // by other means that the New Element dialog?
313
               checkedListBox_ETs.Items.Add("Action",                     defState);
314
               checkedListBox_ETs.Items.Add("Activity",                   defState);
315
               checkedListBox_ETs.Items.Add("ActivityPartition",          defState);
316
               checkedListBox_ETs.Items.Add("ActivityRegion",             defState);    // ?
317
               checkedListBox_ETs.Items.Add("Actor",                      defState);
318
               checkedListBox_ETs.Items.Add("Artifact",                   defState);
319
               checkedListBox_ETs.Items.Add("Association",                defState);    // ?
320
               checkedListBox_ETs.Items.Add("Boundary",                   defState);    // ?
321
               checkedListBox_ETs.Items.Add("CentralBufferNode",          defState);
322
               checkedListBox_ETs.Items.Add("Change",                     defState);
323
               checkedListBox_ETs.Items.Add("Class",                      defState);
324
               checkedListBox_ETs.Items.Add("Collaboration",              defState);
325
               checkedListBox_ETs.Items.Add("Comment",                    defState);
326
               checkedListBox_ETs.Items.Add("Component",                  defState);
327
               checkedListBox_ETs.Items.Add("Constraint",                 defState);    // ?
328
               checkedListBox_ETs.Items.Add("DataStore",                  defState);
329
               checkedListBox_ETs.Items.Add("Decision",                   defState);    // ?
330
               checkedListBox_ETs.Items.Add("DeploymentSpecification",    defState);
331
               checkedListBox_ETs.Items.Add("DiagramFrame",               defState);
332
               checkedListBox_ETs.Items.Add("EmbeddedElement",            defState);    // ?
333
               checkedListBox_ETs.Items.Add("Entity",                     defState);
334
               checkedListBox_ETs.Items.Add("EntryPoint",                 defState);    // ?
335
               checkedListBox_ETs.Items.Add("Enumeration",                defState);
336
               checkedListBox_ETs.Items.Add("Event",                      defState);    // ?
337
               checkedListBox_ETs.Items.Add("ExcecutionEnvironment",      defState);
338
               checkedListBox_ETs.Items.Add("ExceptionHandler",           defState);
339
               checkedListBox_ETs.Items.Add("ExitPoint",                  defState);    // ?
340
               checkedListBox_ETs.Items.Add("ExpansionNode",              defState);    // ?
341
               checkedListBox_ETs.Items.Add("ExpansionRegion",            defState);
342
               checkedListBox_ETs.Items.Add("GUIElement",                 defState);
343
               checkedListBox_ETs.Items.Add("InformationItem",            defState);
344
               checkedListBox_ETs.Items.Add("Interaction",                defState);
345
               checkedListBox_ETs.Items.Add("InteractionFragment",        defState);
346
               checkedListBox_ETs.Items.Add("InteractionOccurrence",      defState);    // ?
347
               checkedListBox_ETs.Items.Add("InteractionState",           defState);    // ?
348
               checkedListBox_ETs.Items.Add("Interface",                  defState);
349
               checkedListBox_ETs.Items.Add("InterruptibleActivityRegion",defState);
350
               checkedListBox_ETs.Items.Add("Issue",                      defState);
351
               checkedListBox_ETs.Items.Add("MergeNode",                  defState);
352
               checkedListBox_ETs.Items.Add("Node",                       defState);
353
               checkedListBox_ETs.Items.Add("Note",                       defState);    // ?
354
               checkedListBox_ETs.Items.Add("Object",                     defState);
355
               checkedListBox_ETs.Items.Add("Package",                    defState);    // ?
356
               checkedListBox_ETs.Items.Add("Parameter",                  defState);    // ?
357
               checkedListBox_ETs.Items.Add("Part",                       defState);    // ?
358
               checkedListBox_ETs.Items.Add("Port",                       defState);    // ?
359
               checkedListBox_ETs.Items.Add("ProvidedInterface",          defState);    // ?
360
               checkedListBox_ETs.Items.Add("Region",                     defState);
361
               checkedListBox_ETs.Items.Add("Report",                     defState);    // ?
362
               checkedListBox_ETs.Items.Add("RequiredInterface",          defState);    // ?
363
               checkedListBox_ETs.Items.Add("Requirement",                defState);
364
               checkedListBox_ETs.Items.Add("Screen",                     defState);
365
               checkedListBox_ETs.Items.Add("Sequence",                   defState);    // ?
366
               checkedListBox_ETs.Items.Add("Signal",                     defState);
367
               checkedListBox_ETs.Items.Add("State",                      defState);
368
               checkedListBox_ETs.Items.Add("StateMachine",               defState);
369
               checkedListBox_ETs.Items.Add("StateNode",                  defState);
370
               checkedListBox_ETs.Items.Add("Synchronization",            defState);    // ?
371
               checkedListBox_ETs.Items.Add("Text",                       defState);    // ?
372
               checkedListBox_ETs.Items.Add("TimeLine",                   defState);
373
               checkedListBox_ETs.Items.Add("Trigger",                    defState);
374
               checkedListBox_ETs.Items.Add("UMLDiagram",                 defState);    // ?
375
               checkedListBox_ETs.Items.Add("UseCase",                    defState);
2094 ghuddy 376
 
377
               if (options.opt_ElementTypes.Count > 0)
378
               {
379
                  foreach(string s in options.opt_ElementTypes)
380
                  {
381
                     int i = checkedListBox_ETs.FindStringExact(s);
382
                     if (i != -1)
383
                     {
384
                        checkedListBox_ETs.SetItemChecked(i,true);
385
                     }
386
                  }
387
               }
388
 
389
               checkBox_SuppressEleDescMissWarn.Checked = options.opt_SuppressElementDescriptionMissingWarnings;
390
 
391
               checkBox_SuppressPrivateClasses.Checked = options.opt_SuppressPrivateClasses;
392
               checkBox_SuppressPrivateMethods.Checked = options.opt_SuppressPrivateMethods;
393
               checkBox_SuppressPrivateAttrs.Checked = options.opt_SuppressPrivateAttributes;
394
 
395
 
396
            }
397
         }
398
      }
399
 
400
 
401
      public void read(EA.Repository EA_Repository, EA_DocGenOptions options)
402
      {
403
         options.opt_RequirementElementDisplayFormat = textBox_ReqFormat.Text;
404
 
405
         if (radioButtonReqSections.Checked == true)
406
         {
407
            options.opt_DisplayRequirementElementsAsSections = true;
408
            options.opt_DisplayRequirementsWithStatus = false;
409
         }
410
         else if (radioButtonReqDefault.Checked == true)
411
         {
412
            options.opt_DisplayRequirementElementsAsSections = false;
413
            options.opt_DisplayRequirementsWithStatus = true;
414
         }
2098 ghuddy 415
         else
2094 ghuddy 416
         {
417
            options.opt_DisplayRequirementElementsAsSections = false;
418
            options.opt_DisplayRequirementsWithStatus = false;
419
         }
2098 ghuddy 420
 
2094 ghuddy 421
         options.opt_ElementHeadingTransitionLevel = System.Convert.ToInt32(textBoxNumParaTransition.Text);
422
 
423
         // If every item is checked then we give back an empty opt_ElementTypes list because
424
         // that indicates that the user wants everything.
425
         options.opt_ElementTypes.Clear();
426
         if (checkedListBox_ETs.CheckedItems.Count != checkedListBox_ETs.Items.Count)
427
         {
428
            foreach(string s in checkedListBox_ETs.CheckedItems)
429
            {
430
               options.opt_ElementTypes.Add(s);
431
            }
432
         }
433
 
434
         options.opt_SuppressElementDescriptionMissingWarnings = checkBox_SuppressEleDescMissWarn.Checked;
435
 
436
         options.opt_SuppressPrivateClasses = checkBox_SuppressPrivateClasses.Checked;
437
         options.opt_SuppressPrivateMethods= checkBox_SuppressPrivateMethods.Checked;
438
         options.opt_SuppressPrivateAttributes = checkBox_SuppressPrivateAttrs.Checked;
439
      }
440
 
441
      private void button_ET_All_Click(object sender, System.EventArgs e)
442
      {
443
         int i;
444
         for (i=0; i < checkedListBox_ETs.Items.Count; i++)
445
         {
446
            checkedListBox_ETs.SetItemChecked(i, true);
447
         }
448
      }
449
 
450
      private void button_ET_None_Click(object sender, System.EventArgs e)
451
      {
452
         int i;
453
         for (i=0; i < checkedListBox_ETs.Items.Count; i++)
454
         {
455
            checkedListBox_ETs.SetItemChecked(i, false);
456
         }
457
      }
458
 
459
      private void findAndCheckItem(string s)
460
      {
461
         int i = checkedListBox_ETs.FindStringExact(s);
462
         if (i != -1)
463
            checkedListBox_ETs.SetItemChecked(i,true);
464
      }
465
 
466
      private void checkDefaultItems()
467
      {
468
         findAndCheckItem("Class");
469
         findAndCheckItem("Component");
470
         findAndCheckItem("Interface");
471
         findAndCheckItem("Requirement");
472
      }
473
 
474
      private void buttonDefault_Click(object sender, System.EventArgs e)
475
      {
476
         int i = 0;
477
 
478
         for (i=0; i < checkedListBox_ETs.Items.Count; i++)
479
         {
480
            checkedListBox_ETs.SetItemChecked(i, false);
481
         }
482
         checkDefaultItems();
483
      }
484
 
485
 
486
	}
487
}