public void Start() { Settings settings = this.Settings; int? num; if (settings == null) { num = null; } else { FlashSettings flashSettings = settings.FlashSettings; num = ((flashSettings != null) ? new int?(flashSettings.mapID) : null); } int num2 = num ?? 1; if (this.Map.MapId != 0) { num2 = this.Map.MapId; } if (this.NextMapId != 0) { num2 = this.NextMapId; } if (num2 == 0) { num2 = 1; } this.Connection.Connect(num2, this.ProxySettings); }
public static void Enable(FlashSettings sets) { if (!IsConfigured) { SetupColorPort(sets.Port, sets.Speed); } EnDis(); }
public static void Flash(List <Controller> con, FlashSettings sets) { SetupPort(sets.Port, sets.Speed); double synLen = GetSyncLength(con, sets.IsSync); foreach (Controller c in con) { if (c.Frames.Count == 0) { Worker.ReportProgress(0, "Контроллер " + c.Number + ':' + c.Button + " не содержит фреймов и пропущен."); continue; } EnterModeProgramming(c.Number, c.Button); Logging.Log.Write("Включен режим программирования"); bool wErr = false; try { double frLen = 0; foreach (Frame f in c.Frames) { frLen += f.Length; if (!SendFrame(c.Number, f)) { wErr = true; } } if (frLen < synLen) { Frame fr = new Frame { BegColor = Colors.Black, EndColor = Colors.Black, Length = synLen - frLen }; SendFrame(c.Number, fr); } Logging.Log.Write("Фреймы отправлены"); } catch (Exception e) { Logging.Log.Write(e.Message); Logging.Log.Write(e.StackTrace); } finally { ExitModeProgramming(c.Number); Logging.Log.Write("Выключен режим программирования"); } if (wErr) { Worker.ReportProgress(0, "Контроллер " + c.Number + ':' + c.Button + " прошит с ошибками."); } } }
public GClass242 method_14() { FlashSettings flashSettings = this.Game.Settings.FlashSettings; GClass242 result = new GClass242(0, 0, "", "", 0) { int_1 = flashSettings.factionID, int_0 = flashSettings.pid, string_0 = flashSettings.sessionID.Trim(), int_2 = flashSettings.userID, string_1 = "8.3.2" }; if (!this.method_18()) { result = null; } return(result); }
public bool method_18() { bool result = true; FlashSettings flashSettings = this.Game.Settings.FlashSettings; DateTimeOffset licenseExpiration; GClass800.GEnum9 licenseState; if (!GClass800.smethod_0(flashSettings.pid, flashSettings.userID, this.Game.Dope.Key, out licenseExpiration, out licenseState, "basic")) { GClass93 socket = this.Socket; if (socket != null) { socket.Disconnect(ErrorReason.NoLicense, null, false); } result = false; } this.Game.LicenseExpiration = licenseExpiration; this.Game.LicenseState = licenseState; return(result); }
/// <summary> /// курс для преобразования xslt /// </summary> /// <param name="_data">провайдер данных для курса</param> /// <exception cref="ArgumentNullException"></exception> public CourseForXSLT(IDataService _data) { if (_data == null) { throw new ArgumentNullException(); } try { origCourse = _data.Course; Title = _data.GetTitle(); Items = new ObservableCollection <IItemModel>(_data.GetItems()); flashParam = new FlashSettings(600, 400); } catch (Exception ex) { throw new Exception(ex.Message); } }
/// <summary> /// конвертировать видео /// в формате swf /// </summary> /// <param name="_inputDir">исходная директория с файлами</param> private void ConvertSWF(string _inputDir) { if (string.IsNullOrEmpty(_inputDir)) { throw new ArgumentNullException("ConvertSWF(string _inputDir)"); } FlashSettings courseFl = convParams.FlashParam; FlashConvertSettings flset = new FlashConvertSettings(courseFl.WidthPx, courseFl.HeightPx, currTempDir); ConvertorSTH5 conv = new ConvertorSTH5(flset); conv.StepChange += conv_StepChange; videoRes = new SWFResourser(_inputDir); foreach (string swf in videoRes) { conv.SetInputSWF(swf); string outPath = System.IO.Path.GetDirectoryName(swf); conv.Convert(outPath); } }
private void method_6(GClass91 gclass91_0, ErrorReason errorReason_0, Exception exception_0) { GameManager game = this.Game; int? num; if (game == null) { num = null; } else { Settings settings = game.Settings; if (settings == null) { num = null; } else { FlashSettings flashSettings = settings.FlashSettings; num = ((flashSettings != null) ? new int?(flashSettings.userID) : null); } } int?num2 = num; IPErkavaBotController iperkavaBotController; if (!PErkava.smethod_0().TryGetValue(num2 ?? -1, out iperkavaBotController)) { return; } this.gameManager_0.Connection.Socket.method_5().method_1(new Action <GInterface0>(GClass82.smethod_3)); iperkavaBotController.DetachPErkava(); this.gclass84_0.method_1(null); try { this.bEyMqhdnuGd.method_8(); } catch { } }
/// <summary> /// утановить параметры флэш ролика /// </summary> /// <param name="_flSts">параметры флэш ролика</param> public void SetFlashParam(FlashSettings _flSts) { FlashParam = _flSts; }
internal async void method_8(byte[] byte_0, uint uint_0) { this.InjectedEncoder = byte_0; this.InjectedLen = uint_0; string hash = ""; using (MD5 md = MD5.Create()) { hash = new string(md.ComputeHash(byte_0).SelectMany(new Func <byte, IEnumerable <char> >(ConnectionManager.< > c.< > c_0.method_0)).ToArray <char>()); } try { ICoreDopeService service = this.Game.Dope.Service; TaskAwaiter <bool> taskAwaiter = ((service != null) ? service.IsDollKnown(hash) : null).GetAwaiter(); if (!taskAwaiter.IsCompleted) { await taskAwaiter; TaskAwaiter <bool> taskAwaiter2; taskAwaiter = taskAwaiter2; taskAwaiter2 = default(TaskAwaiter <bool>); } if (taskAwaiter.GetResult()) { byte_0 = null; } } catch { } try { ICoreDopeService service2 = this.Game.Dope.Service; object obj; if (service2 == null) { obj = null; } else { string checksum = hash; byte[] data = byte_0; string userId = this.Game.Settings.FlashSettings.userID.ToString(); FlashSettings flashSettings = this.Game.Settings.FlashSettings; obj = service2.GetDoll(checksum, data, userId, (flashSettings != null) ? flashSettings.pid : 0); } DollConfig dollConfig = await obj; if (dollConfig != null && dollConfig.DollId != 0) { if (dollConfig.DollId == -1) { this.Socket.Disconnect(ErrorReason.NoLicense, null, false); } else { this.Socket.method_5().method_4().vmethod_3(dollConfig, new Action(this.method_9)); } } else { this.Socket.Disconnect(ErrorReason.RemoteServiceFailure, null, false); } } catch (Exception ex) { this.Socket.Disconnect(ErrorReason.RemoteServiceFailure, ex, false); } }