Skip to content

Commit

Permalink
User-password, added visibility Featursets, added PT Speed toggle on… (
Browse files Browse the repository at this point in the history
…#259)

* User-password, added visibility Featursets, added  PT Speed toggle on joystick,

1. Fixed issue with commit #201
handle when there are no commands available;

2. Upgrade to users infrastructure -
password check gets done on startup even when app is not minimized;

3.  Last active user is saved to config, and is loaded on next app launch with password check

4. Added more features to user-defined visibility control;

5. Added configurable PTZ speed profile - default and high-sensitivity, (high sensitiviy profile allows slower speed and higher control over PT via joystick); profiles can be toggled via mainform commands and via joystick buttons

6. Fixed PTZ physical joystick :
 When no camera window is focused - bind the physical joystick input to the last active camera, or else the joystick input is ignored until user actively chooses a camera window again;
 ( this is not user-friendly when user selects other gui windows such as PTZTool, PTZCommandButtons, and remotecommands window, and therefore moves the screen focus from the cameras, resulting in c.Focused = false for all _pnlCameras.Controls;)

* Added null protection

Added null protection

* edited the visibility on File menu items

leaving only open object list to enable config restore

* Added virtual keyboard for PT preset setup and more

Added virtual keyboard for PT preset setup;
Fixed saving joystick buttons config for ptSpeed ;
Added more feature visibility control on high-level-user;

* Added menu option to load config.xml file

Added option to load config.xml file
PTZcommandButtons - if menu checkbox is on, the window will display even if there are no available presets to display. Display can be turned off using the menu checkbox. This is the same behavior as in PTZControl presets combobox, otherwise it causes other display issues which /i can't solve.
  • Loading branch information
Orvani authored Jun 29, 2023
1 parent 863f020 commit ac565b2
Show file tree
Hide file tree
Showing 32 changed files with 5,314 additions and 95 deletions.
15 changes: 15 additions & 0 deletions AddCamera.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4,886 changes: 4,886 additions & 0 deletions AddCamera.Designer.cs.bak

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion AddCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -765,14 +765,26 @@ private void RenderResources()

HideTab(tabPage3, Helper.HasFeature(Enums.Features.Motion_Detection));
HideTab(tabPage2, Helper.HasFeature(Enums.Features.Alerts));
HideTab(tabPage4, Helper.HasFeature(Enums.Features.Recording));
HideTab(tabPage1, Helper.HasFeature(Enums.Features.High_Level_User));
HideTab(tabPage4, Helper.HasFeature(Enums.Features.Recording) & Helper.HasFeature(Enums.Features.High_Level_User));
HideTab(tabPage8, Helper.HasFeature(Enums.Features.PTZ));
HideTab(tabPage7, Helper.HasFeature(Enums.Features.Save_Frames));
HideTab(tabPage10, Helper.HasFeature(Enums.Features.Save_Frames));
HideTab(tabPage9, Helper.HasFeature(Enums.Features.Cloud) && Helper.HasFeature(Enums.Features.Web_Settings));
HideTab(tabPage5, Helper.HasFeature(Enums.Features.Scheduling));
HideTab(tabPage6, Helper.HasFeature(Enums.Features.Storage));

if (!Helper.HasFeature(Enums.Features.High_Level_User))
{
btnPTZTrack.Enabled = false;
llblEditPTZ.Enabled = false;
}
else
{
btnPTZTrack.Enabled = true;
llblEditPTZ.Enabled = true;
}

if (!Helper.HasFeature(Enums.Features.Web_Settings))
{
linkLabel9.Visible = false;
Expand Down Expand Up @@ -2609,5 +2621,10 @@ private void scheduleEditor1_Load(object sender, EventArgs e)
{

}

private void linkLabel_OpenVRKbrd_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
System.Diagnostics.Process.Start("osk.exe");
}
}
}
4 changes: 2 additions & 2 deletions AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:

[assembly: AssemblyVersion("7.2.6.0")]
[assembly: AssemblyVersion("7.2.6.1")]

//
// In order to sign your assembly you must specify a key to use. Refer to the
Expand Down Expand Up @@ -55,4 +55,4 @@
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]
[assembly: AssemblyFileVersion("7.2.6.0")]
[assembly: AssemblyFileVersion("7.2.6.1")]
20 changes: 20 additions & 0 deletions CheckPassword.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,26 @@ private void DoCheckPassword()
Close();
}

private void DoCheckPassword(string userName)
{
var g = MainForm.Conf.Permissions.First(p => p.name == userName);
if (txtPassword.Text == EncDec.DecryptData(g.password, MainForm.Conf.EncryptCode))
{
if (MainForm.Group != g.name)
MainForm.NeedsResourceUpdate = true;
MainForm.Group = g.name;
DialogResult = DialogResult.OK;
Logger.LogMessage("Login: " + g.name);
Close();
return;
}

DialogResult = DialogResult.Cancel;
MessageBox.Show(LocRm.GetString("PasswordIncorrect"), LocRm.GetString("Note"));

Close();
}

private void CheckPasswordLoad(object sender, EventArgs e)
{
txtPassword.Focus();
Expand Down
Binary file added DLLS/x64/AForge.Imaging.dll
Binary file not shown.
Binary file added DLLS/x64/AForge.Math.dll
Binary file not shown.
Binary file added DLLS/x64/AForge.dll
Binary file not shown.
Binary file added DLLS/x64/Interop.NATUPNPLib.dll
Binary file not shown.
Binary file added DLLS/x64/Interop.NETCONLib.dll
Binary file not shown.
Binary file added DLLS/x64/Interop.NetFwTypeLib.dll
Binary file not shown.
Binary file added DLLS/x64/NAudio.Lame.dll
Binary file not shown.
Binary file added DLLS/x64/NAudio.dll
Binary file not shown.
Binary file added DLLS/x64/NSpeex.dll
Binary file not shown.
Binary file added DLLS/x64/Renci.SshNet.dll
Binary file not shown.
Binary file added DLLS/x64/Renderers.dll
Binary file not shown.
Binary file added DLLS/x64/Windows7ToolStripRenderer.dll
Binary file not shown.
Binary file added DLLS/x64/xiApi.NET.dll
Binary file not shown.
8 changes: 7 additions & 1 deletion Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,13 @@ public enum Features: long
View_File_Menu = 8589934592,
View_Ispy_Links = 17179869184,
View_Status_Bar = 34359738368,
View_Layout_Options = 68719476736
View_Layout_Options = 68719476736,
Open_Web_Interface = 137438953472,
View_Media = 274877906944,
View_Media_on_mobile = 549755813888,
View_Files = 1099511627776,
High_Level_User = 2199023255552

}

}
Expand Down
Loading

0 comments on commit ac565b2

Please sign in to comment.