Beispiel #1
0
        public FrmSpotifyAPICredentials(Analytics analytics)
        {
            InitializeComponent();

            _analytics = analytics;

            _pastSpotifyAPIClientId    = Settings.Default.app_spotify_api_client_id?.Trim();
            _pastSpotifyAPISecretId    = Settings.Default.app_spotify_api_client_secret?.Trim();
            _pastSpotifyAPIRedirectURL = Settings.Default.app_spotify_api_redirect_url?.Trim();

            if (string.IsNullOrEmpty(_pastSpotifyAPIRedirectURL))
            {
                _pastSpotifyAPIRedirectURL = API.SpotifyAPI.SPOTIFY_API_DEFAULT_REDIRECT_URL;
            }

            txtClientId.Text    = _pastSpotifyAPIClientId;
            txtSecretId.Text    = _pastSpotifyAPISecretId;
            txtRedirectURL.Text = _pastSpotifyAPIRedirectURL;

            Text = FrmEspionSpotify.Instance.Rm.GetString(I18NKeys.TitleSpotifyAPICredentials);

            lblClientId.Text    = FrmEspionSpotify.Instance.Rm.GetString(I18NKeys.LblClientId);
            lblSecretId.Text    = FrmEspionSpotify.Instance.Rm.GetString(I18NKeys.LblSecretId);
            lblRedirectURL.Text = FrmEspionSpotify.Instance.Rm.GetString(I18NKeys.LblRedirectURL);

            txtClientId.WaterMark    = FrmEspionSpotify.Instance.Rm.GetString(I18NKeys.WatermarkClientId);
            txtSecretId.WaterMark    = FrmEspionSpotify.Instance.Rm.GetString(I18NKeys.WatermarkSecretId);
            txtRedirectURL.WaterMark = FrmEspionSpotify.Instance.Rm.GetString(I18NKeys.WatermarkRedirectURL);

            tip.SetToolTip(lnkFAQSpotifyAPI, FrmEspionSpotify.Instance.Rm.GetString(I18NKeys.TipFAQSpotifyAPI));
            tip.SetToolTip(lnkSpotifyAPIDashboard,
                           FrmEspionSpotify.Instance.Rm.GetString(I18NKeys.TipSpotifyAPIDashboard));
        }
Beispiel #2
0
        public ItemCreator(ListView listView, bool editMode)
        {
            this.listView = listView;
            this.editMode = editMode;
            InitializeComponent();

            addItemBtn.Text = "Add Item to Invoice";

            if (editMode)
            {
                const int ITEM_CODE  = 0;
                const int DESC       = 1;
                const int UNIT_PRICE = 2;
                const int QTY        = 3;
                itemCodeTB.Text    = this.listView.SelectedItems[0].SubItems[ITEM_CODE].Text;
                unitPriceTB.Text   = this.listView.SelectedItems[0].SubItems[UNIT_PRICE].Text;
                qtyTB.Text         = this.listView.SelectedItems[0].SubItems[QTY].Text;
                descriptionTB.Text = this.listView.SelectedItems[0].SubItems[DESC].Text;
                addItemBtn.Text    = "Update Item";
            }

            MetroToolTip unitPriceGSTToolTip = new MetroToolTip();

            unitPriceGSTToolTip.Active       = true;
            unitPriceGSTToolTip.AutoPopDelay = 4000;
            unitPriceGSTToolTip.InitialDelay = 600;
            unitPriceGSTToolTip.IsBalloon    = true;
            unitPriceGSTToolTip.ToolTipIcon  = ToolTipIcon.Info;
            unitPriceGSTToolTip.SetToolTip(unitPriceIncludesGSTLabel, "Leave this Checkbox unchecked to have Moneybags\r\nautomatically add GST to your Unit Price");
        }
Beispiel #3
0
        private void label_Hover(object sender, EventArgs e)
        {
            var labelSender = (MetroLabel)sender;
            var origSize    = labelSender.Width;

            labelSender.AutoSize = true;
            var newSize = labelSender.Width;

            labelSender.AutoSize = false;

            if (newSize >= origSize)
            {
                _hintToolTip.SetToolTip(labelSender, labelSender.Text);
            }
        }
        private void SetDynamicTooltip(Control control, string caption)
        {
            MetroToolTip toolTip = new MetroToolTip();

            toolTip.SetToolTip(control, caption);
        }
Beispiel #5
0
 /// <summary>
 /// Value changed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected virtual void SettingValue_ValueChanged(object sender, EventArgs e)
 {
     MetroToolTip.SetToolTip(SettingValue, SettingValue.Value.ToString());
 }
Beispiel #6
0
 private void ThreadWallpaper_ProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     //throw new NotImplementedException();
     toolTip.SetToolTip(ThreadWallpaperChangePictureBox, "Wallpaper Change: " + _wsLib.ReportTimeLeft(threadWallpaperCounter));
 }
Beispiel #7
0
 /// <summary>
 /// Value Changed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected override void SettingValue_ValueChanged(object sender, EventArgs e)
 {
     Application.DoEvents();
     MetroToolTip.SetToolTip(SettingValue, GetToolTip());
 }