Ejemplo n.º 1
0
 public SnapshotSession()
 {
     m_rect_size = Rectangle.Empty;
     m_is_capture_set = false;
     m_snapshot_settings = SettingsManager.Instance.GetSnapshotSettings();
     m_image_settings = SettingsManager.Instance.GetImageSettings();
 }
        private void InitialiseFields()
        {
            m_snapshot_settings = SettingsManager.Instance.GetSnapshotSettings();
            m_image_settings = SettingsManager.Instance.GetImageSettings();
            m_export_settings = SettingsManager.Instance.GetExportSettings();
            m_hotkey_settings = MainWindow.m_hotkey_manager;

            //general settings
            txtDirectory.Text = m_snapshot_settings.GetParentDirectory();
            txtFrequency.Text = m_snapshot_settings.GetFrequency().TotalSeconds.ToString();
            txtTemplateDirectory.Text = m_export_settings.GetTemplatePath();
            txtSizeLimit.Text = m_snapshot_settings.GetSizeLimit().ToString();
            cbIdleDetection.IsChecked = m_snapshot_settings.IsIdleDetectionEnabled();
            cbSizeLimit.IsChecked = m_snapshot_settings.IsSpaceLimitEnabled();

            if (m_image_settings.GetPixelFormat() == PixelFormat.Format24bppRgb)
                comboPixelFormat.SelectedIndex = 0;
            else if (m_image_settings.GetPixelFormat() == PixelFormat.Format32bppArgb)
                comboPixelFormat.SelectedIndex = 1;
            else if (m_image_settings.GetPixelFormat() == PixelFormat.Format64bppArgb)
                comboPixelFormat.SelectedIndex = 2;

            comboImageFormat.SelectedIndex = Equals(m_image_settings.GetImageFormat(), ImageFormat.Png) ? 0 : 1;

            //shortcut settings
            InitialiseShortcuts();
        }
Ejemplo n.º 3
0
 SettingsManager()
 {
     m_snapshot_settings = new SnapshotSettings();
     m_image_settings = new ImageSettings();
     m_export_settings = new ExportSettings();
     LoadConfiguration();
 }