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.
43 lines
1.3 KiB
43 lines
1.3 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Eplan.EplApi.ApplicationFramework;
|
|
using KPlan.Util;
|
|
using KPlan.Forms;
|
|
using System.Windows;
|
|
using Eplan.EplApi.MasterData;
|
|
using Eplan.EplApi.DataModel;
|
|
using Eplan.EplApi.Base;
|
|
using System.Threading;
|
|
|
|
namespace KPlan {
|
|
class KTestAction : Eplan.EplApi.ApplicationFramework.IEplAction{
|
|
public bool Execute(ActionCallingContext ctx) {
|
|
//MDPartsDatabase mDPartsDatabase = EplanUtil.OpenDatabase();
|
|
//List<MDPart> parts = EplanUtil.GetUnsyncedParts(mDPartsDatabase, "", "");
|
|
//int cnt = parts==null?0:parts.Count;
|
|
//MessageBox.Show(""+cnt);
|
|
//Util.EplanUtil.UpdateAndClose(mDPartsDatabase);
|
|
|
|
Eplan.EplApi.MasterData.MDPartsDatabase mdPartsDatabase = Util.EplanUtil.OpenDatabase();
|
|
mdPartsDatabase.UpdateSearchIndex();
|
|
new KPartSync(mdPartsDatabase).ShowDialog();
|
|
Util.EplanUtil.UpdateAndClose(mdPartsDatabase);
|
|
return true;
|
|
}
|
|
|
|
public bool OnRegister(ref string Name, ref int Ordinal) {
|
|
Name = "KTestAction";
|
|
Ordinal = 20;
|
|
return true;
|
|
|
|
}
|
|
|
|
public void GetActionProperties(ref ActionProperties actionProperties) {
|
|
//actionProperties.Description = "Action test with parameters.";
|
|
}
|
|
}
|
|
}
|