public SlideShow(List<string> SrcList, int CurrSrc, MainWindow MainImageWindow)
     : this()
 {
     this.SrcList = SrcList;
     this.CurrSrc = CurrSrc;
     this.MainImageWindow = MainImageWindow;
     ImageBox.Source = new BitmapImage(new Uri(SrcList.ElementAt(CurrSrc)));
     Timer.Start();
 }
Пример #2
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            string imagePath = (e.Args.Length != 0) ? e.Args[0] : null;
            if (imagePath != null)
            {
                string ext = System.IO.Path.GetExtension(imagePath).ToUpper();
                if (ext != ".JPG" && ext != ".JPEG")
                {
                    imagePath = null;
                }
            }

            // メイン画面を起動
            MainWindow mainWindow = new MainWindow(imagePath);
            mainWindow.Show();
        }