コード例 #1
0
ファイル: UC_TLabel.cs プロジェクト: Wessie/Loopstream
        public TLabel()
            : base()
        {
            ctl = new SolidBrush(Color.Fuchsia);
            pen = new Pen(new SolidBrush(SystemColors.ControlDark));
            Color ca = SystemColors.ControlLightLight;
            Color cb = SystemColors.Control;

            try
            {
                grb = Color.FromArgb(
                    cb.R + (ca.R - cb.R) / 3,
                    cb.G + (ca.G - cb.G) / 3,
                    cb.B + (ca.B - cb.B) / 3);
                grb = cb;
                gra = Color.FromArgb(
                    grb.R + (ca.R - cb.R) / 2,
                    grb.G + (ca.G - cb.G) / 2,
                    grb.B + (ca.B - cb.B) / 2);
            }
            catch
            {
                gra = ca;
                grb = cb;
            }
            ShadeBack = false;

            Skinner.add(this);
        }
コード例 #2
0
ファイル: UC_Troggle.cs プロジェクト: bakape/Loopstream
        public UC_Troggle()
        {
            bLoad = bSave = null;
            InitializeComponent();
            init();
            Resize       += UC_Troggle_Resize;
            pb.MouseDown += new MouseEventHandler(pb_MouseDown);

            Skinner.add(this);
        }
コード例 #3
0
        public Graden()
            : base()
        {
            co              = 1;
            Direction       = false;
            colorA          = SystemColors.Control;
            colorB          = SystemColors.ControlLight;
            renderedOpacity = 1;
            ca              = _ca = colorA;
            cb              = _cb = colorB;

            Skinner.add(this);
        }
コード例 #4
0
        public Verter()
        {
            InitializeComponent();
            _enabled      = true;
            _boost        = 1;
            _boostLock    = -1;
            defaultFG     = gLabel.ForeColor;
            defaultBG     = gLabel.BackColor;
            w8fuckOn      = new Padding(0, 4, 0, 0);
            w8fuckOff     = new Padding(1, 5, 1, 0);
            giSlider.Font = new Font(giSlider.Font.FontFamily, giSlider.Font.Size * 2);

            Skinner.add(this);
        }
コード例 #5
0
ファイル: UC_Pritch.cs プロジェクト: bakape/Loopstream
        public Pritch()
        {
            pre  = null;
            Text = "asdf";
            InitializeComponent();
            this.Resize += UC_Pritch_Resize;
            pre          = null;

            pad        = 8;
            pH.Height  = pV.Width = 5;
            bH.Visible = bV.Visible = false;

            magic();

            Skinner.add(this);
        }
コード例 #6
0
        public Verter()
        {
            InitializeComponent();
            _enabled      = true;
            _boost        = 1;
            defaultFG     = gLabel.ForeColor;
            defaultBG     = gLabel.BackColor;
            w8fuckOn      = new Padding(0, 4, 0, 0);
            w8fuckOff     = new Padding(1, 5, 1, 0);
            giSlider.Font = new Font(giSlider.Font.FontFamily, giSlider.Font.Size * 2);

            graden1.MouseDown += slider_MouseDown;
            graden1.MouseMove += slider_MouseMove;
            graden1.MouseUp   += slider_MouseUp;
            graden2.MouseDown += slider_MouseDown;
            graden2.MouseMove += slider_MouseMove;
            graden2.MouseUp   += slider_MouseUp;

            Skinner.add(this);
        }
コード例 #7
0
        //int debounce;

        public LLabel()
            : base()
        {
            //debounce = 0;
            src    = null;
            tinval = null;
            agrad1 = SystemColors.ScrollBar;
            agrad2 = SystemColors.ScrollBar;
            //olevel = LicenseManager.UsageMode == LicenseUsageMode.Designtime ? 1 : 0;
            olevel = 0;
            applyGradient();
            //applyLevel();

            //bg = Bitmap.FromFile(@"C:\Users\ed\Documents\Visual Studio 2012\Projects\Loopstream\Loopstream\res\volbar.png");
            bg    = new Bitmap(16, 16);
            sha   = new Bitmap(96, 96);
            w     = bg.Width;
            h     = bg.Height;
            dark  = new Pen(new SolidBrush(SystemColors.ControlDark));
            light = new Pen(new SolidBrush(SystemColors.ControlLightLight));
            Color ca = SystemColors.ControlLight;
            Color cb = SystemColors.ControlLightLight;
            Color one, two;

            try
            {
                one = Color.FromArgb(
                    ca.R + (cb.R - ca.R) / 3,
                    ca.G + (cb.G - ca.G) / 3,
                    ca.B + (cb.B - ca.B) / 3);
                two = Color.FromArgb(
                    one.R + (cb.R - ca.R) / 3,
                    one.G + (cb.G - ca.G) / 3,
                    one.B + (cb.B - ca.B) / 3);
            }
            catch
            {
                // TODO: Check order
                one = ca;
                two = cb;
            }
            one = Color.FromArgb(64,
                                 SystemColors.ControlDark.R,
                                 SystemColors.ControlDark.G,
                                 SystemColors.ControlDark.B);
            two = Color.FromArgb(64,
                                 SystemColors.ControlLightLight.R,
                                 SystemColors.ControlLightLight.G,
                                 SystemColors.ControlLightLight.B);

            lightF = SystemColors.ControlLightLight;
            light0 = Color.FromArgb(0,
                                    lightF.R,
                                    lightF.G,
                                    lightF.B);

            using (Graphics g = Graphics.FromImage(bg))
            {
                g.FillRectangle(new SolidBrush(one), 0, 0, w, h);
                Pen pen = new Pen(new SolidBrush(two));
                for (int a = -16; a < w; a++)
                {
                    if (a > -8 && a < 0 || a > 8)
                    {
                        continue;
                    }
                    g.DrawLine(pen, new Point(a, 16), new Point(a + 16, 0));
                }
            }
            Image bbg = new Bitmap(bg.Width * 6, bg.Height * 6);

            using (Graphics g = Graphics.FromImage(bbg))
            {
                for (int x = 0; x < bbg.Width; x += w)
                {
                    for (int y = 0; y < bbg.Height; y += h)
                    {
                        g.DrawImageUnscaled(bg, x, y);
                    }
                }
            }
            bg.Dispose();
            bg = bbg;
            w  = bg.Width;
            h  = bg.Height;

            using (Graphics g = Graphics.FromImage(sha))
            {
                int zh = sha.Height;
                for (int y = 0; y < zh; y++)
                {
                    int    ih   = zh - y;
                    double opac = ih * 1.0 / zh;
                    opac = 0.9 * opac * opac;
                    g.DrawLine(new Pen(Color.FromArgb(
                                           (int)(opac * 255), lightF.R, lightF.G, lightF.B)),
                               0, y, sha.Width, y);
                }
            }

            Skinner.add(this);
        }
コード例 #8
0
ファイル: Program.cs プロジェクト: bakape/Loopstream
        static void Main(string[] args)
        {
            DBGLOG            = "";
            SIGN_BINARY       = false;
            CRASH_REPORTER    = true;
            IGNORE_EXCEPTIONS = false;
            VERIFY_CHECKSUM   = true;
            BALLOONS          = true;
            ASK_DFC           = true;

            Program.args = args;
            foreach (string str in args)
            {
                if (str == "sign")
                {
                    SIGN_BINARY = true;
                }

                if (str == "exceptions")
                {
                    CRASH_REPORTER = false;
                }

                if (str == "unsigned")
                {
                    VERIFY_CHECKSUM = false;
                }

                if (str == "no_dfc")
                {
                    ASK_DFC = false;
                }
            }

            if (CRASH_REPORTER)
            {
                AppDomain.CurrentDomain.UnhandledException += (ueSender, ueArgs) => {
                    if (IGNORE_EXCEPTIONS)
                    {
                        return;
                    }

                    new UI_Exception(ueArgs.ExceptionObject as Exception, 1);
                };

                Application.ThreadException += (ueSender, ueArgs) =>
                {
                    if (IGNORE_EXCEPTIONS)
                    {
                        return;
                    }

                    new UI_Exception(ueArgs.Exception, 2);
                };

                Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            }

            if (!debug)
            {
                AppDomain.CurrentDomain.AssemblyResolve += (sender, dargs) =>
                {
                    // workaround for win7 custom themes
                    if (dargs.Name.Contains("PresentationFramework"))
                    {
                        return(null);
                    }

                    // vs2019
                    if (dargs.Name.StartsWith("Loopstream.XmlSerializers"))
                    {
                        return(null);
                    }

                    String resourceName = "Loopstream.lib." +
                                          dargs.Name.Substring(0, dargs.Name.IndexOf(", ")) + ".dll";

                    using (var stream = Assembly.GetExecutingAssembly().
                                        GetManifestResourceStream(resourceName))
                    {
                        if (stream == null)
                        {
                            return(null);
                        }

                        Byte[] assemblyData = new Byte[stream.Length];
                        stream.Read(assemblyData, 0, assemblyData.Length);
                        return(Assembly.Load(assemblyData));
                    }
                };
            }

            if (!debug)
            {
                IconExtractor ie = new IconExtractor(Application.ExecutablePath);
                icon = ie.GetIcon(0);
                ie.Dispose();
            }
            else
            {
                icon = new System.Drawing.Icon(@"..\..\res\loopstream.ico");
            }

            tools  = System.Windows.Forms.Application.ExecutablePath;
            tools  = tools.Substring(tools.Replace('\\', '/').LastIndexOf('/') + 1);
            tools  = tools.Split('.')[0];
            tools += "Tools\\";

            System.Diagnostics.Process.GetCurrentProcess().PriorityClass =
                System.Diagnostics.ProcessPriorityClass.AboveNormal;

            Logger.init();
            Skinner.init();
            rnd = new Random();
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Home());
        }