Exemplo n.º 1
0
 protected void LinkButton_Home_Click(object sender, EventArgs e)
 {
     LinkButton_Home.Style["font-weight"] = "bold";
     LinkButton_Log.Style.Remove("font-weight");
     LinkButton_Config.Style.Remove("font-weight");
     MultiView_tvNZB.SetActiveView(View_Home); //Default view is the gridview
 }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack) //first page load
        {
            //Tests to see if config.xml file was configured by user
            XDocument configXML = XDocument.Load(Server.MapPath("App_Data/Config.xml"));
            var       config    = from c in configXML.Descendants("Config")
                                  select c;

            foreach (var settings in config)
            {
                if (settings.Element("NewzbinUserName").Value == "") //Config not set yet
                {
                    //Bolds the config menu item which should be currently selected
                    LinkButton_Config.Style["font-weight"] = "bold";
                    LinkButton_Log.Style.Remove("font-weight");
                    LinkButton_Home.Style.Remove("font-weight");

                    Session["Config"] = "new";
                    BindData();
                    MultiView_tvNZB.SetActiveView(View_Config);
                }
                else
                {
                    //Bolds the home menu item which should be currently selected
                    LinkButton_Home.Style["font-weight"] = "bold";
                    LinkButton_Log.Style.Remove("font-weight");
                    LinkButton_Config.Style.Remove("font-weight");

                    MultiView_tvNZB.SetActiveView(View_Home); //Default view is the gridview
                    BindData();
                }
            }
        }
    }