Exemple #1
0
        private void QuickSettingCaptureModeChanged(object sender, EventArgs e)
        {
            ToolStripMenuSelectListItem item = ((ItemCheckedChangedEventArgs)e).Item;
            WindowCaptureMode           windowsCaptureMode = (WindowCaptureMode)item.Data;

            if (item.Checked)
            {
                conf.WindowCaptureMode = windowsCaptureMode;
            }
        }
Exemple #2
0
        private void QuickSettingBoolItemChanged(object sender, EventArgs e)
        {
            ToolStripMenuSelectListItem item = ((ItemCheckedChangedEventArgs)e).Item;
            IniValue iniValue = item.Data as IniValue;

            if (iniValue != null)
            {
                iniValue.Value = item.Checked;
                IniConfig.Save();
            }
        }
        void QuickSettingItemChanged(object sender, EventArgs e)
        {
            ToolStripMenuSelectList     selectList = (ToolStripMenuSelectList)sender;
            ToolStripMenuSelectListItem item       = ((ItemCheckedChangedEventArgs)e).Item;;

            if (selectList.Identifier.Equals("destination"))
            {
                IEnumerator            en   = selectList.DropDownItems.GetEnumerator();
                ScreenshotDestinations dest = 0;
                while (en.MoveNext())
                {
                    ToolStripMenuSelectListItem i = (ToolStripMenuSelectListItem)en.Current;
                    if (i.Checked)
                    {
                        dest |= (ScreenshotDestinations)i.Data;
                    }
                }
                conf.Output_Destinations = dest;
                conf.Store();
            }
            else if (selectList.Identifier.Equals("printoptions"))
            {
                if (item.Data.Equals("AllowPrintShrink"))
                {
                    conf.Output_Print_AllowShrink = (bool?)item.Checked;
                }
                else if (item.Data.Equals("AllowPrintEnlarge"))
                {
                    conf.Output_Print_AllowEnlarge = (bool?)item.Checked;
                }
                else if (item.Data.Equals("AllowPrintRotate"))
                {
                    conf.Output_Print_AllowRotate = (bool?)item.Checked;
                }
                else if (item.Data.Equals("AllowPrintCenter"))
                {
                    conf.Output_Print_Center = (bool?)item.Checked;
                }
                conf.Store();
            }
            else if (selectList.Identifier.Equals("effects"))
            {
                if (item.Data.Equals("PlaySound"))
                {
                    conf.Ui_Effects_CameraSound = (bool?)item.Checked;
                }
                else if (item.Data.Equals("ShowFlashlight"))
                {
                    conf.Ui_Effects_Flashlight = (bool?)item.Checked;
                }
                conf.Store();
            }
        }
Exemple #4
0
        void QuickSettingItemChanged(object sender, EventArgs e)
        {
            ToolStripMenuSelectList     selectList = (ToolStripMenuSelectList)sender;
            ToolStripMenuSelectListItem item       = ((ItemCheckedChangedEventArgs)e).Item;

            if (selectList.Identifier.Equals("destination"))
            {
                Destination selectedDestination = (Destination)item.Data;
                if (item.Checked && !conf.OutputDestinations.Contains(selectedDestination))
                {
                    conf.OutputDestinations.Add(selectedDestination);
                }
                if (!item.Checked && conf.OutputDestinations.Contains(selectedDestination))
                {
                    conf.OutputDestinations.Remove(selectedDestination);
                }
                IniConfig.Save();
            }
            else if (selectList.Identifier.Equals("printoptions"))
            {
                if (item.Data.Equals("AllowPrintShrink"))
                {
                    conf.OutputPrintAllowShrink = item.Checked;
                }
                else if (item.Data.Equals("AllowPrintEnlarge"))
                {
                    conf.OutputPrintAllowEnlarge = item.Checked;
                }
                else if (item.Data.Equals("AllowPrintRotate"))
                {
                    conf.OutputPrintAllowRotate = item.Checked;
                }
                else if (item.Data.Equals("AllowPrintCenter"))
                {
                    conf.OutputPrintCenter = item.Checked;
                }
                IniConfig.Save();
            }
            else if (selectList.Identifier.Equals("effects"))
            {
                if (item.Data.Equals("PlaySound"))
                {
                    conf.PlayCameraSound = item.Checked;
                }
                IniConfig.Save();
            }
        }
Exemple #5
0
        private void QuickSettingDestinationChanged(object sender, EventArgs e)
        {
            ToolStripMenuSelectListItem item = ((ItemCheckedChangedEventArgs)e).Item;
            IDestination selectedDestination = (IDestination)item.Data;

            if (item.Checked && selectedDestination.Designation.Equals(PickerDestination.DESIGNATION))
            {
                foreach (ToolStripMenuSelectList ddi in contextmenu_quicksettings.DropDownItems)
                {
                    if (ddi.Identifier.Equals("destinations"))
                    {
                        foreach (ToolStripMenuSelectListItem dropDownItem in ddi.DropDownItems)
                        {
                            IDestination destination = dropDownItem.Data as IDestination;
                            if (!destination.Designation.Equals(PickerDestination.DESIGNATION))
                            {
                                if (dropDownItem.CheckState == CheckState.Checked)
                                {
                                    dropDownItem.CheckState = CheckState.Unchecked;
                                }
                            }
                        }
                    }
                }
                conf.OutputDestinations.Clear();
                conf.OutputDestinations.Add(selectedDestination.Designation);
            }
            else
            {
                if (item.Checked && !conf.OutputDestinations.Contains(selectedDestination.Designation))
                {
                    conf.OutputDestinations.Add(selectedDestination.Designation);
                }
                if (!item.Checked && conf.OutputDestinations.Contains(selectedDestination.Designation))
                {
                    conf.OutputDestinations.Remove(selectedDestination.Designation);
                }
            }
            IniConfig.Save();
        }