Ejemplo n.º 1
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            ImagePlayer player = new ImagePlayer();
            player.Show();

            Application.Run();
        }
Ejemplo n.º 2
0
        private void SelectedAlbumMenuItem_Click(object sender, EventArgs e)
        {
            string selectedAlbPath = AlbumPath + @"/" + ((ToolStripMenuItem)sender).Text;
            string[] albFactors = Directory.GetDirectories(selectedAlbPath);

            //現在の選択アルバム名を保存
            AlbumNameNow = ((ToolStripMenuItem)sender).Text;

            //プログラムが終了しないようにするフラグ
            IsAlbumLoading = true;
            //一度すべてのPlayerを閉じる
            AllCloseMenuItem_Click(null, null);
            IsAlbumLoading = false;

            foreach (string factor in albFactors)
            {
                foreach (string ext in IMAGE_SEARCH_PATTERN_ALL)
                {
                    string[] bmfiles = Directory.GetFiles(factor, ext);
                    Point location;

                    foreach (string bmPath in bmfiles)
                    {
                        Bitmap image = new Bitmap(bmPath);

                        location = GetLocation(factor + @"/Location.txt");

                        ImagePlayer player = new ImagePlayer(image, location);
                        player.StartPosition = FormStartPosition.Manual;
                        player.Width = image.Width;
                        player.Height = image.Height;
                        player.Show();
                        player.Invalidate();
                    }
                }
            }
        }
Ejemplo n.º 3
0
        private void PlayerAddMenuItem_Click(object sender, EventArgs e)
        {
            ImagePlayer player = new ImagePlayer();

            player.Show();
        }