Ejemplo n.º 1
0
        private void CreateRobotDispatcher()
        {
            try
            {
                WagoPane.ConnectToBK(m_BK); //Todo: Deviceinit wo?
                m_BK.SetConfig("127.0.0.1", 502);
                m_BK.Start();
                m_EventStopThread    = new ManualResetEvent(false);
                m_EventThreadStopped = new ManualResetEvent(false);
                RobotInterface DispatcherInterface = new RobotInterface(null, modulDisplay1, null, null,
                                                                        m_ModuleState, null);
                RobotInterface Robot1Interface = new RobotInterface(stationDisplay1, null, null, null,
                                                                    m_ModuleState, m_BK);
                RobotInterface Robot2Interface = new RobotInterface(stationDisplay2, modulDisplay1, resultTable1, partHistoryTable1,
                                                                    m_ModuleState, m_BK);

                m_RobotDispatcher = new DemoRobotDispatcher(m_EventStopThread, m_EventThreadStopped, DispatcherInterface, Robot1Interface, Robot2Interface);

                //ToDo: Anzeigeelemnte mit Ereignishandlern verbinden
                this.counterEditor1.ConnectEvent(m_RobotDispatcher.GetRefRobot2().GetRefCounter());
            }
            catch (SystemException e)
            {
                DlgError.HandleException(e);
            }
        }
Ejemplo n.º 2
0
        private void InitControls()
        {
            //SoftKeys definieren, max 10 pro Menu
            MainSoftKeys.ButtonNavigation SoftKeyMenuDesc = new MainSoftKeys.ButtonNavigation();
            //Hauptmenu
            SoftKeyMenuDesc.Add(new MainSoftKeys.ButtonConfig("AutomaticStop", "Automatik Stop", "", MainSoftKeys.ButtonFunction.Call));
            SoftKeyMenuDesc.Add(new MainSoftKeys.ButtonConfig("HomingStart", "Grundstellungs -fahrt", "", MainSoftKeys.ButtonFunction.Call));
            SoftKeyMenuDesc.Add(new MainSoftKeys.ButtonConfig("AutomaticStart", "Automatik Start", "", MainSoftKeys.ButtonFunction.Call));
            SoftKeyMenuDesc.Add(new MainSoftKeys.ButtonConfig("AutomaticStartOnce", "Automatik Einmal", "", MainSoftKeys.ButtonFunction.Call));
            SoftKeyMenuDesc.Add(new MainSoftKeys.ButtonConfig("SelectUser", "Benutzerwechsel", "", MainSoftKeys.ButtonFunction.Call));
            SoftKeyMenuDesc.Add(new MainSoftKeys.ButtonConfig("SelectType", "Typwechsel", "", MainSoftKeys.ButtonFunction.Call));
            SoftKeyMenuDesc.Add(new MainSoftKeys.ButtonConfig("SettingsType", "Typeditor", "", MainSoftKeys.ButtonFunction.Call));
            SoftKeyMenuDesc.Add(new MainSoftKeys.ButtonConfig("options", "Service...", "", MainSoftKeys.ButtonFunction.OpenSubMenu));
            //Optionen
            SoftKeyMenuDesc.Add(new MainSoftKeys.ButtonConfig("", "<--", "options", MainSoftKeys.ButtonFunction.ReturnSubMenu));
            SoftKeyMenuDesc.Add(new MainSoftKeys.ButtonConfig("Language", "Sprache", "options", MainSoftKeys.ButtonFunction.Call));
            SoftKeyMenuDesc.Add(new MainSoftKeys.ButtonConfig("ManualMode", "Handbetrieb", "options", MainSoftKeys.ButtonFunction.Call));
            SoftKeyMenuDesc.Add(new MainSoftKeys.ButtonConfig("Drucker", "Drucker", "options", MainSoftKeys.ButtonFunction.Call));
            SoftKeyMenuDesc.Add(new MainSoftKeys.ButtonConfig("Kalibrierung", "Kalibrierung", "options", MainSoftKeys.ButtonFunction.Call));
            this.mainSoftKeys1.SetButtonNavigation(SoftKeyMenuDesc);

            stationDisplay1.SetTitle("Station1");
            stationDisplay2.SetTitle("Station2");
            modulDisplay1.ClearStatus();

            WagoPane.ConnectToBK(m_BK);
            m_BK.SetConfig("127.0.0.1", 502);
            m_BK.Start();
        }