Пример #1
0
 public void UseCommandLineArgs(string[] args)
 {
     if (args != null && args.Length > 1)
     {
         for (int i = 1; i < args.Length; i++)
         {
             if (args[i].Equals("-clipboardupload", StringComparison.InvariantCultureIgnoreCase))
             {
                 UploadManager.ClipboardUpload();
             }
             else if (args[i][0] != '-')
             {
                 UploadManager.UploadFile(args[i]);
             }
         }
     }
 }
        public static void ClipboardUploadWithContentViewer()
        {
            if (Program.Settings.ShowClipboardContentViewer)
            {
                using (ClipboardContentViewer ccv = new ClipboardContentViewer())
                {
                    if (ccv.ShowDialog() == DialogResult.OK && !ccv.IsClipboardEmpty)
                    {
                        UploadManager.ClipboardUpload();
                    }

                    Program.Settings.ShowClipboardContentViewer = !ccv.DontShowThisWindow;
                }
            }
            else
            {
                UploadManager.ClipboardUpload();
            }
        }
Пример #3
0
        private void LoadSettings()
        {
            niTray.Visible = Program.Settings.ShowTray;

            if (ZAppHelper.GetEnumLength <ImageDestination>() <= Program.Settings.SelectedImageUploaderDestination)
            {
                Program.Settings.SelectedImageUploaderDestination = 0;
            }

            ((ToolStripMenuItem)tsmiImageUploaders.DropDownItems[Program.Settings.SelectedImageUploaderDestination]).Checked = true;
            UploadManager.ImageUploader = (ImageDestination)Program.Settings.SelectedImageUploaderDestination;

            if (ZAppHelper.GetEnumLength <FileDestination>() <= Program.Settings.SelectedFileUploaderDestination)
            {
                Program.Settings.SelectedFileUploaderDestination = 0;
            }

            ((ToolStripMenuItem)tsmiFileUploaders.DropDownItems[Program.Settings.SelectedFileUploaderDestination]).Checked = true;
            UploadManager.FileUploader = (FileDestination)Program.Settings.SelectedFileUploaderDestination;

            if (ZAppHelper.GetEnumLength <TextDestination>() <= Program.Settings.SelectedTextUploaderDestination)
            {
                Program.Settings.SelectedTextUploaderDestination = 0;
            }

            ((ToolStripMenuItem)tsmiTextUploaders.DropDownItems[Program.Settings.SelectedTextUploaderDestination]).Checked = true;
            UploadManager.TextUploader = (TextDestination)Program.Settings.SelectedTextUploaderDestination;

            if (ZAppHelper.GetEnumLength <UrlShortenerType>() <= Program.Settings.SelectedURLShortenerDestination)
            {
                Program.Settings.SelectedURLShortenerDestination = 0;
            }

            ((ToolStripMenuItem)tsmiURLShorteners.DropDownItems[Program.Settings.SelectedURLShortenerDestination]).Checked = true;
            UploadManager.URLShortener = (UrlShortenerType)Program.Settings.SelectedURLShortenerDestination;

            UpdateUploaderMenuNames();

            UploadManager.UpdateProxySettings();
        }
Пример #4
0
 private void uploadFileToolStripMenuItem_Click(object sender, EventArgs e)
 {
     UploadManager.UploadFile();
 }
Пример #5
0
 private void tsbFileUpload_Click(object sender, EventArgs e)
 {
     UploadManager.UploadFile();
 }
Пример #6
0
 private void tsbClipboardUpload_Click(object sender, EventArgs e)
 {
     UploadManager.ClipboardUploadWithContentViewer();
 }
Пример #7
0
 private void MainForm_DragDrop(object sender, DragEventArgs e)
 {
     UploadManager.DragDropUpload(e.Data);
 }