private void FCBTWordSelector_SelectedIndexChanged(object sender, EventArgs e) { if ((!isSCInit) || (_ftb == null)) { return; } FlatComboBox fcb = sender as FlatComboBox; string val = fcb.SelectedValue.ToString(); switch (val) { case null: case "": { break; } default: { try { if ( (val.Equals(Properties.Resources.txtSpellMwnuUnderline)) || (val.Equals(Properties.Resources.txtSpellMwnuNoMiss)) || (val.Equals(Properties.Resources.txtSpellMwnuReplace)) || (val.Equals(Properties.Resources.txtSpellMwnuCancelMiss)) ) { break; } else if (val.Equals(Properties.Resources.txtSpellMwnuRestore)) { _ftb.Text = _origin; _SpellReset(); break; } else if (val.Equals(Properties.Resources.txtSpellMwnuClose)) { this.Visible = false; _SpellReset(); break; } else if (val.Equals(Properties.Resources.txtSpellMwnuCancel)) { FCBTWordSelector.DataSource = new string[] { Properties.Resources.txtSpellMwnuCancelMiss, Properties.Resources.txtSpellMwnuClose }; _SpellReset(); break; } else if (val.Contains(Properties.Resources.txtSpellMwnuAddDictionary)) { if (_bw != null) { _spc.AddUserWord(_bw.Text); _ftb.Select(0, 0); _Check(); } break; } else if ((_bw != null) && (!string.IsNullOrWhiteSpace(_ftb.Text))) { _ftb.Select(_bw.StartIndex, _bw.Length); _ftb.SelectionReplace(val); _Check(); break; } } catch (Exception ex) { _iLog.LogError(ex.Message); } break; } } }