public bool IsStartPanelActive() { if (panelStack == null) { return(false); } var panelArray = panelStack.ToArray(); if (panelArray.Length == 1) { UIStart tempPanel = panelArray[0] as UIStart; if (tempPanel == null) { return(false); } else { return(true); } } UIStart panel = panelArray[1] as UIStart; if (panel == null) { return(false); } else { return(true); } }
//click button Play(UI start) public void buttonPlay() { UIStart.SetActive(false); UIHand.SetActive(true); audioSource.PlayOneShot(audioClips[0], 1f); StartCoroutine(wait(1, 2)); }
private void CreateLayersFiles(ConditionModel model) { Func <ConditionModel, string> funHtml = UIStart.getInstance(model).CreatePageUIByType; Func <ConditionModel, string> funCs = UIStart.getInstance(model).CreatePageCSByType; string dicPath = AppDomain.CurrentDomain.BaseDirectory;; #region TCControls if (RbtnListAndEdit.IsChecked == true) { CreateFile(dicPath, "ListPageHtml", ePageType.ViewPage, funHtml); CreateFile(dicPath, "ListPageCs", ePageType.ViewPage, funCs); CreateFile(dicPath, "EditPageHtml", ePageType.EditPage, funHtml); CreateFile(dicPath, "EditPageCs", ePageType.EditPage, funCs); } else if (RbtnListEditListBox.IsChecked == true) { CreateFile(dicPath, "简单编辑页面HTML", ePageType.ViewEditPageListBox, funHtml); CreateFile(dicPath, "简单编辑页面", ePageType.ViewEditPageListBox, funCs); } else if (RbtnListEditRepeater.IsChecked == true) { CreateFile(dicPath, "简单编辑页面HTML", ePageType.ViewEditPageRepeater, funHtml); CreateFile(dicPath, "简单编辑页面", ePageType.ViewEditPageRepeater, funCs); } #endregion }
private void CreateUI(ConditionModel model) { Func <ConditionModel, string> funHtml = UIStart.getInstance(model).CreatePageUIByType; Func <ConditionModel, string> funCs = UIStart.getInstance(model).CreatePageCSByType; #region TCControls if (RbtnListAndEdit.IsChecked == true) { TcControls.Items.Clear(); TcControls.Items.Add(CreateUITabItem("ViewPageHtml", model, ePageType.ViewPage, funHtml)); TcControls.Items.Add(CreateUITabItem("VIewPageCs", model, ePageType.ViewPage, funCs)); TcControls.Items.Add(CreateUITabItem("EditPageHtml", model, ePageType.EditPage, funHtml)); TcControls.Items.Add(CreateUITabItem("EditPageCs", model, ePageType.EditPage, funCs)); } else if (RbtnListEditListBox.IsChecked == true) { TcControls.Items.Clear(); TcControls.Items.Add(CreateUITabItem("简单编辑页面HTML", model, ePageType.ViewEditPageListBox, funHtml)); TcControls.Items.Add(CreateUITabItem("简单编辑页面CS", model, ePageType.ViewEditPageListBox, funCs)); } else if (RbtnListEditRepeater.IsChecked == true) { TcControls.Items.Clear(); TcControls.Items.Add(CreateUITabItem("编辑页面HTML", model, ePageType.ViewEditPageRepeater, funHtml)); TcControls.Items.Add(CreateUITabItem("编辑页面CS", model, ePageType.ViewEditPageRepeater, funCs)); } #endregion }
public override void OnEnter() { Debug.Log("I am ProcLogin"); // use UIManager to open UIStart here startUI = (UIStart)GameMain.Instance.uiManager.CreateUI(UIManager.UIID.Start); //startUI = (UILogin)GameMain.Instance.uiManager.CreateUI (UIManager.UIID.Login); //GameObject.Find ("GameMain").GetComponent<GameMain> (); }
private void CreateOneLayer(TreeViewNode node, ConditionModel model) { Constant.Constant.TableName = node.Name; model.EntityName = node.Name; model.Table = GetDtFields(node.Name); if (TbEntityName.Text.Length > 0) { model.EntityName = this.TbEntityName.Text; } if (TbNameSpace.Text.Length > 0) { model.NameSpace = TbNameSpace.Text; } if (RBtnLay.IsChecked == true) { CreateLayersTabItem(model); } else if (RBtnProc.IsChecked == true) { CreateProcTabItem(); } else if (RBtnMvc.IsChecked == true) { CreateProcTabMVC(model); } else if (RBtnProcCaller.IsChecked == true) { CreateProcCallerTabItem(); } else if (this.RBtnAPIUI.IsChecked == true) { Func <ConditionModel, string> funHtml = UIStart.getInstance(model).CreatePageUIByType; Func <ConditionModel, string> funCs = UIStart.getInstance(model).CreatePageCSByType; TcControls.Items.Clear(); TcControls.Items.Add(CreateUITabItem("列表页面", model, ePageType.ApiViewPage, funHtml)); TcControls.Items.Add(CreateUITabItem("编辑页面", model, ePageType.ApiEditPage, funHtml)); TcControls.Items.Add(CreateUITabItem("列表编辑页面", model, ePageType.ApiViewEditPage, funHtml)); TcControls.Items.Add(CreateUITabItem("ashx", model, ePageType.Ashx, funCs)); } else { CreateUI(model); } }
public void PopAllPanels() { if (panelStack == null) { return; } UIStart startPanel = panelStack.Peek() as UIStart; if (startPanel != null) { return; } int count = panelStack.Count; for (int i = 0; i < count; i++) { BasePanel topPanel = panelStack.Pop(); topPanel.OnExit(); } }
static void Main() { Action destroySelf = () => { }; using (var testcontext = new OperationContext(s => {})) { var testPhase = new SelfDestroyPhase(); testPhase.Run(testcontext, null); destroySelf = testcontext.DestroySelf; } UIStart.Run(log => { using (var context = new OperationContext(log)) { try { Operation.Start(context); destroySelf = context.DestroySelf; context.GlobalTimeout.Token.ThrowIfCancellationRequested(); } catch (Exception e) { context.WriteLine("Error:"); context.WriteLine(e.ToString()); using (var stream = new StreamWriter(new FileStream("errors.txt", FileMode.OpenOrCreate, FileAccess.Write))) stream.WriteLine(e.ToString()); } } }); destroySelf(); Environment.Exit(0); }
void Awake() { _instance = this; }
public void StartUIShow() { _StartUI = new UIStart(); _StartUI.Show(); }