예제 #1
0
 /// <summary>
 /// Конструктор формы, инициализирующий его компоненты
 /// </summary>
 public GearConstructingForm()
 {
     InitializeComponent();
     app.GetActiveApp();
     if (app.Kompas != null)
     {
         GotActiveApp();
     }
 }
예제 #2
0
        public void Create(bool res, params double[] list)
        {
            KompasApp app = new KompasApp();

            app.GetActiveApp();
            if (app.Kompas == null)
            {
                app.NewApp();
            }
            Parameter[] param = new Parameter[list.Length];
            for (int i = 0; i < list.Length; i++)
            {
                param[i].Value = list[i];
            }
            param[0].Descrpiption = PluginForKompas.Properties.Resources.HexagonDepth;
            param[1].Descrpiption = PluginForKompas.Properties.Resources.StiffenerDepth;
            param[2].Descrpiption = PluginForKompas.Properties.Resources.StiffenerWidth;
            param[3].Descrpiption = PluginForKompas.Properties.Resources.HexagonDiameter;
            param[4].Descrpiption = PluginForKompas.Properties.Resources.CircumentalHoles;
            param[5].Descrpiption = PluginForKompas.Properties.Resources.CenterHole;
            param[6].Descrpiption = PluginForKompas.Properties.Resources.Rigidity;
            param[7].Descrpiption = PluginForKompas.Properties.Resources.Count;

            GearBuilder Gear = new GearBuilder(app, param);

            Assert.AreEqual(res, Gear.CreateGear());
        }