Example #1
0
 /// <summary>
 /// Attempts to load the most recently-edited project.
 /// </summary>
 /// <param name="inSender">The originator of the event.</param>
 /// <param name="inEventArguments">Additional event data.</param>
 private void LinkLabelMostRecent_LinkClicked(object inSender, LinkLabelLinkClickedEventArgs inEventArguments)
 {
     if (!string.IsNullOrEmpty(Settings.Default.MostRecentProject))
     {
         All.ProjectDirectory = Settings.Default.MostRecentProject;
         if (EditorCommands.LoadDataFiles())
         {
             ScribeProgram.ShowEditor();
             Close();
         }
         else
         {
             SystemSounds.Beep.Play();
             Logger.Log(LogLevel.Error, Resources.ErrorLoadFailed);
         }
     }
 }
Example #2
0
        /// <summary>
        /// Attempts to load a saved project.
        /// </summary>
        /// <param name="inSender">The originator of the event.</param>
        /// <param name="inEventArguments">Additional event data.</param>
        private void ButtonLoadProject_Click(object inSender, EventArgs inEventArguments)
        {
            if (!EditorCommands.SelectProjectFolder(Resources.InfoMessageLoad, Resources.FolderNameOldProject))
            {
                return;
            }

            if (EditorCommands.LoadDataFiles())
            {
                ScribeProgram.ShowEditor();
                Close();
            }
            else
            {
                SystemSounds.Beep.Play();
                Logger.Log(LogLevel.Error, Resources.ErrorLoadFailed);
            }
        }
Example #3
0
        /// <summary>
        /// Attempts to create a new project.
        /// </summary>
        /// <param name="inSender">The originator of the event.</param>
        /// <param name="inEventArguments">Additional event data.</param>
        private void ButtonNewProject_Click(object inSender, EventArgs inEventArguments)
        {
            if (!EditorCommands.SelectProjectFolder(Resources.InfoMessageNew, Resources.FolderNameNewProject))
            {
                return;
            }

            if (TemplatesMessageBox.CreateTemplatesInProjectFolder() &&
                EditorCommands.LoadDataFiles())
            {
                ScribeProgram.ShowEditor();
                Close();
            }
            else
            {
                SystemSounds.Beep.Play();
                Logger.Log(LogLevel.Error, Resources.ErrorNewFailed);
            }
        }