Esempio n. 1
0
        // called when the Plugin is deselected OR when Liv is being closed down.
        public void OnDeactivate()
        {
            PluginLog.Log("ActionCameraPlugin", "OnDeactivate ");

            ApplySettings?.Invoke(this, EventArgs.Empty);

            avatarRefSignal?.OnChanged.RemoveListener(OnAvatarChanged);
            avatarRefSignal = null;
        }
Esempio n. 2
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (!trw.IsAllFieldSet())
            {
                MessageBox.Show("One of the required field is empty", Text, MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }

            int.TryParse(txPort.Text, out var port);
            var sd = new ServerDetails {
                GroupID       = GlobalHelper.dbGroups.GetIDByGroupName(ddGroup.Text),
                ServerName    = txServername.Text,
                Server        = txComputer.Text,
                Port          = port,
                Username      = txUsername.Text,
                Password      = new Password(txPassword.Text, false),
                Description   = txDescription.Text,
                ColorDepth    = (int)lblColorDepth.Tag,
                DesktopWidth  = int.Parse(txWidth.Text),
                DesktopHeight = int.Parse(txHeight.Text),
                Fullscreen    = cbFullscreen.Checked
            };

            if (isUpdating)
            {
                // pass our old UID to new UID for saving
                sd.Id = oldSD.Id;

                GlobalHelper.dbServers.Save(sd);

                // new settings changed
                // pass new settings on our oldSD
                oldSD = sd;

                DialogResult dr = MessageBox.Show("Conection settings successfully updated.\r\nDo you want to apply your current changes.", Text, MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                if (dr == DialogResult.Yes)
                {
                    ApplySettings?.Invoke(sender, oldSD);
                }
            }
            else
            {
                GlobalHelper.dbServers.Save(sd);
                MessageBox.Show("New conenction settings successfully saved", Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
                Close();
            }
        }
 // OnDeactivate is called when the user changes the profile to other camera behaviour or when the application is about to close.
 // The camera behaviour should clean everything it created when the behaviour is deactivated.
 public void OnDeactivate()
 {
     ApplySettings?.Invoke(this, EventArgs.Empty);
 }
Esempio n. 4
0
 void setSettings()
 {
     int[] resol = ResolutionComboBox.SelectedValue as int[];
     ApplySettings?.Invoke(resol[0], resol[1], (int)FPSComboBox.SelectedValue, (int)AnitialisingComboBox.SelectedValue, VSyncCheckBox.Checked, Convert.ToInt32(MaxItemCountNumeric.Value));
 }
Esempio n. 5
0
 private void applySettings_Click(object sender, EventArgs e)
 {
     ApplySettings?.Invoke();
 }