private void buttonTransfer_Click(object sender, EventArgs e) { bool isEnter = false; Dictionary <string, string> dicLayers = new Dictionary <string, string>(); for (int i = listViewTransfer.Items.Count - 1; i >= 0; i--) { dicLayers.Add(listViewTransfer.Items[i].Text, listViewTransfer.Items[i].SubItems[1].Text); //Список слоев на изменение по стандарту listViewTransfer.Items.RemoveAt(i); } if (dicLayers.Count != 0) { isEnter = true; lm.TransferLayer(dicLayers); //Трансфер выбранных слоев lm.SaveDataLayers(dicLayers); } if (checkBoxTextStyle.Checked) { isEnter = true; TextStyleManager txtManager = new TextStyleManager(); txtManager.TransferTextStyles(); } if (checkBoxSizeStyle.Checked) { isEnter = true; DimStyleManager dimManager = new DimStyleManager(); dimManager.TransferDimStyles(); } if (!isEnter) { return; } //object aDoc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument; //aDoc.GetType().InvokeMember("Audit", // BindingFlags.InvokeMethod, null, // aDoc, new object[] { true }); MessageBox.Show("Стандартизация чертежа завершена!", "Выполнено!", MessageBoxButtons.OK, MessageBoxIcon.Information); }
private void buttonTransfer_Click(object sender, EventArgs e) { bool isEnter = false; Dictionary<string, string> dicLayers = new Dictionary<string, string>(); for (int i = listViewTransfer.Items.Count - 1; i >= 0; i--) { dicLayers.Add(listViewTransfer.Items[i].Text, listViewTransfer.Items[i].SubItems[1].Text); //Список слоев на изменение по стандарту listViewTransfer.Items.RemoveAt(i); } if (dicLayers.Count != 0) { isEnter = true; lm.TransferLayer(dicLayers); //Трансфер выбранных слоев lm.SaveDataLayers(dicLayers); } if (checkBoxTextStyle.Checked) { isEnter = true; TextStyleManager txtManager = new TextStyleManager(); txtManager.TransferTextStyles(); } if (checkBoxSizeStyle.Checked) { isEnter = true; DimStyleManager dimManager = new DimStyleManager(); dimManager.TransferDimStyles(); } if (!isEnter) return; //object aDoc = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument; //aDoc.GetType().InvokeMember("Audit", // BindingFlags.InvokeMethod, null, // aDoc, new object[] { true }); MessageBox.Show("Стандартизация чертежа завершена!", "Выполнено!", MessageBoxButtons.OK, MessageBoxIcon.Information); }