dkn*_*ack 10
Form_FormClosed
Form_Load
private void Form1_Load(object sender, EventArgs e)
{
this.Location = new Point(Properties.Settings.Default.LocationX, Properties.Settings.Default.LocationY);
this.Width = Properties.Settings.Default.WindowWidth;
this.Height = Properties.Settings.Default.WindowHeight;
}
private void Form1_FormClosed(object sender, FormClosedEventArgs e)
{
Properties.Settings.Default.LocationX = this.Location.X;
Properties.Settings.Default.LocationY = this.Location.Y;
Properties.Settings.Default.WindowWidth = this.Width;
Properties.Settings.Default.WindowHeight = this.Height;
Properties.Settings.Default.Save();
}
Run Code Online (Sandbox Code Playgroud)
MainWindow_Closed
MainWindow_Loaded
void MainWindow_Loaded(object sender, RoutedEventArgs e)
{
this.Left = Properties.Settings.Default.LocationX;
this.Top = Properties.Settings.Default.LocationY;
this.Width = Properties.Settings.Default.WindowWidth;
this.Height = Properties.Settings.Default.WindowHeight;
}
void MainWindow_Closed(object sender, EventArgs e)
{
Properties.Settings.Default.LocationX = this.Left;
Properties.Settings.Default.LocationY = this.Top;
Properties.Settings.Default.WindowWidth = this.Width;
Properties.Settings.Default.WindowHeight = this.Height;
Properties.Settings.Default.Save();
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3518 次 |
最近记录: |