コード例 #1
0
        private void lview_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (lview.Items.Count > 0)
            {
                try
                {
                    string _text = lview.SelectedItem.ToString();
                    string _pn   = _text.Substring(0, _text.IndexOf("\n"));
                    string _fid  = "";
                    string _rev  = "";
                    foreach (var value in _printer._componentsList)
                    {
                        if (_pn == value._PN)
                        {
                            _fid       = value._FID;
                            _rev       = value._REV;
                            _component = value;
                            break;
                        }
                    }

                    switch (_component._type)
                    {
                    case COMPONENTTYPE.MB: { SNWindow _snWindow = new SNWindow(_component._type, _testid); _snWindow.Show(); break; };

                    case COMPONENTTYPE.OP: { SNWindow _snWindow = new SNWindow(_component._type, _testid); _snWindow.Show(); break; };

                    case COMPONENTTYPE.ENG: { SNWindow _snWindow = new SNWindow(_component._type, _testid); _snWindow.Show(); break; };

                    default:
                        break;
                    }
                    string _path   = ParseFIDPathFromXML();
                    int    _revInt = 0;
                    int.TryParse(_rev, out _revInt);
                    if (_revInt > 9)
                    {
                        _browser.Navigate(_path + @"FID\" + _fid + "." + _rev + " " + _pn + ".pdf");
                    }
                    else
                    {
                        _browser.Navigate(_path + @"FID\" + _fid + ".0" + _rev + " " + _pn + ".pdf");
                    }
                }
                catch (Exception)
                {
                }
            }
        }
コード例 #2
0
        private void timer_Tick(object sender, EventArgs e)
        {
            _count++;
            if (_count == 2)
            {
                _timer.Stop();
                switch (_component._type)
                {
                case COMPONENTTYPE.MB: { SNWindow _snWindow = new SNWindow(_component._type, _testid); _snWindow.Topmost = true; _snWindow.Show(); _snWindow.txtSN.Focus(); break; };

                case COMPONENTTYPE.OP: { SNWindow _snWindow = new SNWindow(_component._type, _testid); _snWindow.Topmost = true; _snWindow.Show(); _snWindow.txtSN.Focus(); break; };

                case COMPONENTTYPE.ENG: { SNWindow _snWindow = new SNWindow(_component._type, _testid); _snWindow.Topmost = true; _snWindow.Show(); _snWindow.txtSN.Focus(); break; };

                default:
                    break;
                }
            }
        }