예제 #1
0
        public Configurator()
        {
            InitializeComponent();

            Text = ApplicationName;

            if (!mRoot.IsLicensed)
            {
                Utils.DoRequestLicense(mRoot.ApplicationName, mRoot.Version, Resources.robot_32x32, () => mRoot.IsLicensed);
            }
            CmdSave.Enabled = 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);

            var windowsRoot = new RobotWareWrapper("RobotWare for Windows");

            Macros.DataSource = windowsRoot.Specifications;
        }
예제 #2
0
        private bool Run(string[] args)
        {
            IRobotWare root = new RobotWareWrapper(ApplicationName);

            if (!root.IsLicensed)
            {
                Utils.DoRequestLicense(root.ApplicationName, root.Version, Resources.robot_32x32, () => root.IsLicensed);
            }

            if (!root.IsLicensed)
            {
                return(false);
            }

            if (args.Length != 1)
            {
                PrintUsage();

                return(false);
            }

            // run macro file specified on command line
            var eng = new Engine(root, this, args[0]);

            return(eng.Run());
        }
예제 #3
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            const string ApplicationName = "RobotWare for Windows";

            var licWrapper = new RobotWareWrapper(ApplicationName);

            Directory.CreateDirectory(licWrapper.UserSpecificationFolder);

            Application.Run(new EllieWare.Manager.Manager(licWrapper));
        }
예제 #4
0
        private void CreateTaskPane(ISldWorks pSldWorks)
        {
            var thisAssembly = Assembly.GetAssembly(GetType());
            var bmp          = new BitmapHandler();
            var icon         = bmp.CreateFileFromResourceBitmap("RobotWare.SolidWorks.robot_16x18.bmp", thisAssembly);
            var view         = pSldWorks.CreateTaskpaneView2(icon, @"RobotWare for SolidWorks");
            var ctrl         = (ManagerCtrlX)view.AddControl(@"RobotWare.ActiveXUserControl", @"");
            var root         = new RobotWareWrapper("RobotWare for SolidWorks", pSldWorks);
            var mgrCtl       = new ManagerCtl(root)
            {
                Dock = DockStyle.Fill
            };

            ctrl.Controls.Add(mgrCtl);
        }