当前位置: 首页>>代码示例>>C#>>正文


C# Icon.Clone方法代码示例

本文整理汇总了C#中System.Drawing.Icon.Clone方法的典型用法代码示例。如果您正苦于以下问题:C# Icon.Clone方法的具体用法?C# Icon.Clone怎么用?C# Icon.Clone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Drawing.Icon的用法示例。


在下文中一共展示了Icon.Clone方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetManagedIcon

        public static Icon GetManagedIcon(ref Icon UnmanagedIcon)
        {
            Icon ManagedIcon = (Icon) UnmanagedIcon.Clone();

            DestroyIcon(UnmanagedIcon.Handle);

            return ManagedIcon;
        }
开发者ID:DefStevo,项目名称:defstevo-collection,代码行数:8,代码来源:IconHandler.cs

示例2: ImageListItem

				internal ImageListItem(Icon value)
				{
					if (value == null)
						throw new ArgumentNullException("value");

					// Icons are cloned.
					this.Image = (Icon)value.Clone();
				}
开发者ID:carrie901,项目名称:mono,代码行数:8,代码来源:ImageList.cs

示例3: GetManagedIcon

 /// <summary>
 /// Get managed icon from a unmanaged one,
 /// Copy (clone) the returned icon to a new object, thus allowing us to clean-up properly
 /// </summary>
 /// <param name="unmanagedIcon">Unmanaged icon</param>
 /// <returns>Managed icon instance</returns>
 public static Icon GetManagedIcon(ref Icon unmanagedIcon)
 {
     Icon managedIcon = (Icon)unmanagedIcon.Clone();
     User32.DestroyIcon(unmanagedIcon.Handle);
     return managedIcon;
 }
开发者ID:something252,项目名称:VisualFolderCreator,代码行数:12,代码来源:IconReader.cs

示例4: BatchConvert

        public BatchConvert(Icon icon)
        {
            InitializeComponent();
            Icon = (Icon)icon.Clone();

            progressBar1.Visible = false;
            labelStatus.Text = string.Empty;
            var l = Configuration.Settings.Language.BatchConvert;
            Text = l.Title;
            groupBoxInput.Text = l.Input;
            labelChooseInputFiles.Text = l.InputDescription;
            groupBoxOutput.Text = l.Output;
            labelChooseOutputFolder.Text = l.ChooseOutputFolder;
            checkBoxOverwrite.Text = l.OverwriteExistingFiles;
            labelOutputFormat.Text = Configuration.Settings.Language.Main.Controls.SubtitleFormat;
            labelEncoding.Text = Configuration.Settings.Language.Main.Controls.FileEncoding;
            buttonStyles.Text = l.Style;
            groupBoxConvertOptions.Text = l.ConvertOptions;
            checkBoxRemoveFormatting.Text = l.RemoveFormatting;
            checkBoxFixCasing.Text = l.ReDoCasing;
            checkBoxRemoveTextForHI.Text = l.RemoveTextForHI;
            checkBoxOverwriteOriginalFiles.Text = l.OverwriteOriginalFiles;
            columnHeaderFName.Text = Configuration.Settings.Language.JoinSubtitles.FileName;
            columnHeaderFormat.Text = Configuration.Settings.Language.Main.Controls.SubtitleFormat;
            columnHeaderSize.Text = Configuration.Settings.Language.General.Size;
            columnHeaderStatus.Text = l.Status;
            linkLabelOpenOutputFolder.Text = Configuration.Settings.Language.Main.Menu.File.Open;
            buttonSearchFolder.Text = l.ScanFolder;
            buttonConvert.Text = l.Convert;
            buttonCancel.Text = Configuration.Settings.Language.General.OK;
            checkBoxScanFolderRecursive.Text = l.Recursive;
            checkBoxScanFolderRecursive.Left = buttonSearchFolder.Left - checkBoxScanFolderRecursive.Width - 5;

            groupBoxChangeFrameRate.Text = Configuration.Settings.Language.ChangeFrameRate.Title;
            groupBoxOffsetTimeCodes.Text = Configuration.Settings.Language.ShowEarlierLater.TitleAll;
            labelFromFrameRate.Text = Configuration.Settings.Language.ChangeFrameRate.FromFrameRate;
            labelToFrameRate.Text = Configuration.Settings.Language.ChangeFrameRate.ToFrameRate;
            labelHoursMinSecsMilliSecs.Text = Configuration.Settings.Language.General.HourMinutesSecondsMilliseconds;

            comboBoxFrameRateFrom.Left = labelFromFrameRate.Left + labelFromFrameRate.Width + 3;
            comboBoxFrameRateTo.Left = labelToFrameRate.Left + labelToFrameRate.Width + 3;
            if (comboBoxFrameRateFrom.Left > comboBoxFrameRateTo.Left)
                comboBoxFrameRateTo.Left = comboBoxFrameRateFrom.Left;
            else
                comboBoxFrameRateFrom.Left = comboBoxFrameRateTo.Left;

            comboBoxSubtitleFormats.Left = labelOutputFormat.Left + labelOutputFormat.Width + 3;
            comboBoxEncoding.Left = labelEncoding.Left + labelEncoding.Width + 3;
            if (comboBoxSubtitleFormats.Left > comboBoxEncoding.Left)
            {
                comboBoxEncoding.Left = comboBoxSubtitleFormats.Left;
            }
            else
            {
                comboBoxSubtitleFormats.Left = comboBoxEncoding.Left;
            }
            buttonStyles.Left = comboBoxSubtitleFormats.Left + comboBoxSubtitleFormats.Width + 5;

            timeUpDownAdjust.MaskedTextBox.Text = "000000000";

            comboBoxFrameRateFrom.Items.Add((23.976).ToString(CultureInfo.InvariantCulture));
            comboBoxFrameRateFrom.Items.Add((24.0).ToString(CultureInfo.InvariantCulture));
            comboBoxFrameRateFrom.Items.Add((25.0).ToString(CultureInfo.InvariantCulture));
            comboBoxFrameRateFrom.Items.Add((29.97).ToString(CultureInfo.InvariantCulture));

            comboBoxFrameRateTo.Items.Add((23.976).ToString(CultureInfo.InvariantCulture));
            comboBoxFrameRateTo.Items.Add((24.0).ToString(CultureInfo.InvariantCulture));
            comboBoxFrameRateTo.Items.Add((25.0).ToString(CultureInfo.InvariantCulture));
            comboBoxFrameRateTo.Items.Add((29.97).ToString(CultureInfo.InvariantCulture));

            FixLargeFonts();

            foreach (var f in SubtitleFormat.AllSubtitleFormats)
            {
                if (!f.IsVobSubIndexFile)
                    comboBoxSubtitleFormats.Items.Add(f.Name);

            }
            comboBoxSubtitleFormats.SelectedIndex = 0;

            comboBoxEncoding.Items.Clear();
            int encodingSelectedIndex = 0;
            comboBoxEncoding.Items.Add(Encoding.UTF8.EncodingName);
            foreach (EncodingInfo ei in Encoding.GetEncodings())
            {
                if (ei.Name != Encoding.UTF8.BodyName && ei.CodePage >= 949 && !ei.DisplayName.Contains("EBCDIC") && ei.CodePage != 1047)
                {
                    comboBoxEncoding.Items.Add(ei.CodePage + ": " + ei.DisplayName);
                    if (ei.Name == Configuration.Settings.General.DefaultEncoding)
                        encodingSelectedIndex = comboBoxEncoding.Items.Count - 1;
                }
            }
            comboBoxEncoding.SelectedIndex = encodingSelectedIndex;

            if (string.IsNullOrEmpty(Configuration.Settings.Tools.BatchConvertOutputFolder) || !Directory.Exists(Configuration.Settings.Tools.BatchConvertOutputFolder))
                textBoxOutputFolder.Text = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
            else
                textBoxOutputFolder.Text = Configuration.Settings.Tools.BatchConvertOutputFolder;
            checkBoxOverwrite.Checked = Configuration.Settings.Tools.BatchConvertOverwrite;
            checkBoxFixCasing.Checked = Configuration.Settings.Tools.BatchConvertFixCasing;
//.........这里部分代码省略.........
开发者ID:novaterata,项目名称:subtitleedit,代码行数:101,代码来源:BatchConvert.cs

示例5: Initialize

 public void Initialize(Icon icon, Image newFile, Image openFile, Image saveFile, Image SaveFileAs, Image find, Image replace, Image fixCommonErrors,
     Image visualSync, Image spellCheck, Image settings, Image help)
 {
     this.Icon = (Icon)icon.Clone();
     pictureBoxNew.Image = (Image)newFile.Clone();
     pictureBoxOpen.Image = (Image)openFile.Clone();
     pictureBoxSave.Image = (Image)saveFile.Clone();
     pictureBoxSaveAs.Image = (Image)SaveFileAs.Clone();
     pictureBoxFind.Image = (Image)find.Clone();
     pictureBoxReplace.Image = (Image)replace.Clone();
     pictureBoxTBFixCommonErrors.Image = (Image)fixCommonErrors.Clone();
     pictureBoxVisualSync.Image = (Image)visualSync.Clone();
     pictureBoxSpellCheck.Image = (Image)spellCheck.Clone();
     pictureBoxSettings.Image = (Image)settings.Clone();
     pictureBoxHelp.Image = (Image)help.Clone();
 }
开发者ID:Brijen,项目名称:subtitleedit,代码行数:16,代码来源:Settings.cs

示例6: LoadNotificationIcons

        private void LoadNotificationIcons()
        {
            using (Bitmap b = new Bitmap(16, 16))
            {
                using (Graphics g = Graphics.FromImage(b))
                {
                    g.FillRectangle(new SolidBrush(Color.Black), 0, 0, b.Width, b.Height);
                    blackIcon = Icon.FromHandle(b.GetHicon());
                }
            }

            dummyIcon = new UsageIcon();
            notifyIcons.Add(cpuHistoryIcon = new CpuHistoryIcon() { Parent = this });
            notifyIcons.Add(cpuUsageIcon = new CpuUsageIcon() { Parent = this });
            notifyIcons.Add(ioHistoryIcon = new IoHistoryIcon() { Parent = this });
            notifyIcons.Add(commitHistoryIcon = new CommitHistoryIcon() { Parent = this });
            notifyIcons.Add(physMemHistoryIcon = new PhysMemHistoryIcon() { Parent = this });

            foreach (var icon in notifyIcons)
                icon.Icon = (Icon)blackIcon.Clone();

            this.ExecuteOnIcons((icon) => icon.ContextMenu = menuIcon);
            this.ExecuteOnIcons((icon) => icon.MouseDoubleClick += notifyIcon_MouseDoubleClick);
            cpuHistoryMenuItem.Checked = Properties.Settings.Default.CpuHistoryIconVisible;
            cpuUsageMenuItem.Checked = Properties.Settings.Default.CpuUsageIconVisible;
            ioHistoryMenuItem.Checked = Properties.Settings.Default.IoHistoryIconVisible;
            commitHistoryMenuItem.Checked = Properties.Settings.Default.CommitHistoryIconVisible;
            physMemHistoryMenuItem.Checked = Properties.Settings.Default.PhysMemHistoryIconVisible;
            this.ApplyIconVisibilities();

            NPMenuItem.Checked = Properties.Settings.Default.NewProcesses;
            TPMenuItem.Checked = Properties.Settings.Default.TerminatedProcesses;
            NSMenuItem.Checked = Properties.Settings.Default.NewServices;
            startedSMenuItem.Checked = Properties.Settings.Default.StartedServices;
            stoppedSMenuItem.Checked = Properties.Settings.Default.StoppedServices;
            DSMenuItem.Checked = Properties.Settings.Default.DeletedServices;

            NPMenuItem.Click += new EventHandler(CheckedMenuItem_Click);
            TPMenuItem.Click += new EventHandler(CheckedMenuItem_Click);
            NSMenuItem.Click += new EventHandler(CheckedMenuItem_Click);
            startedSMenuItem.Click += new EventHandler(CheckedMenuItem_Click);
            stoppedSMenuItem.Click += new EventHandler(CheckedMenuItem_Click);
            DSMenuItem.Click += new EventHandler(CheckedMenuItem_Click);
        }
开发者ID:andyvand,项目名称:ProcessHacker,代码行数:44,代码来源:HackerWindow.cs

示例7: BatchConvert

        public BatchConvert(Icon icon)
        {
            InitializeComponent();
            Icon = (Icon)icon.Clone();

            progressBar1.Visible = false;
            labelStatus.Text = string.Empty;
            var l = Configuration.Settings.Language.BatchConvert;
            Text = l.Title;
            groupBoxInput.Text = l.Input;
            labelChooseInputFiles.Text = l.InputDescription;
            groupBoxOutput.Text = l.Output;
            labelChooseOutputFolder.Text = l.ChooseOutputFolder;
            checkBoxOverwrite.Text = l.OverwriteExistingFiles;
            labelOutputFormat.Text = Configuration.Settings.Language.Main.Controls.SubtitleFormat;
            labelEncoding.Text = Configuration.Settings.Language.Main.Controls.FileEncoding;
            buttonStyles.Text = l.Style;
            groupBoxConvertOptions.Text = l.ConvertOptions;
            checkBoxRemoveFormatting.Text = l.RemoveFormatting;
            checkBoxFixCasing.Text = l.RedoCasing;
            checkBoxRemoveTextForHI.Text = l.RemoveTextForHI;
            checkBoxOverwriteOriginalFiles.Text = l.OverwriteOriginalFiles;
            columnHeaderFName.Text = Configuration.Settings.Language.JoinSubtitles.FileName;
            columnHeaderFormat.Text = Configuration.Settings.Language.Main.Controls.SubtitleFormat;
            columnHeaderSize.Text = Configuration.Settings.Language.General.Size;
            columnHeaderStatus.Text = l.Status;
            linkLabelOpenOutputFolder.Text = Configuration.Settings.Language.Main.Menu.File.Open;
            buttonSearchFolder.Text = l.ScanFolder;
            buttonConvert.Text = l.Convert;
            buttonCancel.Text = Configuration.Settings.Language.General.Ok;
            checkBoxScanFolderRecursive.Text = l.Recursive;
            checkBoxScanFolderRecursive.Left = buttonSearchFolder.Left - checkBoxScanFolderRecursive.Width - 5;

            groupBoxChangeFrameRate.Text = Configuration.Settings.Language.ChangeFrameRate.Title;
            groupBoxOffsetTimeCodes.Text = Configuration.Settings.Language.ShowEarlierLater.TitleAll;
            labelFromFrameRate.Text = Configuration.Settings.Language.ChangeFrameRate.FromFrameRate;
            labelToFrameRate.Text = Configuration.Settings.Language.ChangeFrameRate.ToFrameRate;
            labelHourMinSecMilliSecond.Text = Configuration.Settings.Language.General.HourMinutesSecondsMilliseconds;

            comboBoxFrameRateFrom.Left = labelFromFrameRate.Left + labelFromFrameRate.Width + 3;
            comboBoxFrameRateTo.Left = labelToFrameRate.Left + labelToFrameRate.Width + 3;
            if (comboBoxFrameRateFrom.Left > comboBoxFrameRateTo.Left)
                comboBoxFrameRateTo.Left = comboBoxFrameRateFrom.Left;
            else
                comboBoxFrameRateFrom.Left = comboBoxFrameRateTo.Left;

            comboBoxSubtitleFormats.Left = labelOutputFormat.Left + labelOutputFormat.Width + 3;
            comboBoxEncoding.Left = labelEncoding.Left + labelEncoding.Width + 3;
            if (comboBoxSubtitleFormats.Left > comboBoxEncoding.Left)
            {
                comboBoxEncoding.Left = comboBoxSubtitleFormats.Left;
            }
            else
            {
                comboBoxSubtitleFormats.Left = comboBoxEncoding.Left;
            }
            buttonStyles.Left = comboBoxSubtitleFormats.Left + comboBoxSubtitleFormats.Width + 5;

            timeUpDownAdjust.MaskedTextBox.Text = "000000000";

            comboBoxFrameRateFrom.Items.Add(23.976);
            comboBoxFrameRateFrom.Items.Add(24.0);
            comboBoxFrameRateFrom.Items.Add(25.0);
            comboBoxFrameRateFrom.Items.Add(29.97);

            comboBoxFrameRateTo.Items.Add(23.976);
            comboBoxFrameRateTo.Items.Add(24.0);
            comboBoxFrameRateTo.Items.Add(25.0);
            comboBoxFrameRateTo.Items.Add(29.97);

            Utilities.FixLargeFonts(this, buttonCancel);

            _allFormats = new List<SubtitleFormat> { new Pac() };
            int selectedFormatIndex = 0;
            var formatNames = new List<string>();
            foreach (var f in SubtitleFormat.AllSubtitleFormats)
            {
                if (!f.IsVobSubIndexFile)
                {
                    formatNames.Add(f.Name);
                    _allFormats.Add(f);
                }
            }
            formatNames.Add(l.PlainText);
            formatNames.Add(BluRaySubtitle);
            for (int index = 0; index < formatNames.Count; index++)
            {
                var name = formatNames[index];
                comboBoxSubtitleFormats.Items.Add(name);
                if (Configuration.Settings.Tools.BatchConvertFormat == name)
                {
                    selectedFormatIndex = index;
                }
            }
            comboBoxSubtitleFormats.SelectedIndex = selectedFormatIndex;

            comboBoxEncoding.Items.Clear();
            int encodingSelectedIndex = 0;
            comboBoxEncoding.Items.Add(Encoding.UTF8.EncodingName);
            foreach (EncodingInfo ei in Encoding.GetEncodings())
//.........这里部分代码省略.........
开发者ID:Gargamelll,项目名称:subtitleedit,代码行数:101,代码来源:BatchConvert.cs

示例8: Add

 /// <include file='doc\ImageList.uex' path='docs/doc[@for="ImageList.ImageCollection.Add"]/*' />
 /// <devdoc>
 ///    <para>[To be supplied.]</para>
 /// </devdoc>
 public void Add(Icon value) {
     if (value == null) {
         throw new ArgumentNullException("value");
     }
     Add(new Original(value.Clone(), OriginalOptions.OwnsImage), null); // WHY WHY WHY do we clone here...
     // changing it now is a breaking change, so we have to keep track of this specific icon and dispose that
 }
开发者ID:mind0n,项目名称:hive,代码行数:11,代码来源:ImageList.cs

示例9: GetIcon

        public static Icon GetIcon(byte[] bytes)
        {
            if (bytes == null)
                return null;

            if (bytes.Length == 0)
                return null;

            System.IO.MemoryStream stream = new System.IO.MemoryStream(bytes);
            Icon icon = new Icon(stream);
            stream.Close();
            try
            {
                return (Icon)icon.Clone();
            }
            catch(Exception ex)
            {
                Trace.WriteLine(ex);
            }
            finally
            {
                icon.Dispose();
            }
            return null;
        }
开发者ID:luisbebop,项目名称:svchost,代码行数:25,代码来源:ScreenCapturing.cs

示例10: BatchConvert

        public BatchConvert(Icon icon)
        {
            InitializeComponent();
            Icon = (Icon)icon.Clone();

            progressBar1.Visible = false;
            labelStatus.Text = string.Empty;
            var l = Configuration.Settings.Language.BatchConvert;
            Text = l.Title;
            groupBoxInput.Text = l.Input;
            labelChooseInputFiles.Text = l.InputDescription;
            groupBoxOutput.Text = l.Output;
            labelChooseOutputFolder.Text = l.ChooseOutputFolder;
            checkBoxOverwrite.Text = l.OverwriteExistingFiles;
            labelOutputFormat.Text = Configuration.Settings.Language.Main.Controls.SubtitleFormat;
            labelEncoding.Text = Configuration.Settings.Language.Main.Controls.FileEncoding;
            buttonStyles.Text = l.Style;
            groupBoxConvertOptions.Text = l.ConvertOptions;
            checkBoxRemoveFormatting.Text = l.RemoveFormatting;
            checkBoxFixCasing.Text = l.RedoCasing;
            checkBoxRemoveTextForHI.Text = l.RemoveTextForHI;
            checkBoxOverwriteOriginalFiles.Text = l.OverwriteOriginalFiles;
            columnHeaderFName.Text = Configuration.Settings.Language.JoinSubtitles.FileName;
            columnHeaderFormat.Text = Configuration.Settings.Language.Main.Controls.SubtitleFormat;
            columnHeaderSize.Text = Configuration.Settings.Language.General.Size;
            columnHeaderStatus.Text = l.Status;
            linkLabelOpenOutputFolder.Text = Configuration.Settings.Language.Main.Menu.File.Open;
            buttonSearchFolder.Text = l.ScanFolder;
            buttonConvert.Text = l.Convert;
            buttonCancel.Text = Configuration.Settings.Language.General.Ok;
            checkBoxScanFolderRecursive.Text = l.Recursive;
            checkBoxScanFolderRecursive.Left = buttonSearchFolder.Left - checkBoxScanFolderRecursive.Width - 5;

            groupBoxChangeFrameRate.Text = Configuration.Settings.Language.ChangeFrameRate.Title;
            groupBoxOffsetTimeCodes.Text = Configuration.Settings.Language.ShowEarlierLater.TitleAll;
            groupBoxSpeed.Text = Configuration.Settings.Language.ChangeSpeedInPercent.TitleShort;
            labelFromFrameRate.Text = Configuration.Settings.Language.ChangeFrameRate.FromFrameRate;
            labelToFrameRate.Text = Configuration.Settings.Language.ChangeFrameRate.ToFrameRate;
            labelHourMinSecMilliSecond.Text = Configuration.Settings.Language.General.HourMinutesSecondsMilliseconds;

            comboBoxFrameRateFrom.Left = labelFromFrameRate.Left + labelFromFrameRate.Width + 3;
            comboBoxFrameRateTo.Left = labelToFrameRate.Left + labelToFrameRate.Width + 3;
            if (comboBoxFrameRateFrom.Left > comboBoxFrameRateTo.Left)
                comboBoxFrameRateTo.Left = comboBoxFrameRateFrom.Left;
            else
                comboBoxFrameRateFrom.Left = comboBoxFrameRateTo.Left;

            comboBoxSubtitleFormats.Left = labelOutputFormat.Left + labelOutputFormat.Width + 3;
            comboBoxEncoding.Left = labelEncoding.Left + labelEncoding.Width + 3;
            if (comboBoxSubtitleFormats.Left > comboBoxEncoding.Left)
            {
                comboBoxEncoding.Left = comboBoxSubtitleFormats.Left;
            }
            else
            {
                comboBoxSubtitleFormats.Left = comboBoxEncoding.Left;
            }
            buttonStyles.Left = comboBoxSubtitleFormats.Left + comboBoxSubtitleFormats.Width + 5;

            timeUpDownAdjust.MaskedTextBox.Text = "000000000";

            comboBoxFrameRateFrom.Items.Add(23.976);
            comboBoxFrameRateFrom.Items.Add(24.0);
            comboBoxFrameRateFrom.Items.Add(25.0);
            comboBoxFrameRateFrom.Items.Add(29.97);

            comboBoxFrameRateTo.Items.Add(23.976);
            comboBoxFrameRateTo.Items.Add(24.0);
            comboBoxFrameRateTo.Items.Add(25.0);
            comboBoxFrameRateTo.Items.Add(29.97);

            UiUtil.FixLargeFonts(this, buttonCancel);

            _allFormats = new List<SubtitleFormat> { new Pac() };
            var formatNames = new List<string>();
            foreach (var format in SubtitleFormat.AllSubtitleFormats)
            {
                if (!format.IsVobSubIndexFile)
                {
                    formatNames.Add(format.Name);
                    _allFormats.Add(format);
                }
            }
            formatNames.Add(new Ayato().Name);
            formatNames.Add(l.PlainText);
            formatNames.Add(BluRaySubtitle);
            formatNames.Add(VobSubSubtitle);
            formatNames.Add(Configuration.Settings.Language.ExportCustomText.Title);
            UiUtil.InitializeSubtitleFormatComboBox(comboBoxSubtitleFormats, formatNames, Configuration.Settings.Tools.BatchConvertFormat);

            UiUtil.InitializeTextEncodingComboBox(comboBoxEncoding);

            if (string.IsNullOrEmpty(Configuration.Settings.Tools.BatchConvertOutputFolder) || !Directory.Exists(Configuration.Settings.Tools.BatchConvertOutputFolder))
                textBoxOutputFolder.Text = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
            else
                textBoxOutputFolder.Text = Configuration.Settings.Tools.BatchConvertOutputFolder;
            checkBoxOverwrite.Checked = Configuration.Settings.Tools.BatchConvertOverwriteExisting;
            checkBoxOverwriteOriginalFiles.Checked = Configuration.Settings.Tools.BatchConvertOverwriteOriginal;
            checkBoxFixCasing.Checked = Configuration.Settings.Tools.BatchConvertFixCasing;
            checkBoxFixCommonErrors.Checked = Configuration.Settings.Tools.BatchConvertFixCommonErrors;
//.........这里部分代码省略.........
开发者ID:LeonCheung,项目名称:subtitleedit,代码行数:101,代码来源:BatchConvert.cs

示例11: LoadNotificationIcons

        private void LoadNotificationIcons()
        {
            using (Bitmap b = new Bitmap(16, 16))
            {
                using (Graphics g = Graphics.FromImage(b))
                {
                    g.FillRectangle(new SolidBrush(Color.Black), 0, 0, b.Width, b.Height);
                    blackIcon = Icon.FromHandle(b.GetHicon());
                }
            }

            dummyIcon = new UsageIcon();
            notifyIcons.Add(cpuHistoryIcon = new CpuHistoryIcon() { Parent = this });
            notifyIcons.Add(cpuUsageIcon = new CpuUsageIcon() { Parent = this });
            notifyIcons.Add(ioHistoryIcon = new IoHistoryIcon() { Parent = this });
            notifyIcons.Add(commitHistoryIcon = new CommitHistoryIcon() { Parent = this });
            notifyIcons.Add(physMemHistoryIcon = new PhysMemHistoryIcon() { Parent = this });

            foreach (var icon in notifyIcons)
                icon.Icon = (Icon)blackIcon.Clone();

            this.ExecuteOnIcons(icon => icon.ContextMenu = contextMenuStripTray);
            this.ExecuteOnIcons(icon => icon.MouseDoubleClick += notifyIcon_MouseDoubleClick);

            this.cpuHistoryMenuItem.Checked = Settings.Instance.CpuHistoryIconVisible;
            this.cpuUsageMenuItem.Checked = Settings.Instance.CpuUsageIconVisible;
            this.ioHistoryMenuItem.Checked = Settings.Instance.IoHistoryIconVisible;
            this.commitHistoryMenuItem.Checked = Settings.Instance.CommitHistoryIconVisible;
            this.physMemHistoryMenuItem.Checked = Settings.Instance.PhysMemHistoryIconVisible;
            this.ApplyIconVisibilities();

            this.newProcessesToolStripMenuItem.Checked = Settings.Instance.NewProcesses;
            this.terminatedProcessesToolStripMenuItem.Checked = Settings.Instance.TerminatedProcesses;
            this.newServicesToolStripMenuItem.Checked = Settings.Instance.NewServices;
            this.startedServicesToolStripMenuItem.Checked = Settings.Instance.StartedServices;
            this.stoppedServicesToolStripMenuItem.Checked = Settings.Instance.StoppedServices;
            this.deletedServicesToolStripMenuItem.Checked = Settings.Instance.DeletedServices;

            this.newProcessesToolStripMenuItem.Click += this.CheckedMenuItem_Click;
            this.terminatedProcessesToolStripMenuItem.Click += this.CheckedMenuItem_Click;
            this.newServicesToolStripMenuItem.Click += this.CheckedMenuItem_Click;
            this.startedServicesToolStripMenuItem.Click += this.CheckedMenuItem_Click;
            this.stoppedServicesToolStripMenuItem.Click += this.CheckedMenuItem_Click;
            this.deletedServicesToolStripMenuItem.Click += this.CheckedMenuItem_Click;
        }
开发者ID:john-peterson,项目名称:processhacker,代码行数:45,代码来源:HackerWindow.cs

示例12: Add

 public void Add(Icon value)
 {
     if (value == null)
     {
         throw new ArgumentNullException("value");
     }
     this.Add(new ImageList.Original(value.Clone(), ImageList.OriginalOptions.OwnsImage), null);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:ImageList.cs


注:本文中的System.Drawing.Icon.Clone方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。