/// <summary> /// Estrae Grit /// Ritorna il Path dell'eseguibile /// </summary> /// <returns></returns> private String ExtractGrit() { ResourcesService rs = new ResourcesService(System.Reflection.Assembly.GetExecutingAssembly()); SystemService ss = SM.Get <SystemService>(); String TmpPath = ss.CombinePaths(Path.GetTempPath(), "grit"); FilePlus fp = rs.GetObject <FilePlus>("Template_Util.GRIT.grit.exe"); String GritPath = ss.CombinePaths(TmpPath, "grit.exe"); fp.Folder = TmpPath; fp.Name = "grit"; fp.Extension = ".exe"; fp.Save(); fp = rs.GetObject <FilePlus>("Template_Util.GRIT.FreeImage.dll"); fp.Folder = TmpPath; fp.Name = "FreeImage"; fp.Extension = ".dll"; fp.Save(); fp = rs.GetObject <FilePlus>("Template_Util.GRIT.licence-mit.txt"); fp.Folder = TmpPath; fp.Name = "licence-mit"; fp.Extension = ".txt"; fp.Save(); return(GritPath); }
public HueColorPicker() { InitializeComponent(); ResourcesService rs = new ResourcesService(System.Reflection.Assembly.GetExecutingAssembly()); BitmapImage img = rs.GetObject <BitmapImage>("ExtendCSharpWPF.Resource.HueRing.png"); canvas.Background = new ImageBrush(img); SelectionCircle = new Ellipse(); SelectionCircle.Stroke = System.Windows.Media.Brushes.Black; SelectionCircle.Fill = System.Windows.Media.Brushes.Transparent; SelectionCircle.HorizontalAlignment = HorizontalAlignment.Center; SelectionCircle.VerticalAlignment = VerticalAlignment.Center; canvas.Children.Add(SelectionCircle); }