private bool ShowInitFaildPanel(string text) { if (!initFaildPanelIsShown) { initFaildPanelIsShown = true; //这里还得用这个方法实现,因为在UIManager初始化之前有一步拷贝配置文件的过程,如果发生意外,这里用UIManager就会有问题 //这个路径就强制不能变了吧 Object prefab = Resources.Load <Object>(@"objects/ui/common_ngui/uipnlinitiatefailed"); GameObject failedPanel = Instantiate(prefab) as GameObject; failedPanel.transform.localPosition = Vector3.zero; float a = 1, b = 320, c = a / b; failedPanel.transform.localScale = new Vector3(c, c, c); var obj = UiUtility.FindChild(failedPanel, "Text"); #if UNITY_EDITOR if (!requestManagerSuccess) { obj.GetComponent <UILabel>().text = "CLientHelper模块初始化失败,找服务器去"; } else { obj.GetComponent <UILabel>().text = "自己看日志, 如果文件被占用就重启unity ; "; obj.GetComponent <UILabel>().text += UnpackFile2PersistentPath.UnPackFileError; } #else #endif return(false); } return(true); }
public OrderQueue(Session session, OrderCacheItem queueInfo) { _queueInfo = queueInfo; InitializeComponent(); imglist.Images.Add(UiUtility.Get24PxImageFrom16PxImg(Properties.Resources.user_16)); Gif.SetLoadingImage(pbAnimate); Icon = Properties.Resources.icon_warning; InitSession(session); LoadInfo(); _worker = new QueueOrderWorker(session) { TourFlag = _queueInfo.tourFlag }; _worker.QueueMessageChanged += _worker_QueueMessageChanged; _worker.QueryOrderQueueFailed += _worker_QueryOrderQueueFailed; _worker.QueryOrderQueueSuccess += _worker_QueryOrderQueueSuccess; Load += (s, e) => { btnClose.Enabled = false; _worker.RunQueryOrderQueue(); }; FormClosing += (s, e) => { e.Cancel = _worker != null; }; btnClose.DialogResult = DialogResult.Cancel; btnCancelQueue.Click += BtnCancelQueue_Click; FormPlacementManager.Instance.Control(this); }
/// <summary> /// 执行初始化 /// </summary> /// <param name="session"></param> public void InitSession(Session session) { Session = session; UiUtility.AttachContext(this, session); lblTip.Text = $"<b>{session.UserKeyData.DisplayName}</b> ({session.UserName}) 的手机号 <font color='red'><b>{session.UserKeyData.MobileNumber}</b></font> 未通过核验,<br />可能会对订票、更改密码等产生影响,是否现在就核验?"; }
private void GetLabelOptionList(string arrNo, int lineNo) { try { using (ArrivalBLL arrivalBLL = new ArrivalBLL()) { List <T_ARRIVAL_DTL_SUB> lstLabel = arrivalBLL.GetLabelList(arrNo, lineNo); //this.grdUNIT.DataSource = lstUnit; if (lstLabel == null) { lstLabel = new List <T_ARRIVAL_DTL_SUB>(); } //DataTable table = ConvertToDataTable(lstUnit); //this.grdUNIT.DataSource = table; this.dtbLabelOptionList = UiUtility.ConvertToDataTable(lstLabel); if (this.dtbLabelOptionList != null) { this.grdLabelOption.DataSource = this.dtbLabelOptionList; } } } catch (Exception ex) { XtraMessageBox.Show(ex.Message); } }
private void GetUserByUserID(string userid) { User user = null; using (AdministratorBLL adminBll = new AdministratorBLL()) { user = adminBll.GetUserByUserID(userid); } if (user != null) { this.txtUSER_ID.EditValue = user.USER_ID; this.txtUSER_NAME.EditValue = user.USER_NAME; this.txtWARE_ID.EditValue = user.WARE_ID; this.txtLOGIN.EditValue = user.LOGIN; this.txtPWD.EditValue = user.PWD; this.txtEMPLOYEE_ID.EditValue = user.EMPLOYEE_ID; this.lueDefaultRole.EditValue = user.ROLE_ID; this.txtREMARK.EditValue = user.REMARK; this.txtEMAIL.EditValue = user.EMAIL; this.txtCOMP_ID.EditValue = user.COMP_ID; this.icbREC_STAT.EditValue = user.REC_STAT; this.GetUserRoleList(user.USER_ID); GridView view = (GridView)this.grdRole.Views[0]; UiUtility.RemoveActiveRow(view); } }
public void ExportToXLS(string defaultFilename, string title, string filter) { UiUtility.ClearSelection(this._exportView); //this.saveFileDialog.CheckFileExists = true; this.saveFileDialog.FileName = defaultFilename; this.saveFileDialog.Title = title; this.saveFileDialog.Filter = filter; DialogResult result = this.saveFileDialog.ShowDialog(); if (result != DialogResult.Cancel) { if (this.waitDialog == null) { this.waitDialog = new WaitDialogForm("Starting Export...", "Please waiting to Export Data"); } string filename = this.saveFileDialog.FileName; if (filename != "") { this.ExportToEx(filename, "XLS"); if (this.waitDialog != null) { this.waitDialog.SetCaption("Export Finished"); } this.OpenFile(filename); } } }
public PassengerPanel() { InitializeComponent(); if (!Program.IsRunning) { return; } Load += PassengerPanel_Load; tsFilter.KeyUp += tsFilter_KeyUp; tsDelete.Click += tsDelete_Click; tsAdd.Click += tsAdd_Click; tsEdit.Click += tsEdit_Click; list.DoubleClick += tsEdit_Click; tsImportToClipboard.Click += (s, e) => CopyToClipboard(); tsImportToFile.Click += (s, e) => ExportToFile(); list.KeyUp += list_KeyUp; tsImportDlg.Click += (s, e) => { GetControl <ImportPassenger>().ShowDialog(); Session.LoadPassengers(); }; //图标 imgList.Images.Add(UiUtility.Get24PxImageFrom16PxImg(Properties.Resources.user_16)); imgList.Images.Add(UiUtility.Get24PxImageFrom16PxImg(Properties.Resources.male)); imgList.Images.Add(UiUtility.Get24PxImageFrom16PxImg(Properties.Resources.female)); //维护 _inSystemMaintenance = ParamData.IsSystemMaintenance; }
private void InsertRole() { string result = string.Empty; Role role = null; try { DataRow rowRole = this.dtbRole.Rows[0]; if (rowRole != null) { role = new Role(); role.ROLE_ID = rowRole["ROLE_ID"].ToString().ToUpper(); role.ROLE_NAME = rowRole["ROLE_NAME"].ToString(); role.REC_STAT = (bool)rowRole["REC_STAT"]; } using (AdministratorBLL adminBll = new AdministratorBLL()) { result = adminBll.InsertRole(role, ((frmMainMenu)this.ParentForm).UserID); } if (result.Equals("OK")) { NotifierResult.Show("Insert Complete", "Result", 50, 1000, 50, NotifyType.Safe); } else { NotifierResult.Show(result, "Error", 100, 1000, 0, NotifyType.Warning); } } catch (Exception ex) { XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } finally { this.FormState = eFormState.ReadOnly; //Get all Invoice on Invoice List this.GetRoleList(); if (result.Equals("OK")) { GridView viewList = (GridView)this.grdRole.Views[0]; viewList.ClearSorting(); int position = UiUtility.GetRowHandleByColumnValue(viewList, "ROLE_ID", role.ROLE_ID); if (position != 0) { if (position != GridControl.InvalidRowHandle) { this.dntRole.Position = position; } } else { viewList.FocusedRowHandle = 0; } } } }
public GridExportController(BaseView exportView, string[] cols) { UiUtility.ClearSelection(exportView); this._exportView = exportView; this._columnsNoExp = cols; this.saveFileDialog = new SaveFileDialog(); }
private void InsertLabelOption() { try { string result = string.Empty; GridView view = (GridView)this.grdLabelOption.Views[0]; var lstLabel = UiUtility.ConvertToList <T_ARRIVAL_DTL_SUB>(this.dtbLabelOptionList); using (ArrivalBLL arrBll = new ArrivalBLL()) { result = arrBll.InsertLabel(this.ARRIVAL_NO, this.LINE_NO, lstLabel, this._USER_ID); } if (result == "OK") { this.DialogResult = DialogResult.OK; } } catch (Exception ex) { XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }
/// <summary> /// 完成初始化 /// </summary> protected virtual void PostInitialize() { if (ProgramConfiguration.Instance.OrderDlgCenterMainform) { UiUtility.PlaceFormAtCenter(this, show: false); } else { StartPosition = FormStartPosition.CenterScreen; } FormPlacementManager.Instance.Control(this); Layer = new MsgLayer(); Controls.Add(Layer); Layer.BringToFront(); //空格键快速提交 KeyDown += (s, e) => { if (SubmitButton?.Enabled == true && !InQueue) { if (e.KeyCode == Keys.Space || e.KeyCode == Keys.Enter) { SubmitButton.PerformClick(); e.Handled = true; } } }; KeyPreview = true; }
/// <summary> /// 订单提交已成功 /// </summary> /// <param name="orderid"></param> /// <returns></returns> protected virtual async Task QueueSucceedAsync(string orderid) { PreventCloseFlag = false; //new OrderSuccess(orderid.DefaultForEmpty("(不知道..T_T)")) { Session = Session }.Show(); UiUtility.PlaceFormAtCenter(new OrderNotification(Session, Query, Train, PassengerInTickets, null, orderid)); Session.OnRequestShowPanel(PanelIndex.NotComplete); if (Query.Resign) { Query.IsLoaded = false; } if (OrderEventArgs != null) { OrderEventArgs.OrderSubmitContext.OrderID = orderid ?? ""; OrderEventArgs.OrderSubmitContext.Message = ""; Session.OnOrderSubmitSuccess(OrderEventArgs.OrderSubmitContext.Session, OrderEventArgs); } if (AutoResumeAttached) { Controller.Instance[Session].GetContext(this).IsSubmitSuccess = true; } Close(); }
private void bteMC_NO_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { ButtonEdit btnEdit = (ButtonEdit)sender; //Open Popup For Select Supplier. DialogResult result; string mcno = string.Empty; string mcname = string.Empty; using (frmLOVMachine fMcList = new frmLOVMachine()) { object value = this.luePRODUCTION_TYPE.EditValue; if (!string.IsNullOrEmpty(value.ToString())) { fMcList.MACHINE_TYPE = value.ToString(); } else { fMcList.MACHINE_TYPE = "V"; } result = UiUtility.ShowPopupForm(fMcList, this, true); mcno = fMcList.MC_NO; mcname = fMcList.MACHINE_NAME; } if (result == DialogResult.OK) { btnEdit.Text = mcname; this.lblMC_NO_VALUE.Text = mcno; this.txtBOX_QTY.Focus(); } }
private void frmPOPLabelOption_Load(object sender, EventArgs e) { try { this.InitializaLOVData(); this.BingingItem(); this.txtTOTAL_OUTER_QTY.EditValue = this.TOTAL_INNER_QTY; this.GetLabelOptionList(this.ARRIVAL_NO, this.LINE_NO); this.btnSave.Enabled = !this.IsLabelGenerated; //set grid to read only GridView view = (GridView)this.grdLabelOption.Views[0]; UiUtility.SetGridReadOnly(view, this.IsLabelGenerated); if (!base.DialogIdle.IsRunning) { base.DialogIdle.Start(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void OpenFromByName(string formName) { try { Form frmOpen = UiUtility.GetFromByName(formName); if (frmOpen == null) { return; } bool isFound = false; Form[] openForms = this.MdiChildren; if (openForms.Length == 0) { //No open form //frmOpen.MdiParent = this; //frmOpen.Show(); if (this.bgwProcessInform.IsBusy) { this.bgwProcessInform.CancelAsync(); } else { this.bgwProcessInform.RunWorkerAsync(frmOpen); } } else { foreach (Form frm in openForms) { if (frmOpen.Name == frm.Name) { isFound = true; frm.Activate(); break; } } if (!isFound) { //frmOpen.MdiParent = this; //frmOpen.Show(); if (this.bgwProcessInform.IsBusy) { this.bgwProcessInform.CancelAsync(); } else { this.bgwProcessInform.RunWorkerAsync(frmOpen); } } } } catch (Exception ex) { XtraMessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }
public UiPlayerListItem AddPlayer(PlayerData player) { var instance = UiUtility.AddChild(List, Prototype, true); instance.Tick.SetActive(false); instance.Name.text = player.Name; return(instance); }
public void ShowChoices(PlayerData creator, List <AnswerData> choices) { if (Client.IsPlayer(creator)) { InfoBox.Show(Strings.PlayersOwnDrawing); } for (int i = 0; i < choices.Count; i++) { Debug.LogFormat("Show choice: {0}", choices[i].Answer); var instance = UiUtility.AddChild(List.gameObject, ChoicePrototype, true); // Show different UI depending of if this is the player's answer // If it is, the player won't be able to select their own answer bool isPlayer = choices[i].Author.ID == Client.PlayerData.ID; bool isCreator = Client.IsPlayer(creator); instance.YourAnswer.SetActive(isPlayer); instance.OtherPlayersAnswer.SetActive(!isPlayer); instance.Text.ForEach(x => x.text = choices[i].Answer); // Don't allow button presses if the drawing creator is the player instance.Button.interactable = !isPlayer && !isCreator; instance.Like.gameObject.SetActive(!isPlayer); var tempChoice = choices[i]; if (!isPlayer && !isCreator) { instance.Button.onClick.AddListener(() => { if (OnChoiceSelected != null) { OnChoiceSelected(tempChoice); } DisableButtons(); InfoBox.Show(Strings.ChoiceSubmitted); }); } // Likes instance.Like.onClick.AddListener(() => { if (OnLike != null) { OnLike(tempChoice); } instance.Like.gameObject.SetActive(false); }); Views.Add(instance); } }
/// <summary>Raises the <see cref="E:System.Windows.Forms.Control.HandleCreated"></see> event.</summary> /// <param name="e">An <see cref="T:System.EventArgs"></see> that contains the event data. </param> protected override void OnHandleCreated(EventArgs e) { base.OnHandleCreated(e); if (ShowShield) { UiUtility.AddShieldToButton(this); } }
public SystemSupportError() { InitializeComponent(); Icon = Properties.Resources.icon_warning; Load += SystemSupportError_Load; lnkVisitForum.Click += (s, e) => Shell.StartUrl("http://forum.iccfish.com/forum-38-1.html"); btnOpenLocation.Click += (s, e) => UiUtility.OpenLocationInExplorer(Program.LogFile); }
static void ClearGridHistory() { string stateLayoutPath = string.Format("{0}\\{1}", Application.StartupPath, UiUtility.StateConfigPath); if (Directory.Exists(stateLayoutPath)) { UiUtility.ClearFolder(stateLayoutPath); } }
private void PopulateAllDropDowns(EmployerRegistrationViewModel viewModel) { try { if (viewModel == null) { _viewModel = new EmployerRegistrationViewModel(); InitializeDropDowns(); _viewModel.EmployerStudentCategories = UiUtility.InitializeStudentCategory(_viewModel.EmployerStudentCategories, _viewModel.WeekDays, _viewModel.Periods); ViewBag.Lgas = new SelectList(new List <Lga>(), DropdownUtility.ID, DropdownUtility.NAME); ViewBag.SecurityQuestions = _viewModel.SecurityQuestionSelectList; ViewBag.Countries = _viewModel.CountrySelectList; ViewBag.States = _viewModel.StateSelectList; ViewBag.Sexs = _viewModel.SexSelectList; } else { _viewModel = viewModel; if (_viewModel.Employer != null && _viewModel.Employer.Sex != null) { ViewBag.Sexs = new SelectList(_viewModel.SexSelectList, DropdownUtility.VALUE, DropdownUtility.TEXT, _viewModel.Employer.Sex.Id); } else { ViewBag.Sexs = new SelectList(_viewModel.SexSelectList, DropdownUtility.VALUE, DropdownUtility.TEXT, 0); } ViewBag.States = new SelectList(_viewModel.StateSelectList, DropdownUtility.VALUE, DropdownUtility.TEXT, _viewModel.Employer.Person.State.Id); ViewBag.Countries = new SelectList(_viewModel.CountrySelectList, DropdownUtility.VALUE, DropdownUtility.TEXT, _viewModel.Employer.Person.Country.Id); if (_viewModel.Employer != null && _viewModel.Employer.LoginDetail != null && _viewModel.Employer.LoginDetail.SecurityQuestion != null) { ViewBag.SecurityQuestions = new SelectList(_viewModel.SecurityQuestionSelectList, DropdownUtility.VALUE, DropdownUtility.TEXT, _viewModel.Employer.LoginDetail.SecurityQuestion.Id); } else { ViewBag.SecurityQuestions = new SelectList(_viewModel.SecurityQuestionSelectList, DropdownUtility.VALUE, DropdownUtility.TEXT, 0); } if (_viewModel.EmployerStudentCategories == null || _viewModel.EmployerStudentCategories.Count <= 0) { viewModel.EmployerStudentCategories = UiUtility.InitializeStudentCategory(_viewModel.EmployerStudentCategories, _viewModel.WeekDays, _viewModel.Periods); } SetLgaIfExist(_viewModel.Employer.Person.State, _viewModel.Employer.Person.Lga); } SetSelectedEmployerStudentCategory(_viewModel); } catch (Exception) { throw; } }
void OnResultSimilarClicked(object sender, EventArgs <SearchResult> e) { searchQuery = null; searchRelated = null; UiUtility.ClearContainer <ResultView>(uiResults); uiLeftTabs.SelectedIndex = TabIndexSuggestions; Library.ClearOpenSuggestions(); UiUtility.ClearContainer <ResultView>(uiSuggestions); SuggestionScanner.SearchSimilar(e.Data.Title, HandleSuggestions); }
/// <summary> /// 根据两个值进行比较,如果前者小于后者,前者变红, /// </summary> /// <param name="value"></param> /// <param name="needValue"></param> /// <returns></returns> public string GetNeedString(int needValue, int value) { string valueStr = value.ToString(); if (value < needValue) { valueStr = UiUtility.GetTextColorString(value.ToString(), ColorType.Red); } return(string.Format("{0}/{1}", valueStr, needValue)); }
void MakeInstance() { GameInstance = UiUtility.AddChild(GameContainer, GamePrototype, true); var rect = (RectTransform)GameInstance.transform; rect.sizeDelta = Vector2.zero; GameInstance.Initialise(Client); GameInstance.OnGameEnd += OnGameEnd; }
void ImportPassenger_Load(object sender, EventArgs ee) { btnFromCb.Click += (s, e) => ImportFromClipboard(); btnFromFile.Click += (s, e) => ImportFromFile(); btnOk.Click += (s, e) => BeginImport(); imgList.Images.Add(UiUtility.Get24PxImageFrom16PxImg(Properties.Resources.user_16)); imgList.Images.Add(UiUtility.Get24PxImageFrom16PxImg(Properties.Resources.ArrowNormal)); imgList.Images.Add(UiUtility.Get24PxImageFrom16PxImg(Properties.Resources.tick_16)); imgList.Images.Add(UiUtility.Get24PxImageFrom16PxImg(Properties.Resources.delete_16)); }
void InitializeColors() { var theme = ThemeSettings.Instance; var back1 = ColorTranslator.FromHtml(theme.BackColor1); var back2 = ColorTranslator.FromHtml(theme.BackColor2); var fore1 = ColorTranslator.FromHtml(theme.ForeColor1); BackColor = back1; uiLog.ForeColor = fore1; uiLog.BackColor = back1; uiLogLevel.BackColor = back2; uiLogLevel.ForeColor = fore1; uiLogLevelLabel.ForeColor = fore1; uiQuery.ForeColor = fore1; uiQuery.BackColor = back2; uiLogGroup.ForeColor = fore1; uiCurrentGroup.ForeColor = fore1; uiLeftTabs.ForeColor = fore1; uiLeftTabs.BackColor = back1; uiLeftTabsSearch.ForeColor = fore1; uiLeftTabsSearch.BackColor = back1; uiLeftTabsPlaylist.ForeColor = fore1; uiLeftTabsPlaylist.BackColor = back1; uiLeftTabsSuggestions.ForeColor = fore1; uiLeftTabsSuggestions.BackColor = back1; uiDownloadGroup.ForeColor = fore1; uiPostProcessingGroup.ForeColor = fore1; uiBrowserPlayerContainer.ForeColor = fore1; uiPlaylistModeAll.ForeColor = fore1; uiPlaylistModeTrack.ForeColor = fore1; uiPlaylistModeRandom.ForeColor = fore1; uiSuggestionsFromLocation.BackColor = back1; uiSuggestionsFromLocation.ForeColor = fore1; UiUtility.SetLinkForeColors(uiLoadMore); UiUtility.SetLinkForeColors(uiPlaylistStop); UiUtility.SetLinkForeColors(uiPlaylistNext); UiUtility.SetLinkForeColors(uiPlaylistDump); UiUtility.SetLinkForeColors(uiPlaylistClear); UiUtility.SetLinkForeColors(uiPlaylistPrevious); UiUtility.SetLinkForeColors(uiPlaylistRandomize); UiUtility.SetLinkForeColors(uiSearchUpdateLibrary); UiUtility.SetLinkForeColors(uiSearchReplacePlaylist); UiUtility.SetLinkForeColors(uiSuggestionsSearchMore); UiUtility.SetLinkForeColors(uiSuggestionsIgnoreAll); UiUtility.SetLinkForeColors(uiSuggestionsRemoveAll); UiUtility.SetLinkForeColors(uiSuggestionsDownloadAll); UiUtility.SetLinkForeColors(uiSuggestionsClearHistory); UiUtility.SetLinkForeColors(uiSuggestionsReplacePlayist); UiUtility.SetToggleForeColors(uiToggleLog); UiUtility.SetToggleForeColors(uiToggleSearch); UiUtility.SetToggleForeColors(uiToggleFullScreen); UiUtility.SetToggleForeColors(uiTogglePlayerFull); UiUtility.SetToggleForeColors(uiToggleNotifications); UiUtility.SetToggleForeColors(uiToggleCurrentControls); }
private void ChangeFormState(eFormState fState) { try { GridView view = this.grdPickingList.Views[0] as GridView; switch (fState) { case eFormState.Edit: this.dntPickingList.Enabled = true; this.dntPickingList.TextStringFormat = " Edit Mode "; this.dntPickingList.Enabled = false; this.btnEdit.Enabled = false; this.btnDelete.Enabled = false; this.btnSave.Enabled = true; this.btnClose.Enabled = true; this.btnClose.Text = "Cancel"; this.ddbOptions.Enabled = false; UiUtility.SetGridFocused(view, DrawFocusRectStyle.CellFocus, true); UiUtility.SetGridEditOnly(view, false, "QTY"); break; case eFormState.ReadOnly: this.dntPickingList.Enabled = false; this.dntPickingList.TextStringFormat = " Record {0} of {1} "; this.dntPickingList.Enabled = true; this.btnEdit.Enabled = true;; this.btnDelete.Enabled = true; this.btnSave.Enabled = false; this.btnClose.Enabled = true; this.btnClose.Text = "Close"; this.ddbOptions.Enabled = true; UiUtility.SetGridFocused(view, DrawFocusRectStyle.CellFocus, true); UiUtility.SetGridEditOnly(view, true, "QTY"); break; default: break; } } catch (Exception ex) { XtraMessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1); } }
ListViewItem CreateItem(Entity.Web.Passenger p) { var lvi = new ListViewItem(p.Name) { ImageIndex = 0, UseItemStyleForSubItems = true }; if (p.IdTypeCode == '0' || p.IdTypeCode == '1') { var isFemale = (p.IdNo[p.IdNo.Length - 2] - '0') % 2 == 0; lvi.ImageIndex = isFemale ? 2 : 1; } lvi.SubItems.Add(ParamData.PassengerType[p.Type]); lvi.SubItems.Add(ParamData.PassengerIdType.GetValue(p.IdTypeCode).DefaultForEmpty("无效证件类型")); lvi.SubItems.Add(p.IdNo); lvi.SubItems.Add(p.MobileNo); //删除信息 var deleteTime = p.DeleteTime; var deleteMsg = deleteTime == null ? "<请刷新列表>" : deleteTime.Value < DateTime.Today ? "可以删除" : $"{deleteTime.Value.ToString("yyyy年MM月dd日")}可删"; //审核状态 var status = p.Verification; if (status.Verified == null) { lvi.SubItems.Add("待校验"); lvi.SubItems.Add(deleteMsg); lvi.SubItems.Add(status.VerifyMessage); lvi.ForeColor = Color.PaleVioletRed; } else if (status.Verified == true) { lvi.SubItems.Add("已通过"); lvi.SubItems.Add(deleteMsg); lvi.SubItems.Add(status.VerifyMessage); lvi.ForeColor = Color.Green; } else { lvi.SubItems.Add("未通过"); lvi.SubItems.Add(deleteMsg); lvi.SubItems.Add(status.VerifyMessage); lvi.ForeColor = Color.Red; } lvi.Tag = p; UiUtility.ApplySubStyle(lvi); return(lvi); }
public QmPanel() { InitializeComponent(); this.Load += AdvancedToolPanel_Load; imgStatus.Images.Add("standby", UiUtility.Get24PxImageFrom16PxImg(Properties.Resources._148)); imgStatus.Images.Add("query", UiUtility.Get24PxImageFrom16PxImg(Properties.Resources._146)); imgStatus.Images.Add("wait", UiUtility.Get24PxImageFrom16PxImg(Properties.Resources.clock_16)); IsControlVisibleChanged += QmPanel_IsControlVisibleChanged; }
private void CheckHit() { List <RaycastResult> raycastResults = UiUtility.GetUiRayHitListWithScreenPoint(Input.mousePosition); for (int i = 0; i < raycastResults.Count; i++) { if (raycastResults[i].gameObject == gameObject) { this.IsControlling = true; } } }