Make Menu of "Save as..." the same as of "Open"

rafael_abelyar wrote on 10/16/2024, 12:35 PM

Is there any possibility to make "Save As" menu show up the same way as "Open" Menu does?
It is more comfortable to have a possibility to paste Path in the upper part of the Menu-window rather than make several clicks choosing Folder by Folder until the final destination.
1st image is "Save As", 2nd one is "Open"

Comments

rafael_abelyar wrote on 10/16/2024, 2:38 PM

As far as I understand second one is using IFileOpenDialog, so the first one should use IFileSaveDialog, but it doesn't.

Thiago_Sase wrote on 10/16/2024, 4:28 PM

@rafael_abelyar Hi, for that, I use a script;

using System;
using System.IO;
using System.Windows.Forms;
using ScriptPortal.Vegas;

public class EntryPoint
{
    private Vegas myVegas;

    public void FromVegas(Vegas vegas)
    {
        myVegas = vegas;

        SaveFileDialog saveFileDialog = new SaveFileDialog();
        saveFileDialog.Title = "Save Vegas Project As";
        saveFileDialog.Filter = "Vegas Project Files (*.veg)|*.veg"; 
        saveFileDialog.FileName = "Project.veg"; 

        if (saveFileDialog.ShowDialog() == DialogResult.OK)
        {
            string savePath = saveFileDialog.FileName;

            
            myVegas.SaveProject(savePath);
        }
        else
        {
            MessageBox.Show("No file selected. Exiting script.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
    }
}

 

rafael_abelyar wrote on 10/17/2024, 6:05 PM

Thank you very much! This helps me a lot!

 Hi, for that, I use a script;

using System;
using System.IO;
using System.Windows.Forms;
using ScriptPortal.Vegas;

public class EntryPoint
{
    private Vegas myVegas;

    public void FromVegas(Vegas vegas)
    {
        myVegas = vegas;

        SaveFileDialog saveFileDialog = new SaveFileDialog();
        saveFileDialog.Title = "Save Vegas Project As";
        saveFileDialog.Filter = "Vegas Project Files (*.veg)|*.veg"; 
        saveFileDialog.FileName = "Project.veg"; 

        if (saveFileDialog.ShowDialog() == DialogResult.OK)
        {
            string savePath = saveFileDialog.FileName;

            
            myVegas.SaveProject(savePath);
        }
        else
        {
            MessageBox.Show("No file selected. Exiting script.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
    }
}

 

 

Thiago_Sase wrote on 10/17/2024, 6:25 PM

@rafael_abelyar You're welcome.