protected void ButtonImage_PreviewMouseDown(object sender, MouseButtonEventArgs e) { try { if (SelectedButtonName == EnumStreamDeckButtonNames.BUTTON0_NO_BUTTON) { return; } var newlySelectedImage = (StreamDeckImage)sender; /* * Here we must check if event if we can change the button that is selected. If there are unsaved configurations we can't */ if (newlySelectedImage.Bill.Button != StreamDeckPanel.GetInstance(PanelHash).SelectedButton&& EventHandlers.AreThereDirtyListeners(this)) { if (CommonUI.DoDiscardAfterMessage(true, "Discard Changes to " + SelectedButtonName + " ?")) { SetFormState(); } else { e.Handled = true; } } } catch (Exception ex) { Common.ShowErrorMessageBox(ex); } }
static void Main(string[] args) { var app = new Program(); try { var option = new InitializationOptions(app) { //Using DP without device scaling mode DisplayResolutionUnit = DisplayResolutionUnit.DP(), UseSkiaSharp = true }; Forms.Init(option); if (Device.Idiom == TargetIdiom.TV) { // UIControls.Init() should be called after Forms.Init() UIControls.Init(new InitOptions(app)); CommonUI.Init(app); } else { CommonUI.Init(app); CommonUI.AddCommonThemeOverlay(); } app.Run(args); } catch (Exception e) { Console.WriteLine($"Exception : {e.Message}"); } }
private void crystalButton_BrightTest_Click(object sender, EventArgs e) { if (_isTestStart) { crystalButton_BrightTest.Text = CommonUI.GetCustomMessage(_languageTable, "crystalButton_BrightTestStart", "光探头测试"); if (SensorTestEvent != null) { SensorTestEvent(false, null); } _isTestStart = false; } else { if (SensorTestEvent != null) { if (_useablePeripheral == null || _useablePeripheral.Count == 0) { CustomMessageBox.ShowCustomMessageBox(this.ParentForm, CommonUI.GetCustomMessage(_languageTable, "nolightsensorconfig", "不存在光探头信息,无法测试!")); return; } crystalButton_BrightTest.Text = CommonUI.GetCustomMessage(_languageTable, "crystalButton_BrightTestStop", "停止测试"); List <PeripheralsLocation> pers = new List <PeripheralsLocation>(); foreach (UseablePeripheral useable in _useablePeripheral) { pers.Add(useable); } SensorTestEvent(true, pers); } _isTestStart = true; } }
private void Start() { com = UIManager.Instance.GetUI <CommonUI>("CommonUI"); com.SetComUITitle("第六阶段 主动发表意见"); //Canvas canvas = UIManager.Instance.GetComponent<Canvas>(); //com.transform.SetParent(canvas.transform); stACtrl = ResManager.GetPrefab("Prefabs/SentenceExpression/SentenceCtrlA").GetComponent <SentenceCtrlA>(); stACtrl.transform.SetParent(transform); stACtrl.evtFinished += OnstACtrlFinished; stACtrl.evtRedo += OnstACtrlRedo; //stBCtrl = ResManager.GetPrefab("Prefabs/SentenceExpression/SentenceCtrlB").GetComponent<SentenceCtrlB>(); //stBCtrl.transform.SetParent(transform); //stBCtrl.evtFinished += OnstBCtrlFinished; //stBCtrl.evtRedo += OnstBCtrlRedo; //stCCtrl = ResManager.GetPrefab("Prefabs/SentenceExpression/SentenceCtrlC").GetComponent<SentenceCtrlC>(); //stCCtrl.transform.SetParent(transform); //stCCtrl.evtFinished += OnstCCtrlFinished; //stCCtrl.evtRedo += OnstCCtrlRedo; //stDCtrl = ResManager.GetPrefab("Prefabs/SentenceExpression/SentenceCtrlD").GetComponent<SentenceCtrlD>(); //stDCtrl.transform.SetParent(transform); //stDCtrl.evtFinished += OnstDCtrlFinished; //stDCtrl.evtRedo += OnstDCtrlRedo; //tpv = ResManager.GetPrefab("Prefabs/UI/TestPaperView").GetComponent<TestPaperView>(); //tpv.transform.SetParent(transform); //tpv.evtFinished += OnTestPaperFinished; //tpv.evtRedo += OnTestPaperRedo; }
private void refreshOpticalProbeCrystalButton_Click(object sender, EventArgs e) { MonitorAllConfig.Instance().RefreshAllOpticalProbeInfos(); string strText = CommonUI.GetCustomMessage(_languageTable, "Getting_Opticalprobe_information", "正在获取光探头信息,请稍候..."); ShowProcessForm(strText, true); }
private void confirmButton_Click(object sender, EventArgs e) { _fastSegmentParam.SegmentNum = int.Parse(this.sectionHScrollBar.Value.ToString()); _fastSegmentParam.MaxDisplayBright = int.Parse(this.maxLedNumericUpDown.Value.ToString()); _fastSegmentParam.MaxEnvironmentBright = int.Parse(this.maxEnvironmentNumericUpDown.Value.ToString()); _fastSegmentParam.MinDisplayBright = int.Parse(this.minLedNumericUpDown.Value.ToString()); _fastSegmentParam.MinEnvironmentBright = int.Parse(this.minEnvironmentNumericUpDown.Value.ToString()); if (_fastSegmentParam.MaxDisplayBright <= _fastSegmentParam.MinDisplayBright) { string errorTitleText = CommonUI.GetCustomMessage(_languageTable, "errorTitle", "错误"); string errorText = CommonUI.GetCustomMessage(_languageTable, "ledBrightness_error01", "屏体亮度最大值不能小于屏体亮度的最小值"); ShowCustomMessageBox(errorText, errorTitleText, MessageBoxButtons.OK, Windows.Forms.MessageBoxIconType.Error); //MessageBox.Show(this, "屏体亮度最大值不能小于屏体亮度的最小值", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (_fastSegmentParam.MaxEnvironmentBright <= _fastSegmentParam.MinEnvironmentBright) { string errorTitleText = CommonUI.GetCustomMessage(_languageTable, "errorTitle", "错误"); string errorText = CommonUI.GetCustomMessage(_languageTable, "environmentBrightness_error01", "环境亮度最大值不能小于环境亮度的最小值"); ShowCustomMessageBox(errorText, errorTitleText, MessageBoxButtons.OK, Windows.Forms.MessageBoxIconType.Error); //MessageBox.Show(this, "环境亮度最大值不能小于环境亮度的最小值", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } this.DialogResult = System.Windows.Forms.DialogResult.OK; }
public void LoadMainMenu() { if (hasShownStars) { CommonUI.LoadMainMenu(); } }
public ViewResult Index() { using (var scope = Startup.AutofacContainer.BeginLifetimeScope()) { IConfiguration config = scope.Resolve <IConfiguration>(); IHostingEnvironment env = scope.Resolve <IHostingEnvironment>(); } ViewBag.Title = config.WebSiteName; ViewBag.Myuser = CommonUI.getMyuser(); IList <MenuModel> litMenu = MenuSer.GetMenuListByUserGUID(CommonUI.getMyuser().UserGUID); String outMenuHtml = ""; BandingMenu(litMenu, "0", ref outMenuHtml); ViewBag.Menu = outMenuHtml; //计算搜索随机搜索背景图 Random ran = new Random(); ViewBag.RandKey = ran.Next(1, 4); return(View()); }
void RemoveAllListeners() { CommonUI com = UIManager.Instance.GetUI <CommonUI>("CommonUI"); com.redoClickEvent -= NextDo; com.redoClickEvent -= ReDo; com = null; if (swapUI != null) { swapUI.speakEvent -= SpeakBtnClickCallback; } if (XH != null) { XH.Complete -= XHJiewuCallback; XH.timePointEvent = null; } if (MM != null) { MM.Complete -= LsGiveObjCallback; MM.timePointEvent = null; } GlobalEntity.GetInstance().RemoveListener <ClickedObj>(ClickDispatcher.mEvent.DoClick, ClickLsCallBack); GlobalEntity.GetInstance().RemoveListener <ClickedObj>(ClickDispatcher.mEvent.DoClick, ClickFdlsCallBack); }
public void ReloadLevel() { if (hasShownStars) { CommonUI.ReloadLevel(); } }
void RemoveAllListeners() { CommonUI com = UIManager.Instance.GetUI <CommonUI>("CommonUI"); com.redoClickEvent -= NextDo; com.redoClickEvent -= ReDo; com = null; if (swapUI != null) { swapUI.chooseEvent -= ChooseBtnClickCallback; swapUI.speakEvent -= SpeakBtnClickCallback; } if (selectUI != null) { selectUI.okEvent -= SelectUIOkBtnCallback; } if (LS != null) { LS.Complete -= LsGiveObjCallback; LS.ClearCompleteEvent(); LS.timePointEvent = null; } if (XH != null) { XH.Complete -= XHJiewuCallback; XH.ClearCompleteEvent(); XH.timePointEvent = null; } GlobalEntity.GetInstance().RemoveListener <ClickedObj>(ClickDispatcher.mEvent.DoClick, ClickLsCallBack); }
private void Start() { EnhanceCommunityModel.GetInstance().Jiaoshi(); com = UIManager.Instance.GetUI <CommonUI>("CommonUI"); com.SetComUITitle("第二阶段 增强自发性沟通"); //Canvas canvas = FindObjectOfType<Canvas>(); //com.transform.SetParent(canvas.transform); ecACtrl = ResManager.GetPrefab("Prefabs/EnhanceCommunity/EnhanceA").GetComponent <EnhanceCtrlA>(); ecACtrl.transform.SetParent(transform); ecACtrl.evtFinished += OnecACtrlFinished; ecACtrl.evtRedo += OnecACtrlRedo; //ecBCtrl = ResManager.GetPrefab("Prefabs/EnhanceCommunity/EnhanceB").GetComponent<EnhanceCtrlB>(); //ecBCtrl.transform.SetParent(transform); //ecBCtrl.evtFinished += OnecBCtrlFinished; //ecBCtrl.evtRedo += OnecBCtrlRedo; //ecCCtrl = ResManager.GetPrefab("Prefabs/EnhanceCommunity/EnhanceC").GetComponent<EnhanceCtrlC>(); //ecCCtrl.transform.SetParent(transform); //ecCCtrl.evtFinished += OnecCCtrlFinished; //ecCCtrl.evtRedo += OnecCCtrlRedo; //tpv = ResManager.GetPrefab("Prefabs/UI/TestPaperView").GetComponent<TestPaperView>(); //tpv.transform.SetParent(transform); //tpv.evtFinished += OnTestPaperFinished; //tpv.evtRedo += OnTestPaperRedo; }
/// <summary> /// 显示结算界面 /// </summary> void ShowFinalUI() { CommonUI com = UIManager.Instance.GetUI <CommonUI>("CommonUI"); com.nextClickEvent += NextDo; com.redoClickEvent += ReDo; com.ShowFinalUI(); }
private void CancelWindow() { if (CommonUI.DoDiscardAfterMessage(_isDirty)) { DialogResult = false; Close(); } }
public void LoadNextLevel() { if (hasShownStars) { CommonUI.LoadNextLevel(); UnityAds.instance.ShowVideo(); } }
protected override IEnumerator Load() { UILoader <CommonUI> loader = new UILoader <CommonUI>(this, "CommonUI", "core/scenes/ui/examples", disableOnLoad: true); yield return(loader.Load()); m_ui = loader.ui; m_ui.get_gameObject().SetActive(true); }
// public System.Action redo, next; void Awake() { //SumaryModel.GetInstance().Init(); title = transform.Find("bg/title/text").GetComponent <Text>(); content = transform.Find("bg/content").GetComponent <Text>(); CommonUI comUI = UIManager.Instance.GetUI <CommonUI>("CommonUI"); Transform canvas = comUI.transform.parent; transform.SetParent(canvas.transform, false); }
public void Dispose() { //comUI.redoClickEvent -= OnReDo; //comUI.nextClickEvent -= OnNextDo; if (comUI == null) { comUI = UIManager.Instance.GetUI <CommonUI>("CommonUI"); } comUI.redoClickEvent -= OnReDo; comUI.nextClickEvent -= OnNextDo; if (xiaohuaAnim != null) { xiaohuaAnim.timePointEvent = null; xiaohuaAnim.OnContinue(); xiaohuaAnim.ClearCompleteEvent(); } if (fdlsAnim != null) { fdlsAnim.OnContinue(); fdlsAnim.timePointEvent = null; fdlsAnim.ClearCompleteEvent(); } if (LS != null) { LS.timePointEvent = null; LS.OnContinue(); LS.ClearCompleteEvent(); LSCtrl lsctrl = LS.GetComponent <LSCtrl>(); if (lsctrl != null) { lsctrl.DestroyGuadian(); } } XHCtrl xhctrl = xiaohuaAnim.GetComponent <XHCtrl>(); if (xhctrl != null) { xhctrl.DestroyGuadian(); } comUI = null; evtFinished = null; evtRedo = null; if (emptyRoot != null) { Destroy(emptyRoot); emptyRoot = null; } Destroy(gameObject); }
private void ConfirmButton_Click(object sender, EventArgs e) { this.EnvironmentItem = (int)this.EnvironmentNumericUpDown.Value; this.LedItem = (int)this.LedNumericUpDown.Value; if (!IsBrightness()) { string errorTitleText = CommonUI.GetCustomMessage(_languageTable, "errorTitle", "错误"); string errorText = CommonUI.GetCustomMessage(_languageTable, "error01", "存在相同的环境亮度配置,请重新修改"); ShowCustomMessageBox(errorText, errorTitleText, MessageBoxButtons.OK, Windows.Forms.MessageBoxIconType.Error); return; } this.DialogResult = System.Windows.Forms.DialogResult.OK; }
void Redo() { if (evtRedo != null) { evtRedo(); } if (comUI == null) { comUI = UIManager.Instance.GetUI <CommonUI>("CommonUI"); } comUI.redoClickEvent -= OnReDo; comUI.nextClickEvent -= OnNextDo; }
public void HandleLanguageDropdown() { CommonUI.PlayButtonClickSfx(); Language language = Language.Null; Enum.TryParse(languageDropdown.options[languageDropdown.value].text, out language); if (language != Language.Null) { LocalisationSystem.language = language; GameManager.instance.onLanguageChangeEvent.Invoke(); PlayerPersistence.SavePlayerLanguage(); } }
public void Dispose() { if (comUI == null) { comUI = UIManager.Instance.GetUI <CommonUI>("CommonUI"); } comUI.redoClickEvent -= OnReDo; comUI.nextClickEvent -= OnNextDo; //comUI = null; if (xiaohuaAnim != null) { xiaohuaAnim.timePointEvent = null; xiaohuaAnim.OnContinue(); xiaohuaAnim.ClearCompleteEvent(); } if (teacherAnim != null) { teacherAnim.timePointEvent = null; teacherAnim.OnContinue(); teacherAnim.ClearCompleteEvent(); } if (xhctrl != null) { xhctrl.DestroyGuadian(); } if (lsCtrl != null) { lsCtrl.DestroyGuadian(); } ChooseDo.Instance.ResetAll(); HighLightCtrl.GetInstance().OffAllObjs(); GlobalEntity.GetInstance().RemoveListener <ClickedObj>(ClickDispatcher.mEvent.DoClick, OnClickTeacherHandFirst); GlobalEntity.GetInstance().RemoveListener <ClickedObj>(ClickDispatcher.mEvent.DoClick, OnClickTeacherHandFinal); if (goodA != null) { Destroy(goodA); } if (emptyRoot != null) { Destroy(emptyRoot); emptyRoot = null; } evtFinished = null; evtRedo = null; Destroy(gameObject); }
private void ApplyUILanguageTable() { MultiLanguageUtils.UpdateLanguage(CommonUI.OpticalProbeConfigLangPath, this); MultiLanguageUtils.ReadLanguageResource(CommonUI.OpticalProbeConfigLangPath, "frm_OpticalProbeConfig", out _languageTable); if (_languageTable == null || _languageTable.Count == 0) { return; } foreach (DataGridViewColumn columnItem in brightnessDataGridView.Columns) { if (columnItem.CellType == typeof(DataGridViewButtonCell)) { string strText = CommonUI.GetCustomMessage(_languageTable, (columnItem.Name + "_Text").ToLower(), string.Empty); (columnItem as DataGridViewButtonColumn).Text = strText; } string str = CommonUI.GetCustomMessage(_languageTable, columnItem.Name.ToLower(), string.Empty); if (string.IsNullOrEmpty(str)) { continue; } columnItem.HeaderText = str; } foreach (DataGridViewColumn columnItem in opticalProbeDataGridView.Columns) { if (columnItem.CellType == typeof(DataGridViewButtonCell)) { string strText = CommonUI.GetCustomMessage(_languageTable, (columnItem.Name + "_Text").ToLower(), string.Empty); (columnItem as DataGridViewButtonColumn).Text = strText; } string str = CommonUI.GetCustomMessage(_languageTable, columnItem.Name.ToLower(), string.Empty); if (string.IsNullOrEmpty(str)) { continue; } columnItem.HeaderText = str; } if (_isTestStart) { crystalButton_BrightTest.Text = CommonUI.GetCustomMessage(_languageTable, "crystalButton_BrightTestStop", "停止测试"); } else { crystalButton_BrightTest.Text = CommonUI.GetCustomMessage(_languageTable, "crystalButton_BrightTestStart", "光探头测试"); } }
public JsonResult dologin(Myuser myuser) { ResultModel result = new ResultModel(); int i = (HttpContext.Session.GetInt32("ErrorCount") ?? 0); if (i >= 3) { string code = HttpContext.Session.GetString("LoginValidateCode").ToLower(); if (code != myuser.Verifycode.ToLower().Trim()) { result.State = 2; result.Message = "验证码输入错误!"; result.IfValidate = true; return(Json(result)); } } result = MyuserBll.Login(myuser.UserCode, myuser.UserPassword, myuser).Result; if (result.State == 1) { HttpContext.Session.SetInt32("ErrorCount", ++i); if (i > 2) { result.IfValidate = true; } else { result.IfValidate = false; } } if (result.State == 0) { HttpContext.Session.Remove("LoginValidateCode"); HttpContext.Session.Remove("ErrorCount"); CommonUI.SaveUser(myuser, true); string returnUrl = TempData["returnUrl"]?.ToString(); if (returnUrl != null) { Redirect(returnUrl); } else { RedirectToAction(nameof(HomeController.Index), "Home"); } } return(Json(result)); }
private void Start() { comUI = UIManager.Instance.GetUI <CommonUI>("CommonUI"); resetBtn = transform.Find("final/reset").GetComponent <Button>(); resetBtn.onClick.AddListener(OnReDo); nextBtn = transform.Find("final/next").GetComponent <Button>(); nextBtn.onClick.AddListener(OnNextDo); Transform canvas = comUI.transform.parent; transform.SetParent(canvas.transform, false); TestPaperItem[] Items = transform.GetComponentsInChildren <TestPaperItem>(); for (int i = 0; i < Items.Length; i++) { Items[i].callback = Callback; } }
private void opticalProbeDataGridView_CellValueChanged(object sender, DataGridViewCellEventArgs e) { if (e.ColumnIndex == 0 && opticalProbeDataGridView.Rows.Count > 0) { var currentRow = opticalProbeDataGridView.Rows[e.RowIndex]; var item = (DataGridViewCheckBoxCell)currentRow.Cells[e.ColumnIndex]; if (item == null) { return; } bool isChecked = (bool)item.EditedFormattedValue; var currentPositionInfoCell = currentRow.Cells[1] as DataGridViewTextBoxCell; var currentRemarkInfoCell = currentRow.Cells[3] as DataGridViewTextBoxCell; if (currentPositionInfoCell == null) { return; } if (isChecked) { string positionInfo = currentPositionInfoCell.Value as string; string[] splitStr = positionInfo.Split(new char[] { '-' }); if (splitStr.Length > 1 && Convert.ToInt32(splitStr[1]) > 1) { currentRow.DefaultCellStyle.ForeColor = Color.Red; currentRemarkInfoCell.Value = CommonUI.GetCustomMessage(_languageTable, "NoSoftWareFail", "无软件失效"); } if (!_useablePeripheral.Contains(_internTable[e.RowIndex])) { _useablePeripheral.Add(_internTable[e.RowIndex]); } } else { currentRow.DefaultCellStyle.ForeColor = Color.Black; currentRemarkInfoCell.Value = string.Empty; _useablePeripheral.Remove(_internTable[e.RowIndex]); } } }
private void Start() { CommonUI com = UIManager.Instance.GetUI <CommonUI>("CommonUI"); com.SetComUITitle("第三阶段 分辨图片"); //PeopleManager.Instance.ResetModel(); UnityEngine.Debug.Log("DistinguishPictureView::Start(): 第三阶段 第一关 区辨喜欢和不喜欢物品的图卡"); dpaCtrl = ResManager.GetPrefab("Prefabs/DistinguishPicture/DistinguishPictureA").GetComponent <DistinguishPictureCtrlA>(); dpaCtrl.evtFinished += OnDpaCtrlFinished; dpaCtrl.evtRedo += OnDpaCtrlRedo; //dpbCtrl = ResManager.GetPrefab("Prefabs/DistinguishPicture/DistinguishPictureB").GetComponent<DistinguishPictureCtrlB>(); //dpbCtrl.evtFinished += OnDpbCtrlFinished; //dpbCtrl.evtRedo += OnDpbCtrlRedo; //dpcCtrl = ResManager.GetPrefab("Prefabs/DistinguishPicture/DistinguishPictureC").GetComponent<DistinguishPictureCtrlC>(); //dpcCtrl.evtFinished += OnDpcCtrlFinished; //dpcCtrl.evtRedo += OnDpcCtrlRedo; InitPersonsState(); }
void RemoveAllListeners() { CommonUI com = UIManager.Instance.GetUI <CommonUI>("CommonUI"); com.redoClickEvent -= NextDo; com.redoClickEvent -= ReDo; com = null; if (LS != null) { LS.Complete -= KJLsGiveObjCallback; LS.timePointEvent = null; LS.ClearCompleteEvent(); } if (XH != null) { XH.Complete -= KJXHJiewuCallback; XH.timePointEvent = null; XH.ClearCompleteEvent(); } GlobalEntity.GetInstance().RemoveListener <ClickedObj>(ClickDispatcher.mEvent.DoClick, ClickLsCallBack); }
private void Start() { com = UIManager.Instance.GetUI <CommonUI>("CommonUI"); com.SetComUITitle("第五阶段 接受性问句"); //Canvas canvas = FindObjectOfType<Canvas>(); //com.transform.SetParent(canvas.transform); aqACtrl = ResManager.GetPrefab("Prefabs/AcceptQuestion/AcceptQuesCtrlA").GetComponent <AcceptQuesCtrlA>(); aqACtrl.transform.SetParent(transform); aqACtrl.evtFinished += OnaqACtrlFinished; aqACtrl.evtRedo += OnaqACtrlRedo; //aqBCtrl = ResManager.GetPrefab("Prefabs/AcceptQuestion/AcceptQuesCtrlB").GetComponent<AcceptQuesCtrlB>(); //aqBCtrl.transform.SetParent(transform); //aqBCtrl.evtFinished += OnaqBCtrlFinished; //aqBCtrl.evtRedo += OnaqBCtrlRedo; //aqCCtrl = ResManager.GetPrefab("Prefabs/AcceptQuestion/AcceptQuesCtrlC").GetComponent<AcceptQuesCtrlC>(); //aqCCtrl.transform.SetParent(transform); //aqCCtrl.evtFinished += OnstCCtrlFinished; //aqCCtrl.evtRedo += OnstCCtrlRedo; //tpv = ResManager.GetPrefab("Prefabs/UI/TestPaperView").GetComponent<TestPaperView>(); //tpv.transform.SetParent(transform); //tpv.evtFinished += OnTestPaperFinished; //tpv.evtRedo += OnTestPaperRedo; }
private bool IsBrightness(DataGridViewCell cell) { Int32 cellValueAsInt; if (cell.EditedFormattedValue.ToString().Length == 0) { brightnessDataGridView.Rows[cell.RowIndex].ErrorText = CommonUI.GetCustomMessage(_languageTable, "inputbrightvalue", "请输入亮度值"); return(false); } else if (!Int32.TryParse(cell.EditedFormattedValue.ToString(), out cellValueAsInt)) { brightnessDataGridView.Rows[cell.RowIndex].ErrorText = CommonUI.GetCustomMessage(_languageTable, "brightvalueDigital", "亮度值必须为数字"); return(false); } else { foreach (DataGridViewRow row in brightnessDataGridView.Rows) { if (row == null || row.Cells[cell.ColumnIndex] == null || row.Cells[cell.ColumnIndex].Value == null) { break; } if (row.Cells[cell.ColumnIndex].RowIndex == cell.RowIndex) { continue; } if (row.Cells[cell.ColumnIndex].Value.ToString().Equals(cell.EditedFormattedValue.ToString())) { brightnessDataGridView.Rows[cell.RowIndex].ErrorText = CommonUI.GetCustomMessage(_languageTable, "exitssamelightconfig", "存在相同亮度配置"); return(false); } } } brightnessDataGridView.Rows[cell.RowIndex].ErrorText = string.Empty; return(true); }