AcTools.Render.Wrapper.BaseFormWrapper.Toast C# (CSharp) Method

Toast() public method

public Toast ( string message ) : void
message string
return void
        public void Toast(string message) {
            if (Form == null) return;

            Action action = delegate {
                if (_toastTimer == null) {
                    _toastTimer = new Timer { Interval = 3000 };
                    _toastTimer.Tick += ToastTimer_Tick;
                }

                Form.Text = Form.Text == _title ? message : Form.Text + ", " + message;
                _toastTimer.Enabled = false;
                _toastTimer.Enabled = true;
            };

            Form.Invoke(action);
        }