| 1 | using System;
|
|---|
| 2 | using System.Data;
|
|---|
| 3 | using System.Configuration;
|
|---|
| 4 | using System.Collections;
|
|---|
| 5 | using System.Web;
|
|---|
| 6 | using System.Web.Security;
|
|---|
| 7 | using System.Web.UI;
|
|---|
| 8 | using System.Web.UI.WebControls;
|
|---|
| 9 | using System.Web.UI.WebControls.WebParts;
|
|---|
| 10 | using System.Web.UI.HtmlControls;
|
|---|
| 11 | using System.Threading;
|
|---|
| 12 |
|
|---|
| 13 | public partial class MasterPage : System.Web.UI.MasterPage
|
|---|
| 14 | {
|
|---|
| 15 | protected void Page_Load(object sender, EventArgs e)
|
|---|
| 16 | {
|
|---|
| 17 | if ((string)Session["culture"] == "pl-PL")
|
|---|
| 18 | {
|
|---|
| 19 | this.ImageButton1.Enabled = false;
|
|---|
| 20 | }
|
|---|
| 21 | if ((string)Session["culture"] == "en-US")
|
|---|
| 22 | {
|
|---|
| 23 | this.ImageButton2.Enabled = false;
|
|---|
| 24 | }
|
|---|
| 25 | }
|
|---|
| 26 |
|
|---|
| 27 | protected void FlagaPL_Click(object sender, EventArgs e)
|
|---|
| 28 | {
|
|---|
| 29 | if (Thread.CurrentThread.CurrentCulture.Name == "en-US")
|
|---|
| 30 | {
|
|---|
| 31 | Session["culture"] = "pl-PL";
|
|---|
| 32 | string zapytanie = Request.QueryString.ToString();
|
|---|
| 33 | if (zapytanie != "") { zapytanie = "?" + zapytanie; }
|
|---|
| 34 | Response.Write(zapytanie);
|
|---|
| 35 | Response.Redirect(Request.Url.LocalPath + zapytanie);
|
|---|
| 36 | }
|
|---|
| 37 |
|
|---|
| 38 | }
|
|---|
| 39 |
|
|---|
| 40 | protected void FlagaGB_Click(object sender, EventArgs e)
|
|---|
| 41 | {
|
|---|
| 42 | if (Thread.CurrentThread.CurrentCulture.Name == "pl-PL")
|
|---|
| 43 | {
|
|---|
| 44 | Session["culture"] = "en-US";
|
|---|
| 45 | string zapytanie = Request.QueryString.ToString();
|
|---|
| 46 | if (zapytanie != "") { zapytanie = "?" + zapytanie; }
|
|---|
| 47 | Response.Redirect(Request.Url.LocalPath + zapytanie);
|
|---|
| 48 | }
|
|---|
| 49 |
|
|---|
| 50 | }
|
|---|
| 51 | }
|
|---|