void ReferAssemblyFile()
        {
            var message = new ReferFileMessage();
            message.Title = Properties.Resources.TitleSelectPluginAssembly;
            message.CheckFileExists = true;
            message.CheckPathExists = true;
            message.AddExtension = true;
            message.DefaultExt = ".dll";
            message.Filter = "Assembly files (*.dll;*.exe)|*.dll;*.exe|All files (*.*)|*.*";
            message.FileName = Model.HintPath;

            Messenger.Send(message);
            if (message.Result != true) return;

            Model.SetAssemblyName(message.FileName);
        }
        void ReferProjectFile()
        {
            var message = new ReferFileMessage();
            message.Title = Properties.Resources.TitleSelectPluginAssembly;
            message.CheckFileExists = true;
            message.CheckPathExists = true;
            message.AddExtension = true;
            message.DefaultExt = ".dll";
            message.Filter = "C# project files (*.csproj)|*.csproj|All files (*.*)|*.*";
            if (!string.IsNullOrEmpty(Model.Path))
            {
                message.FileName = Model.Path;
            }

            Messenger.Send(message);
            if (message.Result != true) return;

            Model.Path = message.FileName;
        }
        void SaveProjectAs()
        {
            if (Model.Project == null) return;

            var openFileDialogMessage = new ReferFileMessage();
            openFileDialogMessage.Title = Properties.Resources.TitleOpenProject;
            openFileDialogMessage.DefaultExt = ".contentproj";
            openFileDialogMessage.Filter = "Content projects (*.contentproj)|*.contentproj|All files (*.*)|*.*";
            openFileDialogMessage.InitialDirectory = Model.Project.DirectoryPath;
            openFileDialogMessage.FileName = Path.GetFileName(Model.Project.FullPath);

            Messenger.Send(openFileDialogMessage);
            if (openFileDialogMessage.Result != true) return;

            var path = openFileDialogMessage.FileName;

            if (File.Exists(path))
            {
                var confirmationText = string.Format(Properties.Resources.ConfirmOverrideFile, path);
                if (!ConfirmWithMessageBox(confirmationText)) return;
            }

            Model.SaveProjectAs(path);

            // タイトルに新しいプロジェクト ファイル名を設定します。
            Title = Path.GetFileName(Model.Project.FullPath) + " - Content Studio";
        }
        void OpenProject()
        {
            // プロジェクトが既に開かれていて、変更があるならば、保存を促します。
            PromptSaveProject();

            var openFileDialogMessage = new ReferFileMessage();
            openFileDialogMessage.Title = Properties.Resources.TitleOpenProject;
            openFileDialogMessage.DefaultExt = ".contentproj";
            openFileDialogMessage.Filter = "Content projects (*.contentproj)|*.contentproj|All files (*.*)|*.*";

            // プロジェクトが既に開かれているならば、そのディレクトリを設定します。
            if (Model.Project != null)
            {
                openFileDialogMessage.InitialDirectory = Model.Project.DirectoryPath;
            }

            Messenger.Send(openFileDialogMessage);
            if (openFileDialogMessage.Result != true) return;

            OpenProject(openFileDialogMessage.FileName);
        }