Esempio n. 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        CKEditorControl1.Language = CultureInfo.CurrentCulture.ToString();
        string path = Server.MapPath("~/App_Data/notepad/");

        FileHelpers.CreateDirectory(path);
        _filename = path + "notepad.html";
        FileHelpers.CreateFile(_filename);
    }
Esempio n. 2
0
 public void SaveRobots()
 {
     try
     {
         FileHelpers.CreateFile(_filename);
         using (var wr = new StreamWriter(_filename))
         {
             wr.Write(txtRobots.Text);
         }
     }
     catch (Exception ex)
     {
         Debug.LogError(ex);
     }
 }
Esempio n. 3
0
 protected void Page_PreRender(object sender, EventArgs e)
 {
     try
     {
         FileHelpers.CreateFile(_filename);
         using (var sr = new StreamReader(_filename))
         {
             //String line = sr.ReadToEnd();
             txtRobots.Text = sr.ReadToEnd();
         }
     }
     catch (Exception ex)
     {
         Debug.LogError(ex);
     }
 }
Esempio n. 4
0
 protected void SetNotepad(string text)
 {
     try
     {
         Message.Visible = false;
         FileHelpers.CreateFile(_filename);
         using (var wr = new StreamWriter(_filename))
         {
             wr.Write(text);
             Message.Text    = Resources.Resource.Admin_Notepad_SaveComplete;
             Message.Visible = true;
         }
     }
     catch (Exception e)
     {
         Debug.LogError(e);
         Message.Text    = Resources.Resource.Admin_Notepad_SaveError;
         Message.Visible = true;
     }
 }
Esempio n. 5
0
    protected string GetNotepad()
    {
        try
        {
            Message.Visible = false;

            FileHelpers.CreateFile(_filename);
            using (var sr = new StreamReader(_filename))
            {
                String line = sr.ReadToEnd();
                return(line);
            }
        }
        catch (Exception e)
        {
            Debug.LogError(e);
            Message.Text    = Resources.Resource.Admin_Notepad_LoadError;
            Message.Visible = true;
            return(string.Empty);
        }
    }
Esempio n. 6
0
 protected void GoShopClick(object sender, EventArgs e)
 {
     FileHelpers.CreateFile(SettingsGeneral.InstallFilePath);
     Response.Redirect("~/");
 }
Esempio n. 7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     _filename = Server.MapPath("~/") + "robots.txt";
     FileHelpers.CreateFile(_filename);
 }