示例#1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        dictionaries = new Dictionaries(HttpContext.Current);
        if (!Page.IsPostBack)
        {
            dictionarySelector.DataSource = dictionaries.DictionaryNames();
            dictionarySelector.DataBind();
        }

        if (dictionarySelector.Items.Count == 0)
        {
            addPanel.Visible = false;
            searchPanel.Visible = false;
            importPanel.Visible = false;
            dictionarySelector.Visible = false;
            messageLabel.Text = "No dictionaries imported.";
        }
        else
        {
            addPanel.Visible = true;
            searchPanel.Visible = true;
            importPanel.Visible = true;
        }

        //ClearWordList();
    }