public void LaunchFluidUI() { Console.Out.Write("Launching FluidUI... "); try { fluidUi = new NewUI(); } catch (Exception ex) { Console.Out.WriteLine("She's dead, Jim."); Console.Out.WriteLine("The gory details:"); Console.Out.WriteLine(ex.Message); Console.Out.WriteLine(ex.StackTrace); } Console.Out.WriteLine("Done. "); fluidUi.ShowDialog(); // Console.Out.WriteLine("FluidUI Closed. "); }
/// <summary> /// popup inst /// </summary> public UI_PopupBase InstantiateUI(UIPOPUP _popup, Transform _parentTr) { GameObject NewUI; GameObject CloneUI; NewUI = Resources.Load(string.Format("Prefebs/UI_{0}", _popup.ToString())) as GameObject; CloneUI = Instantiate(NewUI); UserEditor.Getsingleton.EditLog(string.Format("Creat Prefebs/UI_{0}", _popup.ToString())); #if UNITY_EDITOR CloneUI.name = NewUI.name; #endif CloneUI.transform.SetParent(_parentTr); RectTransform _cloneUIRectTr = CloneUI.GetComponent <RectTransform>(); RectTransform _newUIRectTr = NewUI.GetComponent <RectTransform>(); _cloneUIRectTr.sizeDelta = _newUIRectTr.sizeDelta; _cloneUIRectTr.anchoredPosition = _newUIRectTr.anchoredPosition; _cloneUIRectTr.localScale = _newUIRectTr.localScale; UI_PopupBase _uiPopupBase = CloneUI.GetComponent <UI_PopupBase>(); UIPopupList.Add(_uiPopupBase); //if (UIPopupList.Count == 1) Open_NextPopup(); //else // _uiPopupBase.gameObject.SetActive(false); //팝업올라 왓으니 캐릭회전 잠그자 //User.isSelectedCharacter = true; return(_uiPopupBase); } // end of function
public static void ShowExample() { NewUI wnd = GetWindow <NewUI>(); wnd.titleContent = new GUIContent("NewUI"); }
private void Controller() { journalmonitor = new EDJournalUIScanner(InvokeAsyncOnUiThread); journalmonitor.OnNewJournalEntry += (je) => { Entry(je, false); }; journalmonitor.OnNewUIEvent += (ui) => { InvokeAsyncOnUiThread(() => NewUI?.Invoke(ui)); }; LogLine?.Invoke("Reading Journals"); Reset(); journalmonitor.SetupWatchers(); // order the reading of last 2 files (in case continue) and fire back the last two journalmonitor.ParseJournalFilesOnWatchers(UpdateWatcher, 2, (a) => InvokeAsyncOnUiThread(() => { Entry(a, true); }), 2); InvokeAsyncOnUiThread(() => { Refresh?.Invoke(currenthe); }); LogLine?.Invoke("Finished reading Journals"); journalmonitor.StartMonitor(); while (!stopit) { if (RequestRescan) { RequestRescan = false; LogLine?.Invoke("Re-reading Journals"); journalmonitor.StopMonitor(); Reset(); journalmonitor.SetupWatchers(); journalmonitor.ParseJournalFilesOnWatchers(UpdateWatcher, 2, (a) => InvokeAsyncOnUiThread(() => { Entry(a, true); }), 2); journalmonitor.StartMonitor(); InvokeAsyncOnUiThread(() => { Refresh?.Invoke(currenthe); }); LogLine?.Invoke("Finished reading Journals"); } Thread.Sleep(100); } journalmonitor.StopMonitor(); }
private void Controller() { journalmonitor = new EDJournalUIScanner(InvokeAsyncOnUiThread); journalmonitor.OnNewJournalEntry += (je) => { Entry(je, false, true); }; journalmonitor.OnNewUIEvent += (ui) => { InvokeAsyncOnUiThread(() => NewUI?.Invoke(ui)); }; LogLine?.Invoke("Detecting Journals"); Reset(); journalmonitor.SetupWatchers(); // order the reading of last 2 files (in case continue) and fire back the last two LogLine?.Invoke("Reading Journals"); journalmonitor.ParseJournalFilesOnWatchers(UpdateWatcher, 2, (a, ji, jt, ei, et) => InvokeAsyncOnUiThread(() => { // System.Diagnostics.Debug.WriteLine("In FG {0} {1} {2} {3} {4} {5}", EDCommander.GetCommander(a.CommanderId).Name, ji, jt, ei, et, a.EventTypeStr ); Entry(a, true, ei - et > -recentlimit); }), 2); InvokeAsyncOnUiThread(() => { RefreshFinished?.Invoke(currenthe); }); LogLine?.Invoke("Finished reading Journals"); journalmonitor.StartMonitor(false); while (!stopit) { if (RequestRescan) { RequestRescan = false; LogLine?.Invoke("Re-reading Journals"); journalmonitor.StopMonitor(); Reset(); journalmonitor.SetupWatchers(); journalmonitor.ParseJournalFilesOnWatchers(UpdateWatcher, 2, (a, ji, jt, ei, et) => InvokeAsyncOnUiThread(() => { Entry(a, true, ei - et > -recentlimit); }), 2); journalmonitor.StartMonitor(false); InvokeAsyncOnUiThread(() => { RefreshFinished?.Invoke(currenthe); }); LogLine?.Invoke("Finished reading Journals"); } Thread.Sleep(100); } journalmonitor.StopMonitor(); }