Пример #1
0
        private async void Form1_Load(object sender, EventArgs e)
        {
            if (!Auth())
            {
                Application.Exit();
                return;
            }

            // togeather
            this.WindowState   = FormWindowState.Minimized;
            this.ShowInTaskbar = false;

            InterceptKeys.SetHooks(
                CaptureScreen,                        // Ctrl+Shift+2 @
                CaptureArea,                          // Ctrl+Shift+3 #
                SelectAndUploadFiles,                 // Ctrl+Shift+6 ^
                _uploadCancellationTokenSource.Token
                );
            // notifyIcon1_MouseClick(sender, new MouseEventArgs(MouseButtons.Right, 0, 0, 0, 0));

            this.checkBox_EditBeforeUpload.Checked = bool.Parse(_account.EditBeforeUpload);
            new ToolTip {
                ShowAlways   = true,
                InitialDelay = 1,
                AutoPopDelay = 10000
            }.SetToolTip(this.checkBox_EditBeforeUpload, $@"'Edit' form will be shown before uploading");
            notifyIcon1.ShowBalloonTip(250, $"Good day, {_account.Email.Split('@')[0]}!", "Sharer is working in the background.", ToolTipIcon.Info);

            if (_openWithSharerFileUploadPath != null)
            {
                await UploadPath(_openWithSharerFileUploadPath, this, CancellationToken.None);
            }
        }