Ejemplo n.º 1
0
 public BottleSlicerPlugin(IRobotWare root, ICallback callback, IParameterManager mgr) :
     this()
 {
     mRoot     = root;
     mCallback = callback;
     mParamMgr = mgr;
 }
Ejemplo n.º 2
0
 public Specification(IRobotWare root, ICallback callback, IEnumerable <IFactory> factories) :
     this()
 {
     mRoot      = root;
     mCallback  = callback;
     mFactories = factories;
 }
Ejemplo n.º 3
0
 // called by RobotWare when:
 //    adding step to a specification
 //    loading or running specification
 //
 // All initialisation should be done here and everything
 // should be set to a safe state.
 public FaceArea(IRobotWare root, ICallback callback, IParameterManager mgr) :
     this()
 {
     mRoot     = root;
     mCallback = callback;
     mParamMgr = mgr;
 }
Ejemplo n.º 4
0
 public PixelResizer(IRobotWare root, ICallback callback, IParameterManager mgr) :
     base(root, callback, mgr)
 {
     mControl.Label1.Text        = @"Pixels Wide:";
     mControl.Label2.Text        = @"Pixels High:";
     mControl.Dimension1.Maximum = mControl.Dimension2.Maximum = 10000;
 }
Ejemplo n.º 5
0
 public Protect(IRobotWare root, ICallback callback, IParameterManager mgr) :
     base(root, callback, mgr)
 {
     mControl.Initialise(root, callback, mgr, BrowserTypes.BothFile);
     mControl.SourceFileSelector.Filter      = Common.FileExtensions.PdfFilesFilter;
     mControl.DestinationFileSelector.Filter = Common.FileExtensions.PdfFilesFilter;
 }
 public SheetMetalEstimator(IRobotWare root, ICallback callback, IParameterManager mgr) :
     this()
 {
     mRoot     = root;
     mCallback = callback;
     mParamMgr = mgr;
 }
Ejemplo n.º 7
0
 public EdgeLengthPercentSelect(IRobotWare root, ICallback callback, IParameterManager mgr) :
     base(root, callback, mgr)
 {
     AreaLabel.Text        = "Threshold:";
     AreaUnits.Text        = "%";
     AreaThreshold.Maximum = 25;
 }
Ejemplo n.º 8
0
 // called by RobotWare when:
 //    adding step to a specification
 //    loading or running specification
 //
 // All initialisation should be done here and everything
 // should be set to a safe state.
 public SampleAddin(IRobotWare root, ICallback callback, IParameterManager mgr) :
     this()
 {
     mRoot     = root;
     mCallback = callback;
     mParamMgr = mgr;
 }
Ejemplo n.º 9
0
 public TemplateCapsule(string cmdName, string text, System.Drawing.Image img, string hint, IRobotWare root, ICallback callback, string fileName)
     : base(cmdName, text, img, hint)
 {
     mRoot     = root;
     mCallback = callback;
     mFileName = fileName;
 }
Ejemplo n.º 10
0
        public MacroFileSelector(IRobotWare root) :
            this()
        {
            mRoot = root;

            RefreshSpecificationsList(string.Empty);
        }
Ejemplo n.º 11
0
        public AssemblyDrawings(IRobotWare root, ICallback callback, IParameterManager mgr) :
            base(root, callback, mgr)
        {
            InitializeComponent();

            // populate templates
            var templateFullDirPath = Path.Combine(Utils.GetSpaceClaimInstallDirectory(), TemplateDir);
            var templates           = from thisTemplate in Directory.EnumerateFiles(templateFullDirPath, "*" + SpaceClaimFileExtn)
                                      select Path.GetFileNameWithoutExtension(thisTemplate);

            Template.DataSource = templates.ToList();
            if (Template.Items.Count > 0)
            {
                Template.SelectedIndex = 0;
            }

            // populate drawing view styles
            DrawingStyle.Items.Clear();

            foreach (var kvp in SupportedViewStyles)
            {
                DrawingStyle.Items.Add(kvp.Key);
            }
            DrawingStyle.SelectedIndex = 0;
        }
Ejemplo n.º 12
0
        public ManagerCtl(IRobotWare root) :
            this()
        {
            mRoot = root;
            if (!mRoot.IsLicensed)
            {
                Utils.DoRequestLicense(mRoot.ApplicationName, mRoot.Version, Resources.robot_32x32_icon, () => mRoot.IsLicensed);
            }

            // http://crashreporterdotnet.codeplex.com/documentation
            Application.ThreadException += ApplicationThreadException;

            // http://autoupdaterdotnet.codeplex.com/documentation
            const string EllieWare  = @"http://www.EllieWare.com";
            var          appCast    = mRoot.ApplicationName.Replace(' ', '_') + ".xml";
            var          appCastUrl = EllieWare + @"/" + appCast;

            AutoUpdater.Start(appCastUrl, mRoot.ApplicationName, mRoot.Version);

            // have to explicitly remove specification list otherwise we get a ghost version
            MainTable.Controls.Remove(mSpecs);

            // recreate specification list from the correct root aka location
            mSpecs = new SpecificationCtl(mRoot)
            {
                Dock = DockStyle.Fill
            };
            mSpecs.SelectedSpecificationChanged += Specs_SelectedSpecificationChanged;
            mSpecs.SpecificationDoubleClick     += Specs_SpecificationDoubleClick;
            MainTable.Controls.Add(mSpecs, 0, 0);

            UpdateButtons();
        }
Ejemplo n.º 13
0
        public override void Initialise(IRobotWare root, ICallback callback, IParameterManager mgr)
        {
            base.Initialise(root, callback, mgr);

            mRoot       = root;
            mParamMgr   = mgr;
            mBatchParam = new DirectoryBatchParameter("Batch Parameter", mRoot.UserSpecificationFolder, "*.*");
        }
Ejemplo n.º 14
0
        public FtpDualItemIOBase(IRobotWare root, ICallback callback, IParameterManager mgr, BrowserTypes browserTypes) :
            base(root, callback, mgr)
        {
            mControl.Initialise(root, callback, mgr);
            mControl.mDualItemIO.Initialise(root, callback, mgr, browserTypes);

            ConnectEventHandlers();
        }
Ejemplo n.º 15
0
        public override void Initialise(IRobotWare root, ICallback callback, IParameterManager mgr)
        {
            base.Initialise(root, callback, mgr);

            Host.SetParameterManager(mgr);
            UserName.SetParameterManager(mgr);
            Password.SetParameterManager(mgr);
        }
Ejemplo n.º 16
0
        public SpecificationComboBoxItem(IRobotWare root, string filePath, ImageList images) :
            base(Path.GetFileNameWithoutExtension(filePath))
        {
            FilePath = filePath;
            var imageIndex = Utils.IsLocalSpecification(root, FilePath) ?  0 : 1;

            Image = images.Images[imageIndex];
        }
Ejemplo n.º 17
0
        public Difference(IRobotWare root, ICallback callback, IParameterManager mgr) :
            base(root, callback, mgr, BrowserTypes.BothFile)
        {
            SetSourceLabel("Original:");
            SetDestinationLabel("Modified:");

            SetSourceFileSelectorFilter(Utils.NativeFilter);
            SetDestinationFileSelectorFilter(Utils.NativeFilter);
        }
Ejemplo n.º 18
0
        public PercentageResizer(IRobotWare root, ICallback callback, IParameterManager mgr) :
            base(root, callback, mgr)
        {
            mControl.Label1.Text    = @"Percentage:";
            mControl.Label2.Visible = mControl.Dimension2.Visible = false;

            // max = 1000% = 10x
            mControl.Dimension1.Maximum = 1000;
        }
Ejemplo n.º 19
0
        public Logger(IRobotWare root, ICallback callback, IParameterManager mgr) :
            base(root, callback, mgr)
        {
            mControl.mSource.SetParameterManager(mgr);
            mControl.mMessage.SetParameterManager(mgr);

            // get Windows Event Log levels
            mControl.mLevel.DataSource    = Enum.GetNames(typeof(EventLogEntryType)).ToList();
            mControl.mLevel.SelectedIndex = 0;
        }
Ejemplo n.º 20
0
        public CommandConfigEditor(IRobotWare root, CommandConfig cfg) :
            this(root)
        {
            CmdText.Text         = cfg.Text;
            CmdIco.Image         = Image.FromFile(cfg.Image);
            CmdHint.Text         = cfg.Hint;
            Macros.SelectedIndex = Macros.Items.IndexOf(cfg.SpecFileName);

            Text = "Edit: " + cfg.Text;
        }
Ejemplo n.º 21
0
        public SpecificationCtl(IRobotWare root) :
            this()
        {
            mRoot = root;
            if (!mRoot.IsLicensed)
            {
                Utils.DoRequestLicense(mRoot.ApplicationName, mRoot.Version, Resources.robot_32x32_icon, () => mRoot.IsLicensed);
            }

            RefreshSpecificationsList();
        }
Ejemplo n.º 22
0
        public MutableRunnableBase(IRobotWare root, ICallback callback, IParameterManager mgr) :
            this()
        {
            mRoot     = root;
            mCallback = callback;
            mParamMgr = mgr;

            mControl.Initialise(root, callback, mgr);

            mControl.ConfigurationChanged += (sender, args) => FireConfigurationChanged();
        }
Ejemplo n.º 23
0
        public Concatenate(IRobotWare root, ICallback callback, IParameterManager mgr) :
            base(root, callback, mgr)
        {
            mControl.Initialise(root, callback, mgr, BrowserTypes.BothFile);

            mControl.mSourceLabel.Text      = @"File 1:";
            mControl.mDestinationLabel.Text = @"File 2:";

            mControl.SourceFileSelector.Filter      = Common.FileExtensions.PdfFilesFilter;
            mControl.DestinationFileSelector.Filter = Common.FileExtensions.PdfFilesFilter;
            mControl.OutputFileSelector.Filter      = Common.FileExtensions.PdfFilesFilter;
        }
Ejemplo n.º 24
0
        public Manager(IRobotWare root) :
            this()
        {
            Text = root.ApplicationName;

            var mgrCtl = new ManagerCtl(root)
            {
                Dock = DockStyle.Fill
            };

            Controls.Add(mgrCtl);
        }
        public ExportAllToAutoCAD(IRobotWare root, ICallback callback, IParameterManager mgr) :
            base(root, callback, mgr, BrowserTypes.BothDirectory)
        {
            InitializeComponent();

            ExportMain.BringToFront();

            SetSourceLabel("Directory:");

            FileFormat.Items.Clear();
            FileFormat.Items.AddRange(new object[] { "AutoCAD DWG files (*.dwg)", "AutoCAD DXF files (*.dxf)" });
            FileFormat.SelectedIndex = 0;
        }
        public void Initialise(IRobotWare root, ICallback callback, IParameterManager mgr, BrowserTypes browsers)
        {
            mBrowsers = browsers;

            // initialise both text boxes to an empty string so that de/serialisation is safer ie no null strings
            mSourceFilePath.Text = mDestinationFilePath.Text = string.Empty;

            mSourceFilePath.SetParameterManager(mgr);
            mDestinationFilePath.SetParameterManager(mgr);

            // initialise to NO so that de/serialisation is safer ie no invalid values (-1)
            mExists.SelectedIndex = 0;
        }
Ejemplo n.º 27
0
        public Engine(IRobotWare root, ICallback callback, string filePath)
        {
            mRoot     = root;
            mCallback = callback;
            var factories = Utils.GetFactories().ToList();

            mSpecification = new Specification(mRoot, mCallback, factories);

            using (var fs = new FileStream(filePath, FileMode.Open))
            {
                var reader = XmlReader.Create(fs);
                mSpecification.ReadXml(reader);
            }
        }
Ejemplo n.º 28
0
        public Main(IRobotWare root) :
            this()
        {
            mRoot = root;
            Text  = mRoot.ApplicationName;

            var specifications = new ManagerCtl(mRoot)
            {
                Dock = DockStyle.Fill
            };

            SpecificationTab.Controls.Clear();
            SpecificationTab.Controls.Add(specifications);
        }
Ejemplo n.º 29
0
        public FileSaveDialog(IRobotWare root) :
            this()
        {
            mRoot = root;
            var localSpecsWtihExtn = from specWithExtn in mRoot.Specifications
                                     where Utils.IsLocalSpecification(mRoot, specWithExtn)
                                     select specWithExtn;

            foreach (var specWithExtn in localSpecsWtihExtn)
            {
                var item = new SpecificationComboBoxItem(mRoot, specWithExtn, mImages);
                mFileNames.Items.Add(item);
            }
        }
Ejemplo n.º 30
0
        public SetViewProjection(IRobotWare root, ICallback callback, IParameterManager mgr) :
            base(root, callback, mgr)
        {
            InitializeComponent();

            // populate with view projections
            SelViewProjection.Items.Clear();

            foreach (var kvp in SupportedViewprojections)
            {
                SelViewProjection.Items.Add(kvp.Key);
            }

            SelViewProjection.SelectedIndex = 0;
        }