Exemplo n.º 1
0
        /// <summary>
        /// Purges all the selected collections.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void butPurge_Click(object sender, EventArgs e)
        {
            int items = 0;

            if (checkBlocks.Checked)
            {
                items += mDoc.Blocks.Purge();
            }
            if (checkDimstyles.Checked)
            {
                items += mDoc.DimStyles.Purge();
            }
            if (checkLayers.Checked)
            {
                items += mDoc.Layers.Purge();
            }
            if (checkImages.Checked)
            {
                items += mDoc.Images.Purge();
            }
            if (checkTextStyles.Checked)
            {
                items += mDoc.TextStyles.Purge();
            }
            if (checkLineTypes.Checked)
            {
                items += mDoc.LineTypes.Purge();
            }
            if (checkHatchPatterns.Checked)
            {
                items += mDoc.HatchPatterns.Purge();
            }

            mDoc.GetUnUsedTables(layers, blocks, dimstyles, linetypes, textstyles, images, hatchpatterns);
            FillTreeView();
            MessageBox.Show(this, items.ToString() + " items purged");
        }
Exemplo n.º 2
0
 /// <summary>
 /// This method is called before the dialog is shown.
 /// </summary>
 /// <param name="doc"></param>
 public void InitializeDialog(vdDocument doc)
 {
     mDoc = doc;
     //This method fills the passed parameter collections with all the unused items of the document.
     mDoc.GetUnUsedTables(layers, blocks, dimstyles, linetypes, textstyles, images, hatchpatterns);
 }