예제 #1
0
        private void ClickedOpenProject(object sender, RoutedEventArgs e)
        {
            var Dialog = new OpenFileDialog();

            Dialog.Filter = "プロジェクトファイル (*.projm)|*.projm|全てのファイル (*.*)|*.*";

            var ReturnValue = Dialog.ShowDialog();


            if (ReturnValue == true)
            {
                var cmd = new MainViewModel.LoadProjectFile();
                cmd.LoadedProjectFileAbsolutePath = Dialog.FileName;

                RecevierOfViewModel.CommandViewModelTo(cmd);

                var Ins = new CMainView.MainViewItemsAvailableValueManager(this);
                Ins.EnableMainViewItems();
                UpdateMaterialDataGrid();

                var anotherCmd = new MainViewModel.GetProjectName();
                anotherCmd.LoadedProjectFileAbsolutePath = Dialog.FileName;

                RecevierOfViewModel.CommandViewModelTo(anotherCmd);

                //ウィンドウタイトル変更
                this.Title = "「お借りした素材一覧」生成器" + "――" + anotherCmd.FetchedProjectName;
            }
        }
예제 #2
0
        public void CommandViewModelTo(GetProjectName cmd)
        {
            ProjectFileReader Reader = new ProjectFileReader(cmd.LoadedProjectFileAbsolutePath);

            cmd.FetchedProjectName = Reader.LoadProjectName();
        }