예제 #1
0
 public SAP_ServiceGPS()
 {
     InitializeComponent();
     mObjSetupService  = new SetupService();
     tmrService        = new Timer();
     mIntTimerInterval = 900000;
 }
예제 #2
0
        public void Init(string dir)
        {
            if (!Directory.Exists(dir))
            {
                Directory.CreateDirectory(dir);
            }

            if (!AddinManager.IsInitialized)
            {
                AddinManager.Initialize(".", dir);
                AddinManager.Registry.Update(_errorStatus);

                AddinManager.AddExtensionNodeHandler(typeof(CSPlugin), OnExtensionChanged);
                AddinManager.AddinLoadError += AddinManager_AddinLoadError;
            }

            SetupService = new SetupService(AddinManager.Registry);

            try
            {
                if (!SetupService.Repositories.ContainsRepository(StarMain.Instance.ServerConfig.PluginsRepoUrl))
                {
                    SetupService.Repositories.RegisterRepository(_errorStatus, StarMain.Instance.ServerConfig.PluginsRepoUrl, false);
                }

                SetupService.Repositories.UpdateAllRepositories(_errorStatus);
            }
            catch (Exception ex)
            {
                ex.LogError();
            }
        }
예제 #3
0
        static void Main(string[] args)
        {
            try
            {
                Application oApp = null;
                if (args.Length < 1)
                {
                    oApp = new Application();
                }
                else
                {
                    oApp = new Application(args[0]);
                }

                //Using Utilities DIApplication..
                DIApplication.DIConnect((SAPbobsCOM.Company)Application.SBO_Application.Company.GetDICompany());
                Menu MyMenu = new Menu();
                MyMenu.AddMenuItems();
                oApp.RegisterMenuEventHandler(MyMenu.SBO_Application_MenuEvent);


                SetupService lObjSetupService = new SetupService();
                lObjSetupService.InitializeTables();

                EarringsRanks pObjEarringsRanks = new EarringsRanks();

                Application.SBO_Application.AppEvent += new SAPbouiCOM._IApplicationEvents_AppEventEventHandler(SBO_Application_AppEvent);
                oApp.Run();
            }
            catch (Exception ex)
            {
                System.Windows.Forms.MessageBox.Show(ex.Message);
            }
        }
        List <FieldDiscriptor> MakeLogFieldList()
        {
            var list = new List <FieldDiscriptor>();

            list.Add(new FieldDiscriptor {
                Field = nameof(LogVM.CUCode), Header = "Cutting Unit", DataType = typeof(LogVM)
            });
            list.Add(new FieldDiscriptor {
                Field = nameof(LogVM.StratumCode), Header = "Stratum", DataType = typeof(LogVM)
            });
            list.Add(new FieldDiscriptor {
                Field = nameof(LogVM.SGCode), Header = "Sample Group", DataType = typeof(LogVM)
            });
            list.Add(new FieldDiscriptor {
                Field = nameof(LogVM.TreeSpecies), Header = "Species", DataType = typeof(LogVM)
            });
            list.Add(new FieldDiscriptor {
                Field = nameof(LogVM.TreeNumber), Header = "Tree Number", DataType = typeof(LogVM)
            });
            list.Add(new FieldDiscriptor {
                Field = nameof(LogVM.PlotNumber), Header = "Plot Number", DataType = typeof(LogVM)
            });
            list.Sort((x, y) => string.Compare(x.Header, y.Header, StringComparison.CurrentCulture));

            list.AddRange(SetupService.GetLogFieldSetups()
                          .OrderBy(x => x.Field)
                          .Select(x => new FieldDiscriptor(x)));
            return(list);
        }
        public TemplateEditViewPresenter(IApplicationController applicationController)
        {
            this.ApplicationController = applicationController;
            Database     = applicationController.Database ?? throw new ArgumentNullException(nameof(Database));
            SetupService = applicationController.SetupService ?? throw new ArgumentNullException(nameof(SetupService));

            //read TreeFiedleSetup info from .setup file and convert the data to TreeFieldSetupDefault
            //it may be posible to simplify this task by asking for the data in the form of a TreeFieldSetupDefault object
            //the xmlSerializer may beable to handle this conversion

            TreeFields = SetupService.GetTreeFieldSetups().Select(tf =>
            {
                return(new TreeFieldSetupDefaultDO()
                {
                    Field = tf.Field,
                    Heading = tf.Heading,
                    Format = tf.Format,
                    ColumnType = tf.ColumnType,
                    Behavior = tf.Behavior,
                });
            }).ToList();

            LogFields = SetupService.GetLogFieldSetups().Select(lf =>
            {
                return(new LogFieldSetupDefaultDO()
                {
                    Field = lf.Field,
                    Heading = lf.Heading,
                    Format = lf.Format,
                    ColumnType = lf.ColumnType,
                    Behavior = lf.Behavior,
                });
            }).ToList();
        }
예제 #6
0
        public AddinInstallDialog(SetupService service)
        {
            Build();
            this.service            = service;
            wizardNotebook.ShowTabs = false;
            ActionArea.Hide();

            tree = new InstallAddinTreeWidget(addinTree);
            tree.AllowSelection    = true;
            tree.SelectionChanged += new EventHandler(OnAddinSelectionChanged);

            repoStore       = new ListStore(typeof(string), typeof(string));
            repoCombo.Model = repoStore;
            CellRendererText crt = new CellRendererText();

            repoCombo.PackStart(crt, true);
            repoCombo.AddAttribute(crt, "text", 0);
            filterComboBox.Active = 1;

            imageInstall.Stock    = "md-software-update";
            imageInstall.IconSize = (int)IconSize.Dialog;

            FillRepos();
            repoCombo.Active = 0;
            LoadAddins();
            FillAddinInfo();
            OnPageChanged();
        }
예제 #7
0
        protected internal InfluxDBClient(InfluxDBClientOptions options)
        {
            Arguments.CheckNotNull(options, nameof(options));

            _options        = options;
            _loggingHandler = new LoggingHandler(options.LogLevel);
            _gzipHandler    = new GzipHandler();

            _apiClient = new ApiClient(options, _loggingHandler, _gzipHandler);

            _exceptionFactory = (methodName, response) =>
                                !response.IsSuccessful ? HttpException.Create(response) : null;

            _setupService = new SetupService((Configuration)_apiClient.Configuration)
            {
                ExceptionFactory = _exceptionFactory
            };
            _healthService = new HealthService((Configuration)_apiClient.Configuration)
            {
                ExceptionFactory = _exceptionFactory
            };
            _readyService = new ReadyService((Configuration)_apiClient.Configuration)
            {
                ExceptionFactory = _exceptionFactory
            };
        }
예제 #8
0
        public ManageSitesDialog(SetupService service, Builder builder, IntPtr handle) : base(handle)
        {
            builder.Autoconnect(this);
//			TransientFor = parent;
//			Services.PlaceDialog (this, parent);
            this.service            = service;
            treeStore               = new Gtk.ListStore(typeof(string), typeof(string), typeof(bool));
            repoTree.Model          = treeStore;
            repoTree.HeadersVisible = false;
            var crt = new Gtk.CellRendererToggle();

            crt.Toggled += HandleRepoToggled;
            repoTree.AppendColumn("", crt, "active", 2);
            repoTree.AppendColumn("", new Gtk.CellRendererText(), "markup", 1);
            repoTree.Selection.Changed += new EventHandler(OnSelect);

            AddinRepository[] reps = service.Repositories.GetRepositories();
            foreach (AddinRepository rep in reps)
            {
                AppendRepository(rep);
            }

            btnRemove.Sensitive = false;

            //Wire buttons
            btnRemove.Clicked += OnRemove;
            btnAdd.Clicked    += OnAdd;

            ShowAll();
        }
        protected internal InfluxDBClient(InfluxDBClientOptions options)
        {
            Arguments.CheckNotNull(options, nameof(options));

            _options        = options;
            _loggingHandler = new LoggingHandler(options.LogLevel);
            _gzipHandler    = new GzipHandler();

            var version = AssemblyHelper.GetVersion(typeof(InfluxDBClient));

            _apiClient = new ApiClient(options, _loggingHandler, _gzipHandler);
            _apiClient.RestClient.UserAgent = $"influxdb-client-csharp/{version}";

            _exceptionFactory = (methodName, response) =>
                                !response.IsSuccessful ? HttpException.Create(response, response.Content) : null;

            _setupService = new SetupService((Configuration)_apiClient.Configuration)
            {
                ExceptionFactory = _exceptionFactory
            };
            _healthService = new HealthService((Configuration)_apiClient.Configuration)
            {
                ExceptionFactory = _exceptionFactory
            };
            _readyService = new ReadyService((Configuration)_apiClient.Configuration)
            {
                ExceptionFactory = _exceptionFactory
            };
        }
예제 #10
0
        public void GetCruiseMethodsTest()
        {
            var setupServ     = new SetupService();
            var cruiseMethods = setupServ.GetCruiseMethods();

            cruiseMethods.Should().NotBeNullOrEmpty();
        }
예제 #11
0
        public void GetProductCodesTest()
        {
            var setupServ = new SetupService();

            var prodCodes = setupServ.GetProductCodes();

            prodCodes.Should().NotBeNullOrEmpty();
        }
예제 #12
0
        public CameraControl()
        {
            InitializeComponent();
            _setup = new SetupService();

            CameraButtonStyle       = Resources["CameraButtonStyle"] as Style;
            SwitchCameraButtonStyle = Resources["SwitchCameraButtonStyle"] as Style;
        }
예제 #13
0
        public void GetLoggingMethodsTest()
        {
            var setupServ = new SetupService();

            var logMeths = setupServ.GetLoggingMethods();

            logMeths.Should().NotBeNullOrEmpty();
        }
예제 #14
0
        public void GetRegionsTest()
        {
            var setupServ = new SetupService();

            var regions = setupServ.GetRegions();

            regions.Should().NotBeNullOrEmpty();
        }
예제 #15
0
        public static Gtk.Window Show(Gtk.Window parent, SetupService service)
        {
            AddinManagerDialog dlg = new AddinManagerDialog(parent, service);

            InitDialog(dlg);
            dlg.Show();
            return(dlg);
        }
예제 #16
0
        public void GetUOMCodesTest()
        {
            var setupServ = new SetupService();

            var uomCodes = setupServ.GetUOMCodes();

            uomCodes.Should().NotBeNullOrEmpty();
        }
예제 #17
0
        public void GetTreeFieldSetupsTest()
        {
            var setupServ = new SetupService();

            var treeFields = setupServ.GetTreeFieldSetups();

            treeFields.Should().NotBeNullOrEmpty();
        }
예제 #18
0
        public static void Initialize(bool updateAddinRegistry)
        {
            if (initialized)
            {
                return;
            }
            Counters.RuntimeInitialization.BeginTiming();
            SetupInstrumentation();

            AddinManager.AddinLoadError += OnLoadError;
            AddinManager.AddinLoaded    += OnLoad;
            AddinManager.AddinUnloaded  += OnUnload;

            try {
                Counters.RuntimeInitialization.Trace("Initializing Addin Manager");
                AddinManager.Initialize(MonoDevelop.Core.PropertyService.ConfigPath);
                AddinManager.InitializeDefaultLocalizer(new DefaultAddinLocalizer());

                if (updateAddinRegistry)
                {
                    AddinManager.Registry.Update(null);
                }
                setupService = new SetupService(AddinManager.Registry);
                Counters.RuntimeInitialization.Trace("Initialized Addin Manager");

                string prefix = string.Empty;
                if (PropertyService.IsWindows)
                {
                    prefix = "win-";
                }

                string mainRep = "http://monodevelop.com/files/addins/" + prefix + AddinManager.CurrentAddin.Version + "/main.mrep";

                AddinRepository[] repos = setupService.Repositories.GetRepositories();
                foreach (AddinRepository rep in repos)
                {
                    if (rep.Url.StartsWith("http://go-mono.com/md/") || (rep.Url.StartsWith("http://monodevelop.com/files/addins/") && rep.Url != mainRep))
                    {
                        setupService.Repositories.RemoveRepository(rep.Url);
                    }
                }
                setupService.Repositories.RegisterRepository(null, mainRep, false);

                Counters.RuntimeInitialization.Trace("Initializing Assembly Service");
                systemAssemblyService = new SystemAssemblyService();
                systemAssemblyService.Initialize();

                initialized = true;
            } catch (Exception ex) {
                Console.WriteLine(ex);
                AddinManager.AddinLoadError -= OnLoadError;
                AddinManager.AddinLoaded    -= OnLoad;
                AddinManager.AddinUnloaded  -= OnUnload;
            } finally {
                Counters.RuntimeInitialization.EndTiming();
            }
        }
예제 #19
0
파일: Runtime.cs 프로젝트: poke/monodevelop
        public static void Initialize(bool updateAddinRegistry)
        {
            if (initialized)
            {
                return;
            }
            Counters.RuntimeInitialization.BeginTiming();
            SetupInstrumentation();

            // Set a default sync context
            if (SynchronizationContext.Current == null)
            {
                SynchronizationContext.SetSynchronizationContext(new SynchronizationContext());
            }

            AddinManager.AddinLoadError += OnLoadError;
            AddinManager.AddinLoaded    += OnLoad;
            AddinManager.AddinUnloaded  += OnUnload;

            try {
                Counters.RuntimeInitialization.Trace("Initializing Addin Manager");
                AddinManager.Initialize(
                    PropertyService.Locations.Config,
                    PropertyService.Locations.Addins,
                    PropertyService.Locations.Cache);
                AddinManager.InitializeDefaultLocalizer(new DefaultAddinLocalizer());

                if (updateAddinRegistry)
                {
                    AddinManager.Registry.Update(null);
                }
                setupService = new SetupService(AddinManager.Registry);
                Counters.RuntimeInitialization.Trace("Initialized Addin Manager");

                //have to do this after the addin service is initialized
                if (UserDataMigrationService.HasSource)
                {
                    Counters.RuntimeInitialization.Trace("Migrating User Data from MD " + UserDataMigrationService.SourceVersion);
                    UserDataMigrationService.StartMigration();
                }

                RegisterAddinRepositories();

                Counters.RuntimeInitialization.Trace("Initializing Assembly Service");
                systemAssemblyService = new SystemAssemblyService();
                systemAssemblyService.Initialize();

                initialized = true;
            } catch (Exception ex) {
                Console.WriteLine(ex);
                AddinManager.AddinLoadError -= OnLoadError;
                AddinManager.AddinLoaded    -= OnLoad;
                AddinManager.AddinUnloaded  -= OnUnload;
            } finally {
                Counters.RuntimeInitialization.EndTiming();
            }
        }
예제 #20
0
        public AddinDetailsDialog(Addin addin, Window parent) : base(String.Empty, parent)
        {
            SetDefaultSize(400, -1);

            AddinHeader info = SetupService.GetAddinHeader(addin);

            HBox box = new HBox();

            box.BorderWidth = 10;
            box.Spacing     = 10;
            VBox.PackStart(box, false, false, 0);

            Image image = new Image();

            image.IconName = "package-x-generic";
            image.IconSize = (int)IconSize.Dialog;
            image.Yalign   = 0.0f;

            box.PackStart(image, false, false, 0);

            StringBuilder builder = new StringBuilder();

            builder.AppendFormat("<b><big>{0}</big></b>\n\n", GLib.Markup.EscapeText(addin.Name));
            builder.AppendFormat(GLib.Markup.EscapeText(addin.Description.Description)).Append("\n\n");

            builder.Append("<small>");

            builder.AppendFormat("<b>{0}</b> {1}\n\n", Catalog.GetString("Version:"),
                                 GLib.Markup.EscapeText(addin.Description.Version));

            builder.AppendFormat("<b>{0}</b> {1}\n\n", Catalog.GetString("Authors:"),
                                 GLib.Markup.EscapeText(addin.Description.Author));

            builder.AppendFormat("<b>{0}</b> {1}\n\n", Catalog.GetString("Copyright/License:"),
                                 GLib.Markup.EscapeText(addin.Description.Copyright));

            if (info.Dependencies.Count > 0)
            {
                builder.AppendFormat("<b>{0}</b>\n", Catalog.GetString("Extension Dependencies:"));
                foreach (AddinDependency dep in info.Dependencies)
                {
                    builder.Append(GLib.Markup.EscapeText(dep.Name)).Append('\n');
                }
            }

            builder.Append("</small>");

            WrapLabel label = new WrapLabel();

            label.Markup = builder.ToString();
            box.PackStart(label, true, true, 0);

            VBox.ShowAll();

            AddDefaultCloseButton();
        }
예제 #21
0
 public InstallDialog(Gtk.Window parent, SetupService service)
 {
     this.Build();
     this.service   = service;
     TransientFor   = parent;
     WindowPosition = Gtk.WindowPosition.CenterOnParent;
     Services.PlaceDialog(this, parent);
     boxProgress.Visible = false;
     Resizable           = false;
 }
예제 #22
0
		public static Gtk.Window Show (Gtk.Window parent, SetupService service)
		{
			AddinManagerDialog dlg = new AddinManagerDialog (parent, service);
			InitDialog (dlg);
			if (parent == null) {
				dlg.SetPosition (Gtk.WindowPosition.Center);
			}
			dlg.Show ();
			return dlg;
		}
예제 #23
0
		public static void Run (Gtk.Window parent, SetupService service)
		{
			AddinManagerDialog dlg = new AddinManagerDialog (parent, service);
			try {
				InitDialog (dlg);
				dlg.Run ();
			} finally {
				dlg.Destroy ();
			}
		}
예제 #24
0
        private async Task InitializeAsync()
        {
            VersionDescription = GetVersionDescription();

            _setup = new SetupService();
            bool res = await _setup.GetAutomode();

            tglAutoOcr.IsOn = res;

            await Task.CompletedTask;
        }
예제 #25
0
        public static Gtk.Window Show(Gtk.Window parent, SetupService service)
        {
            var dlg = Create(parent, service);

            if (parent == null)
            {
                dlg.SetPosition(Gtk.WindowPosition.Center);
            }
            dlg.Show();
            return(dlg);
        }
예제 #26
0
        public static void Main(string[] args)
        {
            var host = CreateHostBuilder(args).Build();

            using (var scope = host.Services.CreateScope())
            {
                var context = scope.ServiceProvider.GetRequiredService <eRestoranContext>();
                SetupService.Seed(context);
            }
            host.Run();
        }
예제 #27
0
        public static Gtk.Dialog Create(Gtk.Window parent = null, SetupService service = null)
        {
            if (service == null)
            {
                service = new SetupService();
            }
            var dlg = new AddinManagerDialog(parent, service);

            InitDialog(dlg);
            return(dlg);
        }
예제 #28
0
        public AddinInstallerDialog(AddinRegistry reg, string message, string[] addinIds)
        {
            this.Build();

            this.addinIds = addinIds;
            setup         = new SetupService(reg);

            if (!CheckAddins(true))
            {
                UpdateRepos();
            }
        }
예제 #29
0
        public static void Main(string[] args)
        {
            //CreateHostBuilder(args).Build().Run();
            var host = CreateHostBuilder(args).Build();

            using (var scope = host.Services.CreateScope())
            {
                var service = scope.ServiceProvider.GetRequiredService <eDecorContext>();
                SetupService.Init(service);
            }
            host.Run();
        }
예제 #30
0
        public static void Main(string[] args)
        {
            var host = CreateHostBuilder(args).Build();

            using (var scope = host.Services.CreateScope())
            {
                var service = scope.ServiceProvider.GetRequiredService <Context>();
                SetupService.MigrateDatabase(service);
            }

            host.Run();
        }