Example #1
0
 public RestoreWindow(AViewWindow owner)
     : base(new RestoreProgramHandler(null, new Location.LocationsHandler()), owner)
 {
     InitializeComponent();
     Translator.WPF.TranslationHelpers.translateWindow(this);
     default_progress_color = restoreProgress.Foreground;
 }
Example #2
0
 protected AProgramWindow(AProgramHandler program_handler, AViewWindow parent)
     : base(parent)
 {
     this.program_handler = program_handler;
     this.Loaded         += new System.Windows.RoutedEventHandler(WindowLoaded);
     if (program_handler != null)
     {
         this.Title = program_handler.program_title;
     }
 }
Example #3
0
        public ReportProblemWindow(AViewWindow owner)
            : base(owner)
        {
            InitializeComponent();
            TranslationHelpers.translateWindow(this);
            this.Icon = owner.Icon;

            uploadBtn.To      = Core.submission_email;
            uploadBtn.Subject = "Problem Report";
            uploadBtn.Source  = Core.settings;
        }
Example #4
0
        public ReportWindow(AAnalyzer analyzer, AViewWindow 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;
        }
Example #5
0
        public NewWindow(AViewWindow 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());
        }
Example #6
0
        public static void beginRestore(AViewWindow 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);
                restore.ShowDialog();

                switch (restore.Result)
                {
                case RestoreResult.Success:
                    Core.redetect_games = true;
                    break;

                case RestoreResult.Cancel:
                case RestoreResult.Failed:
                case RestoreResult.ElevationFailed:
                    break;
                }
            }
            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;
        }