Exemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string str = "", action, style, skey, h;

        action = Request.QueryString["action"];
        style  = Request.QueryString["style"];
        skey   = Request.QueryString["skey"];
        h      = Request.QueryString["h"];
        str    = IOFile.ReadFile("~/eWebEditor/aspx/ajs/" + style + ".js");
        Response.Write(str);
    }
Exemplo n.º 2
0
        //Меню - новый.
        private void новыйToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //Временная строка
            Text txt = new Text();

            //Если имя файла уже есть
            if (file.GetName() != "")
            {
                //Открываем текущий файл
                txt.Set(file.ReadFile());
            }
            //Проверяем был ли изменен текущий файл
            if (richTextBox1.Text + "\n" != txt.Get() && richTextBox1.Text != txt.Get())
            {
                //Если изменён
                //Спрашиваем сохранить или нет
                DialogResult result = MessageBox.Show("Сохранить?", "Создание нового файла", MessageBoxButtons.OKCancel,
                                                      MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1);
                //Если требуется сохранить файл
                if (result == DialogResult.OK)
                {
                    //Сохраняем
                    txt.Set(richTextBox1.Text);
                    file.WriteFile(txt);
                }
            }
            //Выводим форму для создания файла
            NewFile nf = new NewFile();

            nf.ShowDialog();
            //Получаем от нее имя нового файла
            file.SetName("Files/" + nf.name + ".vb");
            txt.Set("");
            //Создаем его
            file.WriteFile(txt);
            //очищаем текстовое поле
            richTextBox1.Text = txt.Get();
        }
Exemplo n.º 3
0
    /// <summary>
    /// 处理后台左边菜单
    /// </summary>
    /// <returns></returns>
    private string leftall()
    {
        string str = string.Empty, mer = Request.QueryString["mer"];

        str = IOFile.ReadFile("~/admin/Apply/lefthtml/left" + mer + ".html");
        if (str.IndexOf("{div|") > -1)
        {
            str = ask.Web.left.divClass(str);
        }
        if (str.IndexOf("{p|") > -1)
        {
            str = ask.Web.left.pClass(str);
        }
        return(str);
    }