Наследование: Eto.Forms.DynamicLayout
Пример #1
0
        private void _selectedProcessChanged(object sender, EventArgs e)
        {
            var     temp    = _processesList.SelectedValue;
            Control content = null;

            if (temp is PortManagerProcess)
            {
                var process = temp as PortManagerProcess;
                content = new PortManagerSettings(process);
            }
            else if (temp is RouterProcess)
            {
                var process = temp as RouterProcess;
                content = new RouterSettings(process);
            }
            else if (temp is HostProcess)
            {
                var process = temp as HostProcess;
                content = new HostSettings(process);
            }
            else if (temp is ForeignDevicePortProcess)
            {
                var process = temp as ForeignDevicePortProcess;
                content = new ForeignDevicePortSettings(process);
            }
            else if (temp is EthernetPortProcess)
            {
                var process = temp as EthernetPortProcess;
                content = new EthernetPortSettings(process);
            }
            else if (temp is DeviceFinderProcess)
            {
                var process = temp as DeviceFinderProcess;
                content = new DeviceFinderSettings(process);
            }
            else if (temp is NetworkDatabaseProcess)
            {
                var process = temp as NetworkDatabaseProcess;
                content = new NetworkDatabaseSettings(process);
            }
            else
            {
                content = new SessionSettings(_session);
            }

            _contentPanel.Content = content;
        }
Пример #2
0
        private void _selectedProcessChanged(object sender, EventArgs e)
        {
            var temp = _processesList.SelectedValue;
            Control content = null;

            if(temp is PortManagerProcess)
            {
                var process = temp as PortManagerProcess;
                content = new PortManagerSettings(process);
            }
            else if(temp is RouterProcess)
            {
                var process = temp as RouterProcess;
                content = new RouterSettings(process);
            }
            else if(temp is HostProcess)
            {
                var process = temp as HostProcess;
                content = new HostSettings(process);
            }
            else if(temp is ForeignDevicePortProcess)
            {
                var process = temp as ForeignDevicePortProcess;
                content = new ForeignDevicePortSettings(process);
            }
            else if(temp is EthernetPortProcess)
            {
                var process = temp as EthernetPortProcess;
                content = new EthernetPortSettings(process);
            }
            else if(temp is DeviceFinderProcess)
            {
                var process = temp as DeviceFinderProcess;
                content = new DeviceFinderSettings(process);
            }
            else if(temp is NetworkDatabaseProcess)
            {
                var process = temp as NetworkDatabaseProcess;
                content = new NetworkDatabaseSettings(process);
            }
            else
            {
                content = new SessionSettings(_session);
            }

            _contentPanel.Content = content;
        }