コード例 #1
0
        private void buttonQueryExObj_Click(object sender, EventArgs e)
        {
            object element = null;

            switch (comboBoxExType.Text)
            {
            case "DI":
                element = Machine.Find <IDiEx>(comboBoxExObj.Text);
                break;

            case "DO":
                element = Machine.Find <IDoEx>(comboBoxExObj.Text);
                break;

            case "VIO":
                element = Machine.Find <IVioEx>(comboBoxExObj.Text);
                break;

            case "CY":
                element = Machine.Find <ICylinderEx>(comboBoxExObj.Text);
                break;

            case "PLATFORM":
                element = Machine.Find <PlatformEx>(comboBoxExObj.Text);
                break;

            case "STATION":
                element = Machine.Find <Station>(comboBoxExObj.Text);
                break;

            case "TASK":
                element = Machine.Find <StationTask>(comboBoxExObj.Text);
                break;

            default:
                return;
            }


            var ele = new ElePropsForm();

            ele.Element = element;
            ele.ShowDialog();
        }
コード例 #2
0
        private void buttonQueryEx_Click(object sender, EventArgs e)
        {
            IEnumerable <IElement> element = null;

            switch (comboBoxExType.Text)
            {
            case "DI":
                element = Machine.DiExs.Values.ToList();
                break;

            case "DO":
                element = Machine.DoExs.Values.ToList();
                break;

            case "VIO":
                element = Machine.VioExs.Values.ToList();
                break;

            case "CY":
                element = Machine.CylinderExs.Values.ToList();
                break;

            case "PLATFORM":
                element = Machine.Platforms.Values.ToList();
                break;

            case "STATION":
                element = Machine.Stations.Values.ToList();
                break;

            case "TASK":
                element = Machine.Tasks.Values.ToList();
                break;

            default:
                return;
            }


            var ele = new ElePropsForm();

            ele.Element = element;
            ele.ShowDialog();
        }