设置&部署项目与Source不同

时间:2014-02-04 21:35:32

标签: c# winforms installation

我创建了这个在VS12中工作正常并编译并运行罚款的程序。但是,我使用InstallShield向导为它创建了一个设置和部署项目。安装在我的测试机器上成功,但是我无法使我的EventHandler工作,它是一个我解析事件的服务实例。

class EventHandler : EventHandlerService.EventHandlerCCServicePortType
{
    public EventHandlerService.handleEventResponse1 handleEvent(EventHandlerService.handleEventRequest eventMsg)
    {
        EventHandlerService.handleEventResponse1 resp = new EventHandlerService.handleEventResponse1();
        EventHandlerService.handleEventResponse respInfo = new EventHandlerService.handleEventResponse();


        resp.handleEventResponse = respInfo;

        respInfo.@return = true;
        Main instance = Main.getFormInstance();
        instance.setPhoneStatus(eventMsg.handleEvent.@event);

        return (resp);

    }
}


static public Main getFormInstance()
{
    return (instance);
}



delegate void setPhoneStatusCB(EventHandlerService.standardEventMsg eventMsg);

public void setPhoneStatus(EventHandlerService.standardEventMsg eventMsg)
    {
            DisplayEvent(eventMsg);
            if (eventMsg.eventType == EventHandlerService.standardEventMsgEventType.CALL_EVENT)
            {
                if (eventMsg.callEvent.objectId == Int64.Parse(Peridot.Properties.Settings.Default.OIGPhoneObjID.ToString()))
                {
                    Peridot.Properties.Settings.Default.OIGPhoneLastEvent = eventMsg.callEvent.type.ToString();
                    if (eventMsg.callEvent.callState.ToString().Length > 0)
                    {
                        Peridot.Properties.Settings.Default.OIGPhoneState = eventMsg.callEvent.callState.ToString();
                    }

                    if (eventMsg.callEvent.localCallId.ToString().Length > 0)
                    {
                        Peridot.Properties.Settings.Default.OIGPhoneCallId = eventMsg.callEvent.localCallId.ToString();
                        writeToLogFile("Getting OIG Phone Call ID EventMsg: " + eventMsg.callEvent.localCallId.ToString(), "SYSTEM");
                    }
                    else
                    {
                        Peridot.Properties.Settings.Default.OIGPhoneCallId = "";
                        writeToLogFile("Getting OIG Phone Call ID Failied! EventMsg: " + eventMsg.callEvent.localCallId.ToString(), "SYSTEM");
                    }

                }
        }
 }

}

似乎从不调用setPhoneStatus并且永远不会发送Instance,这只发生在已部署的程序上而不是在开发中。任何想法?

0 个答案:

没有答案