Exemple #1
0
        public static void InitPlugin(CamBamUI ui)
        {
            ToolStripMenuItem menu_entry;

            menu_entry        = new ToolStripMenuItem();
            menu_entry.Text   = profile_mop_name;
            menu_entry.Click += profile_mop_onclick;
            menu_entry.Image  = resources.cam_trochoprof1;

            insert_in_top_menu(ui, menu_entry);

            menu_entry        = new ToolStripMenuItem();
            menu_entry.Text   = profile_mop_name;
            menu_entry.Click += profile_mop_onclick;
            menu_entry.Image  = resources.cam_trochoprof1;

            insert_in_context_menu(ui, menu_entry);

            menu_entry        = new ToolStripMenuItem();
            menu_entry.Text   = pocket_mop_name;
            menu_entry.Click += pocket_mop_onclick;
            menu_entry.Image  = resources.cam_trochopock1;

            insert_in_top_menu(ui, menu_entry);

            menu_entry        = new ToolStripMenuItem();
            menu_entry.Text   = pocket_mop_name;
            menu_entry.Click += pocket_mop_onclick;
            menu_entry.Image  = resources.cam_trochopock1;

            insert_in_context_menu(ui, menu_entry);

            // defer attachment to toolbar until the first show.
            // Custom CAM Toolbar plugin (if installed) may already attached us after Load event, so we react on later Shown event
            ThisApplication.TopWindow.Shown += on_window_shown;

            if (CADFile.ExtraTypes == null)
            {
                CADFile.ExtraTypes = new List <Type>();
            }
            CADFile.ExtraTypes.Add(typeof(MOPTrochopock));
            CADFile.ExtraTypes.Add(typeof(Mop_matmill));
            CADFile.ExtraTypes.Add(typeof(MOPTrochoprof));

            {
                MOPTrochopock o             = new MOPTrochopock();
                XmlSerializer xmlSerializer = new XmlSerializer(typeof(MOPTrochopock));
                MemoryStream  stream        = new MemoryStream();
                xmlSerializer.Serialize(stream, o);
            }

            {
                MOPTrochoprof o             = new MOPTrochoprof();
                XmlSerializer xmlSerializer = new XmlSerializer(typeof(MOPTrochoprof));
                MemoryStream  stream        = new MemoryStream();
                xmlSerializer.Serialize(stream, o);
            }
        }
Exemple #2
0
        private static void pocket_mop_onclick(object sender, EventArgs ars)
        {
            if (!PolylineUtils.ConfirmSelected(CamBamUI.MainUI.ActiveView))
            {
                return;
            }

            MOPTrochopock mop = new MOPTrochopock(CamBamUI.MainUI.ActiveView.CADFile, CamBamUI.MainUI.ActiveView.Selection);

            CamBamUI.MainUI.InsertMOP(mop);
        }
Exemple #3
0
 public MOPTrochopock(MOPTrochopock src) : base(src)
 {
     Min_stepover = src.Min_stepover;
 }