Changeset 56


Ignore:
Timestamp:
Apr 11, 2005, 9:13:09 PM (19 years ago)
Author:
altba\rryu
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MacFaceFloat/MacFaceApp.cs

    r54 r56  
    113113                        memoryGraph = new Bitmap(5*60, 100);
    114114                        statusWindow = new StatusWindow();
    115                         patternWindow.Closing += new System.ComponentModel.CancelEventHandler(patternWindow_Closing);
     115                        statusWindow.Closing += new System.ComponentModel.CancelEventHandler(patternWindow_Closing);
    116116                        statusWindow.cpuGraphPicBox.Image = cpuGraph;
    117117                        statusWindow.memoryGraphPicBox.Image = memoryGraph;
     
    138138                        drawCPUGraph();
    139139                        drawMemoryGraph();
     140                        FormBorderStyle orgStyle = statusWindow.FormBorderStyle;
     141                        statusWindow.FormBorderStyle = FormBorderStyle.Sizable;
     142                        statusWindow.StartPosition = FormStartPosition.Manual;
    140143                        statusWindow.Location = config.StatusWindowLocation;
     144                        statusWindow.FormBorderStyle = orgStyle;
    141145                        statusWindow.Show();
    142146
     
    456460                private void patternWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e)
    457461                {
    458                         e.Cancel = true;
     462                        if (!System.Environment.HasShutdownStarted)
     463                        {
     464                                e.Cancel = true;
     465                        }
    459466                }
    460467        }
Note: See TracChangeset for help on using the changeset viewer.