예제 #1
0
        private async static void OnDebugMessage(object sender, EventArgs e)
        {
            DebugMessage debug = new DebugMessage(logger.GetLog(), proxy.GetLog());

            Clipboard.SetText(await debug.PublishAsync());
            MessageBox.Show("Debug message created and published, the link has been stored in your clipboard.\nProvide this link when reporting an issue.", "Debug message", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
예제 #2
0
        private async static void OnDebugMessage(object sender, EventArgs e)
        {
            DebugMessage debug = new DebugMessage(logger.GetLog(), proxy.GetLog());

            if (Control.ModifierKeys == Keys.Shift)
            {
                var dialog = new SaveFileDialog()
                {
                    Filter   = "Log Files (*.log)|*.log",
                    FileName = string.Format("usbhelperlauncher_{0:yyyy-MM-dd_HH-mm-ss}.log", DateTime.Now)
                };
                if (dialog.ShowDialog() == DialogResult.OK)
                {
                    File.WriteAllText(dialog.FileName, await debug.Build());
                }
                return;
            }
            Clipboard.SetText(await debug.PublishAsync());
            MessageBox.Show("Debug message created and published, the link has been stored in your clipboard.\nProvide this link when reporting an issue.", "Debug message", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }