예제 #1
0
파일: MainForm.cs 프로젝트: developer88/umk
 private void btn_add_splash_Click(object sender, EventArgs e)
 {
     cls_main main_func = new cls_main();
        if (combo_splash.Text == "image")
        {
        file_dialog.Title = "Укажите файл с картинкой";
        file_dialog.DefaultExt = "*.png";
        file_dialog.Filter = "PNG файлы (*.png)|*.png|JPEG файлы (*.jpg)|*.jpg";
        }
        else
        {
        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)
        {
        if (combo_splash.Text == "image")
        {
            File.Copy(file_dialog.FileName, appdir + "Projects\\" + prj_open_name + "\\temp\\splash\\splash." + main_func.get_extention(file_dialog.FileName), true);
        }
        else
        {
            File.Copy(file_dialog.FileName, appdir + "Projects\\" + prj_open_name + "\\temp\\splash\\splash." + main_func.get_extention(file_dialog.FileName), true);
            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\\splash\\splash_files", true);
        }
        txt_splash_path.Text = "splash." + main_func.get_extention(file_dialog.FileName);
        }
 }
예제 #2
0
파일: MainForm.cs 프로젝트: developer88/umk
 private void add_other_files_Click(object sender, EventArgs e)
 {
     cls_main main_func = new cls_main();
        file_dialog.Title = "Добавление файла";
        file_dialog.DefaultExt = "*.*";
        DialogResult result = file_dialog.ShowDialog();
        if (result == DialogResult.OK)
        {
        string[] row1 = { main_func.get_filename(file_dialog.FileName), "файл", main_func.get_path(file_dialog.FileName) };
       // dg_prj_files.Rows.Add(row1);
        }
 }
예제 #3
0
파일: MainForm.cs 프로젝트: developer88/umk
 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));
        }
 }