Example #1
0
        public RsMini(RsBrowser rs)
        {
            parent = rs;
            mainForm = rs.parent;
            if (!Properties.Settings.Default.Resizable)
            {
                MessageBox.Show("Mini requires DWM.", "Desktop composition not enabled", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return;
            }
            InitializeComponent();
            GlassMargins = new Margins(-3);
            GlassEnabled = false;
            Program.RestoreLocationAndSize(this, Properties.Settings.Default.MiniLocation, Properties.Settings.Default.MiniSize);
            UpdateAspectRatio();
            MaximumSize = new Size(MaximumSize.Width, (int)Math.Floor(MaximumSize.Width * AspectRatio));
            MinimumSize = new Size((int)Math.Floor(MinimumSize.Width * AspectRatio), MinimumSize.Width);
            Game = DwmManager.Register(Handle, rs.Handle);
            Inventory = DwmManager.Register(Handle, rs.Handle);
            UpdateThumbnails();

            if (Settings.Default.MiniVisible)
            {
                Show();
            }
            else
            {
                Hide();
            }
        }
Example #2
0
        public Toolbox(MainForm mainForm)
        {
            parent = mainForm;
            InitializeComponent();

            // Remove toggle UI
            if (!Properties.Settings.Default.Resizable)
            {
                listView1.Items.RemoveAt(6);
            }
            // Remove toggle mini
            if (!Properties.Settings.Default.Resizable)
            {
                listView1.Items.RemoveAt(5);
            }

            if (!Properties.Settings.Default.Show_Classic)
            {
                listView1.Items.RemoveAt(2);
            }

            if (!Properties.Settings.Default.Show_OldSchool)
            {
                listView1.Items.RemoveAt(1);
            }

            if (!Properties.Settings.Default.Show_RuneScape)
            {
                listView1.Items.RemoveAt(0);
            }

            Width = listView1.Items.Count * 75 + 1;
        }
Example #3
0
 public RsBrowser(MainForm mainForm)
 {
     parent = mainForm;
     InitializeComponent();
     webBrowser1.Navigate("http://07box.blogspot.com");
     //webBrowser1.Navigate("file:///C:/Users/User/Documents/SharpDevelop%20Projects/07box/debug.html");
     StartMini();
 }
Example #4
0
        public RsCursor(MainForm mainForm)
        {
            parent = mainForm;

            InitializeComponent();

            int initialStyle = GetWindowLong(Handle, -20);
            SetWindowLong(Handle, -20, initialStyle | 0x80000 | 0x20);

            Hide();
        }
Example #5
0
        private static void Main(string[] args)
        {
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (!WindowsFormsAero.OsSupport.IsCompositionEnabled)
            {
                Properties.Settings.Default.Resizable = false;
            }

            using (_mainForm = new MainForm())
            {
                Application.Run(_mainForm);
                SaveSettings(_mainForm);
            }

            RestoreMouse();
        }
Example #6
0
        protected static void SaveSettings(MainForm form)
        {
            System.Diagnostics.Trace.WriteLine("Persisting settings");
            try
            {
                Settings.Default.LastSize = form.Size;
                if (!(form.Location.X == -10000 && form.Location.Y == -10000))
                {
                    Settings.Default.LastLocation = form.Location;
                }
                Settings.Default.MiniSize = form.rs.mini.Size;
                Settings.Default.MiniLocation = form.rs.mini.Location;
                Settings.Default.Save();

            }
            catch(Exception e)
            {
                System.Diagnostics.Trace.WriteLine("Couldn't persist settings: " + e.Message);
                Settings.Default.Save();
            }
        }
Example #7
0
 public FullscreenDim(MainForm mainForm)
 {
     parent = mainForm;
     InitializeComponent();
 }
Example #8
0
 public SettingsForm(MainForm mainForm)
 {
     parent = mainForm;
     InitializeComponent();
     LoadSettings();
 }