Changeset 116


Ignore:
Timestamp:
Dec 12, 2008, 11:39:03 PM (15 years ago)
Author:
rryu
Message:

空きメモリ領域がグラフの3分の2以上を占める場合は、3分の1以下になるように拡大するようにした。

Location:
trunk/MacFaceFloat
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MacFaceFloat/ConfigurationForm.cs

    r111 r116  
    109109            this.lblTitle = new System.Windows.Forms.Label();
    110110            this.groupBox3 = new System.Windows.Forms.GroupBox();
     111            this.label12 = new System.Windows.Forms.Label();
    111112            this.label11 = new System.Windows.Forms.Label();
    112113            this.label10 = new System.Windows.Forms.Label();
    113114            this.trackBarUpdateSpeed = new System.Windows.Forms.TrackBar();
    114             this.label12 = new System.Windows.Forms.Label();
    115115            this.groupBox1.SuspendLayout();
    116116            ((System.ComponentModel.ISupportInitialize)(this.trackBarOpacity)).BeginInit();
     
    352352            this.groupBox3.Text = "XVŠÔŠu";
    353353            //
     354            // label12
     355            //
     356            this.label12.Location = new System.Drawing.Point(105, 49);
     357            this.label12.Name = "label12";
     358            this.label12.Size = new System.Drawing.Size(38, 11);
     359            this.label12.TabIndex = 2;
     360            this.label12.Text = "0.5•b";
     361            this.label12.TextAlign = System.Drawing.ContentAlignment.TopCenter;
     362            //
    354363            // label11
    355364            //
     
    380389            this.trackBarUpdateSpeed.Value = 10;
    381390            this.trackBarUpdateSpeed.ValueChanged += new System.EventHandler(this.trackBarUpdateSpeed_ValueChanged);
    382             //
    383             // label12
    384             //
    385             this.label12.Location = new System.Drawing.Point(129, 49);
    386             this.label12.Name = "label12";
    387             this.label12.Size = new System.Drawing.Size(38, 11);
    388             this.label12.TabIndex = 2;
    389             this.label12.Text = "0.5•b";
    390             this.label12.TextAlign = System.Drawing.ContentAlignment.TopCenter;
    391391            //
    392392            // ConfigurationForm
  • trunk/MacFaceFloat/StatusWindow.cs

    r112 r116  
    154154
    155155            ulong totalMemory = (ulong)memStats.TotalVisibleMemorySize * 1024;
    156                         double rate = (double)fh / (totalMemory * 1.5);
     156            double rate;
     157
     158                        MemoryUsage latestUsage = memStats.Latest;
     159            if (latestUsage.Used + latestUsage.Available > totalMemory * 1.5)
     160            {
     161                rate = (double)fh / (totalMemory * 3.0);// (double)memStats.CommitLimit;
     162            }
     163            else
     164            {
     165                rate = (double)fh / (totalMemory * 1.5);
     166            }
     167
    157168            int border = (int)(totalMemory * rate);
    158169
Note: See TracChangeset for help on using the changeset viewer.