コード例 #1
0
ファイル: GearBuilderTest.cs プロジェクト: nfnsq/or-sapr
        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());
        }
コード例 #2
0
 private void startButton_Click(object sender, EventArgs e)
 {
     startToolStripStatusLabel.Text = "Kompas starting...";
     app.GetActiveApp();
     if (app.Kompas == null)
     {
         app.NewApp();
     }
     GotActiveApp();
 }