This project has moved. For the latest updates, please go here.

region not saved

Jan 25, 2013 at 11:55 AM

I use OTR to keep a view on my IP-camera, which shows in my browser.

OTR nicely zooms out and stays on top. Very, very useful app. Thanks.

 

The new version is supposed to save regions on windows. I cannot get it to work.

Where and how are these settings saved?

Coordinator
Feb 15, 2013 at 2:01 PM
Hello!
I'm glad you like the application. :) Sorry for the late answer.

Settings are stored using the .NET framework facilities and the setting files are located under:
%LOCALAPPDATA%\Lorenz_Cuno_Klopfenstein\OnTopReplica.exe_Url_<some numbers>\3.4.0.0\user.config
It's a simple XML file and you should be able to edit it manually, if need be.

In order to save a region, you have to first create a region (using the "select region" option) and then use the 'Plus symbol' button. This will give you the opportunity of entering a region name and the hit 'Enter' in order to store the region.
I have never received any bug report regarding this ability, so I have always been assuming this worked for everyone. Please let me know if it continues to fail.

Cheers.
Feb 15, 2013 at 2:30 PM
Better late than never :-).

I found the dir, with user.config xml as described.
So creating seems to work. Only reading the setting fails.
It does not show in in "select window >". Only "whole" is available.
I'm using your compiled binary.
I remember using the installer, with the same problem.
Coordinator
Feb 15, 2013 at 5:10 PM
Can you check whether the generated XML is correct? Regions are stored using the following format:
            <setting name="SavedRegions" serializeAs="Xml">
                <value>
                    <StoredRegionArray>
                        <StoredRegion name="Test region">
                            <Rectangle>
                                <X>173</X>
                                <Y>67</Y>
                                <Width>323</Width>
                                <Height>213</Height>
                            </Rectangle>
                        </StoredRegion>
                    </StoredRegionArray>
                </value>
            </setting>
There should be no difference in how settings work between the binary and the installed version. I'm assuming you're using the latest version?
Feb 15, 2013 at 9:31 PM
I'm using 3.4.0.0
No stored region is saved.
All I have is:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <configSections>
        <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
            <section name="OnTopReplica.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=notsureifthisispersonal" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
        </sectionGroup>
    </configSections>
    <userSettings>
        <OnTopReplica.Properties.Settings>
            <setting name="Language" serializeAs="String">
                <value>(Default)</value>
            </setting>
            <setting name="MustUpdate" serializeAs="String">
                <value>False</value>
            </setting>
            <setting name="RestoreLastSize" serializeAs="String">
                <value>320, 272</value>
            </setting>
            <setting name="RestoreLastPosition" serializeAs="String">
                <value>242, 242</value>
            </setting>
            <setting name="RestoreLastWindowClass" serializeAs="String">
                <value>Chrome_WidgetWin_1</value>
            </setting>
            <setting name="RestoreLastWindowTitle" serializeAs="String">
                <value>Synology Surveillance Station - Google Chrome</value>
            </setting>
            <setting name="RestoreLastWindowHwnd" serializeAs="String">
                <value>3411072</value>
            </setting>
        </OnTopReplica.Properties.Settings>
    </userSettings>
</configuration>
This occurs even if I delete this this settings file, and restart.
Althuoh=gh I tested the save region after I was sure this one existed.
Coordinator
Feb 24, 2013 at 10:36 AM
I'm terribly sorry, but I'm really at a loss here: I have no clue why exactly this doesn't seem to work for you. I was already considering rewriting the settings loading and saving procedures since the solution I'm using right now is less customizable than ideal and is difficult to debug (even though I never ran into a problem like your till now): I'll try to do it in the next release and hopefully that will work as intended. :)
Nov 26, 2014 at 9:08 AM
Hi,

I have been using OTR and find it very useful. My issue is though that regions do not save to the XML file. I have managed to add one saved region using your example but when I try to add another the program fails to load. I think I am using an incorrect format when adding the second saved region. Could anyone with multiple saved regions please upload their XML file as an example?

Thanks!
Coordinator
Nov 27, 2014 at 9:10 AM
Hello Quimreaper,
here's the XML for two stored regions (the first one uses relative margins, the second one uses absolute margins):
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <userSettings>
        <OnTopReplica.Properties.Settings>
            <setting name="Language" serializeAs="String">
                <value>(Default)</value>
            </setting>
            <setting name="MustUpdate" serializeAs="String">
                <value>False</value>
            </setting>
            <setting name="RestoreLastSize" serializeAs="String">
                <value>397, 224</value>
            </setting>
            <setting name="RestoreLastPosition" serializeAs="String">
                <value>274, 157</value>
            </setting>
            <setting name="RestoreLastShowChrome" serializeAs="String">
                <value>True</value>
            </setting>
            <setting name="SavedRegions" serializeAs="Xml">
                <value>
                    <StoredRegionArray>
                        <StoredRegion name="VLC">
                            <Padding>
                                <Left>0</Left>
                                <Top>32</Top>
                                <Right>0</Right>
                                <Bottom>55</Bottom>
                            </Padding>
                        </StoredRegion>
                        <StoredRegion name="Test">
                            <Rectangle>
                                <X>709</X>
                                <Y>430</Y>
                                <Width>965</Width>
                                <Height>545</Height>
                            </Rectangle>
                        </StoredRegion>
                    </StoredRegionArray>
                </value>
            </setting>
        </OnTopReplica.Properties.Settings>
    </userSettings>
</configuration>
Do the regions you create through the program fail to save automatically? Could you send me your log file for debugging, please?
(It is usually located in %APPDATA%\OnTopReplica.)