コード例 #1
0
 private static void InitApplication()
 {
     ServiceProvider.Branding = Branding.LoadBranding();
     ServiceProvider.ConfigureDatabase();
     ServiceProvider.Settings = new Settings();
     ServiceProvider.Settings = ServiceProvider.Settings.Load();
     ServiceProvider.Settings.LoadSessionData();
     ServiceProvider.WindowsManager = new WindowsManager();
     //WIAManager manager = new WIAManager();
     StaticHelper.Instance.PropertyChanged         += Instance_PropertyChanged;
     ServiceProvider.DeviceManager.CameraConnected += DeviceManagerCameraConnected;
     ServiceProvider.DeviceManager.ConnectToCamera();
     ServiceProvider.DeviceManager.PhotoCaptured += DeviceManager_PhotoCaptured;
     if (ServiceProvider.DeviceManager.SelectedCameraDevice.AttachedPhotoSession != null)
     {
         ServiceProvider.Settings.DefaultSession = (PhotoSession)
                                                   ServiceProvider.DeviceManager.SelectedCameraDevice.
                                                   AttachedPhotoSession;
     }
     foreach (ICameraDevice cameraDevice in ServiceProvider.DeviceManager.ConnectedDevices)
     {
         cameraDevice.CaptureCompleted += SelectedCameraDevice_CaptureCompleted;
     }
     ServiceProvider.ScriptManager.OutPutMessageReceived += ScriptManager_OutPutMessageReceived;
     //ServiceProvider.DeviceManager.SelectedCameraDevice.CaptureCompleted += SelectedCameraDevice_CaptureCompleted;
 }