Exemplo n.º 1
0
        private void OnOK(EventArgs e)
        {
            // General
            GeneralSettings general = this.configuration.General;

            general.MinimizeOnRecord = this.chkMinimizeOnRecord.Checked;
            general.HideFromTaskbar  = this.chkHideFromTaskbar.Checked;
            general.OutputDirectory  = this.txtOutputDirectory.Text;
            // Keys
            HotKeySettings hotKeys = this.configuration.HotKeys;

            hotKeys.Cancel = this.hkCancel.Value;
            hotKeys.Global = this.chkGlobalHotKeys.Checked;
            hotKeys.Pause  = this.hkPause.Value;
            hotKeys.Record = this.hkRecord.Value;
            hotKeys.Stop   = this.hkStop.Value;
            // Mouse
            MouseSettings mouse = this.configuration.Mouse;

            mouse.HighlightCursor        = this.chkHighlighCursor.Checked;
            mouse.HighlightCursorColor   = this.cursorHighlightOptions.Color;
            mouse.HighlightCursorRadious = this.cursorHighlightOptions.Radious;
            mouse.RecordCursor           = this.chkRecordCursor.Checked;
            // Sound
            SoundSettings sound = this.configuration.Sound;
            SoundDevice   selectedSoundDevice = this.soundDeviceSelector.SoundDevice;

            sound.DeviceId = selectedSoundDevice != null ? selectedSoundDevice.Id : null;
            sound.Format   = this.cmbSoundFormat.SelectedItem as SoundFormat;
            // Tracking
            // this.configuration.Tracking = this.trackerSelector.TrackingSettings;
            // Video
            VideoSettings video = this.configuration.Video;

            video.Compressor = (this.cmbCompressor.SelectedItem as Avi.VideoCompressor).FccHandlerString;
            video.Fps        = this.videoFps;
            video.Quality    = this.videoQuality;
            // Watermark
            WatermarkSettings watermark = this.configuration.Watermark;

            watermark.Alignment    = this.watermarkOptions.WatermarkAlignment;
            watermark.Color        = this.watermarkOptions.WatermarkColor;
            watermark.Display      = this.chkWatermark.Checked;
            watermark.Font         = this.watermarkOptions.WatermarkFont;
            watermark.Margin       = this.watermarkOptions.WatermarkMargin;
            watermark.Outline      = this.watermarkOptions.WatermarkOutline;
            watermark.OutlineColor = this.watermarkOptions.WatermarkOutlineColor;
            watermark.RightToLeft  = this.watermarkOptions.WatermarkRightToLeft;
            watermark.Text         = this.watermarkOptions.WatermarkText;
            if (this.OK != null)
            {
                this.OK(this, e);
            }
        }
        public void initHotKeys()
        {
            m_hotKeys            = new HotKeySettings[HOTKEY_COUNT];
            m_hotKeys[0]         = new HotKeySettings();
            m_hotKeys[0].Command = "Send key";

            m_hotKeys[1]         = new HotKeySettings();
            m_hotKeys[1].Command = "End key";

            m_hotKeys[2]         = new HotKeySettings();
            m_hotKeys[2].Command = "Place call";

            m_hotKeys[3]         = new HotKeySettings();
            m_hotKeys[3].Command = "Send SMS";

            m_hotKeys[4]         = new HotKeySettings();
            m_hotKeys[4].Command = "Write to BlackBerry Clipboard";

            m_hotKeys[5]         = new HotKeySettings();
            m_hotKeys[5].Command = "Write to Windows Clipboard";
        }
Exemplo n.º 3
0
        private void OnConfigurationChanged()
        {
            // General
            GeneralSettings generalSettings = this.configuration.General;

            this.chkMinimizeOnRecord.Checked = generalSettings.MinimizeOnRecord;
            this.chkHideFromTaskbar.Checked  = generalSettings.HideFromTaskbar;
            this.txtOutputDirectory.Text     = generalSettings.OutputDirectory;
            // Hotkeys
            HotKeySettings hotKeys = this.configuration.HotKeys;

            this.chkGlobalHotKeys.Checked = hotKeys.Global;
            this.hkCancel.Value           = hotKeys.Cancel;
            this.hkPause.Value            = hotKeys.Pause;
            this.hkRecord.Value           = hotKeys.Record;
            this.hkStop.Value             = hotKeys.Stop;
            // Mouse
            MouseSettings mouse = this.configuration.Mouse;

            this.chkRecordCursor.Checked        = mouse.RecordCursor;
            this.chkHighlighCursor.Checked      = mouse.HighlightCursor;
            this.cursorHighlightOptions.Color   = mouse.HighlightCursorColor;
            this.cursorHighlightOptions.Radious = mouse.HighlightCursorRadious;
            // Sound
            SoundSettings sound       = this.configuration.Sound;
            SoundDevice   soundDevice = null;

            if (!string.IsNullOrEmpty(sound.DeviceId))
            {
                soundDevice = new SoundDevice(sound.DeviceId);
            }
            this.soundDeviceSelector.SoundDevice = soundDevice;
            SoundFormat soundFormat = sound.Format;

            if (soundFormat != null)
            {
                this.cmbSoundFormatTag.SelectedItem = soundFormat.Tag;
                if (soundFormat != null && !this.cmbSoundFormat.Items.Contains(soundFormat))
                {
                    this.cmbSoundFormat.Items.Add(soundFormat);
                }
                this.cmbSoundFormat.SelectedItem = soundFormat;
            }
            // Tracking
            // this.trackerSelector.TrackingSettings = this.configuration.Tracking;
            // Video
            VideoSettings video = this.configuration.Video;

            this.cmbSoundFormat.Text = video.Fps.ToString();
            this.videoQuality        = video.Quality;
            this.videoFps            = video.Fps;
            this.cmbFps.Text         = this.videoFps.ToString();
            this.tbQuality.Value     = this.videoQuality;
            // Watermark
            WatermarkSettings watermark = this.configuration.Watermark;

            this.chkWatermark.Checked = watermark.Display;
            this.txtWatermark.Text    = watermark.Text;
            this.watermarkOptions.WatermarkAlignment    = watermark.Alignment;
            this.watermarkOptions.WatermarkColor        = watermark.Color;
            this.watermarkOptions.WatermarkFont         = watermark.Font;
            this.watermarkOptions.WatermarkMargin       = watermark.Margin;
            this.watermarkOptions.WatermarkOutline      = watermark.Outline;
            this.watermarkOptions.WatermarkOutlineColor = watermark.OutlineColor;
            this.watermarkOptions.WatermarkRightToLeft  = watermark.RightToLeft;
            this.watermarkOptions.WatermarkText         = watermark.Text;
            //
            this.UpdateHighlightImage();
            this.UpdateVideoQualityControls();
        }
Exemplo n.º 4
0
        private Configuration()
        {
            var properties = Properties.Settings.Default;
            // Read configuration section elements
            // General
            string outputDir = properties.General_OutputDirectory;

            if (string.IsNullOrEmpty(outputDir))
            {
                string myDocuments = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
                try {
                    outputDir = Path.Combine(myDocuments, outputDirInMyDocs);
                }
                catch (ArgumentException) {
                    outputDir = myDocuments;
                }
            }
            GeneralSettings general = new GeneralSettings();

            general.MinimizeOnRecord = properties.General_MinimizeOnRecord;
            general.HideFromTaskbar  = properties.General_HideFromTaskbarIfMinimized;
            general.OutputDirectory  = outputDir;
            // Hot Keys
            HotKeySettings hotKeys = new HotKeySettings();

            hotKeys.Cancel = properties.HotKeys_Cancel;
            hotKeys.Global = properties.HotKeys_Global;
            hotKeys.Pause  = properties.HotKeys_Pause;
            hotKeys.Record = properties.HotKeys_Record;
            hotKeys.Stop   = properties.HotKeys_Stop;
            // Mouse
            MouseSettings mouse = new MouseSettings();

            mouse.HighlightCursor        = properties.Mouse_HighlightCursor;
            mouse.HighlightCursorColor   = properties.Mouse_HighlightCursorColor;
            mouse.HighlightCursorRadious = properties.Mouse_HighlightCursorRadious;
            mouse.RecordCursor           = properties.Mouse_RecordCursor;
            // Sound
            SoundSettings sound = new SoundSettings();

            sound.DeviceId = properties.Sound_DeviceId;
            sound.Format   = properties.Sound_Format;
            // Tracking
            TrackingSettings tracking = new TrackingSettings();

            tracking.Bounds = properties.Tracking_Bounds;
            tracking.Type   = properties.Tracking_Type;
            // Video
            VideoSettings video = new VideoSettings();

            video.Compressor = properties.Video_Compressor;
            video.Fps        = properties.Video_Fps;
            video.Quality    = properties.Video_Quality;
            // Watermark
            WatermarkSettings waterMark = new WatermarkSettings();

            waterMark.Alignment    = properties.Watermark_Alignment;
            waterMark.Color        = properties.Watermark_Color;
            waterMark.Display      = properties.Watermark_Display;
            waterMark.Font         = properties.Watermark_Font;
            waterMark.Margin       = properties.Watermark_Margin;
            waterMark.Outline      = properties.Watermark_Outline;
            waterMark.OutlineColor = properties.Watermark_OutlineColor;
            waterMark.RightToLeft  = properties.Watermark_RightToLeft;
            waterMark.Text         = properties.Watermark_Text;
            // Set properties
            this.General   = general;
            this.HotKeys   = hotKeys;
            this.Mouse     = mouse;
            this.Sound     = sound;
            this.Tracking  = tracking;
            this.Video     = video;
            this.Watermark = waterMark;
        }
Exemplo n.º 5
0
 public HotKeyConfiguration Create(HotKeySettings _settings)
 {
     return(new HotKeyConfiguration(_settings.Combination, m_map[_settings.ActionType], _settings.ActionContent));
 }