Exemple #1
0
        public override bool Patch(DialogExTemplate dialogEx)
        {
            var controls = dialogEx.Controls;

            const int increment = 7;

            dialogEx.Width += increment;

            for (int i = 0; i < controls.Count; i++)
            {
                var control = controls[i];                 // Label
                if (control.X != 7)
                {
                    continue;
                }
                control.Width += increment;
                control        = controls[++i];          // ":"
                control.X     += increment;
                control        = controls[++i];          // Value
                control.X     += increment;
                control        = controls[++i];          // Unit
                control.X     += increment;
            }

            return(true);
        }
        public override bool Patch(DialogExTemplate dialogEx)
        {
            var controls = dialogEx.Controls;

            dialogEx.Width += 23;

            for (int i = 0; i < controls.Count; i++)
            {
                var control = controls[i];
                if (control is DialogExTemplateControl controlEx && controlEx.Id == 1)
                {
                    continue;
                }
                control.Width = 175;
            }

            /*var control = controls.Find(c => {
             *      return (c is DialogExTemplateControl cEx && cEx.Id == 1170);
             * });
             * control.cx = 120;
             * control = controls.Find(c => {
             *      return (c is DialogExTemplateControl cEx && cEx.Id == 1170);
             * });
             * control.cx = 120;*/

            return(true);
        }
        public override bool Patch(DialogExTemplate dialogEx)
        {
            var controls = dialogEx.Controls;

            var control = controls.Find(c => {
                return(c is DialogExTemplateControl cEx && cEx.Id == 1186);
            });

            control.Width = 140;
            control       = controls.Find(c => {
                return(c is DialogExTemplateControl cEx && cEx.Id == 1189);
            });
            control.Width = 100;
            control       = controls.Find(c => {
                return(c is DialogExTemplateControl cEx && cEx.Id == 1187);
            });
            control.Width = 60;
            control       = controls.Find(c => {
                return(c.X == 19 && c.Width == 24);
            });
            control.Width = 39;


            return(true);
        }
 public override bool Patch(DialogExTemplate dialogEx)
 {
     if (dialogEx.TypeFace != TypeFace || dialogEx.PointSize != PointSize)
     {
         dialogEx.TypeFace  = TypeFace;
         dialogEx.PointSize = PointSize;
         return(true);
     }
     return(false);
 }
        public override bool Patch(DialogExTemplate dialogEx)
        {
            var controls = dialogEx.Controls;

            var control = controls.Find(c => {
                return(c.Y == 34 && c.Width == 9);
            });

            control.Width = 26;

            return(true);
        }
        public override bool Patch(DialogExTemplate dialogEx)
        {
            var controls = dialogEx.Controls;

            // Rects
            controls[6].Width = 90;
            controls[7].X    += 10;
            controls[7].Width = 90;

            controls[19].X     += 10;         // slider
            controls[20].Width += 10;         // JPEG compression
            controls[21].X     += 15;         // num
            controls[21].Width  = 15;         // num
            controls[22].Width += 10;         // Scaling factor

            return(true);
        }
        public override bool Patch(DialogExTemplate dialogEx)
        {
            return(PatchInternal(dialogEx));

            /*if (StringsScraper.IsNormalString(dialogEx.Caption)) {
             *      string id = StringsScraper.GetResId(dialogEx);
             *      if (Translation.TryGetValue(id, out string translation))
             *              dialogEx.Caption = translation;
             * }
             * foreach (var control in dialogEx.Controls) {
             *      if (StringsScraper.IsNormalString(control.CaptionId.Name)) {
             *              string id = StringsScraper.GetResId(control);
             *              if (Translation.TryGetValue(id, out string translation))
             *                      control.CaptionId = translation;
             *      }
             * }
             * return true;*/
        }
        public override bool Patch(DialogExTemplate dialogEx)
        {
            var controls = dialogEx.Controls;

            var control = controls.Find(c => {
                return(c is DialogExTemplateControl cEx && cEx.Id == 1179);
            });

            control.Width = 32;
            control.Y++;
            control.Height -= 2;
            control         = controls.Find(c => {
                return(c.X == 246 && c.Y == 53 && c.Width == 17);
            });
            control.Width = 30;


            return(true);
        }
 private static void ScrapeDialogTemplate(StringBuilder language, StringBuilder normal, DialogExTemplate dialogEx)
 {
     AddResString("CAPTION", language, normal, dialogEx.Caption, GetResId(dialogEx));
     foreach (var control in dialogEx.Controls)
     {
         string commentLine = "CONTROL";
         if (control is DialogExTemplateControl idControl && idControl.Id != 0)
         {
             commentLine += $" {idControl.Id}";
         }
         AddResString(commentLine, language, normal, control.CaptionId.Name, GetResId(control));
     }
 }
 public virtual bool Patch(DialogExTemplate dialogEx) => true;