|
@@ -35,6 +35,10 @@ namespace XHZB.Desktop
|
35
|
35
|
/// </summary>
|
36
|
36
|
public static string AESPassWordStr = null;
|
37
|
37
|
/// <summary>
|
|
38
|
+ /// 课堂节次
|
|
39
|
+ /// </summary>
|
|
40
|
+ public static string ClassroomAdd = null;
|
|
41
|
+ /// <summary>
|
38
|
42
|
/// 接口地址
|
39
|
43
|
/// </summary>
|
40
|
44
|
public static string apiUrl = isDebug ? "http://schoolapitest.xhkjedu.com" : FileToolsCommon.GetConfigValue("APIRequestAddress");
|
|
@@ -269,15 +273,39 @@ namespace XHZB.Desktop
|
269
|
273
|
StopSameProcess();
|
270
|
274
|
Killffmpeg();
|
271
|
275
|
UnZipFFmpeg();
|
|
276
|
+ //注册
|
|
277
|
+ WriteRegistry();
|
272
|
278
|
try
|
273
|
279
|
{
|
274
|
|
- if (args != null&&args.Length>0)
|
|
280
|
+ if (args != null && args.Length > 0)
|
275
|
281
|
{
|
276
|
|
- AESAccountStr = args[0];
|
277
|
|
- AESPassWordStr = args[1];
|
|
282
|
+ string Str = args[0];
|
|
283
|
+ List<string> StrArg = new List<string>(Str.Substring(0, Str.Length - 1).Replace("xhzb://", "").Split('&'));
|
|
284
|
+ //AESAccountStr = args[0];
|
|
285
|
+ //AESPassWordStr = args[1];
|
|
286
|
+ LogHelper.WriteInfoLog(Str);
|
|
287
|
+ foreach (string str in StrArg)
|
|
288
|
+ {
|
|
289
|
+ if (str.Contains("account"))
|
|
290
|
+ {
|
|
291
|
+ AESAccountStr = str.Substring(str.LastIndexOf("=") + 1);
|
|
292
|
+ //string Account= AESHelper.AESDecrypt(AESAccountStr);
|
|
293
|
+ LogHelper.WriteInfoLog("账号=" + AESAccountStr);
|
|
294
|
+
|
|
295
|
+ }
|
|
296
|
+ if (str.Contains("password"))
|
|
297
|
+ {
|
|
298
|
+ AESPassWordStr = str.Substring(str.LastIndexOf("=") + 1);
|
|
299
|
+ //string PassWord = AESHelper.AESDecrypt(AESPassWordStr);
|
|
300
|
+ LogHelper.WriteInfoLog("密码=" + AESPassWordStr);
|
|
301
|
+ }
|
|
302
|
+ if (str.Contains("rid"))
|
|
303
|
+ {
|
|
304
|
+ ClassroomAdd = str.Substring(str.LastIndexOf("=") + 1);
|
|
305
|
+ LogHelper.WriteInfoLog("课堂=" + ClassroomAdd);
|
|
306
|
+ }
|
|
307
|
+ }
|
278
|
308
|
////解密
|
279
|
|
- //string Account= AESHelper.AESDecrypt(AESAccountStr);
|
280
|
|
- //string PassWord = AESHelper.AESDecrypt(AESPassWordStr);
|
281
|
309
|
}
|
282
|
310
|
}
|
283
|
311
|
catch (Exception ex)
|
|
@@ -637,19 +665,19 @@ namespace XHZB.Desktop
|
637
|
665
|
|
638
|
666
|
public static void WriteRegistry()
|
639
|
667
|
{
|
640
|
|
- if(IsSubKeyExist())
|
|
668
|
+ if (IsSubKeyExist())
|
641
|
669
|
{
|
642
|
670
|
//存在时对比位置
|
643
|
671
|
string regStr = ReadRegeditKey();
|
644
|
672
|
string pathStr = FileToolsCommon.GetFileAbsolutePath("/星火直播.exe").Replace("/","\\\\");
|
645
|
673
|
if(regStr!= pathStr)
|
646
|
674
|
{
|
647
|
|
-
|
|
675
|
+ CreateRegeditKey();
|
648
|
676
|
}
|
649
|
677
|
}
|
650
|
678
|
else
|
651
|
679
|
{
|
652
|
|
-
|
|
680
|
+ CreateRegeditKey();
|
653
|
681
|
}
|
654
|
682
|
}
|
655
|
683
|
/// <summary>
|
|
@@ -679,18 +707,17 @@ namespace XHZB.Desktop
|
679
|
707
|
{
|
680
|
708
|
reg.CreateSubKey();
|
681
|
709
|
string pathStr = FileToolsCommon.GetFileAbsolutePath("/星火直播.exe").Replace("/", "\\\\");
|
682
|
|
- reg.WriteRegeditKey("@","星火直播");
|
|
710
|
+ reg.WriteRegeditKey("星火直播");
|
683
|
711
|
reg.WriteRegeditKey("URL Protocol", pathStr);
|
684
|
712
|
|
685
|
|
-
|
686
|
713
|
RegistryHelper reg1 = new RegistryHelper("XHZB\\DefaultIcon\\", RegDomain.ClassesRoot);
|
687
|
714
|
reg1.CreateSubKey();
|
688
|
|
- reg1.WriteRegeditKey("@", pathStr+",1");
|
|
715
|
+ reg1.WriteRegeditKey(pathStr +",1");
|
689
|
716
|
//reg1.CreateSubKey("XHZB\\DefaultIcon\\");
|
690
|
717
|
|
691
|
718
|
RegistryHelper reg2 = new RegistryHelper("XHZB\\shell\\open\\command\\", RegDomain.ClassesRoot);
|
692
|
719
|
reg2.CreateSubKey();
|
693
|
|
- reg2.WriteRegeditKey("@", "\""+pathStr + "\"\"%1\"");
|
|
720
|
+ reg2.WriteRegeditKey("\"" +pathStr + "\"\"%1\"");
|
694
|
721
|
//reg.CreateSubKey("XHZB\\shell\\open\\command\\");
|
695
|
722
|
|
696
|
723
|
//[HKEY_CLASSES_ROOT\XHZB]
|