コード例 #1
0
        private void ApplyRunSetting(frmRunSetting dlg)
        {
            flowRunManager.Auto             = dlg.AutoRunResult;
            flowRunManager.ClearOldResult   = dlg.ClearResultResult;
            flowRunManager.PlayFadingEffect = dlg.FadingEffectResult;
            flowRunManager.NotifyOnEnd      = dlg.NotificationResult;
            flowRunManager.PlaySoundEffect  = dlg.SoundEffectResult;

            flowRunManager.TimePerBlock = (10 - dlg.SpeedResult) * 100 + 1;
            UpdateEnabledButtons(flowRunManager.State, flowRunManager.Auto);
        }
コード例 #2
0
        private void btnSetting_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            bool Auto         = flowRunManager.Auto;
            int  Speed        = 10 - (flowRunManager.TimePerBlock - 1) / 100;
            bool FadingEffect = flowRunManager.PlayFadingEffect;
            bool SoundEffect  = flowRunManager.PlaySoundEffect;
            bool ClearResult  = flowRunManager.ClearOldResult;
            bool NotifyOnEnd  = flowRunManager.NotifyOnEnd;

            frmRunSetting dlg          = new frmRunSetting(Auto, Speed, FadingEffect, SoundEffect, ClearResult, NotifyOnEnd);
            DialogResult  dialogResult = dlg.ShowDialog();

            if (dialogResult == DialogResult.OK)
            {
                ApplyRunSetting(dlg);
            }
        }