예제 #1
0
 public static void PreviewShow(Window owner, FileInfo grdFileInfo, int roundDecimals = 3, int colors = 90)
 {
     GRDPreviewWindow gpw = new GRDPreviewWindow(grdFileInfo.FullName);
     gpw.fileName.Text = grdFileInfo.Name;
     SelectColorItem sci = (SelectColorItem)gpw.inputPath2.SelectedItem;
     gpw.colors = colors;
     gpw.Title = grdFileInfo.Name;
     gpw.roundDecimals = roundDecimals;
     gpw.Owner = owner;
     gpw.minBtn.Visibility = Visibility.Hidden;
     gpw.fileName.Visibility = Visibility.Hidden;
     gpw.ShowInTaskbar = false;
     gpw.openSb.Completed += delegate
     {
         gpw.isOpen = true;
         gpw.inputPath2.SelectedIndex = -1;
         gpw.inputPath2.SelectedIndex = 0;
         gpw.round.SelectedIndex = 2;
     };
     gpw.ShowDialog();
 }
예제 #2
0
 public static void PreviewShow(ResourceManagerTreeNode grdFileInfo, int roundDecimals = 3, int colors = 90)
 {
     if (FilePreviewWindow.showWindows.ContainsKey(grdFileInfo.Path.FullName))
     {
         FilePreviewWindow.showWindows[grdFileInfo.Path.FullName].Activate();
         return;
     }
     GRDPreviewWindow gpw = new GRDPreviewWindow(grdFileInfo.Path.FullName);
     gpw.fileName.Text = grdFileInfo.Path.Name;
     SelectColorItem sci = (SelectColorItem)gpw.inputPath2.SelectedItem;
     gpw.colors = colors;
     gpw.Title = grdFileInfo.Path.Name;
     gpw.roundDecimals = roundDecimals;
     gpw.openSb.Completed += delegate
     {
         gpw.isOpen = true;
         gpw.inputPath2.SelectedIndex = -1;
         gpw.inputPath2.SelectedIndex = 0;
         gpw.round.SelectedIndex = 2;
     };
     gpw.Show();
     FilePreviewWindow.showWindows.Add(grdFileInfo.Path.FullName, gpw);
 }