Author: janderwald
Date: Fri Aug 21 22:40:00 2009
New Revision: 42835
URL:
http://svn.reactos.org/svn/reactos?rev=42835&view=rev
Log:
- Implement Window position/size saving & restoring
- Implemented by Stefan Ludowicy (IRC: BasisBit) reactos A.T. basisbit .D.O.T. de
Added:
trunk/tools/reactosdbg/RosDBG/app.config (with props)
Modified:
trunk/tools/reactosdbg/RosDBG/MainWindow.cs
trunk/tools/reactosdbg/RosDBG/Program.cs
trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs
trunk/tools/reactosdbg/RosDBG/Properties/Settings.Designer.cs
trunk/tools/reactosdbg/RosDBG/Properties/Settings.settings
trunk/tools/reactosdbg/RosDBG/RosDBG.csproj
Modified: trunk/tools/reactosdbg/RosDBG/MainWindow.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/MainWindow…
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/MainWindow.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/MainWindow.cs [iso-8859-1] Fri Aug 21 22:40:00 2009
@@ -189,6 +189,7 @@
{
RosDiagnostics.DebugTrace(RosDiagnostics.TraceType.Info, "Closing
application");
mConnection.Close(true);
+ SaveWindowSettings();
}
void UpdateDebuggerMenu()
@@ -469,6 +470,14 @@
}
}
+ private void SaveWindowSettings()
+ {
+ RosDBG.Properties.Settings.Default.Size = this.Size;
+ RosDBG.Properties.Settings.Default.Location = this.Location;
+ RosDBG.Properties.Settings.Default.WindowState = this.WindowState;
+ RosDBG.Properties.Settings.Default.Save();
+
+ }
}
Modified: trunk/tools/reactosdbg/RosDBG/Program.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Program.cs…
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/Program.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/Program.cs [iso-8859-1] Fri Aug 21 22:40:00 2009
@@ -3,6 +3,7 @@
using System.Linq;
using System.Threading;
using System.Windows.Forms;
+using System.Drawing;
namespace RosDBG
{
@@ -20,6 +21,11 @@
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
MainWindow mw = new MainWindow();
+
+ mw.WindowState = RosDBG.Properties.Settings.Default.WindowState;
+ mw.StartPosition = FormStartPosition.Manual;
+ mw.Location = RosDBG.Properties.Settings.Default.Location;
+ mw.Size = RosDBG.Properties.Settings.Default.Size;
Application.Run(mw);
}
else
Modified: trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Properties…
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/Properties/AssemblyInfo.cs [iso-8859-1] Fri Aug 21
22:40:00 2009
@@ -39,5 +39,5 @@
// will be increased as well. MSI installers must not be generated with the same Build
Number
// otherwise they won't upgrade the old installation!
-[assembly: AssemblyVersion("1.0.2.69")]
-[assembly: AssemblyFileVersion("1.0.2.69")]
+[assembly: AssemblyVersion("1.0.2.72")]
+[assembly: AssemblyFileVersion("1.0.2.72")]
Modified: trunk/tools/reactosdbg/RosDBG/Properties/Settings.Designer.cs
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Properties…
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/Properties/Settings.Designer.cs [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/Properties/Settings.Designer.cs [iso-8859-1] Fri Aug 21
22:40:00 2009
@@ -1,7 +1,7 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
-// Laufzeitversion:2.0.50727.4016
+// Laufzeitversion:2.0.50727.3082
//
// Ãnderungen an dieser Datei können falsches Verhalten verursachen und gehen
verloren, wenn
// der Code erneut generiert wird.
@@ -22,5 +22,41 @@
return defaultInstance;
}
}
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("0, 0")]
+ public global::System.Drawing.Point Location {
+ get {
+ return ((global::System.Drawing.Point)(this["Location"]));
+ }
+ set {
+ this["Location"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("792,
591")]
+ public global::System.Drawing.Size Size {
+ get {
+ return ((global::System.Drawing.Size)(this["Size"]));
+ }
+ set {
+ this["Size"] = value;
+ }
+ }
+
+ [global::System.Configuration.UserScopedSettingAttribute()]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Configuration.DefaultSettingValueAttribute("Normal")]
+ public global::System.Windows.Forms.FormWindowState WindowState {
+ get {
+ return
((global::System.Windows.Forms.FormWindowState)(this["WindowState"]));
+ }
+ set {
+ this["WindowState"] = value;
+ }
+ }
}
}
Modified: trunk/tools/reactosdbg/RosDBG/Properties/Settings.settings
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/Properties…
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/Properties/Settings.settings [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/Properties/Settings.settings [iso-8859-1] Fri Aug 21
22:40:00 2009
@@ -1,7 +1,15 @@
<?xml version='1.0' encoding='utf-8'?>
-<SettingsFile
xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings"
CurrentProfile="(Default)">
- <Profiles>
- <Profile Name="(Default)" />
- </Profiles>
- <Settings />
+<SettingsFile
xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings"
CurrentProfile="(Default)" GeneratedClassNamespace="RosDBG.Properties"
GeneratedClassName="Settings">
+ <Profiles />
+ <Settings>
+ <Setting Name="Location" Type="System.Drawing.Point"
Scope="User">
+ <Value Profile="(Default)">0, 0</Value>
+ </Setting>
+ <Setting Name="Size" Type="System.Drawing.Size"
Scope="User">
+ <Value Profile="(Default)">792, 591</Value>
+ </Setting>
+ <Setting Name="WindowState"
Type="System.Windows.Forms.FormWindowState" Scope="User">
+ <Value Profile="(Default)">Normal</Value>
+ </Setting>
+ </Settings>
</SettingsFile>
Modified: trunk/tools/reactosdbg/RosDBG/RosDBG.csproj
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/RosDBG.csp…
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/RosDBG.csproj [iso-8859-1] (original)
+++ trunk/tools/reactosdbg/RosDBG/RosDBG.csproj [iso-8859-1] Fri Aug 21 22:40:00 2009
@@ -3,7 +3,7 @@
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == ''
">Debug</Configuration>
<Platform Condition=" '$(Platform)' == ''
">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
+ <ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{FB776BFE-D2C2-465E-B713-6AD82CAE1A39}</ProjectGuid>
<OutputType>WinExe</OutputType>
@@ -99,7 +99,6 @@
</Compile>
<Compile Include="Diagnostics.cs" />
<Compile Include="Dockable Objects\BackTrace.cs">
- <SubType>Form</SubType>
</Compile>
<Compile Include="Dockable Objects\BackTrace.Designer.cs">
<DependentUpon>BackTrace.cs</DependentUpon>
@@ -117,7 +116,6 @@
<Compile Include="FileDirChooser.cs">
</Compile>
<Compile Include="Dockable Objects\ToolWindow.cs">
- <SubType>Form</SubType>
</Compile>
<Compile Include="Dockable Objects\ToolWindow.Designer.cs">
<DependentUpon>ToolWindow.cs</DependentUpon>
@@ -127,7 +125,6 @@
<Compile Include="IUseDebugConnection.cs" />
<Compile Include="IUseSymbols.cs" />
<Compile Include="Dockable Objects\Locals.cs">
- <SubType>Form</SubType>
</Compile>
<Compile Include="Dockable Objects\Locals.Designer.cs">
<DependentUpon>Locals.cs</DependentUpon>
@@ -139,7 +136,6 @@
<DependentUpon>MainWindow.cs</DependentUpon>
</Compile>
<Compile Include="Dockable Objects\MemoryWindow.cs">
- <SubType>Form</SubType>
</Compile>
<Compile Include="Dockable Objects\MemoryWindow.Designer.cs">
<DependentUpon>MemoryWindow.cs</DependentUpon>
@@ -147,13 +143,11 @@
<Compile Include="Module.cs" />
<Compile Include="ModuleIndex.cs" />
<Compile Include="Dockable Objects\Modules.cs">
- <SubType>Form</SubType>
</Compile>
<Compile Include="Dockable Objects\Modules.Designer.cs">
<DependentUpon>Modules.cs</DependentUpon>
</Compile>
<Compile Include="Dockable Objects\ProcThread.cs">
- <SubType>Form</SubType>
</Compile>
<Compile Include="Dockable Objects\ProcThread.Designer.cs">
<DependentUpon>ProcThread.cs</DependentUpon>
@@ -193,7 +187,7 @@
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
- <Generator>ResXFileCodeGenerator</Generator>
+ <Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
@@ -232,19 +226,16 @@
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="Dockable Objects\RawTraffic.cs">
- <SubType>Form</SubType>
</Compile>
<Compile Include="Dockable Objects\RawTraffic.Designer.cs">
<DependentUpon>RawTraffic.cs</DependentUpon>
</Compile>
<Compile Include="Dockable Objects\ReactOSWeb.cs">
- <SubType>Form</SubType>
</Compile>
<Compile Include="Dockable Objects\ReactOSWeb.Designer.cs">
<DependentUpon>ReactOSWeb.cs</DependentUpon>
</Compile>
<Compile Include="Dockable Objects\RegisterView.cs">
- <SubType>Form</SubType>
</Compile>
<Compile Include="Dockable Objects\RegisterView.Designer.cs">
<DependentUpon>RegisterView.cs</DependentUpon>
@@ -256,7 +247,6 @@
<DependentUpon>Settings.cs</DependentUpon>
</Compile>
<Compile Include="Dockable Objects\SourceView.cs">
- <SubType>Form</SubType>
</Compile>
<Compile Include="Dockable Objects\SourceView.Designer.cs">
<DependentUpon>SourceView.cs</DependentUpon>
@@ -314,6 +304,7 @@
</ItemGroup>
<ItemGroup>
<Content Include="app-rosdbg.ico" />
+ <None Include="app.config" />
<None Include="Resources\copyToolStripMenuItem.Image.png" />
<None Include="Resources\Run.bmp" />
<None Include="Resources\Pause.bmp" />
Added: trunk/tools/reactosdbg/RosDBG/app.config
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/reactosdbg/RosDBG/app.config…
==============================================================================
--- trunk/tools/reactosdbg/RosDBG/app.config (added)
+++ trunk/tools/reactosdbg/RosDBG/app.config [iso-8859-1] Fri Aug 21 22:40:00 2009
@@ -1,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+ <configSections>
+ <sectionGroup name="userSettings"
type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089" >
+ <section name="RosDBG.Properties.Settings"
type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089"
allowExeDefinition="MachineToLocalUser" requirePermission="false"
/>
+ </sectionGroup>
+ </configSections>
+ <connectionStrings />
+ <userSettings>
+ <RosDBG.Properties.Settings>
+ <setting name="Location" serializeAs="String">
+ <value>0, 0</value>
+ </setting>
+ <setting name="Size" serializeAs="String">
+ <value>792, 591</value>
+ </setting>
+ <setting name="WindowState" serializeAs="String">
+ <value>Normal</value>
+ </setting>
+ </RosDBG.Properties.Settings>
+ </userSettings>
+</configuration>
Propchange: trunk/tools/reactosdbg/RosDBG/app.config
------------------------------------------------------------------------------
svn:eol-style = native