Changeset 56

Show
Ignore:
Timestamp:
04/11/05 21:13:09 (4 years ago)
Author:
altba\rryu
Message:

ステータスウインドウのFormBorderStyle?FixedToolWindow?の場合にLocationプロパティを設定すると、なぜかウインドウの高さがだいたいタイトルバー分だけ小さくなるという謎の現象を回避するコードを追加した。

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/MacFaceFloat/MacFaceApp.cs

    r54 r56  
    112112                        memoryGraph = new Bitmap(5*60, 100); 
    113113                        statusWindow = new StatusWindow(); 
    114                         patternWindow.Closing += new System.ComponentModel.CancelEventHandler(patternWindow_Closing); 
     114                        statusWindow.Closing += new System.ComponentModel.CancelEventHandler(patternWindow_Closing); 
    115115                        statusWindow.cpuGraphPicBox.Image = cpuGraph; 
    116116                        statusWindow.memoryGraphPicBox.Image = memoryGraph; 
     
    137137                        drawCPUGraph(); 
    138138                        drawMemoryGraph(); 
     139                        FormBorderStyle orgStyle = statusWindow.FormBorderStyle; 
     140                        statusWindow.FormBorderStyle = FormBorderStyle.Sizable; 
     141                        statusWindow.StartPosition = FormStartPosition.Manual; 
    139142                        statusWindow.Location = config.StatusWindowLocation; 
     143                        statusWindow.FormBorderStyle = orgStyle; 
    140144                        statusWindow.Show(); 
    141145 
     
    453457                private void patternWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) 
    454458                { 
    455                         e.Cancel = true; 
     459                        if (!System.Environment.HasShutdownStarted) 
     460                        { 
     461                                e.Cancel = true; 
     462                        } 
    456463                } 
    457464        }