Ejemplo n.º 1
0
        /// <summary>
        ///     拖动选择文件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <param name="obj"></param>
        private void u_DragDropFileto(object sender, EventArgs e, UrlReplace obj)
        {
            var p = ((Array)((DragEventArgs)e).Data.GetData(DataFormats.FileDrop)).GetValue(0).ToString();

            obj.LocalPath = p;
            UrlOperate.PushUrl(obj.ToUrlInfo());
            DataHistoryOperate.AddLog(obj.ToUrlInfo());
        }
Ejemplo n.º 2
0
 private void u_ClickReplaceEvent(object sender, EventArgs e, UrlReplace obj)
 {
     if (ofd_file.ShowDialog() == DialogResult.OK)
     {
         obj.LocalPath = ofd_file.FileName;
         UrlOperate.PushUrl(obj.ToUrlInfo());
         DataHistoryOperate.AddLog(obj.ToUrlInfo());
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 ///     启用离线加速
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btn_enablelx_Click(object sender, EventArgs e)
 {
     if (btn_enablelx.Text == _rm.GetString("enable"))
     {
         btn_replace.Enabled = false;
         tb_lx.ReadOnly      = false;
         btn_enablelx.Text   = _rm.GetString("disenable");
         IsLixian            = true;
         DataHistoryOperate.AddLog(ToUrlInfo());
     }
     else
     {
         btn_replace.Enabled = true;
         tb_lx.ReadOnly      = true;
         btn_enablelx.Text   = _rm.GetString("enable");
         IsLixian            = false;
         DataHistoryOperate.AddLog(ToUrlInfo());
     }
 }
Ejemplo n.º 4
0
 private void u_NameTextChanged(object sender, EventArgs e, UrlReplace obj)
 {
     DataHistoryOperate.AddLog(obj.ToUrlInfo());
 }
Ejemplo n.º 5
0
 private void u_EnableLixian(object sender, EventArgs e, UrlReplace obj)
 {
     DataHistoryOperate.AddLog(obj.ToUrlInfo());
     UrlOperate.PushLixianUrl(obj.PsnUrl, obj.LixianUrl);
 }