示例#1
0
 public Form1()
 {
     InitializeComponent();
     Thread.CurrentThread.Priority = ThreadPriority.AboveNormal;
     m_DelegateSetLabelText = new DelegateSetLabelText(this.SetLabelCaption);
     m_DelegateSetProgressValue = new DelegateSetProgressValue(this.SetProgressValue);
     Application.ApplicationExit += new EventHandler(Application_ApplicationExit);
     _cancomms = new ME7Communication();
     _cancomms.onCanInfo += new ME7Communication.CanInfo(_comms_onCanInfo);
     _cancomms.onCanCount += new ME7Communication.CanCount(_cancomms_onCanCount);
     _cancomms.onWriteProgress += new ME7Communication.WriteProgress(_cancomms_onWriteProgress);
     _cancomms.onCanBusLoad += new ME7Communication.CanBusLoad(_cancomms_onCanBusLoad);
     _cancomms.setCANDevice("LAWICEL"); //TODO: Make this selectable
     _cancomms.onReadProgress += new ME7Communication.ReadProgress(_cancomms_onReadProgress);
     //_comms = new ME7KLineCommunication();
     //_comms.LogFolder = Application.StartupPath;
     //_comms.EnableLogging = true;
     //_comms.onStatusChanged += new ICommunication.StatusChanged(_comms_onStatusChanged);
     //_comms.onECUInfo += new ICommunication.ECUInfo(_comms_onECUInfo);
 }
示例#2
0
 public Form1()
 {
     InitializeComponent();
     Thread.CurrentThread.Priority = ThreadPriority.AboveNormal;
     m_DelegateSetLabelText        = new DelegateSetLabelText(this.SetLabelCaption);
     m_DelegateSetProgressValue    = new DelegateSetProgressValue(this.SetProgressValue);
     Application.ApplicationExit  += new EventHandler(Application_ApplicationExit);
     _cancomms                  = new ME7Communication();
     _cancomms.onCanInfo       += new ME7Communication.CanInfo(_comms_onCanInfo);
     _cancomms.onCanCount      += new ME7Communication.CanCount(_cancomms_onCanCount);
     _cancomms.onWriteProgress += new ME7Communication.WriteProgress(_cancomms_onWriteProgress);
     _cancomms.onCanBusLoad    += new ME7Communication.CanBusLoad(_cancomms_onCanBusLoad);
     _cancomms.setCANDevice("LAWICEL"); //TODO: Make this selectable
     _cancomms.onReadProgress += new ME7Communication.ReadProgress(_cancomms_onReadProgress);
     //_comms = new ME7KLineCommunication();
     //_comms.LogFolder = Application.StartupPath;
     //_comms.EnableLogging = true;
     //_comms.onStatusChanged += new ICommunication.StatusChanged(_comms_onStatusChanged);
     //_comms.onECUInfo += new ICommunication.ECUInfo(_comms_onECUInfo);
 }
示例#3
0
        public MainForm()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();

            UpdateConfigBox();

            // initialize delegates
            m_DelegateAddConsoleMsg           = new DelegateAddConsoleMsg(this.AddConsoleMsg);
            m_DelegateSetProgressValue        = new DelegateSetProgressValue(this.SetProgressValue);
            m_DelegateSetProgressBisValue     = new DelegateSetProgressBisValue(this.SetProgressBisValue);
            m_DelegateSetProgressCalcul1Value = new DelegateSetProgressCalcul1Value(this.SetProgressCalcul1Value);
            m_DelegateSetProgressCalcul2Value = new DelegateSetProgressCalcul1Value(this.SetProgressCalcul2Value);
            m_DelegateThreadFinished          = new DelegateThreadFinished(this.ThreadFinished);

            // initialize events
            m_EventStopThread    = new ManualResetEvent(false);
            m_EventThreadStopped = new ManualResetEvent(false);

            cLua = new ConfigLua(m_EventStopThread, m_EventThreadStopped, this);
        }