private void btExportFirstImport_Click(object sender, EventArgs e) { SQMExporter exp = new SQMExporter(); textBox1.Text = ""; if (exp.InitExportFirstImport("Stratis", "EmptyMission", "gagagu")) { textBox1.Text += "Import finished \r\n"; if (exp.FinishExport(true)) { textBox1.Text += "export finished \r\n"; } else { textBox1.Text += "export failed: \r\n" + exp.GetLastException(); } } else { textBox1.Text += "export failed: \r\n" + exp.GetLastException(); } textBox1.Text += "\r\nend"; }
private void btSQMExport_Click(object sender, EventArgs e) { SQMExporter exp = new SQMExporter(); bool x = false; textBox1.Text = ""; // init x = exp.InitExport("Stratis", "blablubb", "gagagu"); textBox1.Text += "InitExport=" + x.ToString() + "\r\n"; exp.SetIntelDataValueByName("mission", "briefingName", "test"); exp.SetIntelDataValueByName("mission", "year", "2010"); int grp = exp.AddNewGroup("mission", "WEST"); exp.AddNewVehicleToGroupByID("mission", grp.ToString()); exp.AddNewWaypointToGroupByID("mission", grp.ToString()); exp.SetGroupWaypointPosition("mission", grp.ToString(), "0", "1", "1", "1"); exp.SetGroupWaypointEffectValueByName("mission", grp.ToString(), "0", "voice", "Alarm"); int sen = exp.AddNewSensor("mission"); //x = exp.AddVehicleItem(2, "B_Heli_Light_01_F", "EMPTY", 1705.3921, 5.5, 5413.7266, 0.0, 0.0, 0.0, "IN FORMATION", "NON PLAYABLE", "DEFAULT", "PRIVATE", "ACTUAL", "", "", "", 1.0, 1.0, 1.0, 1.0, 1.0, "", 1); //textBox1.Text += "AddVehicleItem=" + x.ToString() + "\r\n"; //x = exp.AddVehicleItem(3, "Rabbit_F", "AMBIENT LIFE", 1647.1359, 5.5, 5498.0913, 0.0, 0.0, 0.0, "IN FORMATION", "NON PLAYABLE", "DEFAULT", "PRIVATE", "ACTUAL", "", "", "", 1.0, 1.0, 1.0, 1.0, 1.0, "", 1); //textBox1.Text += "AddVehicleItem=" + x.ToString() + "\r\n"; // write file x = exp.FinishExport(true); textBox1.Text += "FinishExport=" + x.ToString() + "\r\n"; }