Пример #1
0
        private void btnLogin_Click(object sender, RoutedEventArgs e)
        {
            // login button event handler

            // TODO: check login credentials from stored username/ passwords

            // check to see which role was selected to select next screen
            switch ((string)RoleCombobox.SelectedValue)
            {
            case "Supervisor":
                SpecialityView win_spec = new SpecialityView();
                win_spec.Show();
                this.Close();
                break;

            case "Doctor":
                MainWindow win = new MainWindow();
                win.Show();
                this.Close();
                break;

            case "Front Desk":
                FrontDeskView NewWindow = new FrontDeskView(LoginBox.Text);
                NewWindow.Show();
                this.Close();
                break;
            }
        }
Пример #2
0
    public override void BindView()
    {
        if (root == null)
        {
            Debug.Log("bind fail no root found");
        }

        view.Sections = root.Find("Sections");

        view.Next_Button = view.Sections.Find("Next").GetComponent <Button>();
        view.Back_Button = view.Sections.Find("Back").GetComponent <Button>();

        view.ToggleMan   = view.Sections.Find("Section1").Find("基本信息").Find("Toggle_Man").GetComponent <Toggle>();
        view.ToggleWoman = view.Sections.Find("Section1").Find("基本信息").Find("Toggle_Woman").GetComponent <Toggle>();


        view.Layout = view.Sections.Find("Section2").Find("Layout");

        foreach (Transform child in view.Layout)
        {
            SpecialityView vv = new SpecialityView(child.GetSiblingIndex());
            view.specLines.Add(vv);
            vv.BindView(child);
        }


        view.PointLeft      = view.Sections.Find("Section3").Find("属性调整").GetChild(0).GetChild(0).GetComponent <Text> ();
        view.PointLeft.text = model.LeftPoint + "";

        Transform pRoot = view.Sections.Find("Section3").Find("属性调整").GetChild(1);

        view.WarningMsg = view.Sections.Find("Section3").Find("属性调整").Find("提示").GetComponent <Text>();



        view.NextStage = root.Find("NextStage").GetComponent <Button>();

        view.SKillLeft = root.Find("Text_Left").GetComponent <Text> ();
        //view.PointLeft = root.Find ("属性调整").GetChild(0).GetChild(1).GetComponent<Text> ();

        view.SKillLeft.text = model.LeftSkillPoint + "";

        view.PosSkillContainer  = root.Find("已选优势");
        view.AvailableContainer = root.Find("可选特质").GetChild(1).GetChild(0).GetChild(0);

        view.DetailName = root.Find("SpeDetail").GetChild(0).GetComponent <Text>();
        view.DetailDesp = root.Find("SpeDetail").GetChild(1).GetComponent <Text>();

        //Transform pRoot = root.Find ("属性调整").GetChild(1);

        foreach (Transform child in pRoot)
        {
            BasePropertyLineView vv = new BasePropertyLineView();
            vv.BindView(child);
            vv.BaseValue.text = model.bas[child.GetSiblingIndex()] + "";
            view.baseLines.Add(vv);
        }

        foreach (Tezhi tezhi in model.availabelTezhi)
        {
            GameObject    go = GameMain.GetInstance().GetModule <ResLoader>().Instantiate("UI/AvailableTezhi", view.AvailableContainer);
            SpecilistView vv = new SpecilistView();
            vv.BindView(go.transform);
            vv.Name.text = tezhi.Name;
            view.avalableList.Add(vv);
        }
    }