Example #1
0
        static void Main(string[] args)
        {
            // Variables needed to create patch

            /*
             * Gryffi.FTPPassword = "";
             * Gryffi.FTPUsername = "";
             * Gryffi.FTPUrl = "";
             * Gryffi.PatchServerUrl = "";
             * Gryffi.PatchFolder = @"C:\Users\Administrator\Documents\visual studio 2015\Projects\PatchClient\PatchClient\bin\Patch";
             */
            Gryffi.FTPPassword    = "******";
            Gryffi.FTPUsername    = "******";
            Gryffi.FTPUrl         = "ftp://nathan-dev.com";
            Gryffi.PatchServerUrl = "http://www.nathan-dev.com/projects/patchclient/";
            Gryffi.PatchFolder    = @"C:\Users\Administrator\Documents\visual studio 2015\Projects\PatchClient\PatchClient\bin\Patch";

            //If being patcher
            // ReadPatchlist();
            //Patch();
            //CreateRemoteFolders();
            //If being patchlist creator
            Gryffi.CreatePatchlist(9, true, true, Channel.Release);
            Console.ReadLine();
        }
        private void Save_Click(object sender, RoutedEventArgs e)
        {
            // Configure save file dialog box
            Microsoft.Win32.SaveFileDialog dlg = new Microsoft.Win32.SaveFileDialog();
            dlg.FileName   = "list";                        // Default file name
            dlg.DefaultExt = ".txt";                        // Default file extension
            dlg.Filter     = "Text documents (.txt)|*.txt"; // Filter files by extension

            // Show save file dialog box
            Nullable <bool> result = dlg.ShowDialog();

            // Process save file dialog box results
            if (result == true)
            {
                Gryffi.SCurrentDirectory = dlg.FileName.Replace("list.txt", null);
                Gryffi.CreatePatchlist(Gryffi.GryffiPatchlist.Version, false);
            }
        }