コード例 #1
0
 public AttachTo()
 {
     Name = "AttachTo";
     IsExtensionMethod = true;
     IsStatic          = true;
     DeclaringType     = new WindowsFormsExtensions();
 }
コード例 #2
0
        private void imageRaker_Progress(string url, bool succeed, int total)
        {
            if (this.InvokeRequired)
            {
                this.BeginInvoke(new ImageRaker.ProgressEventHandlerDelegate(imageRaker_Progress), url, succeed, total);
            }
            else
            {
                currentProgress++;

                messageLabel.Text  = string.Format("저장 중\n\n{0}", url);
                progressLabel.Text = string.Format("{0} / {1}", currentProgress, total);

                progressBar.PerformStep();

                Logger.DLog("imageRaker_Progress - succeed: {0}, total: {1}", succeed, total);

                // windows 7
                if (succeed == false)
                {
                    WindowsFormsExtensions.SetTaskbarProgressState(this, Windows7.DesktopIntegration.Windows7Taskbar.ThumbnailProgressState.Error);
                }

                WindowsFormsExtensions.SetTaskbarProgress(progressBar);
            }
        }
コード例 #3
0
 public EnableVisualStyles()
 {
     Name = "EnableVisualStyles";
     IsExtensionMethod = true;
     IsStatic          = true;
     DeclaringType     = new WindowsFormsExtensions();
 }
コード例 #4
0
 /// <summary>
 /// Sets the progress bar of this form's taskbar button to the
 /// specified state.
 /// </summary>
 /// <param name="form">The form.</param>
 /// <param name="state">The taskbar progress state.</param>
 public static void SetTaskbarProgressState(this Form form, ThumbnailProgressState state)
 {
     try
     {
         WindowsFormsExtensions.SetTaskbarProgressState(form, (Windows7Taskbar.ThumbnailProgressState)state);
     }
     catch (Exception) {}             // Library might fail in Windows Vista and before
 }
コード例 #5
0
 /// <summary>
 /// Sets the progress bar of this form's taskbar button to the
 /// specified percentage.
 /// </summary>
 /// <param name="form">The form.</param>
 /// <param name="percent">The progress percentage.</param>
 public static void SetTaskbarProgress(this Form form, float percent)
 {
     try
     {
         WindowsFormsExtensions.SetTaskbarProgress(form, percent);
     }
     catch (Exception) {}             // Library might fail in Windows Vista and before
 }
コード例 #6
0
 /// <summary>
 /// Sets the progress bar in the containing form's taskbar button
 /// to this toolstrip progress bar's progress.
 /// </summary>
 /// <param name="progressBar">The progress bar.</param>
 public static void SetTaskbarProgress(this ToolStripProgressBar progressBar)
 {
     try
     {
         WindowsFormsExtensions.SetTaskbarProgress(progressBar);
     }
     catch (Exception) {}             // Library might fail in Windows Vista and before
 }
コード例 #7
0
 /// <summary>
 /// Draws the specified overlay icon over this form's taskbar button.
 /// </summary>
 /// <param name="form">The form.</param>
 /// <param name="icon">The overlay icon.</param>
 /// <param name="description">The overlay icon's description.</param>
 public static void SetTaskbarOverlayIcon(this Form form, Icon icon, string description)
 {
     try
     {
         WindowsFormsExtensions.SetTaskbarOverlayIcon(form, icon, description);
     }
     catch (Exception) {}             // Library might fail in Windows Vista and before
 }
コード例 #8
0
 public AttachControlTo()
 {
     Name = "AttachControlTo";
     IsExtensionMethod = true;
     IsStatic          = true;
     DeclaringType     = new WindowsFormsExtensions();
     ReturnType        = new KnownStockTypes.System.Object();
 }
コード例 #9
0
 public AttachControlTo()
 {
     Name = "AttachControlTo";
     IsExtensionMethod = true;
     IsStatic = true;
     DeclaringType = new WindowsFormsExtensions();
     ReturnType = new KnownStockTypes.System.Object();
 }
コード例 #10
0
 public AttachTo()
 {
     Name = "AttachTo";
     IsExtensionMethod = true;
     IsStatic = true;
     DeclaringType = new WindowsFormsExtensions();
 }
コード例 #11
0
 public EnableVisualStyles()
 {
     Name = "EnableVisualStyles";
     IsExtensionMethod = true;
     IsStatic = true;
     DeclaringType = new WindowsFormsExtensions();
 }