Пример #1
0
        public Form1(UserCmd c)
        {
            InitializeComponent();
            cmd = c;
            TCSettings s = c.mydb.tcSetting;

            propertyGrid1.SelectedObject = s;
        }
Пример #2
0
 static TCSettings loadDefault()
 {
     try
     {
         FileStream   fs  = new FileStream(TCSettings.AssemblyDirectory() + "/data.json", FileMode.Open, FileAccess.Read);
         StreamReader sr  = new StreamReader(fs);
         string       str = sr.ReadToEnd();
         sr.Close();
         TCSettings obj = JsonConvert.DeserializeObject <TCSettings>(str);
         TCSettings.Instance = obj;
         return(obj);
     }
     catch (Exception ex)
     {
     }
     TCSettings.Instance = new TCSettings();
     return(null);
 }
Пример #3
0
        public void init()
        {
            Document doc = Application.DocumentManager.MdiActiveDocument;
            Database db  = doc.Database;

            db.BeginSave += db_BeginSave;
            if (tcSetting == null)
            {
                tcSetting = new TCSettings();
            }

            if (TEDicList == null)
            {
                TEDicList = new List <TEDictionary>();
            }
            else
            {
                /*for (int i = 0; i < TEDicList.Count; i++)
                 * {
                 *  List<Triangle> tris=TEDicList[i].TriangleList;
                 *  for (int j = 0; j < tris.Count; j++)
                 *  {
                 *      tris[j].acDbFace=
                 *  }
                 * }*/
            }
            if (PSList == null)
            {
                PSList     = new List <PointSet>();
                Resolution = -1;
            }
            if (Resolution > PSList.Count - 1)
            {
                Resolution = PSList.Count - 1;
            }
            lineIds           = null;
            assistContourDics = new Dictionary <int, AssistContourDic>();
        }