Exemplo n.º 1
0
        public IEnumerable <string> method_1()
        {
            GEnum5 genum = MapUtils.smethod_10(this.MapId);

            if (genum != GEnum5.None)
            {
                int all  = 0;
                int done = 0;
                foreach (KeyValuePair <int, Ship> keyValuePair in this.Ships)
                {
                    Ship value = keyValuePair.Value;
                    if (value.IsNpc)
                    {
                        int num = all;
                        all = num + 1;
                        bool flag;
                        if (value.HpPercentage < 25f || this.method_8(value, out flag))
                        {
                            num  = done;
                            done = num + 1;
                        }
                    }
                }
                DarkOrbitWebAPI.GalaxyGatesInfo ggInfo       = this.Game.Web.GgInfo;
                DarkOrbitWebAPI.jumpgateGate    jumpgateGate = (ggInfo != null) ? ggInfo.GetGate(genum) : null;
                string text = string.Format("Wave {0}/{1}", (jumpgateGate != null) ? new int?(jumpgateGate.currentWave) : null, (jumpgateGate != null) ? new int?(jumpgateGate.totalWave) : null);
                if (jumpgateGate != null)
                {
                    yield return(text);
                }
                yield return(string.Format("{0}/{1}", done, all));
            }
            yield break;
        }
Exemplo n.º 2
0
    // Token: 0x0600008A RID: 138 RVA: 0x0025D7D8 File Offset: 0x0025B9D8
    protected virtual void OnPaint(PaintEventArgs e)
    {
        Bitmap    bitmap    = new Bitmap(base.Width, base.Height);
        Graphics  graphics  = Graphics.FromImage(bitmap);
        Rectangle rect      = new Rectangle(0, 0, base.Width, base.Height);
        Graphics  graphics2 = graphics;

        graphics2.SmoothingMode     = SmoothingMode.HighQuality;
        graphics2.PixelOffsetMode   = PixelOffsetMode.HighQuality;
        graphics2.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
        graphics2.Clear(this.BackColor);
        graphics2.FillRectangle(new SolidBrush(this.color_0), rect);
        graphics2.DrawString("r", this.Font, new SolidBrush(this.Color_1), new Rectangle(0, 0, base.Width, base.Height), GClass6.stringFormat_1);
        GEnum5 genum = this.genum5_0;

        if (genum != GEnum5.Over)
        {
            if (genum == GEnum5.Down)
            {
                graphics2.FillRectangle(new SolidBrush(Color.FromArgb(30, Color.Black)), rect);
            }
        }
        else
        {
            graphics2.FillRectangle(new SolidBrush(Color.FromArgb(30, Color.White)), rect);
        }
        base.OnPaint(e);
        graphics.Dispose();
        e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
        e.Graphics.DrawImageUnscaled(bitmap, 0, 0);
        bitmap.Dispose();
    }
Exemplo n.º 3
0
    // Token: 0x060001D8 RID: 472 RVA: 0x00006E14 File Offset: 0x00005014
    protected virtual void OnPaint(PaintEventArgs e)
    {
        Bitmap    bitmap    = GControl8.smethod_8(GControl8.smethod_6(this), GControl8.smethod_7(this));
        Graphics  graphics  = GControl8.smethod_9(bitmap);
        Rectangle rectangle = new Rectangle(0, 0, GControl8.smethod_6(this), GControl8.smethod_7(this));
        Graphics  graphics2 = graphics;

        GControl8.smethod_10(graphics2, SmoothingMode.HighQuality);
        GControl8.smethod_11(graphics2, PixelOffsetMode.HighQuality);
        GControl8.smethod_12(graphics2, TextRenderingHint.ClearTypeGridFit);
        GControl8.smethod_14(graphics2, GControl8.smethod_13(this));
        GControl8.smethod_16(graphics2, GControl8.smethod_15(this.color_0), rectangle);
        graphics2.DrawString("0", GControl8.smethod_17(this), GControl8.smethod_15(this.Color_1), new Rectangle(2, 1, GControl8.smethod_6(this), GControl8.smethod_7(this)), GClass6.stringFormat_1);
        GEnum5 genum = this.genum5_0;

        if (genum == GEnum5.Over)
        {
            graphics2.FillRectangle(new SolidBrush(Color.FromArgb(30, Color.White)), rectangle);
        }
        else if (genum == GEnum5.Down)
        {
            graphics2.FillRectangle(new SolidBrush(Color.FromArgb(30, Color.Black)), rectangle);
        }
        base.OnPaint(e);
        graphics.Dispose();
        e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
        e.Graphics.DrawImageUnscaled(bitmap, 0, 0);
        bitmap.Dispose();
    }
Exemplo n.º 4
0
    // Token: 0x06000243 RID: 579 RVA: 0x00007830 File Offset: 0x00005A30
    protected virtual void OnPaint(PaintEventArgs e)
    {
        this.method_1();
        Bitmap   bitmap   = GControl11.smethod_15(GControl11.smethod_13(this), GControl11.smethod_14(this));
        Graphics graphics = GControl11.smethod_16(bitmap);

        this.int_0 = GControl11.smethod_13(this) - 1;
        this.int_1 = GControl11.smethod_14(this) - 1;
        Rectangle rectangle_  = new Rectangle(0, 2, GControl11.smethod_14(this) - 5, GControl11.smethod_14(this) - 5);
        Rectangle rectangle_2 = new Rectangle(4, 6, this.int_1 - 12, this.int_1 - 12);
        Graphics  graphics2   = graphics;

        GControl11.smethod_17(graphics2, SmoothingMode.HighQuality);
        GControl11.smethod_18(graphics2, TextRenderingHint.ClearTypeGridFit);
        GControl11.smethod_20(graphics2, GControl11.smethod_19(this));
        GControl11.GEnum2 genum = this.genum2_0;
        if (genum == GControl11.GEnum2.Style1)
        {
            GControl11.smethod_22(graphics2, GControl11.smethod_21(this.color_0), rectangle_);
            GEnum5 genum2 = this.genum5_0;
            if (genum2 == GEnum5.Over)
            {
                GControl11.smethod_24(graphics2, GControl11.smethod_23(this.color_1), rectangle_);
            }
            else if (genum2 == GEnum5.Down)
            {
                GControl11.smethod_24(graphics2, GControl11.smethod_23(this.color_1), rectangle_);
            }
            if (this.Boolean_0)
            {
                GControl11.smethod_22(graphics2, GControl11.smethod_21(this.color_1), rectangle_2);
            }
        }
        else if (genum == GControl11.GEnum2.Style2)
        {
            GControl11.smethod_22(graphics2, GControl11.smethod_21(this.color_0), rectangle_);
            GEnum5 genum2 = this.genum5_0;
            if (genum2 == GEnum5.Over)
            {
                GControl11.smethod_24(graphics2, GControl11.smethod_23(this.color_1), rectangle_);
                GControl11.smethod_22(graphics2, GControl11.smethod_21(Color.FromArgb(118, 213, 170)), rectangle_);
            }
            else if (genum2 == GEnum5.Down)
            {
                GControl11.smethod_24(graphics2, GControl11.smethod_23(this.color_1), rectangle_);
                GControl11.smethod_22(graphics2, GControl11.smethod_21(Color.FromArgb(118, 213, 170)), rectangle_);
            }
            if (this.Boolean_0)
            {
                GControl11.smethod_22(graphics2, GControl11.smethod_21(this.color_1), rectangle_2);
            }
        }
        graphics2.DrawString(GControl11.smethod_25(this), GControl11.smethod_26(this), GControl11.smethod_21(this.color_2), new Rectangle(20, 2, this.int_0, this.int_1), GClass6.stringFormat_0);
        base.OnPaint(e);
        graphics.Dispose();
        e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
        e.Graphics.DrawImageUnscaled(bitmap, 0, 0);
        bitmap.Dispose();
    }
Exemplo n.º 5
0
        public SelectedNpcModel GetModel(Ship ship, Map map = null, int?targetMap = null, int offsetWave = 0)
        {
            if (ship == null)
            {
                return(null);
            }
            if (map != null)
            {
                int int_ = targetMap ?? map.MapId;
                if (MapUtils.smethod_10(int_) != GEnum5.None)
                {
                    if (this.NpcWhitelist.Any((SelectedNpcModel t) => NpcUtils.NpcById[t.NpcId] is NpcUtils.GGWaveType))
                    {
                        GEnum5 type = MapUtils.smethod_10(int_);
                        DarkOrbitWebAPI.GalaxyGatesInfo ggInfo       = map.Game.Web.GgInfo;
                        DarkOrbitWebAPI.jumpgateGate    jumpgateGate = (ggInfo != null) ? ggInfo.GetGate(type) : null;
                        if (jumpgateGate == null)
                        {
                            return(null);
                        }
                        SelectedNpcModel result = null;
                        int num = 0;
                        foreach (KeyValuePair <SelectedNpcModel, NpcUtils.GGWaveType> keyValuePair in (from t in this.NpcWhitelist
                                                                                                       where NpcUtils.NpcById[t.NpcId] is NpcUtils.GGWaveType
                                                                                                       select t).ToDictionary((SelectedNpcModel t) => t, (SelectedNpcModel t) => (NpcUtils.GGWaveType)NpcUtils.NpcById[t.NpcId]))
                        {
                            if (jumpgateGate.currentWave >= keyValuePair.Value.WaveNumber)
                            {
                                if (offsetWave == 0)
                                {
                                    result = keyValuePair.Key;
                                }
                            }
                            else
                            {
                                num++;
                                if (num == offsetWave)
                                {
                                    result = keyValuePair.Key;
                                }
                            }
                        }
                        return(result);
                    }
                }
            }
            if (ship == Ship.Default)
            {
                return(null);
            }
            string name = ship.Name;

            NpcUtils.NpcType npc = NpcUtils.NpcType.smethod_5(name);
            return(this.NpcWhitelist.FirstOrDefault((SelectedNpcModel t) => t.NpcId == npc.Id));
        }
Exemplo n.º 6
0
    public virtual bool vmethod_1()
    {
        int    mapId          = base.Context.Map.MapId;
        GEnum5 galaxyGateType = this.GalaxyGateType;

        DarkOrbitWebAPI.GalaxyGatesInfo ggInfo = base.Context.Game.Web.GgInfo;
        if (((ggInfo != null) ? ggInfo.GetGate(galaxyGateType) : null) == null)
        {
            return(false);
        }
        MapProfile       mapProfile       = base.MapProfile;
        SelectedNpcModel selectedNpcModel = (mapProfile != null) ? mapProfile.GetModel(Ship.Default, base.Context.Map, new int?(mapId), 0) : null;

        return(selectedNpcModel != null && mapProfile.NpcWhitelist.LastOrDefault <SelectedNpcModel>() == selectedNpcModel);
    }
Exemplo n.º 7
0
 public GClass900(GClass890 gclass890_1, TargetMap targetMap_1)
 {
     Class13.lOBHd9Nzn7x2T();
     base..ctor(gclass890_1, targetMap_1, "G", int.MinValue);
     this.GalaxyGateType = MapUtils.smethod_10((int)targetMap_1);
 }
Exemplo n.º 8
0
        public static bool smethod_8(int int_0)
        {
            GEnum5 item = MapUtils.smethod_10(int_0);

            return(MapUtils.Events.Contains(item));
        }
Exemplo n.º 9
0
        public static bool smethod_7(int int_0)
        {
            GEnum5 genum = MapUtils.smethod_10(int_0);

            return(!MapUtils.Events.Contains(genum) && genum != GEnum5.None && genum != (GEnum5)227 && genum != (GEnum5)77);
        }
Exemplo n.º 10
0
 public GClass849(GClass839 gclass839_1, TargetMap targetMap_1)
 {
     Class13.NP5bWyNzLwONS();
     base..ctor(gclass839_1, targetMap_1, "G", int.MinValue);
     this.GalaxyGateType = MapUtils.smethod_10((int)targetMap_1);
 }
Exemplo n.º 11
0
    // Token: 0x0600009C RID: 156 RVA: 0x00005778 File Offset: 0x00003978
    protected virtual void OnPaint(PaintEventArgs e)
    {
        this.method_0();
        Bitmap   bitmap   = GControl2.smethod_11(GControl2.smethod_9(this), GControl2.smethod_10(this));
        Graphics graphics = GControl2.smethod_12(bitmap);

        this.int_0 = GControl2.smethod_9(this) - 1;
        this.int_1 = GControl2.smethod_10(this) - 1;
        Rectangle rectangle = new Rectangle(0, 2, GControl2.smethod_10(this) - 5, GControl2.smethod_10(this) - 5);
        Graphics  graphics2 = graphics;

        GControl2.smethod_13(graphics2, SmoothingMode.HighQuality);
        GControl2.smethod_14(graphics2, TextRenderingHint.ClearTypeGridFit);
        GControl2.smethod_16(graphics2, GControl2.smethod_15(this));
        GControl2.GEnum1 genum = this.genum1_0;
        if (genum != GControl2.GEnum1.Style1)
        {
            if (genum == GControl2.GEnum1.Style2)
            {
                graphics2.FillRectangle(new SolidBrush(this.color_0), rectangle);
                GEnum5 genum2 = this.genum5_0;
                if (genum2 == GEnum5.Over)
                {
                    graphics2.DrawRectangle(new Pen(this.color_2), rectangle);
                    graphics2.FillRectangle(new SolidBrush(Color.FromArgb(118, 213, 170)), rectangle);
                }
                else if (genum2 == GEnum5.Down)
                {
                    graphics2.DrawRectangle(new Pen(this.color_2), rectangle);
                    graphics2.FillRectangle(new SolidBrush(Color.FromArgb(118, 213, 170)), rectangle);
                }
                if (this.Boolean_0)
                {
                    graphics2.DrawString("ü", new Font("Wingdings", 18f), new SolidBrush(this.color_2), new Rectangle(5, 7, this.int_1 - 9, this.int_1 - 9), GClass6.stringFormat_1);
                }
                if (!base.Enabled)
                {
                    graphics2.FillRectangle(new SolidBrush(Color.FromArgb(54, 58, 61)), rectangle);
                    graphics2.DrawString(this.Text, this.Font, new SolidBrush(Color.FromArgb(48, 119, 91)), new Rectangle(20, 2, this.int_0, this.int_1), GClass6.stringFormat_0);
                }
                graphics2.DrawString(this.Text, this.Font, new SolidBrush(this.color_1), new Rectangle(20, 2, this.int_0, this.int_1), GClass6.stringFormat_0);
            }
        }
        else
        {
            GControl2.smethod_18(graphics2, GControl2.smethod_17(this.color_0), rectangle);
            GEnum5 genum2 = this.genum5_0;
            if (genum2 == GEnum5.Over)
            {
                GControl2.smethod_20(graphics2, GControl2.smethod_19(this.color_2), rectangle);
            }
            else if (genum2 == GEnum5.Down)
            {
                GControl2.smethod_20(graphics2, GControl2.smethod_19(this.color_2), rectangle);
            }
            if (this.Boolean_0)
            {
                graphics2.DrawString("ü", GControl2.smethod_7("Wingdings", 18f), GControl2.smethod_17(this.color_2), new Rectangle(5, 7, this.int_1 - 9, this.int_1 - 9), GClass6.stringFormat_1);
            }
            if (!base.Enabled)
            {
                graphics2.FillRectangle(new SolidBrush(Color.FromArgb(54, 58, 61)), rectangle);
                graphics2.DrawString(this.Text, this.Font, new SolidBrush(Color.FromArgb(140, 142, 143)), new Rectangle(20, 2, this.int_0, this.int_1), GClass6.stringFormat_0);
            }
            graphics2.DrawString(this.Text, this.Font, new SolidBrush(this.color_1), new Rectangle(20, 2, this.int_0, this.int_1), GClass6.stringFormat_0);
        }
        base.OnPaint(e);
        graphics.Dispose();
        e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
        e.Graphics.DrawImageUnscaled(bitmap, 0, 0);
        bitmap.Dispose();
    }
Exemplo n.º 12
0
    // Token: 0x06000078 RID: 120 RVA: 0x0025D26C File Offset: 0x0025B46C
    protected virtual void OnPaint(PaintEventArgs e)
    {
        this.method_0();
        Bitmap   bitmap   = new Bitmap(base.Width, base.Height);
        Graphics graphics = Graphics.FromImage(bitmap);

        this.int_0 = base.Width - 1;
        this.int_1 = base.Height - 1;
        Rectangle rect      = new Rectangle(0, 2, base.Height - 5, base.Height - 5);
        Graphics  graphics2 = graphics;

        graphics2.SmoothingMode     = SmoothingMode.HighQuality;
        graphics2.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
        graphics2.Clear(this.BackColor);
        GControl2.GEnum1 genum = this.genum1_0;
        if (genum != GControl2.GEnum1.Style1)
        {
            if (genum == GControl2.GEnum1.Style2)
            {
                graphics2.FillRectangle(new SolidBrush(this.color_0), rect);
                GEnum5 genum2 = this.genum5_0;
                if (genum2 != GEnum5.Over)
                {
                    if (genum2 == GEnum5.Down)
                    {
                        graphics2.DrawRectangle(new Pen(this.color_2), rect);
                        graphics2.FillRectangle(new SolidBrush(Color.FromArgb(118, 213, 170)), rect);
                    }
                }
                else
                {
                    graphics2.DrawRectangle(new Pen(this.color_2), rect);
                    graphics2.FillRectangle(new SolidBrush(Color.FromArgb(118, 213, 170)), rect);
                }
                if (this.Boolean_0)
                {
                    graphics2.DrawString("ü", new Font("Wingdings", 18f), new SolidBrush(this.color_2), new Rectangle(5, 7, this.int_1 - 9, this.int_1 - 9), GClass6.stringFormat_1);
                }
                if (!base.Enabled)
                {
                    graphics2.FillRectangle(new SolidBrush(Color.FromArgb(54, 58, 61)), rect);
                    graphics2.DrawString(this.Text, this.Font, new SolidBrush(Color.FromArgb(48, 119, 91)), new Rectangle(20, 2, this.int_0, this.int_1), GClass6.stringFormat_0);
                }
                graphics2.DrawString(this.Text, this.Font, new SolidBrush(this.color_1), new Rectangle(20, 2, this.int_0, this.int_1), GClass6.stringFormat_0);
            }
        }
        else
        {
            graphics2.FillRectangle(new SolidBrush(this.color_0), rect);
            GEnum5 genum2 = this.genum5_0;
            if (genum2 != GEnum5.Over)
            {
                if (genum2 == GEnum5.Down)
                {
                    graphics2.DrawRectangle(new Pen(this.color_2), rect);
                }
            }
            else
            {
                graphics2.DrawRectangle(new Pen(this.color_2), rect);
            }
            if (this.Boolean_0)
            {
                graphics2.DrawString("ü", new Font("Wingdings", 18f), new SolidBrush(this.color_2), new Rectangle(5, 7, this.int_1 - 9, this.int_1 - 9), GClass6.stringFormat_1);
            }
            if (!base.Enabled)
            {
                graphics2.FillRectangle(new SolidBrush(Color.FromArgb(54, 58, 61)), rect);
                graphics2.DrawString(this.Text, this.Font, new SolidBrush(Color.FromArgb(140, 142, 143)), new Rectangle(20, 2, this.int_0, this.int_1), GClass6.stringFormat_0);
            }
            graphics2.DrawString(this.Text, this.Font, new SolidBrush(this.color_1), new Rectangle(20, 2, this.int_0, this.int_1), GClass6.stringFormat_0);
        }
        base.OnPaint(e);
        graphics.Dispose();
        e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
        e.Graphics.DrawImageUnscaled(bitmap, 0, 0);
        bitmap.Dispose();
    }
Exemplo n.º 13
0
 public GClass81(string string_1, bool bool_1, GEnum5 genum5_1)
 {
     this.Message = string_1;
     this.Error   = bool_1;
     this.Type    = genum5_1;
 }
Exemplo n.º 14
0
    // Token: 0x06000130 RID: 304 RVA: 0x002600A0 File Offset: 0x0025E2A0
    protected virtual void OnPaint(PaintEventArgs e)
    {
        this.method_1();
        Bitmap   bitmap   = new Bitmap(base.Width, base.Height);
        Graphics graphics = Graphics.FromImage(bitmap);

        this.int_0 = base.Width - 1;
        this.int_1 = base.Height - 1;
        Rectangle rect      = new Rectangle(0, 2, base.Height - 5, base.Height - 5);
        Rectangle rect2     = new Rectangle(4, 6, this.int_1 - 12, this.int_1 - 12);
        Graphics  graphics2 = graphics;

        graphics2.SmoothingMode     = SmoothingMode.HighQuality;
        graphics2.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
        graphics2.Clear(this.BackColor);
        GControl11.GEnum2 genum = this.genum2_0;
        if (genum != GControl11.GEnum2.Style1)
        {
            if (genum == GControl11.GEnum2.Style2)
            {
                graphics2.FillEllipse(new SolidBrush(this.color_0), rect);
                GEnum5 genum2 = this.genum5_0;
                if (genum2 == GEnum5.Over)
                {
                    graphics2.DrawEllipse(new Pen(this.color_1), rect);
                    graphics2.FillEllipse(new SolidBrush(Color.FromArgb(118, 213, 170)), rect);
                }
                else if (genum2 == GEnum5.Down)
                {
                    graphics2.DrawEllipse(new Pen(this.color_1), rect);
                    graphics2.FillEllipse(new SolidBrush(Color.FromArgb(118, 213, 170)), rect);
                }
                if (this.Boolean_0)
                {
                    graphics2.FillEllipse(new SolidBrush(this.color_1), rect2);
                }
            }
        }
        else
        {
            graphics2.FillEllipse(new SolidBrush(this.color_0), rect);
            GEnum5 genum2 = this.genum5_0;
            if (genum2 != GEnum5.Over)
            {
                if (genum2 == GEnum5.Down)
                {
                    graphics2.DrawEllipse(new Pen(this.color_1), rect);
                }
            }
            else
            {
                graphics2.DrawEllipse(new Pen(this.color_1), rect);
            }
            if (this.Boolean_0)
            {
                graphics2.FillEllipse(new SolidBrush(this.color_1), rect2);
            }
        }
        graphics2.DrawString(this.Text, this.Font, new SolidBrush(this.color_2), new Rectangle(20, 2, this.int_0, this.int_1), GClass6.stringFormat_0);
        base.OnPaint(e);
        graphics.Dispose();
        e.Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic;
        e.Graphics.DrawImageUnscaled(bitmap, 0, 0);
        bitmap.Dispose();
    }