Exemplo n.º 1
0
        private void InitData()
        {
            //Get the file path to look for effect files
            Properties.config config   = TeslaEffectCompiler.Properties.config.Default;
            String            filePath = config.FilePath;

            if (String.IsNullOrEmpty(filePath) || !Directory.Exists(filePath))
            {
                //If first time startup, use title path
                filePath = ResourceUtils.TitlePath;
            }
            filePathTextBox.Text         = filePath;
            filePathBrowser.SelectedPath = filePathTextBox.Text;

            //Get the file path that will be where we output tebo files
            String outputPath = config.OutputPath;

            if (String.IsNullOrEmpty(outputPath) || !Directory.Exists(filePath))
            {
                //If first time startup, use the title path
                outputPath = ResourceUtils.TitlePath;
            }
            outputPathTextBox.Text = outputPath;

            outputPathBrowser.SelectedPath = outputPathTextBox.Text;

            //Check to see if there's any valid files and list them
            ListEffectFiles(filePathTextBox.Text);
        }
Exemplo n.º 2
0
 private void SavePaths(Object sender, FormClosingEventArgs args)
 {
     //Save user defined paths for future use.
     if (args.CloseReason == CloseReason.ApplicationExitCall)
     {
         Properties.config config = TeslaEffectCompiler.Properties.config.Default;
         config.FilePath   = filePathTextBox.Text;
         config.OutputPath = outputPathTextBox.Text;
         config.Save();
     }
 }