示例#1
0
 public static void ShowHistory()
 {
     // Make sure the history is loaded, will be done only once
     ImgurUtils.LoadHistory();
     if (instance == null)
     {
         instance = new ImgurHistory();
     }
     instance.Show();
     instance.redraw();
 }
示例#2
0
        public SettingsForm(ImgurConfiguration config)
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();
            CancelButton = buttonCancel;
            AcceptButton = buttonOK;

            ImgurUtils.LoadHistory();

            historyButton.Enabled = config.runtimeImgurHistory.Count > 0;
        }
示例#3
0
 private void CheckHistory()
 {
     try {
         ImgurUtils.LoadHistory();
         _host.GreenshotForm.BeginInvoke((MethodInvoker) delegate {
             if (_config.ImgurUploadHistory.Count > 0)
             {
                 _historyMenuItem.Enabled = true;
             }
             else
             {
                 _historyMenuItem.Enabled = false;
             }
         });
     } catch (Exception ex) {
         Log.Error("Error loading history", ex);
     }
 }
示例#4
0
        public SettingsForm(ImgurConfiguration config) : base()
        {
            //
            // The InitializeComponent() call is required for Windows Forms designer support.
            //
            InitializeComponent();
            CancelButton = buttonCancel;
            AcceptButton = buttonOK;
            this.Icon    = GreenshotPlugin.Core.GreenshotResources.getGreenshotIcon();

            ImgurUtils.LoadHistory();

            if (config.runtimeImgurHistory.Count > 0)
            {
                historyButton.Enabled = true;
            }
            else
            {
                historyButton.Enabled = false;
            }
        }