Exemplo n.º 1
0
        /// <summary>
        /// "ChangeActiveProgram" button clicked.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnChangeActiveProgram_Click(object sender, EventArgs e)
        {
            _sendCommand = SendCommand.ChangeActiveProgram;

            using (DepthProgramSelectForm depthProgramSelectForm = new DepthProgramSelectForm(false, true))
            {
                if (DialogResult.OK == depthProgramSelectForm.ShowDialog())
                {
                    int rc = NativeMethods.LJV7IF_ChangeActiveProgram(_currentDeviceId, depthProgramSelectForm.Target);
                    AddLogResult(rc, Resources.SID_CHANGE_ACTIVE_PROGRAM);
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// "RewriteTemporarySetting" button clicked.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnRewriteTemporarySetting_Click(object sender, EventArgs e)
 {
     using (DepthProgramSelectForm depthProgramSelectForm = new DepthProgramSelectForm(true, false))
     {
         if (DialogResult.OK == depthProgramSelectForm.ShowDialog())
         {
             int rc = NativeMethods.LJV7IF_RewriteTemporarySetting(_currentDeviceId, depthProgramSelectForm.Depth);
             AddLogResult(rc, Resources.SID_REWRITE_TEMPORARY_SETTING);
         }
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// "ReflectSetting" button clicked.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnUpdataSetting_Click(object sender, EventArgs e)
        {
            using (DepthProgramSelectForm depthProgramSelectForm = new DepthProgramSelectForm(true, false))
            {
                if (DialogResult.OK == depthProgramSelectForm.ShowDialog())
                {
                    uint dwError = 0;
                    int rc = NativeMethods.LJV7IF_ReflectSetting(_currentDeviceId, depthProgramSelectForm.Depth, ref dwError);

                    AddLogResult(rc, Resources.SID_UPDATA_SETTING);
                    if (rc != (int)Rc.Ok)
                    {
                        AddError(dwError);
                    }
                }
            }
        }
Exemplo n.º 4
0
 /// <summary>
 /// "InitializeSetting" button clicked.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnInitializeSetting_Click(object sender, EventArgs e)
 {
     using (DepthProgramSelectForm depthProgramSelectForm = new DepthProgramSelectForm(true, true))
     {
         if (DialogResult.OK == depthProgramSelectForm.ShowDialog())
         {
             int rc = NativeMethods.LJV7IF_InitializeSetting(_currentDeviceId, depthProgramSelectForm.Depth, depthProgramSelectForm.Target);
             AddLogResult(rc, Resources.SID_INITIALIZE_SETTING);
         }
     }
 }