Exemple #1
0
 public static void RegisterVerbs()
 {
     Verb.Register(Codes.ConvertToPath, new ConvertToPath());
     Verb.Register(Codes.RemoveVertex, new VertexChange());
     Verb.Register(Codes.AddVertex, new VertexChange());
     Verb.Register(Codes.ConvertToBezier, new VertexChange());
     Verb.Register(Codes.ConvertToLine, new VertexChange());
     Verb.Register(Codes.SmoothVertex, new VertexChange());
     Verb.Register(Codes.CornerVertex, new VertexChange());
     Verb.Register(Codes.MakeMask, new MakeMask());
     Verb.Register(Codes.RemoveMask, new RemoveMask());
 }
Exemple #2
0
        public static void RegisterDocumentVerbs()
        {
            Verb.Register(Codes.NewDocument, new NewDocument());
            Verb.Register(Codes.Open, new OpenDocument());
            Verb.Register(Codes.Save, new SaveDocument());
            Verb.Register(Codes.SaveAs, new SaveDocument());
            Verb.Register(Codes.SaveAsWorksheet, new SaveDocument());
            Verb.Register(Codes.Print, new PrintDocument()
            {
                Direct = false
            });
            Verb.Register(Codes.PrintDirectly, new PrintDocument()
            {
                Direct = true
            });
            Verb.Register(Codes.PrintPreview, new PrintDocument()
            {
                Preview = true
            });
            Verb.Register(Codes.ExportEMF, new ExportEMF());
            Verb.Register(Codes.ExportSVG, new ExportSVG());
            Verb.Register(Codes.ExportJPEG, new ExportImage()
            {
                extension = "JPEG", format = ImageFormat.Jpeg
            });
            Verb.Register(Codes.ExportPNG, new ExportImage()
            {
                extension = "PNG", format = ImageFormat.Png
            });
            Verb.Register(Codes.ExportPageAsDocument, new ExportPageAsDocument());
            Verb.Register(Codes.ImportImage, new ImportImage());
            Verb.Register(Codes.Quit, (source, view, transaction) =>
            {
                if (Globals.Root.Editor.CheckDiscard(Globals.Root.CurrentDocument))
                {
                    Globals.Root.CloseApplication();
                }
            });
            Verb.Register(Codes.CloseDocument, new CloseDocument());

            Verb.Register(Codes.Start, (source, pnlView, tx) => { Globals.Root.Editor.DoStartVerb(); });
            Verb.Register(Codes.StartupScript, (source, pnlView, tx) => { frmEditStartupScript.Display(Globals.Root.Editor); });
            Verb.Register(Codes.DefaultItemScript, (source, pnlView, tx) => { frmEditDefaultScripts.Display(Codes.DefaultItemScript, Globals.Root.Editor); });
            Verb.Register(Codes.DefaultEscapeScript, (source, pnlView, tx) => { frmEditDefaultScripts.Display(Codes.DefaultEscapeScript, Globals.Root.Editor); });
            Verb.Register(Codes.DefaultGroupScript, (source, pnlView, tx) => { frmEditDefaultScripts.Display(Codes.DefaultGroupScript, Globals.Root.Editor); });
            Verb.Register(Codes.ExportAsText, new ExportAsText());
            Verb.Register(Codes.UserUser, new UserUser());
            Verb.Register(Codes.UserTeacher, new UserTeacher());

            Verb.Register(Codes.Group, new NullVerb());
            Verb.Register(Codes.Ungroup, new NullVerb());
        }
Exemple #3
0
 public static void RegisterVerbs()
 {
     Verb.Register(Codes.HidePopup, new ShowHidePopup()
     {
         Show = false
     });
     Verb.Register(Codes.ShowPopup, new ShowHidePopup()
     {
         Show = true
     });
     Verb.Register(Codes.ShowAllPopups, new ShowHideAllPopups()
     {
         Show = true
     });
     Verb.Register(Codes.HideAllPopups, new ShowHideAllPopups()
     {
         Show = false
     });
     Verb.Register(Codes.SetPromptItem, new SetPromptItem());
     Verb.Register(Codes.ShowGraphicSelection, new ShowHideGraphicSelection()
     {
         Show = true
     });
     Verb.Register(Codes.HideGraphicSelection, new ShowHideGraphicSelection()
     {
         Show = false
     });
     Verb.Register(Codes.ShowTextSelection, new ShowHideTextSelection()
     {
         Show = true
     });
     Verb.Register(Codes.HideTextSelection, new ShowHideTextSelection()
     {
         Show = false
     });
     Verb.Register(Codes.GridWizard, new GridWizard());
     Verb.Register(Codes.ViewPredictionWords, new ViewPredictionWords());
     Verb.Register(Codes.EditItemBounds, new EditItemBounds());
     Verb.Register(Codes.EditWindowBounds, new EditWindowBounds());
     Verb.Register(Codes.CopyScripts, new CopyScripts());
     Verb.Register(Codes.CopyPresentation, new CopyPresentation());
     Verb.Register(Codes.CCFUpdate, new CCFUpdate());
     Verb.Register(Codes.SaveSettings, new SaveSettings());
     Verb.Register(Codes.LoadSettings, new LoadSettings());
     Verb.Register(Codes.ImportIRM, new ImportIRM());
     Verb.Register(Codes.ExportIRM, new ExportIRM());
     Verb.Register(Codes.MakeActive, new MakeActive());
     Verb.Register(Codes.MakeInactive, new MakeInactive());
     Verb.Register(Codes.SAWManual, (source, pnlView, Transaction) => { Globals.Root.ShellOpen(Path.Combine(Globals.Root.InternalFolder, "SAW Manual.pdf")); });
     Verb.Register(Codes.YoctoTest, (SourceFilter, pnlView, Transaction) => { frmYocto.Display(); }).MightOpenDialogValue = true;
 }
Exemple #4
0
 public static void RegisterVerbs()
 {
     Verb.Register(Codes.Redo, new Redo());
     Verb.Register(Codes.Undo, new Undo());
     Verb.Register(Codes.Paste, new Paste());
     Verb.Register(Codes.Copy, new CopyCut()
     {
         IsCut = false
     });
     Verb.Register(Codes.Cut, new CopyCut()
     {
         IsCut = true
     });
     Verb.Register(Codes.Delete, new Delete());
 }
Exemple #5
0
 public static void RegisterDrawingVerbs()
 {
     Verb.Register(Codes.Choose, new Choose());
     Verb.Register(Codes.ChooseExisting, new DrawingVerbDoneByPanel());
     Verb.Register(Codes.Cancel, new Cancel());
     Verb.Register(Codes.Complete, new DrawingVerbDoneByPanel());
     Verb.Register(Codes.Increment, new DrawingVerbDoneByPanel());
     Verb.Register(Codes.Decrement, new DrawingVerbDoneByPanel());
     Verb.Register(Codes.Up, new MouseMove()
     {
         X = 0, Y = -1
     });
     Verb.Register(Codes.Right, new MouseMove()
     {
         X = 1, Y = 0
     });
     Verb.Register(Codes.Down, new MouseMove()
     {
         X = 0, Y = 1
     });
     Verb.Register(Codes.Left, new MouseMove()
     {
         X = -1, Y = 0
     });
     Verb.Register(Codes.MouseSmallStep, new MouseStep()
     {
         Step = AppliedConfig.MouseSteps.Small
     });
     Verb.Register(Codes.MouseMediumStep, new MouseStep()
     {
         Step = AppliedConfig.MouseSteps.Medium
     });
     Verb.Register(Codes.MouseLargeStep, new MouseStep()
     {
         Step = AppliedConfig.MouseSteps.Large
     });
     Verb.Register(Codes.RestoreFocus, (source, pnlView, tx) => { pnlView.Focus(); });
     Verb.Register(Codes.PageUp, (source, pnlView, tx) => { pnlView.PageUpDown(-1); });
     Verb.Register(Codes.PageDown, (source, pnlView, tx) => { pnlView.PageUpDown(1); });
     Verb.Register(Codes.ScrollDown, (source, pnlView, tx) => { pnlView.DoScroll(new Size(0, 2)); });
     Verb.Register(Codes.ScrollUp, (source, pnlView, tx) => { pnlView.DoScroll(new Size(0, -2)); });
     Verb.Register(Codes.ScrollLeft, (source, pnlView, tx) => { pnlView.DoScroll(new Size(-2, 0)); });
     Verb.Register(Codes.ScrollRight, (source, pnlView, tx) => { pnlView.DoScroll(new Size(2, 0)); });
 }
Exemple #6
0
 public static void RegisterVerbs()
 {
     Verb.Register(Codes.PageNext, new PageNext());
     Verb.Register(Codes.PagePrevious, new PagePrevious());
     Verb.Register(Codes.PageDelete, new PageDelete());
     Verb.Register(Codes.PageClear, new PageClear());
     Verb.Register(Codes.PageInsertAfter, new PageAdd());
     Verb.Register(Codes.PageDuplicate, new PageAdd()
     {
         Duplicate = true
     });
     Verb.Register(Codes.PageInsertBefore, new PageAdd()
     {
         Offset = 0
     });
     Verb.Register(Codes.PageMoveDown, new PageMoveDown());
     Verb.Register(Codes.PageMoveUp, new PageMoveUp());
     Verb.Register(Codes.EditPaper, new EditPaper());
     Verb.Register(Codes.PageSize, new PageSize());
     Verb.Register(Codes.SetOrigin, new SetOrigin());
 }
Exemple #7
0
 public static void RegisterVerbs()
 {
     Verb.Register(Codes.SendBack, new ChangeZ());
     Verb.Register(Codes.SendBackOneStep, new ChangeZ());
     Verb.Register(Codes.BringFront, new ChangeZ());
     Verb.Register(Codes.BringFrontOneStep, new ChangeZ());
     Verb.Register(Codes.Texture, new SelectTexture());
     Verb.Register(Codes.FlipHorizontal, new QuickTransform());
     Verb.Register(Codes.FlipVertical, new QuickTransform());
     Verb.Register(Codes.RotateLeft, new QuickTransform());
     Verb.Register(Codes.RotateRight, new QuickTransform());
     Verb.Register(Codes.NudgeDown, new Nudge()
     {
         X = 0, Y = 1
     });
     Verb.Register(Codes.NudgeUp, new Nudge()
     {
         X = 0, Y = -1
     });
     Verb.Register(Codes.NudgeLeft, new Nudge()
     {
         X = -1, Y = 0
     });
     Verb.Register(Codes.NudgeRight, new Nudge()
     {
         X = 1, Y = 0
     });
     Verb.Register(Codes.TextLarger, new ChangeTextSize()
     {
         Delta = 1
     });
     Verb.Register(Codes.TextSmaller, new ChangeTextSize()
     {
         Delta = -1
     });
     Verb.Register(Codes.TidyAngle, new Tidy()
     {
         Mode = Shape.SnapModes.Angle
     });
     Verb.Register(Codes.TidyShape, new Tidy()
     {
         Mode = Shape.SnapModes.Shape
     });
     Verb.Register(Codes.TidyGrid, new Tidy()
     {
         Mode = Shape.SnapModes.Grid
     });
     Verb.Register(Codes.DoubleClick, new DoubleClick());
     Verb.Register(Codes.QuickAddButtons, (source, pnlView, tx) => { frmAddButtons.Display(Globals.Root.CurrentPage); }, true, view => Globals.Root.CurrentDocument.ActivityID.Equals(Activities.PaletteID));
     Verb.Register(Codes.FreeTextToTextLine, new FreeTextToLine());
     Verb.Register(Codes.SmallestHeight, new Alignment());
     Verb.Register(Codes.SmallestWidth, new Alignment());
     Verb.Register(Codes.LargestHeight, new Alignment());
     Verb.Register(Codes.LargestWidth, new Alignment());
     for (Codes code = Codes.AlignLeft; code <= Codes._AfterAlignment; code++)
     {
         Verb.Register(code, new Alignment());
     }
     Verb.Register(Codes.MakeChild, new MakeChild());
     Verb.Register(Codes.MoveOutOfContainer, new MoveOutOfContainer());
     Verb.Register(Codes.ToggleBold, new ToggleBold());
     Verb.Register(Codes.ToggleItalic, new ToggleItalic());
     Verb.Register(Codes.ToggleUnderline, new ToggleUnderline());
 }