Esempio n. 1
0
 public void showQRCode(int Index, Config config)
 {
     if (Index >= 0)
     {
         string url = ShareHandler.GetShareUrl(config, Index);
         if (Utils.IsNullOrEmpty(url))
         {
             picQRCode.Image = null;
             txtUrl.Text     = string.Empty;
             return;
         }
         txtUrl.Text     = url;
         picQRCode.Image = QRCodeHelper.GetQRCode(url);
     }
 }
Esempio n. 2
0
 public void showQRCode(VmessItem item)
 {
     if (item != null)
     {
         string url = ShareHandler.GetShareUrl(item);
         if (Utils.IsNullOrEmpty(url))
         {
             picQRCode.Image = null;
             txtUrl.Text     = string.Empty;
             return;
         }
         txtUrl.Text     = url;
         picQRCode.Image = QRCodeHelper.GetQRCode(url);
     }
 }
Esempio n. 3
0
        private void menuExport2SubContent_Click(object sender, EventArgs e)
        {
            GetLvSelectedIndex();

            StringBuilder sb = new StringBuilder();

            foreach (int v in lvSelecteds)
            {
                string url = ShareHandler.GetShareUrl(config, v);
                if (Utils.IsNullOrEmpty(url))
                {
                    continue;
                }
                sb.Append(url);
                sb.AppendLine();
            }
            if (sb.Length > 0)
            {
                Utils.SetClipboardData(Utils.Base64Encode(sb.ToString()));
                UI.Show(UIRes.I18N("BatchExportSubscriptionSuccessfully"));
            }
        }
Esempio n. 4
0
        private void menuExport2ShareUrl_Click(object sender, EventArgs e)
        {
            GetLvSelectedIndex();

            StringBuilder sb = new StringBuilder();

            foreach (var it in lstSelecteds)
            {
                string url = ShareHandler.GetShareUrl(it);
                if (Utils.IsNullOrEmpty(url))
                {
                    continue;
                }
                sb.Append(url);
                sb.AppendLine();
            }
            if (sb.Length > 0)
            {
                Utils.SetClipboardData(sb.ToString());
                AppendText(false, ResUI.BatchExportURLSuccessfully);
                //UI.Show(ResUI.BatchExportURLSuccessfully"));
            }
        }