private void buttonSelect_Unselect_Click(object sender, EventArgs e) { bool allAreChecked = DwgNameList.CheckedItems.Count == DwgNameList.Items.Count; int count = DwgNameList.Items.Count; for (int i = 0; i < count; i++) { PublishInfo info = (PublishInfo)DwgNameList.Items[i]; _checkedChangedWithoutAuthorizationDwg = true; DwgNameList.SetItemChecked(DwgNameList.Items.IndexOf(info), !allAreChecked); _checkedChangedWithoutAuthorizationDwg = false; } if (_curPubInfo != null) { int nCount = LayoutNameList.Items.Count; for (int i = 0; i < nCount; i++) { LayoutInfo info = (LayoutInfo)LayoutNameList.Items[i]; _checkedChangedWithoutAuthorizationLayout = true; LayoutNameList.SetItemChecked(LayoutNameList.Items.IndexOf(info), !allAreChecked); _checkedChangedWithoutAuthorizationLayout = false; } } }
private void textBoxSourcePath_TextChanged(object sender, EventArgs e) { if (!Directory.Exists(textBoxSourcePath.Text)) { DwgNameList.ClearSelected(); LayoutNameList.ClearSelected(); textBoxSourcePath.Focus(); return; } if ( !KojtoCAD.Plotter.Plotter.BuildList( textBoxSourcePath.Text, checkBoxDWG.Checked, checkBoxDXF.Checked, checkBoxPlotAllDWGs.Checked)) { //throw new Exception("The plotter failed to build the drawing list. Maybe you have to select different source directory."); return; } // Refreshing the list boxes the ugly way if (this.checkBoxDWG.Checked) { this.checkBoxDWG.Checked = false; this.checkBoxDWG.Checked = true; } if (this.checkBoxDXF.Checked) { this.checkBoxDXF.Checked = false; this.checkBoxDXF.Checked = true; } }