Esempio n. 1
0
 public virtual void SetContext(InstallContext context, IWatch watch, string name = null, params string[] args)
 {
     this.InstallContext = context;
     this.Watch          = watch;
     this.Name           = name;
     this.initArgs       = args;
 }
Esempio n. 2
0
 public override void Load(IController hud)
 {
     base.Load(hud);
     _watch = Hud.Time.CreateWatch();
     maxX   = Hud.Window.Size.Width;
     maxY   = Hud.Window.Size.Height;
 }
        public override void Load(IController hud)
        {
            base.Load(hud);

            GoblinPack = SoundAlertFactory.Create <IMonster>((monster) => "goblin pack");

            DefaultGoblin         = SoundAlertFactory.Create <IMonster>((monster) => monster.SnoMonster.NameLocalized);
            MalevolentTormentor   = SoundAlertFactory.Create <IMonster>((monster) => monster.SnoMonster.NameLocalized);
            BloodThief            = SoundAlertFactory.Create <IMonster>((monster) => monster.SnoMonster.NameLocalized);
            OdiousCollector       = SoundAlertFactory.Create <IMonster>((monster) => monster.SnoMonster.NameLocalized);
            GemHoarder            = SoundAlertFactory.Create <IMonster>((monster) => monster.SnoMonster.NameLocalized);
            Gelatinous            = SoundAlertFactory.Create <IMonster>((monster) => monster.SnoMonster.NameLocalized);
            GildedBaron           = SoundAlertFactory.Create <IMonster>((monster) => monster.SnoMonster.NameLocalized);
            InsufferableMiscreant = SoundAlertFactory.Create <IMonster>((monster) => monster.SnoMonster.NameLocalized);
            RainbowGoblin         = SoundAlertFactory.Create <IMonster>((monster) => monster.SnoMonster.NameLocalized);
            MenageristGoblin      = SoundAlertFactory.Create <IMonster>((monster) => monster.SnoMonster.NameLocalized);
            TreasureFiendGoblin   = SoundAlertFactory.Create <IMonster>((monster) => monster.SnoMonster.NameLocalized);

            SnoMapping.Add(413289, MalevolentTormentor);
            SnoMapping.Add(408989, BloodThief);
            SnoMapping.Add(5985, OdiousCollector);
            SnoMapping.Add(5987, GemHoarder);
            SnoMapping.Add(408354, Gelatinous); // Gelatinous Sire
            //SnoMapping.Add(410572, Gelatinous); // Gelatinous Spawn
            //SnoMapping.Add(410574, Gelatinous); // Gelatinous Spawn
            SnoMapping.Add(429161, GildedBaron);
            SnoMapping.Add(408655, InsufferableMiscreant);
            SnoMapping.Add(450993, MenageristGoblin);
            SnoMapping.Add(405186, RainbowGoblin);
            SnoMapping.Add(380657, TreasureFiendGoblin);

            lastPack = Hud.Time.CreateWatch();
        }
Esempio n. 4
0
        public SkillPainter(IController hud, bool setDefaultStyle)
        {
            Enabled = true;
            Hud     = hud;

            _lastTownEliteSimulation = Hud.CreateWatch();

            if (setDefaultStyle)
            {
                CooldownFont    = Hud.Render.CreateFont("arial", 14, 255, 255, 255, 255, true, false, 255, 0, 0, 0, true);
                SkillDamageFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 200, 100, false, false, 160, 0, 0, 0, true);
                SkillDpsFont    = Hud.Render.CreateFont("tahoma", 7, 255, 255, 255, 255, false, false, 160, 0, 0, 0, true);
                SkillDpsBackgroundBrushesByElementalType = new IBrush[]
                {
                    Hud.Render.CreateBrush(200, 255, 6, 0, 0),
                    Hud.Render.CreateBrush(200, 183, 57, 7, 0),
                    Hud.Render.CreateBrush(200, 0, 38, 119, 0),
                    Hud.Render.CreateBrush(200, 77, 102, 155, 0),
                    Hud.Render.CreateBrush(200, 50, 106, 21, 0),
                    Hud.Render.CreateBrush(200, 138, 0, 94, 0),
                    Hud.Render.CreateBrush(200, 190, 117, 0, 0),
                };
                DamageBonusFont      = Hud.Render.CreateFont("tahoma", 7, 255, 200, 200, 200, false, false, 160, 0, 0, 0, true);
                DamageBonusEliteFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 160, 160, false, false, 160, 0, 0, 0, true);
            }
        }
Esempio n. 5
0
        static void Main(string[] args)
        {
            IWatchMaker maker = new DigitalWatchMaker();
            IWatch      watch = maker.CreateWatch();

            watch.ShowTime();
        }
        public bool RemovePage(string wiki, string page)
        {
            page = page.Replace("_", " ");
            IWatch currpage = null;

            lock (MonitoredPages)
            {
                foreach (IWatch iw in MonitoredPages)
                {
                    if (iw.Page == page && wiki == iw.Site)
                    {
                        currpage = iw;
                        break;
                    }
                }
                if (MonitoredPages.Contains(currpage))
                {
                    MonitoredPages.Remove(currpage);
                    Module.SetConfig(channel, "HTML.Update", true);
                    Save();
                    IRC.DeliverMessage(messages.Localize("rcfeed4", channel.Language), channel);
                    return(true);
                }
            }
            IRC.DeliverMessage(messages.Localize("rcfeed5", channel.Language), channel);
            return(true);
        }
Esempio n. 7
0
 public NetworkVideoHandler(IWatch watchPageHandler, State::IMessageHandler messageHandler, ILocalSettingHandler settingHandler, IVideoInfoContainer videoInfoContainer)
 {
     this._wacthPagehandler   = watchPageHandler;
     this._messageHandler     = messageHandler;
     this._settingHandler     = settingHandler;
     this._videoInfoContainer = videoInfoContainer;
 }
Esempio n. 8
0
 public InstallProcess(InstallContext context, IWatch process, IWin32Window owner = null)
 {
     this.context = context;
     this.process = process;
     this.owner   = owner;
     this.process?.SetStep("正在准备安装");
     this.process?.Info("正在准备安装");
 }
Esempio n. 9
0
        public override void Load(IController hud)
        {
            base.Load(hud);

            _lastNewGame        = Hud.Time.CreateWatch();
            _lastLevelUp        = Hud.Time.CreateWatch();
            _lastLevelUpLimiter = Hud.Time.CreateWatch();
        }
Esempio n. 10
0
 public bool TryCreateWatch(string path, RangeInt cursor, out IWatch watch)
 {
     if (WatchContext.TryParseDeepest(this, path, ref cursor, out var ctrxResult))
     {
         return(ctrxResult.TryCreateWatch(out watch));
     }
     watch = null;
     return(false);
 }
Esempio n. 11
0
        public void BeforeRender()
        {
            if (!Enabled)
            {
                return;
            }
            if (!Hud.Game.IsInGame)
            {
                return;
            }

            var captureOn = Hud.Render.ParagonLevelUpSplashTextUiElement.Visible &&
                            !string.IsNullOrEmpty(Hud.MyBattleTag) &&
                            _lastNewGame.TimerTest(10 * 1000);

            if (!captureOn)
            {
                if (StopRenderingWhenCapturing && !Hud.Render.IsRenderEnabled)
                {
                    // turn back
                    Hud.Render.IsRenderEnabled = true;
                }

                return;
            }

            if (StopRenderingWhenCapturing && Hud.Render.IsRenderEnabled)
            {
                // turn off and wait a cycle before first capture so HUD can disappear properly
                Hud.Render.IsRenderEnabled = false;
                return;
            }

            var paragonLevel = Hud.Game.Me.CurrentLevelParagon;

            if (_lastLevelUp.TimerTest(120 * 1000))
            {
                _lastLevelUp.Restart();
                _lastLevelUpDelay = null;
                _lastLevelUpLimiter.Restart();

                Hud.TextLog.Log("levelup_paragon_" + Hud.MyBattleTag, paragonLevel.ToString("D", CultureInfo.InvariantCulture));
            }

            if ((_lastLevelUpDelay?.TimerTest(DelayBetweenFrames) != false) && !_lastLevelUpLimiter.TimerTest(8 * 1000))
            {
                (_lastLevelUpDelay ?? (_lastLevelUpDelay = Hud.Time.CreateWatch())).Restart();
                try
                {
                    var fileName = Hud.MyBattleTag + "_" + Hud.Game.Me.HeroId.ToString("D", CultureInfo.InvariantCulture) + "_" + Hud.Game.Me.HeroName + "_" + Hud.Time.Now.ToString("yyyyMMddHHmmssfff", CultureInfo.InvariantCulture) + "_" + paragonLevel.ToString("D", CultureInfo.InvariantCulture) + ".jpg";
                    Hud.Render.CaptureScreenToFile(SubFolderName, fileName);
                }
                catch (Exception)
                {
                }
            }
        }
Esempio n. 12
0
 public Monitor(bool enabled)
 {
     Enabled      = enabled;
     monitorWatch = new Stopwatch();
     if (enabled)
     {
         monitorWatch.Start();
     }
     Current = CreateWatch(null, null);
 }
Esempio n. 13
0
        // Sends all outstanding updates to the watch, and reset the update Dictionary
        private void FlushMessages()
        {
            var updates = watchUpdates;

            watchUpdates = new Dictionary <WatchMessage, object>();

            IWatch watchService = DependencyService.Get <IWatch>();

            watchService.SendWatchMessages(updates);
        }
Esempio n. 14
0
        private void ResetTownWatch(int playerIndex)
        {
            // reset states if needed
            IWatch watch = TownWatch[playerIndex];

            if (watch.IsRunning || watch.ElapsedMilliseconds > 0)
            {
                watch.Reset();
            }
        }
        public async Task DisconnectAndPop()
        {
            await App.Current.OWBLE.Disconnect();

            await Navigation.PopModalAsync();

            IWatch watchService = DependencyService.Get <IWatch>();

            watchService.StopListeningForWatchMessages();
        }
        public override void Load(IController hud)
        {
            base.Load(hud);
            MalusTimeFont = Hud.Render.CreateFont("tahoma", 7, 255, 250, 100, 100, true, false, 160, 0, 0, 0, true);
            BonusTimeFont = Hud.Render.CreateFont("tahoma", 7, 255, 128, 255, 0, true, false, 160, 0, 0, 0, true);

            MinutesSecondsFormat = "{0:%m}m {0:ss}s";

            pauseTimer = Hud.Time.CreateWatch();     //solo
        }
Esempio n. 17
0
 public IAccessor Create(IWatch w, IAccessor a)
 {
     if (a is IAccessor <TValue> av)
     {
         return(new DefaultStringAccessor <TValue>(av));
     }
     else
     {
         throw new InvalidOperationException();
     }
 }
 public void Execute(object command, IWatch executor)
 {
     try
     {
        executor.Intialize(command);
     }
     finally
     {
         _container.Release(executor);
     }
 }
Esempio n. 19
0
 public FrmDetails(SqlAdoExecutor.SqlHelper sqlHelper, ScriptFiles files, string rootPath, string storePath, IWatch watch, Stack <string> newDirs, IDictionary <ScriptType, List <string> > newObjs) : this()
 {
     this.sqlHelper = sqlHelper;
     this.files     = files;
     this.rootPath  = rootPath;
     this.needStore = !string.IsNullOrEmpty(storePath);
     this.storePath = storePath;
     this.watch     = watch;
     this.newDirs   = newDirs;
     this.newObjs   = newObjs;
     this.SetDetails();
 }
Esempio n. 20
0
            bool TryCreateWatch(out IWatch watch)
            {
                var pathRange = Path.Range();

                if (WatchContext.TryParseDeepest(Context, Path, ref pathRange, out var lastCtx))
                {
                    return(lastCtx.TryCreateWatch(out watch));
                }
                watch = default;
                return(false);
                //return WatchContext.TryCreateWatch(Context, Path, Path.Range(), out watch);
            }
            public Float4x4Visualizer(IWatch w, IAccessor <float4x4> a)
            {
                Watch    = w;
                Accessor = a;

                var prefab = Resources.Load("DebugWatchFloat4x4Gizmo") as GameObject;

                VisGo.GameObject      = GameObject.Instantiate(prefab, Vector3.zero, Quaternion.identity);
                VisGo.GameObject.name = $"Gizmo {w.GetName()} {w.GetContextName()}";
                gizmo          = VisGo.GameObject.GetComponent <InternalDetails.DebugWatchFloat4x4Gizmo>();
                gizmo.Accessor = a;
                gizmo.Refresh();
            }
Esempio n. 22
0
        public void Init(PatchContext context, IWatch watch)
        {
            this.Watch            = watch;
            this.needStore        = context.IsNeedStore;
            this.files            = context.Files;
            this.scriptPath       = context.Path;
            this.connectionString = context.ConnectionString;
            this.isShowDetails    = context.ShowDetails;

            this.CanRun        = InternalInit();;
            this.CanRollback   = this.CanRun;
            this.CommandStatus = CommandStatus.Inited;
        }
Esempio n. 23
0
        public override void Load(IController hud)
        {
            base.Load(hud);
            _watch = Hud.Time.CreateWatch();
            maxX   = Hud.Window.Size.Width;
            maxY   = Hud.Window.Size.Height;

            NextHeroDecorator = new TopLabelDecorator(Hud)
            {
                TextFont = Hud.Render.CreateFont("Microsoft Sans Serif", 9, 225, 255, 255, 255, false, false, 100, 0, 0, 0, true),
                TextFunc = () => NextHeroText,
            };
        }
Esempio n. 24
0
        public GLQ_SkillBarPainter(IController hud, bool setDefaultStyle)
        {
            Enabled = true;
            Hud     = hud;

            _lastTownEliteSimulation = Hud.CreateWatch();

            if (setDefaultStyle)
            {
                CooldownFont       = Hud.Render.CreateFont("arial", 14, 255, 255, 255, 255, true, false, 255, 0, 0, 0, true);
                TimeLeftClockBrush = Hud.Render.CreateBrush(220, 0, 0, 0, 0);
            }
        }
Esempio n. 25
0
 public ClientImpl(ClientBuilder clientBuilder)
 {
     // Copy the builder so external modifications won't affect this client impl.
     this.builder           = clientBuilder.Copy();
     this.kvClient          = null;
     this.authClient        = null;
     this.maintenanceClient = null;
     this.clusterClient     = null;
     this.leaseClient       = null;
     this.watchClient       = null;
     this.lockClient        = null;
     this.connectionManager = new ClientConnectionManager(this.builder);
 }
Esempio n. 26
0
 private IWatch CreateWatch(object?caller, string?info)
 {
     if (Enabled)
     {
         var watch = new MonitoringWatch(this, caller, info, Current);
         watches.Add(watch);
         return(Current = watch);
     }
     else
     {
         return(Current = discard);
     }
 }
Esempio n. 27
0
        public bool insertString(string WS, string Page)
        {
            wiki site = getWiki(WS);

            Page = Page.Replace("_", " ");
            if (site != null)
            {
                if (WS == "all" || channels.Contains(site.channel))
                {
                    IWatch currpage = null;
                    lock (pages)
                    {
                        foreach (IWatch iw in pages)
                        {
                            if (iw.Channel == site.channel && iw.Page == Page)
                            {
                                currpage = iw;
                                break;
                            }
                        }
                    }
                    if (Page.Contains("*"))
                    {
                        if (!Page.EndsWith("*") || Page.Replace("*", "") == "")
                        {
                            core.irc._SlowQueue.DeliverMessage(messages.get("rcfeed8", channel.Language), channel.Name);
                            return(true);
                        }
                    }
                    if (pages.Contains(currpage))
                    {
                        core.irc._SlowQueue.DeliverMessage(messages.get("rcfeed9", channel.Language),
                                                           channel.Name);
                        return(true);
                    }
                    lock (pages)
                    {
                        pages.Add(new IWatch(site, Page, site.channel));
                    }
                    core.irc._SlowQueue.DeliverMessage(messages.get("rcfeed10", channel.Language), channel.Name);
                    Module.SetConfig(channel, "HTML.Update", true);
                    Save();
                    return(true);
                }
                core.irc._SlowQueue.DeliverMessage(messages.get("rcfeed11", channel.Language), channel.Name);
                return(false);
            }
            core.irc._SlowQueue.DeliverMessage(messages.get("rcfeed12", channel.Language), channel.Name);
            return(false);
        }
Esempio n. 28
0
        public override void Load(IController hud)
        {
            base.Load(hud);
            //Turn labels on and off
            ShowIgnorePain = false;
            //ShowOculus = true;



            //Horizontal and Vertical label positions.
            YPos = 0.65f;
            XPos = 0.5f;

            SizeModifier = 1f;
            TextSize     = 8;
            JumpDistance = 1.07f;
            NumRows      = 1;

            //Label size is based on a percentage of screen width/height
            _labelWidthPercentage  = 0.040f;
            _labelHeightPercentage = 0.018f;

            //Vertical distance between labels
            YPosIncrement = 0.021f;

            //If true labels are always shown
            Debug          = false;
            SmoothMovement = true;
            SmoothSpeed    = 0.05f;
            debugWatch     = Hud.Time.CreateWatch();
            debugWatch.Restart();

            BorderBrush = Hud.Render.CreateBrush(150, 30, 30, 30, 0);

            //BackgroundBrushIP = Hud.Render.CreateBrush(100, 100, 225, 100, 0);   // Ignore Pain


            Labels = new List <Label>();

            //Labels.Add(new Label("神目指环", 402461, 2, BackgroundBrushOC, ShowOculus));


            _jumpCount = 1;
            _yPosTemp  = YPos;
            _xPosTemp  = XPos;
            if (NumRows < 1)
            {
                NumRows = 1;
            }
        }
            public Float4x4Visualizer(IWatch w, IAccessor <float4x4> a)
            {
                Watch    = w;
                Accessor = a;
                var prefab = Resources.Load("DebugWatchVisualizer") as GameObject;

                VisGo.GameObject      = GameObject.Instantiate(prefab, Vector3.zero, Quaternion.identity);
                VisGo.GameObject.name = $"Plot {w.GetName()} {w.GetContextName()}";
                VisGo.Hide();
                visualizer          = VisGo.GameObject.GetComponent <InternalDetails.DebugWatchFloat4x4>();
                visualizer.Accessor = a;
                visualizer.Scale    = Scale;
                AddCurrentValue();
                visualizer.Refresh();
            }
Esempio n. 30
0
        public override void Load(IController hud)
        {
            base.Load(hud);
            _Timer = Hud.Time.CreateWatch();
            _Timer.Start();
            WhichStat = 0;

            CurrentStatDecorator = new TopLabelDecorator(Hud)
            {
                BackgroundBrush = Hud.Render.CreateBrush(0, 255, 234, 137, 30),
                TextFont        = Hud.Render.CreateFont("Segoe UI Light", 9, 255, 255, 234, 137, false, false, true),

                TextFunc = () => CurrentStats,
            };
        }
Esempio n. 31
0
 public override void Load(IController hud)
 {
     base.Load(hud);
     TotalTimerFont = Hud.Render.CreateFont("tahoma", 7.5f, 230, 0, 255, 255, true, false, true);
     A1TimerFont    = Hud.Render.CreateFont("tahoma", 7.5f, 230, 128, 64, 64, true, false, true);
     A2TimerFont    = Hud.Render.CreateFont("tahoma", 7.5f, 230, 255, 128, 64, true, false, true);
     A3TimerFont    = Hud.Render.CreateFont("tahoma", 7.5f, 230, 128, 128, 192, true, false, true);
     A4TimerFont    = Hud.Render.CreateFont("tahoma", 7.5f, 230, 0, 128, 192, true, false, true);
     A5TimerFont    = Hud.Render.CreateFont("tahoma", 7.5f, 230, 170, 215, 255, true, false, true);
     TotalTimeWatch = Hud.Time.CreateWatch();
     A1TimeWatch    = Hud.Time.CreateWatch();
     A2TimeWatch    = Hud.Time.CreateWatch();
     A3TimeWatch    = Hud.Time.CreateWatch();
     A4TimeWatch    = Hud.Time.CreateWatch();
     A5TimeWatch    = Hud.Time.CreateWatch();
 }
 public DirectoryWatcherIndentifier(IWatch<FileInformationDto> watcher)
 {
     Watcher = watcher;
 }
Esempio n. 33
0
 public static string GetTimeDisplay(IWatch w)
 {
     return w.GetMilitaryTimeDisplay();
 }