Пример #1
0
 private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (fWd != null)
     {
         fWd.Close();
         fWd = null;
     }
 }
Пример #2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (fWd != null)
            {
                var result = MessageBox.Show("Bạn muốn chọn số ảnh khác?", "Màn hình quay thưởng đang thực thi", MessageBoxButton.YesNo);
                if (result == MessageBoxResult.Yes)
                {
                    fWd.Close();
                    fWd = null;
                }
                else
                {
                    return;
                }
            }

            var dlg = new OpenFileDialog();

            dlg.Multiselect = true;
            if (dlg.ShowDialog() == true)
            {
                List <String> imgs = new List <string>();
                foreach (var path in dlg.FileNames)
                {
                    imgs.Add(path);
                }
                //if (imgs.Count > 300)
                //{
                //    MessageBox.Show("Vui lòng chọn số lượng ảnh nhỏ hơn 300");
                //    return;
                //}
                int rotatemode = 1;
                if (ngaunhien.IsChecked == true)
                {
                    rotatemode = 2;
                }
                if (traiphai.IsChecked == true)
                {
                    rotatemode = 3;
                }
                if (trenduoi.IsChecked == true)
                {
                    rotatemode = 4;
                }

                bool isremove = (loaibo.IsChecked == true);
                fWd = new FullImgWindow(imgs, rotatemode, isremove);
                fWd.Show();
            }
        }
Пример #3
0
 public MainWindow()
 {
     InitializeComponent();
     fWd = null;
 }