You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.1 KiB
40 lines
1.1 KiB
using Eplan.EplApi.ApplicationFramework;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using KPlan.Forms;
|
|
|
|
namespace KPlan.Actions {
|
|
class CreateProjectAction : Eplan.EplApi.ApplicationFramework.IEplAction {
|
|
|
|
public bool Execute(ActionCallingContext ctx) {
|
|
CreateProject projDialog = new CreateProject();
|
|
projDialog.ShowDialog();
|
|
if (projDialog.create) {
|
|
try {
|
|
projDialog.DoCreateProject();
|
|
}
|
|
catch (Exception ex) {
|
|
System.Windows.MessageBox.Show("创建项目出错:" + ex.Message);
|
|
Util.KUtil.LogErr(ex);
|
|
}
|
|
}
|
|
return true;
|
|
}
|
|
|
|
public bool OnRegister(ref string Name, ref int Ordinal) {
|
|
Name = "CreateProjectAction";
|
|
Ordinal = 20;
|
|
return true;
|
|
}
|
|
|
|
public void GetActionProperties(ref ActionProperties actionProperties) {
|
|
//actionProperties.Description = "Action test with parameters.";
|
|
}
|
|
|
|
|
|
}
|
|
}
|