Esempio n. 1
0
 private void UpdatePAC()
 {
     if (pacListHandle == null)
     {
         pacListHandle = new PACListHandle();
     }
     pacListHandle.UpdatePACFromGFWList(config);
 }
Esempio n. 2
0
 private void tsbCheckUpdatePACList_Click(object sender, EventArgs e)
 {
     if (pacListHandle == null)
     {
         pacListHandle = new PACListHandle();
         pacListHandle.UpdateCompleted += (sender2, args) =>
         {
             if (args.Success)
             {
                 v2rayHandler_ProcessEvent(false, "PAC更新成功!");
             }
             else
             {
                 v2rayHandler_ProcessEvent(false, "PAC更新失败!");
             }
         };
         pacListHandle.Error += (sender2, args) =>
         {
             v2rayHandler_ProcessEvent(true, args.GetException().Message);
         };
     }
     v2rayHandler_ProcessEvent(false, "开始更新PAC...");
     pacListHandle.UpdatePACFromGFWList(config);
 }
Esempio n. 3
0
 private void tsbCheckUpdatePACList_Click(object sender, EventArgs e)
 {
     if (pacListHandle == null)
     {
         pacListHandle = new PACListHandle();
         pacListHandle.UpdateCompleted += (sender2, args) =>
         {
             if (args.Success)
             {
                 AppendText(false, UIRes.I18N("MsgPACUpdateSuccessfully"));
             }
             else
             {
                 AppendText(false, UIRes.I18N("MsgPACUpdateFailed"));
             }
         };
         pacListHandle.Error += (sender2, args) =>
         {
             AppendText(true, args.GetException().Message);
         };
     }
     AppendText(false, UIRes.I18N("MsgStartUpdatingPAC"));
     pacListHandle.UpdatePACFromGFWList(config);
 }
Esempio n. 4
0
 private void menuUpdatePACList_Click(object sender, EventArgs e)
 {
     pacListHandle.UpdatePACFromGFWList(config);
 }