コード例 #1
0
        private void HandleLoad()
        {
            OpenFileDialog dialog = DialogFactory.GetOpenJsonDialog();

            if (dialog.ShowDialog() == true)
            {
                FleetTemplate parsedTemplate = JsonFactory.FleetTemplateFromFile(dialog.FileName);

                if (parsedTemplate != null)
                {
                    if (Model != null)
                    {
                        Model.FleetTemplate = parsedTemplate;
                    }

                    TemplateUpdatedMessage message = new TemplateUpdatedMessage(parsedTemplate);
                    Messenger.Default.Send(message);
                }
            }
        }