Autor: Edward Bartolo Data: A: dng Assumpte: Re: [DNG] Automatic connections: expected behaviour from netman
Hi all,
Making the above changes is only a matter of a few minutes in Lazarus.
In the mainform:
AlreadyAttemptedToAutoConnect: boolean;
Set the above to false when the form is created;
At the event handlers for all Connect buttons set
AlreadyAttemptedToAutoConnect to false;
In the timer's event do this:
if (not AlreadyAttemptedToAutoConnect) and (HasOption('--auto-conn') then
begin
call auto-connect function;
AlreadyAttemptedToAutoConnect := true;
end;
And its done. :D
Edward
On 13/09/2015, Edward Bartolo <edbarx@???> wrote: > Hi all,
>
> As I am approaching the final stages of Pre-Alpha development, I would
> like to ask how netman should behave when 'automatic connections' are
> enabled.
>
> Needless to state the obvious, here, we are not doing Microsoft, but
> rather, we want to keep netman as simple as it can be. Yes, there are
> opinions contrary to what I am doing, but the world is such, that we
> cannot please everyone.
>
> At the moment, I am thinking about how netman should behave when
> automatic searching and connecting to wifi hotspots is enabled. I
> already have an idea how this can be achieved, but I want to use the
> least of processing time possible, knowing from experience how network
> managers that think for themselves can be made to almost clog the
> system.
>
> As far as I am concerned, manual connections to a wifi is enough for
> me. I only need to click a button, and netman connects.
>
> My 'idea' is to use the already existing timer to check whether there
> is a connection, if not, it calls the function for automatic
> connections. If when the latter function returns there is still no
> active connection, netman stops trying to connect automatically until
> the user tries to connect manually.
>
> On startup, the timer would call the function for automatic
> connections without user intervention if automatic connections are
> enabled.
>
> Edward
>