Ejemplo n.º 1
0
 private void SaveSettings(ComboBox cb,ComboBox cbColor,Feature feature,Feature axfaner,string existPropName,string colorPropName)
 {
     //для каждой группы написать такую обработку.
     if (cb.Text == "Нет")
     {
         // гасим
         if (!axfaner.IsSuppressed())
             axfaner.SetSuppression(0);
         //if (featureNone.IsSuppressed())
         //    featureNone.SetSuppression(2);
         string colorPath = GetTextureFilePath("none");
         SetDecors(_swModel, feature, colorPath);
         _swModel.DeleteCustomInfo2(string.Empty, existPropName);
         _swModel.DeleteCustomInfo2(string.Empty, colorPropName);
         //_mSwAddin.SetModelProperty(_swModel, existPropName, "", swCustomInfoType_e.swCustomInfoText, string.Empty, true);//"Нет", true);
         //_mSwAddin.SetModelProperty(_swModel, colorPropName, "", swCustomInfoType_e.swCustomInfoText, string.Empty, true);//"Нет", true);
         return;
     }
     else if (cb.Text != "Нет")
     {
         //зажигаем (если погашена)
         if (axfaner.IsSuppressed())
             axfaner.SetSuppression(2);
         //if (!featureNone.IsSuppressed())
         //    featureNone.SetSuppression(0);
         _mSwAddin.SetModelProperty(_swModel, existPropName, "", swCustomInfoType_e.swCustomInfoText, "H", true);
     }
     if (!string.IsNullOrEmpty(cbColor.Text) && !axfaner.IsSuppressed())
     {
         string colorPath = GetTextureFilePath(cbColor.Text);
         SetDecors(_swModel,feature, colorPath);
         _mSwAddin.SetModelProperty(_swModel, colorPropName, "", swCustomInfoType_e.swCustomInfoText, cbColor.Text, true);
     }
 }