public FlurrySettings()
 {
     specs = new List <FlurrySpec>(FlurrySettings.MakeDefaultSpecs());
     foreach (string s in Properties.Settings.Default.ExtraFlurries)
     {
         specs.Add(new FlurrySpec(s));
     }
     //LoadFlurries();
 }
Exemple #2
0
        public MainForm(string[] args)
        {
            InitializeComponent();
            settings = new FlurrySettings();
            preset   = Properties.Settings.Default.SelectedFlurry;

            IntPtr topmost = new IntPtr(-1);

            if (args.Length > 0)
            {
                if (args[0].ToLower().Equals("/p"))
                {
                    SetParent((IntPtr)int.Parse(args[1]));
                    preview = true;
                }
                if (args[0].ToLower().StartsWith("/c"))
                {
                    config = true;

                    SettingsForm sf = new SettingsForm();
                    sf.SpecItems    = this.settings.specs.ToArray();
                    sf.SelectedItem = preset;
                    if (sf.ShowDialog() == DialogResult.OK)
                    {
                        preset = sf.SelectedItem;
                        Properties.Settings.Default.SelectedFlurry = preset;
                        Properties.Settings.Default.Save();
                    }
                    Close();
                }
            }

            if (!preview && !config)
            {
                int width  = Win32.User.GetSystemMetrics(Win32.User.SM_CXVIRTUALSCREEN);
                int height = Win32.User.GetSystemMetrics(Win32.User.SM_CYVIRTUALSCREEN);
                Win32.User.SetWindowPos(this.Handle, topmost, 0, 0, width, height, 0);
                Win32.User.ShowCursor(0);
            }


            if (!config)
            {
                if (preset > settings.specs.Count)
                {
                    preset = 0;
                }
                timer1.Interval = (int)(1000.0 / Types.iMaxFrameProgressInMs);
                timer1.Tick    += new EventHandler(timer1_Tick);
                Init();

                timer1.Start();
            }
        }
Exemple #3
0
        public MainForm(string[] args)
        {
            InitializeComponent();
            settings = new FlurrySettings();
            preset = Properties.Settings.Default.SelectedFlurry;

            IntPtr topmost = new IntPtr(-1);

            if (args.Length > 0)
            {
                if (args[0].ToLower().Equals("/p"))
                {
                    SetParent((IntPtr)int.Parse(args[1]));
                    preview = true;
                }
                if (args[0].ToLower().StartsWith("/c") )
                {
                    config = true;

                    SettingsForm sf = new SettingsForm();
                    sf.SpecItems=this.settings.specs.ToArray();
                    sf.SelectedItem = preset;
                    if (sf.ShowDialog() == DialogResult.OK)
                    {
                        preset = sf.SelectedItem;
                        Properties.Settings.Default.SelectedFlurry = preset;
                        Properties.Settings.Default.Save();
                    }
                    Close();
                }
            }

            if(!preview && !config)
            {
                int width = Win32.User.GetSystemMetrics(Win32.User.SM_CXVIRTUALSCREEN);
                int height = Win32.User.GetSystemMetrics(Win32.User.SM_CYVIRTUALSCREEN);
                Win32.User.SetWindowPos(this.Handle, topmost, 0, 0, width, height, 0);
                Win32.User.ShowCursor(0);
            }

            if (!config)
            {
                if (preset > settings.specs.Count)
                    preset = 0;
                timer1.Interval = (int)(1000.0 / Types.iMaxFrameProgressInMs);
                timer1.Tick += new EventHandler(timer1_Tick);
                Init();

                timer1.Start();
            }
        }
Exemple #4
0
        int showForFrameCount = Types.iMaxFrameProgressInMs * 5;//About 5 secs

        void Run()
        {
            SdlDotNet.Input.Mouse.ShowCursor = false;
            Video.WindowIcon(System.Reflection.Assembly.GetExecutingAssembly());
            Video.WindowCaption = "FlurrySharp Test Window";
            g_nMonitors         = Win32.User.GetSystemMetrics(Win32.User.SM_CMONITORS);

            screen = Video.SetVideoMode(Win32.User.GetSystemMetrics(Win32.User.SM_CXVIRTUALSCREEN), Win32.User.GetSystemMetrics(Win32.User.SM_CYVIRTUALSCREEN), true, true, false, true, false);
            Win32.User.SetWindowPos(Video.WindowHandle, new IntPtr(0), 0, 0, screen.Width, screen.Height, 0);

            txtSprite = new TextSprite(new SdlDotNet.Graphics.Font("vera.ttf", 12));
            settings  = new FlurrySettings();

            Events.Tick         += new EventHandler <TickEventArgs>(Events_Tick);
            Events.VideoResize  += new EventHandler <VideoResizeEventArgs>(Events_VideoResize);
            Events.Quit         += new EventHandler <QuitEventArgs>(Events_Quit);
            Events.Fps           = Types.iMaxFrameProgressInMs;
            Events.MouseMotion  += new EventHandler <SdlDotNet.Input.MouseMotionEventArgs>(Events_MouseMotion);
            Events.KeyboardDown += new EventHandler <SdlDotNet.Input.KeyboardEventArgs>(Events_KeyboardDown);
            Init();
            Reshape();

            Events.Run();
        }
Exemple #5
0
        void Run()
        {
            SdlDotNet.Input.Mouse.ShowCursor = false;
            Video.WindowIcon(System.Reflection.Assembly.GetExecutingAssembly());
            Video.WindowCaption = "FlurrySharp Test Window";
            g_nMonitors = Win32.User.GetSystemMetrics(Win32.User.SM_CMONITORS);

            screen = Video.SetVideoMode(Win32.User.GetSystemMetrics(Win32.User.SM_CXVIRTUALSCREEN), Win32.User.GetSystemMetrics(Win32.User.SM_CYVIRTUALSCREEN), true, true, false, true, false);
            Win32.User.SetWindowPos(Video.WindowHandle, new IntPtr(0), 0, 0, screen.Width, screen.Height, 0);

            txtSprite = new TextSprite(new SdlDotNet.Graphics.Font("vera.ttf", 12));
            settings = new FlurrySettings();

            Events.Tick += new EventHandler<TickEventArgs>(Events_Tick);
            Events.VideoResize += new EventHandler<VideoResizeEventArgs>(Events_VideoResize);
            Events.Quit += new EventHandler<QuitEventArgs>(Events_Quit);
            Events.Fps = Types.iMaxFrameProgressInMs;
            Events.MouseMotion += new EventHandler<SdlDotNet.Input.MouseMotionEventArgs>(Events_MouseMotion);
            Events.KeyboardDown += new EventHandler<SdlDotNet.Input.KeyboardEventArgs>(Events_KeyboardDown);
            Init();
            Reshape();

            Events.Run();
        }