public override InteractionTab GetTab()
    {
        InfoTab tab = GameObject.Instantiate(prefab).GetComponent <InfoTab>();

        tab.Bind(this);
        return(tab);
    }
Exemple #2
0
    public void CreateEffect(Unit.Action _action)
    {
        InfoTab tempTab = Instantiate(infoTabPrefab, transform).GetComponent <InfoTab>();

        tempTab.affliation = affliation;
        if (affliation == GameManager.Affliation.DEFENCE)
        {
            tempTab.transform.localPosition = new Vector3(0, 0.5f, -0.4f);
        }
        else
        {
            tempTab.transform.localPosition = new Vector3(0, -0.5f, -0.4f);
        }
        Effect tempEffect = new Effect
        {
            actionType = _action.actionType,
            value      = _action.value,
            immune     = _action.immune,
            infoTab    = tempTab,
            affliation = _action.affliation
        };

        tempTab.LoadTab(tempEffect);
        effects.Add(tempEffect);
    }
Exemple #3
0
 // Use this for initialization
 void Start()
 {
     if (target == null)
     {
         target = GetComponentInChildren <UISprite>();
     }
     infoTab = PanelGameObject.GetComponent <InfoTab>();
 }
Exemple #4
0
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    protected void UserLogin()
    {
        System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
        string loginDate = DateTime.Now.ToString("dd/MM/yyyy");

        Session["Permissions"] = null;
        StringBuilder Q = new StringBuilder();

        Q.Append("SELECT * FROM AppUsers WHERE UsrStatus = '1' AND UsrLoginID = @P1 ");
        if (txtLoginID.Text != "admin")
        {
            Q.Append(" AND GETDATE() BETWEEN UsrStartDate AND UsrExpireDate ");
        }
        DataTable dt = DBFun.FetchData(Q.ToString(), new string[] { txtLoginID.Text });

        if (!DBFun.IsNullOrEmpty(dt))
        {
            if (dt.Rows[0]["UsrPassword"].ToString() == txtPassword.Text) //CryptorEngine.Decrypt("", true)
            {
                try
                {
                    Session["UserName"]    = txtLoginID.Text;
                    Session["Permissions"] = CryptorEngine.Decrypt(dt.Rows[0]["UsrPermission"].ToString(), true);
                    //Session["Permissions"] = dt.Rows[0]["UsrPermission"].ToString();
                    Session["PreferedCulture"] = "en-US";
                    Session["Language"]        = dt.Rows[0]["UsrLanguage"].ToString();
                    Session["Role"]            = "User";
                    Session["MyTheme"]         = "Theme" + Session["Language"].ToString();

                    string url = InfoTab.FindFirstTab(); //@"~/pages/SettingMachine.aspx"; //MachinePing.aspx"; //InfoTab.FindFirstTab(); //@"~/pages/MachinePing.aspx";//
                    if (!string.IsNullOrEmpty(url))
                    {
                        Response.Redirect(url, false);
                    }
                    else
                    {
                        MessageFun.ShowMsg(this, MessageFun.TypeMsg.Error, General.Msg("You do not have access,Please contact the Administrator", "لا يمكنك الدخول,الرجاء مراجعة مدير النظام"));
                    }
                    return;
                }
                catch (Exception e1)
                {
                    DBFun.InsertError("Login.aspx", "UserLogin");
                }
            }
        }

        MessageFun.ShowMsg(this, MessageFun.TypeMsg.Error, General.Msg("You do not have access,Please contact the Administrator", "لا يمكنك الدخول,الرجاء مراجعة مدير النظام"));
    }
        /// <summary>
        /// If overridding this don't forget to call base.Load().
        /// NOTE: Will navigate to the pages url if the current drivers url
        /// is empty.
        /// </summary>
        /// <returns></returns>
        /// <remarks>
        /// If the driver is an EventFiringWebDriver an event listener will
        /// be added to the 'Navigated' event and uses the url to determine
        /// if the page is 'stale'.
        /// </remarks>
        public override ILoadableComponent Load()
        {
            base.Load();
            basePage.Load();
            Tabs.Load();
            InfoTab.Load();

            // Wait for the loading indicator.
            WrappedDriver
            .Wait(TimeSpan.FromSeconds(5))
            .TrySequentialWait(
                out var exc,
                d => basePage.IsAjaxBusy(),
                d => !basePage.IsAjaxBusy());

            return(this);
        }
Exemple #6
0
        private void AboutButtonClick(object sender, RoutedEventArgs e)
        {
            var header = new TabHeader();

            header.HeaderText = "About";
            header.Closing   += OnTabCloseRequest;
            var tab = new TabItem()
            {
                Header = header,
            };
            var aboutTab = new InfoTab();

            tab.Content = aboutTab;
            tab.InvalidateArrange();
            tabViewer.Items.Add(tab);
            tabViewer.SelectedItem = tab;
            UpdateLayout();
        }
Exemple #7
0
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    protected void Page_Load(object sender, EventArgs e)
    {
        FormSession.FillSession("", null);

        try { Response.AppendHeader("Refresh", Convert.ToString((Session.Timeout * 60) + 2) + "; URL=../Login.aspx"); } catch (Exception ex) { }

        if (FormSession.Language == "Ar")
        {
            MainDiv.Attributes.Add("dir", "rtl");
        }
        else
        {
            MainDiv.Attributes.Add("dir", "ltr");
        }

        int Index = InfoTab.FindPageIndex(FormSession.PageIndex);

        InfoTab.ShowTabs(Index, Session["Language"].ToString(), (HtmlTableCell)MyHeader.FindControl("MenuHeader"));
        lblHeading.Text = Titel;
    }
Exemple #8
0
 public void SetTab(InfoTab _infoTab)
 {
     infoTab = _infoTab;
 }
Exemple #9
0
    void OnClick()
    {
        InfoTab tabs = PanelObject.GetComponent <InfoTab>();

        tabs.ShowTab(TargetTab, -1);
    }
Exemple #10
0
 private void Start()
 {
     tab = FindObjectOfType <InfoTab>();
 }
Exemple #11
0
            /*
             * Generates a fake entry for the list of steps to hold information about the guide.
             * Not an ideal solution... Should probably build an entire PivotItem and insert it at the
             * start of GuidePivot.
             */
            private InfoTab BuildInfoTab(Guide g)
            {
                InfoTab infoTab = new InfoTab();
                infoTab.Type = "Info";
                infoTab.Title = "Info";
                infoTab.TitleImage = g.TitleImage;

                if (g.Introduction != null && g.Introduction.Length > 0)
                {
                    infoTab.Introduction = g.Introduction.Replace("<p>", "").Replace("</p>", "");
                }

                if (g.Difficulty != null && g.Difficulty.Length > 0)
                {
                    infoTab.Difficulty = g.Difficulty;
                }

                if (g.Author != null && g.Author.Length > 0)
                {
                    infoTab.Author = g.Author;
                }

                if (g.Parts != null && g.Parts.Length > 0)
                {
                    infoTab.Parts = g.parts;
                }

                if (g.Prereqs != null && g.Prereqs.Length > 0)
                {
                    infoTab.Prereqs = g.prereqs;
                }

                if (g.Tools != null && g.Tools.Length > 0)
                {
                    infoTab.Tools = g.tools;
                }
                infoTab.createShortNames(g.parentName);
                return infoTab;
            }
Exemple #12
0
 // Use this for initialization
 void Start()
 {
     if (target == null) target = GetComponentInChildren<UISprite>();
     infoTab = PanelGameObject.GetComponent<InfoTab>();
 }