예제 #1
0
 public GearsEditor(CGearLists _gearlists, CData _data, string title)
 {
     gearlists = _gearlists;
     data      = _data;
     InitializeComponent();
     this.Title = title;
 }
예제 #2
0
        public void Init(ComboBox _NumcomboBox, ComboBox _ModelcomboBox, DataGrid _dataGridView, CTransmissionCal _TransmissionCal, CGearLists _lists)
        {
            NumcomboBox     = _NumcomboBox;
            ModelcomboBox   = _ModelcomboBox;
            dataGridView    = _dataGridView;
            TransmissionCal = _TransmissionCal;
            lists           = _lists;

            NumcomboBox.SelectionChanged   += NumcomboBox_SelectionChanged;
            ModelcomboBox.SelectionChanged += ModelcomboBox_SelectionChanged;


            NumcomboBox.Items.Clear();
            foreach (CGearList list in lists.Lists)
            {
                NumcomboBox.Items.Add(list);
            }
            NumcomboBox.SelectedIndex   = 0;
            ModelcomboBox.SelectedIndex = 0;
            switch (lists.type)
            {
            case GearType.Front:
                NumcomboBox.SelectedIndex   = Properties.Settings.Default.frnumid;
                ModelcomboBox.SelectedIndex = Properties.Settings.Default.frmodid;
                break;

            case GearType.Back:
                NumcomboBox.SelectedIndex   = Properties.Settings.Default.bknumid;
                ModelcomboBox.SelectedIndex = Properties.Settings.Default.bkmodid;
                break;

            case GearType.Inner:
                NumcomboBox.SelectedIndex   = Properties.Settings.Default.innumid;
                ModelcomboBox.SelectedIndex = Properties.Settings.Default.inmodid;
                break;
            }
        }