Esempio n. 1
0
 private void btn_add_licence_Click(object sender, EventArgs e)
 {
     cls_main main_func = new cls_main();
        file_dialog.Title = "Укажите файл со страницей";
        file_dialog.DefaultExt = "*.htm";
        file_dialog.Filter = "HTML страница (*.htm)|*.htm|HTML страница (*.html)|*.html";
        DialogResult result = file_dialog.ShowDialog();
        if (result == DialogResult.OK)
        {
        main_func.DirectoryCopy(main_func.get_path(file_dialog.FileName) + main_func.get_filename_without_ex(file_dialog.FileName) + "_files", appdir + "Projects\\" + prj_open_name + "\\temp\\licence\\licence_files", true);
        File.Copy(file_dialog.FileName, appdir + "Projects\\" + prj_open_name + "\\temp\\licence\\licence." + main_func.get_extention(file_dialog.FileName), true);
        txt_licence_path.Text = "licence." + main_func.get_extention(file_dialog.FileName);
        main_func.replace_in_file(main_func.get_filename_without_ex(file_dialog.FileName) + "_files/", "licence_files/", appdir + "Projects\\" + prj_open_name + "\\temp\\licence\\licence." + main_func.get_extention(file_dialog.FileName));
        }
 }