Esempio n. 1
0
        public static void beginRestore(ACommunicationWindow parent, List<Archive> archives)
        {
            string extrasave = ProgressHandler.message;
            ProgressHandler.saveMessage();
            parent.hideInterface();
            if (archives.Count > 1 && !TranslatingRequestHandler.Request(RequestType.Question,"RestoreMultipleArchives").Cancelled ) {
                Restore.RestoreProgramHandler.use_defaults = true;
            }

            foreach (Archive archive in archives) {
                if (Restore.RestoreProgramHandler.overall_stop) {
                    break;
                }
                Restore.RestoreWindow restore = new Restore.RestoreWindow(archive, parent);
                if (restore.ShowDialog() == true) {
                    Core.redetect_games = true;
                }
            }
            Restore.RestoreProgramHandler.use_defaults = false;
            Restore.RestoreProgramHandler.overall_stop = false;
            // Restore.RestoreProgramHandler.default_user = null;
            if (Restore.RestoreProgramHandler.unsuccesfull_restores.Count > 0) {
                StringBuilder fail_list = new StringBuilder();
                foreach (string failed in Restore.RestoreProgramHandler.unsuccesfull_restores) {
                    fail_list.AppendLine(failed);
                }
                TranslatingMessageHandler.SendError("RestoreSomeFailed", fail_list.ToString());
            }
            parent.showInterface();
            ProgressHandler.message = extrasave;
        }
Esempio n. 2
0
 public RestoreWindow(ACommunicationWindow owner)
     : base(new RestoreProgramHandler(null, new Location.LocationsHandler()), owner)
 {
     InitializeComponent();
     Translator.WPF.TranslationHelpers.translateWindow(this);
     default_progress_color = restoreProgress.Foreground;
 }
        public ReportProblemWindow(ACommunicationWindow owner)
            : base(owner)
        {
            InitializeComponent();
            TranslationHelpers.translateWindow(this);
            this.Icon = owner.Icon;

            uploadBtn.To = Core.submission_email;
            uploadBtn.Subject = "Problem Report";
            uploadBtn.Source = Core.settings;
        }
Esempio n. 4
0
        public ReportWindow(AAnalyzer analyzer, ACommunicationWindow owner)
            : base(owner)
        {
            InitializeComponent();
            TranslationHelpers.translateWindow(this);
            this.Icon = owner.Icon;
            this.analyzer = analyzer;
            reportTxt.Text = analyzer.report;

            uploadBtn.To = Core.submission_email;
            uploadBtn.Subject = "Game Data - " + analyzer.game.Title;
            uploadBtn.Message = analyzer.report;
            uploadBtn.Source = Core.settings;
        }
Esempio n. 5
0
        public NewWindow(ACommunicationWindow owner)
            : base(owner,Core.settings)
        {
            this.Owner = owner;
            //            var uriSource = new Uri(System.IO.Path.Combine(Core.ExecutablePath, "masgau.ico"), UriKind.Relative);
              //          this.Icon = new BitmapImage(uriSource);

            System.Drawing.Icon ico = Properties.Resources.MASGAUIcon;

            this.Icon = System.Windows.Interop.Imaging.CreateBitmapSourceFromHBitmap(
                    ico.ToBitmap().GetHbitmap(),
                    IntPtr.Zero,
                    Int32Rect.Empty,
                    BitmapSizeOptions.FromEmptyOptions());
        }