Exemple #1
0
        private void Btn_autoRefresh_Click(object sender, EventArgs e)
        {
            if (AutoRefresh.Enabled == true)
            {
                //Disable autorefresh
                AutoRefresh.Stop();

                btn_autoRefresh.BackColor = Color.Red;

                //Reset default values
                ProgHelpers.qpositions.Clear();
                ProgHelpers.qtimes.Clear();
                ProgHelpers.errorCount       = 0;
                ProgHelpers.sentErrors       = 0;
                ProgHelpers.startingTime     = DateTime.Now;
                ProgHelpers.startingMsgsent  = false;
                ProgHelpers.startingPosition = 99999;
                ProgHelpers.pushTime         = new DateTime(2005, 7, 15, 3, 15, 0); //Defaulttime, way back :)...
                ProgHelpers.etaString        = "";
                txt_currPosi.Text            = "Position / Starting position / Elapsed time";
                txt_speed.Text    = "Speed";
                txt_etrlabel.Text = "ETR";

                //Reset ETACalc
                ProgHelpers.etaCalc.Reset();



                txt_loglabel.Text = (DateTime.Now.ToLongTimeString() + " Automatic refreshing OFF.");
            }
            else
            {
                //Set Starting time
                ProgHelpers.startingTime = DateTime.Now;

                //Enable autorefresh
                AutoRefresh.Start();

                btn_autoRefresh.BackColor = Color.Green;

                //Write to console
                txt_loglabel.Text = (DateTime.Now.ToLongTimeString() + " Automatic refreshing ON.");
            }
        }
Exemple #2
0
        private void Zer0UI_Load(object sender, EventArgs e)
        {
            //Timers Start
            TogglerLabel.Text  = Properties.Settings.Default.AutoInjToggler;
            TogglerLabel2.Text = Properties.Settings.Default.TopMostToggler;
            // Start of AutoInjection Toggle
            if (TogglerLabel.Text == "rodfpq")
            {
                AutoInjection.Start();
                AutoInjectToggler.Checked = true;
            }
            else
            {
                AutoInjection.Stop();
                AutoInjectToggler.Checked = false;
            }
            // End of AutoInjection Toggle
            // Start of TopMost Toggle
            if (TogglerLabel2.Text == "wrjiow")
            {
                TopMost = true;
                TopMostToggler.Checked = true;
            }
            else
            {
                TopMost = false;
                TopMostToggler.Checked = false;
            }
            // End of TopMost Toggle
            CheckForUpdates();
            Zer0CheckForUpdates();
            Zer0AutoRefresh.Start();
            AutoRefresh.Start();
            //Timers End
            //Bleu TextBox
            string Bleustr  = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
            string Bleustr2 = "0123456789";
            string Bleustr3 = "ŠšŒœŸÿÀàÁáÂâÃãÄäÅåÆæÇçÈèÉéÊêËëÌìÍíÎîÏïÐðÑñÒòÓóÔôÕõÖØøÙùÚúÛûÜüÝýÞþßö";

            this.BleuTextBox.StyleResetDefault();
            this.BleuTextBox.Styles[32].Font = "Consolas";
            this.BleuTextBox.Styles[32].Size = 10;
            this.BleuTextBox.StyleClearAll();
            this.BleuTextBox.Styles[0].ForeColor  = Color.Silver;
            this.BleuTextBox.Styles[1].ForeColor  = Color.FromArgb(0, 0, 127, 0);
            this.BleuTextBox.Styles[2].ForeColor  = Color.FromArgb(0, 0, 127, 0);
            this.BleuTextBox.Styles[4].ForeColor  = Color.FromArgb(0, 0, 127, 127);
            this.BleuTextBox.Styles[5].ForeColor  = Color.FromArgb(0, 0, 0, 127);
            this.BleuTextBox.Styles[13].ForeColor = Color.FromArgb(0, 255, 128, 0);
            this.BleuTextBox.Styles[14].ForeColor = Color.FromArgb(0, 255, 0, 0);
            this.BleuTextBox.Styles[15].ForeColor = Color.DarkSlateBlue;
            this.BleuTextBox.Styles[6].ForeColor  = Color.FromArgb(0, 127, 0, 127);
            this.BleuTextBox.Styles[7].ForeColor  = Color.FromArgb(0, 127, 0, 127);
            this.BleuTextBox.Styles[8].ForeColor  = Color.FromArgb(0, 127, 0, 127);
            this.BleuTextBox.Styles[10].ForeColor = Color.FromArgb(0, 127, 127, 127);
            this.BleuTextBox.Styles[9].ForeColor  = Color.Maroon;
            this.BleuTextBox.Lexer     = Lexer.Lua;
            this.BleuTextBox.WordChars = Bleustr + Bleustr2 + Bleustr3;
            this.BleuTextBox.SetKeywords(0, "info and break do else elseif end for function if in local nil not or repeat return then until while false true goto assert collectgarbage dofile _G getmetatable ipairs loadfile next pairs pcall print rawequal rawget rawset setmetatable tonumber tostring type _VERSION xpcall string table math coroutine io os debug getfenv gcinfo load loadlib loadstring require select setfenv unpack _LOADED LUA_PATH _REQUIREDNAME package rawlen package bit32 utf8 _ENV string.byte string.char string.dump string.find string.format string.gsub string.len string.lower string.rep string.sub string.upper table.concat table.insert table.remove table.sort math.abs math.acos math.asin math.atan math.atan2 math.ceil math.cos math.deg math.exp math.floor math.frexp math.ldexp math.log math.max math.min math.pi math.pow math.rad math.random math.randomseed math.sin math.sqrt math.tan string.gfind string.gmatch string.match string.reverse string.pack string.packsize string.unpack table.foreach table.foreachi table.getn table.setn table.maxn table.pack table.unpack table.move math.cosh math.fmod math.huge math.log10 math.modf math.mod math.sinh math.tanh math.maxinteger math.mininteger math.tointeger math.type math.ult bit32.arshift bit32.band bit32.bnot bit32.bor bit32.btest bit32.bxor bit32.extract bit32.replace bit32.lrotate bit32.lshift bit32.rrotate bit32.rshift utf8.char utf8.charpattern utf8.codes utf8.codepoint utf8.len utf8.offset coroutine.create coroutine.resume coroutine.status coroutine.wrap coroutine.yield io.close io.flush io.input io.lines io.open io.output io.read io.tmpfile io.type io.write io.stdin io.stdout io.stderr os.clock os.date os.difftime os.execute os.exit os.getenv os.remove os.rename os.setlocale os.time os.tmpname coroutine.isyieldable coroutine.running io.popen module package.loaders package.seeall package.config package.searchers package.searchpath require package.cpath package.loaded package.loadlib package.path package.preload wait");
            this.BleuTextBox.SetKeywords(1, "warn");
            this.BleuTextBox.SetKeywords(2, "error");
            this.BleuTextBox.SetKeywords(3, "");
            this.BleuTextBox.SetProperty("fold", "1");
            this.BleuTextBox.SetProperty("fold.compact", "1");
            this.BleuTextBox.Margins[1].Type      = MarginType.Symbol;
            this.BleuTextBox.Margins[1].Mask      = 4261412864u;
            this.BleuTextBox.Margins[1].Sensitive = true;
            this.BleuTextBox.Margins[1].Width     = 15;
            for (int i = 25; i <= 31; i++)
            {
                this.BleuTextBox.Markers[i].SetForeColor(SystemColors.ControlLightLight);
                this.BleuTextBox.Markers[i].SetBackColor(SystemColors.ControlDark);
            }
            this.BleuTextBox.Markers[30].Symbol = MarkerSymbol.BoxPlus;
            this.BleuTextBox.Markers[31].Symbol = MarkerSymbol.BoxMinus;
            this.BleuTextBox.Markers[25].Symbol = MarkerSymbol.BoxPlusConnected;
            this.BleuTextBox.Markers[27].Symbol = MarkerSymbol.TCorner;
            this.BleuTextBox.Markers[26].Symbol = MarkerSymbol.BoxMinusConnected;
            this.BleuTextBox.Markers[29].Symbol = MarkerSymbol.VLine;
            this.BleuTextBox.Markers[28].Symbol = MarkerSymbol.LCorner;
            this.BleuTextBox.AutomaticFold      = (AutomaticFold.Show | AutomaticFold.Click | AutomaticFold.Change);
            int Bleulength = this.BleuTextBox.Lines.Count.ToString().Length;

            BleuTextBox.Margins[0].Width = this.BleuTextBox.TextWidth(33, new string('9', Bleulength + 1)) + 2;
            // End Bleu TextBox
        }