Exemple #1
0
        public override string ToString()
        {
            var optionValues = new List <string>
            {
                Geolocation.ToString(),
                Midi.ToString(),
                Notifications.ToString(),
                Push.ToString(),
                SyncXhr.ToString(),
                Microphone.ToString(),
                Camera.ToString(),
                Magnetometer.ToString(),
                Gyroscope.ToString(),
                Speaker.ToString(),
                Vibrate.ToString(),
                Fullscreen.ToString(),
                Payment.ToString(),
                Accelerometer.ToString(),
                AmbientLightSensor.ToString(),
                Autoplay.ToString(),
                EncryptedMedia.ToString(),
                PictureInPicture.ToString(),
                Usb.ToString(),
                Vr.ToString()
            };

            optionValues.AddRange(Other.Select(o =>
            {
                o.Value.FeatureName = o.Key;
                return(o.Value.ToString());
            }));

            return(string.Join("; ", optionValues.Where(s => s.Length > 0)));
        }
Exemple #2
0
        public void RegisterActions(Gtk.Application app, GLib.Menu menu)
        {
            var zoom_section = new GLib.Menu();

            menu.AppendSection(null, zoom_section);

            app.AddAccelAction(ZoomIn, new[] { "<Primary>plus", "<Primary>equal", "equal", "<Primary>KP_Add", "KP_Add" });
            zoom_section.AppendItem(ZoomIn.CreateMenuItem());

            app.AddAccelAction(ZoomOut, new[] { "<Primary>minus", "<Primary>underscore", "minus", "<Primary>KP_Subtract", "KP_Subtract" });
            zoom_section.AppendItem(ZoomOut.CreateMenuItem());

            app.AddAccelAction(ActualSize, new[] { "<Primary>0", "<Primary><Shift>A" });
            zoom_section.AppendItem(ActualSize.CreateMenuItem());

            app.AddAccelAction(ZoomToWindow, "<Primary>B");
            zoom_section.AppendItem(ZoomToWindow.CreateMenuItem());

            app.AddAccelAction(Fullscreen, "F11");
            zoom_section.AppendItem(Fullscreen.CreateMenuItem());

            var metric_section = new GLib.Menu();

            menu.AppendSection(null, metric_section);

            var metric_menu = new GLib.Menu();

            metric_section.AppendSubmenu(Translations.GetString("Ruler Units"), metric_menu);

            app.AddAction(RulerMetric);
            metric_menu.Append(Translations.GetString("Pixels"), $"app.{RulerMetric.Name}(0)");
            metric_menu.Append(Translations.GetString("Inches"), $"app.{RulerMetric.Name}(1)");
            metric_menu.Append(Translations.GetString("Centimeters"), $"app.{RulerMetric.Name}(2)");

            var show_hide_section = new GLib.Menu();

            menu.AppendSection(null, show_hide_section);

            var show_hide_menu = new GLib.Menu();

            show_hide_section.AppendSubmenu(Translations.GetString("Show/Hide"), show_hide_menu);

            app.AddAction(PixelGrid);
            show_hide_menu.AppendItem(PixelGrid.CreateMenuItem());

            app.AddAction(Rulers);
            show_hide_menu.AppendItem(Rulers.CreateMenuItem());

            app.AddAction(ToolBar);
            show_hide_menu.AppendItem(ToolBar.CreateMenuItem());

            app.AddAction(StatusBar);
            show_hide_menu.AppendItem(StatusBar.CreateMenuItem());

            app.AddAction(ToolBox);
            show_hide_menu.AppendItem(ToolBox.CreateMenuItem());

            app.AddAction(ImageTabs);
            show_hide_menu.AppendItem(ImageTabs.CreateMenuItem());
        }
Exemple #3
0
 public EffectScreenshot(Fullscreen fs, FindWindows.Window window, int x, int y, int width, int height)
 {
     _fs     = fs;
     _window = window;
     _x      = x;
     _y      = y;
     _width  = width;
     _height = height;
 }
Exemple #4
0
 public EffectScreenshot(Fullscreen fs, FindWindows.Window window, int x, int y, int width, int height)
 {
     _fs = fs;
     _window = window;
     _x = x;
     _y = y;
     _width = width;
     _height = height;
 }
 public EffectTransparentScreenshot(Fullscreen fs, FindWindows.Window window, int x, int y, int width, int height, EffectBackground background)
 {
     _fs = fs;
     _window = window;
     _x = x;
     _y = y;
     _width = width;
     _height = height;
     _effectBackground = background;
 }
Exemple #6
0
 public EffectTransparentScreenshot(Fullscreen fs, FindWindows.Window window, int x, int y, int width, int height, EffectBackground background)
 {
     _fs               = fs;
     _window           = window;
     _x                = x;
     _y                = y;
     _width            = width;
     _height           = height;
     _effectBackground = background;
 }
Exemple #7
0
        public void CreateMainMenu(Gtk.Menu menu)
        {
            MenuItem show_pad = (MenuItem)menu.Children[0];

            menu.Remove(show_pad);

            menu.Append(ToolBar.CreateMenuItem());
            menu.Append(PixelGrid.CreateMenuItem());
            menu.Append(Rulers.CreateMenuItem());
            menu.Append(ImageTabs.CreateMenuItem());
            menu.AppendSeparator();

            ImageMenuItem zoomin = ZoomIn.CreateAcceleratedMenuItem(Gdk.Key.plus, Gdk.ModifierType.ControlMask);

            zoomin.AddAccelerator("activate", PintaCore.Actions.AccelGroup, new AccelKey(Gdk.Key.equal, Gdk.ModifierType.ControlMask, AccelFlags.Visible));
            zoomin.AddAccelerator("activate", PintaCore.Actions.AccelGroup, new AccelKey(Gdk.Key.equal, 0, AccelFlags.Visible));
            zoomin.AddAccelerator("activate", PintaCore.Actions.AccelGroup, new AccelKey(Gdk.Key.KP_Add, Gdk.ModifierType.ControlMask, AccelFlags.Visible));
            zoomin.AddAccelerator("activate", PintaCore.Actions.AccelGroup, new AccelKey(Gdk.Key.KP_Add, 0, AccelFlags.Visible));
            menu.Append(zoomin);

            ImageMenuItem zoomout = ZoomOut.CreateAcceleratedMenuItem(Gdk.Key.minus, Gdk.ModifierType.ControlMask);

            zoomout.AddAccelerator("activate", PintaCore.Actions.AccelGroup, new AccelKey(Gdk.Key.minus, Gdk.ModifierType.ControlMask, AccelFlags.Visible));
            zoomout.AddAccelerator("activate", PintaCore.Actions.AccelGroup, new AccelKey(Gdk.Key.minus, 0, AccelFlags.Visible));
            zoomout.AddAccelerator("activate", PintaCore.Actions.AccelGroup, new AccelKey(Gdk.Key.KP_Subtract, Gdk.ModifierType.ControlMask, AccelFlags.Visible));
            zoomout.AddAccelerator("activate", PintaCore.Actions.AccelGroup, new AccelKey(Gdk.Key.KP_Subtract, 0, AccelFlags.Visible));
            menu.Append(zoomout);

            ImageMenuItem actualsize = ActualSize.CreateAcceleratedMenuItem(Gdk.Key.Key_0, Gdk.ModifierType.ControlMask);

            actualsize.AddAccelerator("activate", PintaCore.Actions.AccelGroup, new AccelKey(Gdk.Key.A, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask, AccelFlags.Visible));
            menu.Append(actualsize);
            menu.Append(ZoomToWindow.CreateAcceleratedMenuItem(Gdk.Key.B, Gdk.ModifierType.ControlMask));
            //menu.Append (ZoomToSelection.CreateAcceleratedMenuItem (Gdk.Key.B, Gdk.ModifierType.ControlMask | Gdk.ModifierType.ShiftMask));
            menu.Append(Fullscreen.CreateAcceleratedMenuItem(Gdk.Key.F11, Gdk.ModifierType.None));

            menu.AppendSeparator();

            Gtk.Action unit_action = new Gtk.Action("RulerUnits", Mono.Unix.Catalog.GetString("Ruler Units"), null, null);
            Menu       unit_menu   = (Menu)menu.AppendItem(unit_action.CreateSubMenuItem()).Submenu;

            unit_menu.Append(Pixels.CreateMenuItem());
            unit_menu.Append(Inches.CreateMenuItem());
            unit_menu.Append(Centimeters.CreateMenuItem());

            menu.AppendSeparator();
            menu.Append(show_pad);
        }
Exemple #8
0
        protected override void Render(HtmlTextWriter output)
        {
            StringBuilder sb = new StringBuilder("<OBJECT ID='" +
                                                 this.ClientID + "' name='" + this.ClientID + "' " +
                                                 "CLASSID='CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6'" +
                                                 "VIEWASTEXT" +
                                                 "height=" + Height + " " + "width=" + Width +
                                                 ">");

            //Render properties as object parameters
            sb.Append("<PARAM name='URL' value='" +
                      FileName + "'>");
            sb.Append("<PARAM name='mute' value='" +
                      Mute.ToString() + "'>");
            sb.Append("<PARAM name='AutoStart' value='" +
                      Autostart.ToString() + "'>");
            sb.Append("<PARAM name='balance' value='" +
                      Balance + "'>");
            sb.Append("<PARAM name='enabled' value='" +
                      Enabled.ToString() + "'>");
            sb.Append("<PARAM name='fullScreen' value='" +
                      Fullscreen.ToString() + "'>");
            sb.Append("<PARAM name='playCount' value='" +
                      PlayCount.ToString() + "'>");
            if (Volume >= 0)
            {
                sb.Append("<PARAM name='volume' value='" +
                          Volume + "'>");
            }
            sb.Append("<PARAM name='rate' value='" +
                      Rate + "'>");
            sb.Append("<PARAM name='StretchToFit' value='" +
                      StretchToFit.ToString() + "'>");
            sb.Append("<PARAM name='enabledContextMenu' value='" +
                      EnableContextMenu.ToString() + "'>");

            //output ending object tag
            sb.Append("</OBJECT>");

            //flush everything to the output stream
            output.Write(sb.ToString());
        }
        private void ViewFullSize()
        {
            var item = SelectedItem;

            if (item == null)
            {
                return;
            }
            ServiceProvider.Instance.OnMessage(Messages.SetBusy, "Processing  image ...");
            try
            {
                IMagickImage image = new MagickImage(item.TempFile);
                foreach (var plugin in ServiceProvider.Instance.PreAdjustPlugins)
                {
                    image = plugin.Execute(image, Session.Variables);
                }
                foreach (var plugin in ServiceProvider.Instance.AdjustPlugins)
                {
                    image = plugin.Execute(image, item.Variables);
                }
                var bitmap = image.ToBitmapSource();
                bitmap.Freeze();



                item.IsBusy = false;
                Application.Current.Dispatcher.BeginInvoke(new Action(() =>
                {
                    ServiceProvider.Instance.OnMessage(Messages.ClearBusy);
                    Fullscreen wnd   = new Fullscreen();
                    wnd.Image.Source = bitmap;
                    wnd.ShowDialog();
                }));
            }
            catch (Exception e)
            {
                ServiceProvider.Instance.OnMessage(Messages.StatusMessage, "Image processing error");
                Log.Debug("Image processing error", e);
            }
            ServiceProvider.Instance.OnMessage(Messages.ClearBusy);
        }
Exemple #10
0
 public EffectScreenshot(Fullscreen fs, FindWindows.Window window, int x, int y, int width, int height, EffectBackground background)
     : this(fs, window, x, y, width, height)
 {
     _effectBackground = background;
 }
Exemple #11
0
        public override void PrintInitialization(StringBuilder builder)
        {
            //myDialog = DialogCreate(width, height, anchor, x, y, modal)
            builder.Append("\t\t");
            builder.Append(Name);
            builder.Append(" = DialogCreate(");
            builder.Append(Size.Width);
            builder.Append(", ");
            builder.Append(Size.Height);
            builder.Append(", ");
            builder.Append(Anchor.ToSCIIString());
            builder.Append(", ");
            builder.Append(Offset.X);
            builder.Append(", ");
            builder.Append(Offset.Y);
            builder.Append(", ");
            builder.Append(Modal.ToString().ToLower());
            builder.AppendLine(");");

            Dialog defaultDialog = new Dialog(null, new Rectangle(0, 0, 100, 100), Data);

            defaultDialog.ContextChanged(Context);

            if (Image != defaultDialog.Image && (defaultDialog.Image == null || Image.Path != defaultDialog.Image.Path))
            {
                //Set texture
                //DialogSetImage(myDialog, "my texture");
                builder.Append("\t\tDialogSetImage(");
                builder.Append(Name);
                builder.Append(", \"");
                builder.Append(Image.Path.Replace("\\", "\\\\"));
                builder.AppendLine("\");");
            }

            if (Title != defaultDialog.Title)
            {
                //DialogSetTitle(myDialog, "my title");
                builder.Append("\t\tDialogSetTitle(");
                builder.Append(Name);
                builder.Append(", \"");
                builder.Append(Title);
                builder.AppendLine("\");");
            }

            if (Offscreen != defaultDialog.Offscreen)
            {
                //DialogSetOffscreen(myDialog, true);
                builder.Append("\t\tDialogSetOffscreen(");
                builder.Append(Name);
                builder.Append(", \"");
                builder.Append(Offscreen);
                builder.AppendLine("\");");
            }


            if (Fullscreen != defaultDialog.Fullscreen)
            {
                //DialogSetOffscreen(myDialog, true);
                builder.Append("\t\tDialogSetFullscreen(");
                builder.Append(Name);
                builder.Append(", ");
                builder.Append(Fullscreen.ToString().ToLower());
                builder.AppendLine(");");
            }

            if (BackgroundVisible != defaultDialog.BackgroundVisible)
            {
                //DialogSetOffscreen(myDialog, true);
                builder.Append("\t\tDialogSetImageVisible(");
                builder.Append(Name);
                builder.Append(", ");
                builder.Append(BackgroundVisible.ToString().ToLower());
                builder.AppendLine(");");
            }

            if (Transparency != defaultDialog.Transparency)
            {
                //DialogSetOffscreen(myDialog, true);
                builder.Append("\t\tDialogSetTransparency(");
                builder.Append(Name);
                builder.Append(", \"");
                builder.Append(Transparency);
                builder.AppendLine("\");");
            }

            if (Visible != defaultDialog.Visible)
            {
                //this->SetVisible(PlayerGroupAll(), true);
                builder.Append("\t\tthis->SetVisible(PlayerGroupAll(), ");
                builder.Append(Visible.ToString().ToLower());
                builder.AppendLine(");");
            }
        }
Exemple #12
0
 public string Export()
 {
     return(String.Format("{0},{1},{2},{3},{4},{5}", (int)ScreenIndex, Fullscreen.ToString(), Left, Top, Width, Height));
 }
Exemple #13
0
 public EffectScreenshot(Fullscreen fs, FindWindows.Window window, int x, int y, int width, int height, EffectBackground background)
     : this(fs, window, x, y, width, height)
 {
     _effectBackground = background;
 }
Exemple #14
0
    // Use this for initialization
    private void Start()
    {
        // add button functions

        // reset RealGlobals
        ResetRG.GetComponent <Button>().onClick.AddListener(() => {
            if (RealGlobalCooldown > 0)
            {
                LuaScriptBinder.ClearVariables();
                RealGlobalCooldown = 60 * 2;
                ResetRG.GetComponentInChildren <Text>().text = !GlobalControls.crate ? "Real Globals Erased!" : "REEL GOLBELZ DELEET!!!!!";
            }
            else
            {
                RealGlobalCooldown = 60 * 2;
                ResetRG.GetComponentInChildren <Text>().text = !GlobalControls.crate ? "Are you sure?" : "R U SUR???";
            }
        });

        // reset AlMightyGlobals
        ResetAG.GetComponent <Button>().onClick.AddListener(() => {
            if (AlMightyGlobalCooldown > 0)
            {
                LuaScriptBinder.ClearAlMighty();
                AlMightyGlobalCooldown = 60 * 2;
                ResetAG.GetComponentInChildren <Text>().text = !GlobalControls.crate ? "AlMighty Globals Erased!" : "ALMEIGHTIZ DELEET!!!!!";
            }
            else
            {
                AlMightyGlobalCooldown = 60 * 2;
                ResetAG.GetComponentInChildren <Text>().text = !GlobalControls.crate ? "Are you sure?" : "R U SUR???";
            }
        });

        // clear Save
        ClearSave.GetComponent <Button>().onClick.AddListener(() => {
            if (SaveCooldown > 0)
            {
                File.Delete(Application.persistentDataPath + "/save.gd");
                SaveCooldown = 60 * 2;
                ClearSave.GetComponentInChildren <Text>().text = !GlobalControls.crate ? "Save wiped!" : "RIP";
            }
            else
            {
                SaveCooldown = 60 * 2;
                ClearSave.GetComponentInChildren <Text>().text = !GlobalControls.crate ? "Are you sure?" : "R U SUR???";
            }
        });

        // toggle safe mode
        Safe.GetComponent <Button>().onClick.AddListener(() => {
            ControlPanel.instance.Safe = !ControlPanel.instance.Safe;

            // save Safe Mode preferences to AlMighties
            LuaScriptBinder.SetAlMighty(null, "CYFSafeMode", DynValue.NewBoolean(ControlPanel.instance.Safe), true);

            Safe.GetComponentInChildren <Text>().text = !GlobalControls.crate
                ? ("Safe mode: " + (ControlPanel.instance.Safe ? "On" : "Off"))
                : ("SFAE MDOE: " + (ControlPanel.instance.Safe ? "ON" : "OFF"));
        });
        Safe.GetComponentInChildren <Text>().text = !GlobalControls.crate
            ? ("Safe mode: " + (ControlPanel.instance.Safe ? "On" : "Off"))
            : ("SFAE MDOE: " + (ControlPanel.instance.Safe ? "ON" : "OFF"));

        // toggle retrocompatibility mode
        Retro.GetComponent <Button>().onClick.AddListener(() => {
            GlobalControls.retroMode = !GlobalControls.retroMode;

            // save RetroMode preferences to AlMighties
            LuaScriptBinder.SetAlMighty(null, "CYFRetroMode", DynValue.NewBoolean(GlobalControls.retroMode), true);

            Retro.GetComponentInChildren <Text>().text = !GlobalControls.crate
                ? ("Retrocompatibility Mode: " + (GlobalControls.retroMode ? "On" : "Off"))
                : ("RETORCMOAPTIILBIYT MOD: " + (GlobalControls.retroMode ? "ON" : "OFF"));
        });
        Retro.GetComponentInChildren <Text>().text = !GlobalControls.crate
            ? ("Retrocompatibility Mode: " + (GlobalControls.retroMode ? "On" : "Off"))
            : ("RETORCMOAPTIILBIYT MOD: " + (GlobalControls.retroMode ? "ON" : "OFF"));

        // toggle pixel-perfect fullscreen
        Fullscreen.GetComponent <Button>().onClick.AddListener(() => {
            ScreenResolution.perfectFullscreen = !ScreenResolution.perfectFullscreen;

            // save RetroMode preferences to AlMighties
            LuaScriptBinder.SetAlMighty(null, "CYFPerfectFullscreen", DynValue.NewBoolean(ScreenResolution.perfectFullscreen), true);

            Fullscreen.GetComponentInChildren <Text>().text = !GlobalControls.crate
                ? ("Blurless Fullscreen: " + (ScreenResolution.perfectFullscreen ? "On" : "Off"))
                : ("NOT UGLEE FULLSCREEN: " + (ScreenResolution.perfectFullscreen ? "ON" : "OFF"));
        });
        Fullscreen.GetComponentInChildren <Text>().text = !GlobalControls.crate
            ? ("Blurless Fullscreen: " + (ScreenResolution.perfectFullscreen ? "On" : "Off"))
            : ("NOT UGLEE FULLSCREEN: " + (ScreenResolution.perfectFullscreen ? "ON" : "OFF"));

        // change window scale
        Scale.GetComponent <Button>().onClick.AddListener(() => {
            double maxScale = System.Math.Floor(Screen.currentResolution.height / 480.0);
            if (ScreenResolution.windowScale < maxScale)
            {
                ScreenResolution.windowScale += 1;
            }
            else
            {
                ScreenResolution.windowScale = 1;
            }

            if (Screen.height != ScreenResolution.windowScale * 480 && !Screen.fullScreen)
            {
                ScreenResolution.SetFullScreen(false);
            }

            // save RetroMode preferences to AlMighties
            LuaScriptBinder.SetAlMighty(null, "CYFWindowScale", DynValue.NewNumber(ScreenResolution.windowScale), true);

            Scale.GetComponentInChildren <Text>().text = !GlobalControls.crate
                ? ("Window Scale: " + ScreenResolution.windowScale.ToString() + "x")
                : ("WEENDO STRECH: " + ScreenResolution.windowScale.ToString() + "X");
        });
        ScreenResolution.windowScale--;
        Scale.GetComponent <Button>().onClick.Invoke();

        // Discord Rich Presence
        // Change Discord Status Visibility
        Discord.GetComponent <Button>().onClick.AddListener(() => {
            Discord.GetComponentInChildren <Text>().text = (!GlobalControls.crate ? "Discord Display: " : "DEESCORD DESPLAY: ") + DiscordControls.ChangeVisibilitySetting(1);
        });
        Discord.GetComponentInChildren <Text>().text = (!GlobalControls.crate ? "Discord Display: " : "DEESCORD DESPLAY: ") + DiscordControls.ChangeVisibilitySetting(0);

        // exit
        Exit.GetComponent <Button>().onClick.AddListener(() => { SceneManager.LoadScene("ModSelect"); });

        // Crate Your Frisk
        if (!GlobalControls.crate)
        {
            return;
        }
        // labels
        GameObject.Find("OptionsLabel").GetComponent <Text>().text     = "OPSHUNS";
        GameObject.Find("DescriptionLabel").GetComponent <Text>().text = "MORE TXET";

        // buttons
        ResetRG.GetComponentInChildren <Text>().text   = "RESTE RELA GOLBALZ";
        ResetAG.GetComponentInChildren <Text>().text   = "RESTE ALMIGTY GOLBALZ";
        ClearSave.GetComponentInChildren <Text>().text = "WYPE SAV";
        Exit.GetComponentInChildren <Text>().text      = "EXIT TOO MAD SELCT";
    }