public override void Awake() { historyPanel = GetComponent <HistoryPanel>(); requestCode = RequestCode.Info; actionCode = ActionCode.UpdateHistory; base.Awake(); }
public static HistoryPanel HistoryPanel() { if (historyPanel == null) { historyPanel = new HistoryPanel(); } return(historyPanel); }
protected virtual void SetupHistoryPanel(Control parent) { HistoryPanel = new HistoryPanel(ExpressionFormatter, NumberFormatter); HistoryPanel.OnClear += HistoryPanelClear; HistoryPanel.OnHistorySelect += HistoryPanelSelect; HistoryPanel.OnExtended += HistoryPanelExtended; HistoryPanel.OnShrunken += BackPanelShrunken; PlaceBackPanel((Control)HistoryPanel, parent); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); container = FindViewById <LinearLayout>(Resource.Id.container); foreach (ResultHistory resultHistory in Application.Results) { HistoryPanel historyPanel = new HistoryPanel(this, resultHistory.StartDateTime, (DateTime)resultHistory.EndDateTime, resultHistory.Players.Where(p => p.Name != Player.DirkName).Select(p => p.Name).ToList()); container.AddView(historyPanel); container.RequestLayout(); } }
private void InstantiateHistoryPanel(string nameStr, string msgStr, bool isTween, bool isLarge) { HistoryPanel historyPanel = Instantiate <HistoryPanel>(historyPanelPrefab); historyPanel.transform.SetParent(chatHistoryHolder); historyPanel.GetComponent <RectTransform>().localScale = Vector3.one; historyPanel.gameObject.SetActive(true); historyPanel.Init(this, nameStr, msgStr, isTween, isLarge); Canvas.ForceUpdateCanvases(); chatHistoryScroll.verticalNormalizedPosition = 0f; Canvas.ForceUpdateCanvases(); }
/// <summary> /// 联系人 /// </summary> private void btnAttender_Click(object sender, EventArgs e) { try { var pnl = new HistoryPanel(); UXMessageMask.ShowForm(ownerContainer, pnl); callManager.GetHistoryCalls((calls) => { pnl.BindData(calls); }); } catch (Exception ex) { UXMessageMask.ShowMessage(ownerContainer, false, ex.Message, MessageBoxButtonsType.OK, MessageBoxIcon.Error); } }
public void RemoveResult(HistoryPanel historyPanel) { new AlertDialog.Builder(this) .SetTitle(Resources.GetString(Resource.String.result_removing)) .SetMessage(Resources.GetString(Resource.String.continue_question)) .SetPositiveButton(Resources.GetString(Resource.String.yes), new DialogInterfaceOnClickListener((IDialogInterface dialog, int which) => { container.RemoveView(historyPanel); container.RequestLayout(); Application.RemoveResult(historyPanel.StartDateTime); Application.SaveResults(); })) .SetNegativeButton(Resources.GetString(Resource.String.no), new DialogInterfaceOnClickListener(null)) .Show(); }
public HistoryItem Set(History history, HistoryPanel historyPanel) { HistoryPanel = historyPanel; if (history.Date.ToString("D") == DateTime.Now.ToString("D") && history.Photo == null) { selectPhotoButton.gameObject.SetActive(true); photographButton.gameObject.SetActive(true); photo.sprite = Resources.Load <Sprite>("Sprites/Add"); } else if (history.Photo != null) { photo.sprite = GameFacade.TransBytesToSprite(history.Photo, 600, 900); } else { photo.sprite = historyPanel.NullSprite; } date.text = history.Date.Year + "年\n" + history.Date.Month + "月" + history.Date.Day + "日"; id = history.Id; Content = history.Content != "" ? history.Content : "无"; return(this); }
private void RestoreHistoryPanel(NoahTask task, bool endOfTask = true) { DebugEvent(string.Format("Restoring {0} History", task.name)); RhinoApp.InvokeOnUiThread(new Action(() => { if (HistoryPanel == null) { Panels.OpenPanel(HistoryPanel.PanelId); } HistoryPanel = Panels.GetPanel <HistoryPanel>(RhinoDoc.ActiveDoc); if (restoreHistory) { if (task.history.Count > 0) { DebugEvent(string.Format("{0} Has {1} History", task.name, task.history.Count)); HistoryPanel.SetHistory(task.name, task.history); restoreHistory = false; } } else { DebugEvent(string.Format("Pushing {0} History", task.name)); HistoryPanel.AddHistory(task.name, task.history.Last()); } HistoryPanel.RestoreEvent -= HistoryPanel_RestoreEvent; HistoryPanel.RestoreEvent += HistoryPanel_RestoreEvent; HistoryPanel.StoreEvent -= HistoryPanel_StoreEvent; HistoryPanel.StoreEvent += HistoryPanel_StoreEvent; HistoryPanel.DeleteEvent -= HistoryPanel_DeleteEvent; HistoryPanel.DeleteEvent += HistoryPanel_DeleteEvent; })); }
protected virtual void HistoryPanelExtended(object sender, EventArgs e) { BackPanelActivated = true; ActiveBackPanel = HistoryPanel; HistoryPanel.ShowItems(History.ToArray()); }
protected virtual void OpenHistoryPanel() { HistoryPanel.Extend(Keypad.MainAreaHeight); Keypad.DisableAllKeys(); }
public void ShowResult(HistoryPanel historyPanel) { Application.ShowResult(historyPanel.StartDateTime); }