コード例 #1
0
 protected override void OnStartup(StartupEventArgs e)
 {
     if (e.Args.Length > 0 && File.Exists(e.Args[0]))
     {
         FileInfo fileInfo = new FileInfo(e.Args[0]);
         if (fileInfo.Extension == ".sdb")
         {
             OverviewViewModel vm = new OverviewViewModel();
             vm.Load(fileInfo.FullName);
             win_mainWorkspace workspace = new win_mainWorkspace(vm);
             workspace.Show();
         }
         else
         {
             OverviewViewModel vm        = new OverviewViewModel();
             win_mainWorkspace workspace = new win_mainWorkspace(vm);
             workspace.Show();
         }
     }
     else
     {
         OverviewViewModel vm        = new OverviewViewModel();
         win_mainWorkspace workspace = new win_mainWorkspace(vm);
         workspace.Show();
     }
 }