public AdvancedViewModel(RequestModel request)
 {
     Send         = new RelayCommand(ExecuteAdvancedRequest, param => canExecuteSend);
     Close        = new RelayCommand(ExecuteClose, param => true);
     advSettings  = new AdvancedSettings(this);
     this.request = request;
 }
Esempio n. 2
0
        private void InitializeView()
        {
            PatientUpdaterOptions clonedOptions;

            if (!string.IsNullOrEmpty(_ServiceDirectory))
            {
                _Settings = AdvancedSettings.Open(_ServiceDirectory);

                _options = _Settings.GetAddInCustomData <PatientUpdaterOptions>(_AddIn, _Name);
                if (_options == null)
                {
                    _options = new PatientUpdaterOptions();
                }
            }
            else
            {
                _Settings = null;
                _options  = new PatientUpdaterOptions();
            }

            if (string.IsNullOrEmpty(_options.RetryDirectory))
            {
                _options.RetryDirectory = Path.Combine(_ServiceDirectory, @"AutoUpdate\");
            }

            clonedOptions = Clone(_options);
            _view.Initialize(clonedOptions, _aeAccessAgent);
        }
        public void ConfigureCommand(DicomCommand command)
        {
            try
            {
                AdvancedSettings            settings;
                WorklistAddInsConfiguration worklistConfig;

                settings       = AdvancedSettings.Open(AddInsSession.ServiceDirectory);
                worklistConfig = GetWorklistAddInsSettings(settings);



                if (null != settings)
                {
                    if (command is NCreateCommand)
                    {
                        ConfigureNCreateCommand(command, worklistConfig);
                    }

                    if (command is MppsNCreateCommand)
                    {
                        ConfigureMppsNCreateCommand(command, worklistConfig);
                    }
                }
            }
            catch (Exception exception)
            {
                LogEvent("Failed to configure Modality Performed Procedure NCreate Command, default configuration will be applied.^\n" + exception.Message, command.RequestDataSet);
            }
        }
Esempio n. 4
0
        // Leadtools.Dicom.Server.exe calls this
        public override void Load(string serviceDirectory, string displayName)
        {
            try
            {
                // Open 'advanced.config' which contains all settings for CSStorageServerManger.exe addins (including this addin)
                AdvancedSettings settings = AdvancedSettings.Open(serviceDirectory);

                ServiceDirectory = serviceDirectory;
                DisplayName      = displayName;
                _server          = ServiceLocator.Retrieve <DicomServer>();
                ServiceName      = _server.Name;

                if (!ServiceLocator.IsRegistered <SettingsChangedNotifier>())
                {
                    SettingsChangedNotifier configChangedNotifier = new SettingsChangedNotifier(settings);

                    configChangedNotifier.SettingsChanged += ConfigChangedNotifier_SettingsChanged;
                    configChangedNotifier.Enabled          = true;
                    ServiceLocator.Register <SettingsChangedNotifier>(configChangedNotifier);
                }
                else
                {
                    ServiceLocator.Retrieve <SettingsChangedNotifier>().SettingsChanged += ConfigChangedNotifier_SettingsChanged;
                }

                ConfigureAddin(settings);
            }
            catch (Exception)
            {
            }
        }
Esempio n. 5
0
        // Called when the external store addin is loaded by the PACSFramework
        // Registers the ICrud interface used by this external store add-in
        // If this external store add-in is currently active, this method starts the JobManager for this addin
        public override void Load(string serviceDirectory, string displayName)
        {
            // Open 'advanced.config' which contains all settings for CSStorageServerManger.exe addins (including this ExternalStore AmazonS3Addin)
            AdvancedSettings settings = AdvancedSettings.Open(serviceDirectory);

            _serviceDirectory = serviceDirectory;

            try
            {
                Type[] extraTypes = new[] { typeof(AmazonS3Configuration) };
                Options = settings.GetAddInCustomData <ExternalStoreOptions>(ExternalStorePresenter._Name, "ExternalStoreOptions", extraTypes);
                if (Options == null)
                {
                    Options = new ExternalStoreOptions();
                }
                ICrud thisCrud = Options.GetCrud(AmazonS3Guid);
                if (thisCrud != null)
                {
                    DataAccessServiceLocator.Register(thisCrud, thisCrud.ExternalStoreGuid);
                }
            }
            catch (Exception e)
            {
                if (Options == null)
                {
                    Options = new ExternalStoreOptions();
                }

                Logger.Global.Error(Source, e.Message);
            }

            ExternalStore.Addin.Module.StartExternalStoreJobs(AmazonS3ExternalStoreAddinConfig, "AmazonS3");
        }
Esempio n. 6
0
        public static PatientRestrictOptions GetPatientRestrictOptions(AdvancedSettings settings)
        {
            PatientRestrictOptions options = null;

            try
            {
                settings.RefreshSettings();
                options = settings.GetAddInCustomData <PatientRestrictOptions>(Source, OptionsName);
                if (options == null)
                {
                    options = new PatientRestrictOptions();
                }
            }
            catch (Exception e)
            {
                if (options == null)
                {
                    options = new PatientRestrictOptions();
                }

                Logger.Global.SystemMessage(LogType.Error, e.Message);
            }

            return(options);
        }
Esempio n. 7
0
 private void ValidateAndCorrectAdvancedSettings()
 {
     if (Advanced == null)
     {
         Advanced = AdvancedSettings.Default;
     }
 }
Esempio n. 8
0
 public InlineSendingAgent(ISender sender, Endpoint endpoint, IMessageLogger logger, AdvancedSettings settings)
 {
     _sender   = sender;
     _logger   = logger;
     _settings = settings;
     Endpoint  = endpoint;
 }
Esempio n. 9
0
        public DurableWorkerQueue(Endpoint endpoint, IHandlerPipeline pipeline,
                                  AdvancedSettings settings, IEnvelopePersistence persistence, ITransportLogger logger)
        {
            _settings    = settings;
            _persistence = persistence;
            _logger      = logger;

            endpoint.ExecutionOptions.CancellationToken = settings.Cancellation;

            _receiver = new ActionBlock <Envelope>(async envelope =>
            {
                try
                {
                    envelope.ContentType = envelope.ContentType ?? "application/json";

                    await pipeline.Invoke(envelope, this);
                }
                catch (Exception e)
                {
                    // This *should* never happen, but of course it will
                    logger.LogException(e);
                }
            }, endpoint.ExecutionOptions);

            _policy = Policy
                      .Handle <Exception>()
                      .WaitAndRetryForeverAsync(i => (i * 100).Milliseconds()
                                                , (e, timeSpan) => {
                _logger.LogException(e);
            });
        }
Esempio n. 10
0
        public void Initialize(AdvancedSettings advancedSettings, ServerSettings Settings, string ServerDirectory)
        {
            _AdvancedSettings = advancedSettings;
            _Settings         = Settings;

            Module.InitializeLicense();
            DicomEngine.Startup();
            DicomNet.Startup();
            Module.InitializeFailureDirectory(ServerDirectory);
            Module.ServiceName      = Settings.ServiceName;
            Module.ServiceDirectory = ServerDirectory;

            try
            {
                if (Settings != null)
                {
                    Module.ServiceName = Settings.ServiceName;
                }
                Module.ServiceDirectory = ServerDirectory;
                Module.ConfigureRuleProcessor(_AdvancedSettings);

                _dlgConfigure              = new ConfigureDialog();
                _dlgConfigure.FormClosing += new FormClosingEventHandler(_dlgConfigure_FormClosing);
                _Presenter = new RuleEditorPresenter(Module._Options, ServerDirectory);
                _Presenter.RunView(_dlgConfigure, advancedSettings);
            }
            catch (Exception e)
            {
                Logger.Global.Exception(Module.Source, e);
            }
        }
Esempio n. 11
0
        private void ConfigureAutoCopy(AdvancedSettings settings)
        {
            string name = Assembly.GetExecutingAssembly().GetName().Name;

            Options = GetAutoCopyOptions(settings);

            if (Options.EnableAutoCopy)
            {
                if (CopyQueue != null)
                {
                    CopyQueue.Dispose();
                }

                CopyQueue = new AutoCopyQueue(Options.AutoCopyThreads);
                CopyQueue.InitializeDatabase();
            }
            else
            {
                if (CopyQueue != null)
                {
                    CopyQueue.Dispose();
                    CopyQueue = null;
                }
            }
        }
Esempio n. 12
0
        public DurabilityAgent(ITransportLogger logger,
                               ILogger <DurabilityAgent> trace,
                               IWorkerQueue workers,
                               IEnvelopePersistence persistence,
                               ITransportRuntime runtime,
                               AdvancedSettings settings)
        {
            if (persistence is NulloEnvelopePersistence)
            {
                _disabled = true;
                return;
            }

            Logger       = logger;
            _trace       = trace;
            _workers     = workers;
            _persistence = persistence;
            _settings    = settings;


            _storage = _persistence.AgentStorage;

            _worker = new ActionBlock <IMessagingAction>(processAction, new ExecutionDataflowBlockOptions
            {
                MaxDegreeOfParallelism = 1,
                CancellationToken      = _settings.Cancellation
            });

            NodeId = _settings.UniqueNodeId;

            IncomingMessages = new RecoverIncomingMessages(persistence, workers, settings, logger);
            OutgoingMessages = new RecoverOutgoingMessages(runtime, settings, logger);
            NodeReassignment = new NodeReassignment(settings);
            ScheduledJobs    = new RunScheduledJobs(settings, logger);
        }
Esempio n. 13
0
        private void LoadAdvancedSettings()
        {
            this.AdvSettings                    = AdvancedSettings.Load();
            this.EQSettings.UseEqDisplay        = this.AdvSettings.EqDisplay;
            this.EQSettings.UseNormalEq         = this.AdvSettings.NormalEQ;
            this.EQSettings.UseStereoEq         = this.AdvSettings.StereoEQ;
            this.EQSettings.UseVUmeter          = this.AdvSettings.VUmeter;
            this.EQSettings.UseVUmeter2         = this.AdvSettings.VUmeter2;
            this.EQSettings._useVUindicators    = this.AdvSettings.VUindicators;
            this.EQSettings.RestrictEQ          = this.AdvSettings.RestrictEQ;
            this.EQSettings._EQ_Restrict_FPS    = this.AdvSettings.EqRate;
            this.EQSettings.DelayEQ             = this.AdvSettings.DelayEQ;
            this.EQSettings._DelayEQTime        = this.AdvSettings.DelayEqTime;
            this.EQSettings.SmoothEQ            = this.AdvSettings.SmoothEQ;
            this.EQSettings.EQTitleDisplay      = this.AdvSettings.EQTitleDisplay;
            this.EQSettings._EQTitleShowTime    = this.AdvSettings.EQTitleShowTime;
            this.EQSettings._EQTitleDisplayTime = this.AdvSettings.EQTitleDisplayTime;
            this.EQSettings._EqUpdateDelay      = (this.EQSettings._EQ_Restrict_FPS == 0)
                                         ? 0
                                         : ((0x989680 / this.EQSettings._EQ_Restrict_FPS) -
                                            (0xf4240 / this.EQSettings._EQ_Restrict_FPS));
            this.DisplaySettings.BlankDisplayWithVideo  = this.AdvSettings.BlankDisplayWithVideo;
            this.DisplaySettings.EnableDisplayAction    = this.AdvSettings.EnableDisplayAction;
            this.DisplaySettings.DisplayActionTime      = this.AdvSettings.EnableDisplayActionTime;
            this.DisplaySettings.BlankDisplayWhenIdle   = this.AdvSettings.BlankDisplayWhenIdle;
            this.DisplaySettings.BlankIdleDelay         = this.AdvSettings.BlankIdleTime;
            this.DisplaySettings._BlankIdleTimeout      = this.DisplaySettings.BlankIdleDelay * 0x989680;
            this.DisplaySettings._Shutdown1             = Settings.Instance.Shutdown1;
            this.DisplaySettings._Shutdown2             = Settings.Instance.Shutdown2;
            this.DisplaySettings._DisplayControlTimeout = this.DisplaySettings.DisplayActionTime * 0x989680;
            FileInfo info = new FileInfo(Config.GetFile(Config.Dir.Config, "MiniDisplay_DebugForm.xml"));

            this.SettingsLastModTime = info.LastWriteTime;
            this.LastSettingsCheck   = DateTime.Now;
        }
Esempio n. 14
0
        private void InitializeExternalStore(ExternalStoreConfigurationView externalStoreView, ExternalStorePresenter externalStorePresenter)
        {
            if (ServerState.Instance.ServerService != null)
            {
                AdvancedSettings settings = AdvancedSettings.Open(ServerState.Instance.ServerService.ServiceDirectory);

                externalStorePresenter.ServiceDirectory = ServerState.Instance.ServerService.ServiceDirectory;

                externalStorePresenter.RunView(externalStoreView, settings);
            }
            else
            {
                externalStorePresenter.RunView(externalStoreView, null);
            }

            __ExternalStorePresenter = externalStorePresenter;
            __ExternalStorePresenter.ExternalStore       += new EventHandler <ExternalStoreMessageEventArgs>(ExternalStorePresenter_ExternalStore);
            __ExternalStorePresenter.CancelExternalStore += new EventHandler <EventArgs>(ExternalStorePresenter_CancelExternalStore);
            __ExternalStorePresenter.Clean         += new EventHandler <Leadtools.Medical.Winforms.ExternalStore.CleanMessageEventArgs>(ExternalStorePresenter_Clean);
            __ExternalStorePresenter.Restore       += new EventHandler <RestoreMessageEventArgs>(ExternalStorePresenter_Restore);
            __ExternalStorePresenter.CancelRestore += new EventHandler <EventArgs>(ExternalStorePresenter_CancelRestore);
            __ExternalStorePresenter.Reset         += new EventHandler <Leadtools.Medical.Winforms.ExternalStore.ResetEventArgs>(ExternalStorePresenter_Reset);
            ConfigureExternalStore();

            //ServerState.Instance.IsRemoteServerChanged += new EventHandler(OnConfigurerFowarder);
            //ServerState.Instance.RemoteServerInformationChanged += new EventHandler(OnConfigurerFowarder);
        }
Esempio n. 15
0
        private void InitializeForwarding(ForwardManagerConfigurationView forwardView, ForwardManagerPresenter forwardPresenter)
        {
            if (ServerState.Instance.ServerService != null)
            {
                AdvancedSettings settings = AdvancedSettings.Open(ServerState.Instance.ServerService.ServiceDirectory);

                forwardPresenter.RunView(forwardView, settings);
            }
            else
            {
                forwardPresenter.RunView(forwardView, null);
            }

            __ForwardPresenter          = forwardPresenter;
            __ForwardPresenter.Forward += new EventHandler <ForwardMessageEventArgs>(Forwarder_Forward);
            __ForwardPresenter.Clean   += new EventHandler <Leadtools.Medical.Winforms.Forwarder.SendMessageEventArgs>(Forwarder_Clean);
            __ForwardPresenter.Reset   += new EventHandler <Leadtools.Medical.Winforms.Forwarder.ResetEventArgs>(Forwarder_Reset);
#if LEADTOOLS_V18_OR_LATER
            __ForwardPresenter.CancelForward += new EventHandler <EventArgs>(Forwarder_CancelForward);
            __ForwardPresenter.CancelClean   += new EventHandler <EventArgs>(Forwarder_CancelClean);
#endif // #if LEADTOOLS_V18_OR_LATER
            ConfigureForwarder();

            ServerState.Instance.IsRemoteServerChanged          += new EventHandler(OnConfigurerFowarder);
            ServerState.Instance.RemoteServerInformationChanged += new EventHandler(OnConfigurerFowarder);
        }
 public LightweightLocalSendingAgent(Endpoint endpoint, ITransportLogger logger,
                                     IHandlerPipeline pipeline, AdvancedSettings settings, IMessageLogger messageLogger) : base(endpoint, logger, pipeline, settings)
 {
     _messageLogger = messageLogger;
     Destination    = Address = endpoint.Uri;
     Endpoint       = endpoint;
 }
Esempio n. 17
0
        public MartenBackedListenerContext()
        {
            theStore = DocumentStore.For(_ =>
            {
                _.Connection(Servers.PostgresConnectionString);
                _.PLV8Enabled = false;
            });


            theSettings = new AdvancedSettings(null);


            EnvelopeStorageAdmin.RebuildSchemaObjects();

            var persistence =
                new PostgresqlEnvelopePersistence(
                    new PostgresqlSettings {
                ConnectionString = Servers.PostgresConnectionString
            }, theSettings);

            thePipeline    = Substitute.For <IHandlerPipeline>();
            theWorkerQueue = new DurableWorkerQueue(new LocalQueueSettings("temp"), thePipeline, theSettings,
                                                    persistence, TransportLogger.Empty());


            var agent = Substitute.For <IListener>();

            theWorkerQueue.StartListening(agent);
        }
Esempio n. 18
0
        public void Configure(IWin32Window Parent, ServerSettings Settings, string ServerDirectory)
        {
            AdvancedSettings settings  = AdvancedSettings.Open(ServerDirectory);
            IConfigureDialog configure = new AddinConfiguration();

            configure.Initialize(settings, Settings, ServerDirectory);
            configure.ShowDialog(Parent);
        }
Esempio n. 19
0
        //private readonly IWorkerQueue _workers;

        public MetricsCollector(IMetrics metrics, IEnvelopePersistence persistence, IMessageLogger logger,
                                AdvancedSettings settings)
        {
            _metrics     = metrics;
            _persistence = persistence;
            _logger      = logger;
            _settings    = settings;
        }
Esempio n. 20
0
 public RecoverIncomingMessages(IEnvelopePersistence persistence, IWorkerQueue workers, AdvancedSettings settings,
                                ITransportLogger logger)
 {
     _persistence   = persistence;
     _workers       = workers;
     this._settings = settings;
     _logger        = logger;
 }
Esempio n. 21
0
 private AdvancedSettings GetAdvanceSettingSession()
 {
     if (Session["advancesetting"] == null)
     {
         Session["advancesetting"] = new AdvancedSettings();
     }
     return((AdvancedSettings)Session["advancesetting"]);
 }
Esempio n. 22
0
 public SyndicationController(IPostService postService, IPageService pageService, ICategoryService categoryService, BasicSettings basicSettings, AdvancedSettings advancedSettings, FeedSettings feedSettings)
 {
     _postService      = postService;
     _pageService      = pageService;
     _categoryService  = categoryService;
     _basicSettings    = basicSettings;
     _advancedSettings = advancedSettings;
     _feedSettings     = feedSettings;
 }
Esempio n. 23
0
        public static AdvancedSettings GetSingleton()
        {
            if (singleton == null)
            {
                singleton = new AdvancedSettings();
            }

            return(singleton);
        }
Esempio n. 24
0
        private void ConfigureAutoCopy()
        {
            if (ServerState.Instance.ServerService != null)
            {
                AdvancedSettings settings = AdvancedSettings.Open(ServerState.Instance.ServerService.ServiceDirectory);

                __AutoCopyPresenter.UpdateSettings(settings);
            }
        }
Esempio n. 25
0
        void configChangedNotifier_SettingsChanged(object sender, EventArgs e)
        {
            // Reinitialize the dicom security settings
            InitializeDicomSecurity(true);

            AdvancedSettings settings = AdvancedSettings.Open(ServiceDirectory);

            ConfigureAutoCopy(settings);
        }
Esempio n. 26
0
 public SendingAgent(ITransportLogger logger, IMessageLogger messageLogger, ISender sender,
                     AdvancedSettings settings, Endpoint endpoint)
 {
     _logger        = logger;
     _messageLogger = messageLogger;
     _sender        = sender;
     _settings      = settings;
     Endpoint       = endpoint;
 }
Esempio n. 27
0
        void server_AdvancedSettingsChanged(object sender, EventArgs e)
        {
            AdvancedSettings settings = AdvancedSettings.Open(ServiceDirectory);

            if (settings != null)
            {
                settings.RefreshSettings();
                Options = settings.GetAddInCustomData <PatientUpdaterOptions>(_AddIn, _Name);
                if (Options != null)
                {
                    //
                    // Change auto update settings
                    //
                    if (Options.EnableAutoUpdate)
                    {
                        if (UpdateQueue != null)
                        {
                            return;
                        }

                        UpdateQueue = new AutoUpdateQueue(Options.AutoUpdateThreads);
                        UpdateQueue.InitializeDatabase();
                    }
                    else
                    {
                        if (UpdateQueue != null)
                        {
                            UpdateQueue.Dispose();
                            UpdateQueue = null;
                        }
                    }

                    //
                    // Change retry settings
                    //
                    if (Options.EnableRetry)
                    {
                        if (RetryProcessor != null)
                        {
                            return;
                        }

                        RetryProcessor = new AutoRetryProcessor(Options.RetryDirectory);
                        RetryProcessor.Start(Options.RetrySeconds, Options.RetryDays);
                    }
                    else
                    {
                        if (RetryProcessor != null)
                        {
                            RetryProcessor.Stop();
                            RetryProcessor = null;
                        }
                    }
                }
            }
        }
Esempio n. 28
0
        public override void Load(string serviceDirectory, string displayName)
        {
            bool     isLicensed = false;
            ILicense license    = null;

            if (ServiceLocator.IsRegistered <ILicense>())
            {
                license = ServiceLocator.Retrieve <ILicense>();
            }

            InitializeLicense();
            isLicensed = IsLicenseValid();
            try
            {
                AdvancedSettings settings = AdvancedSettings.Open(serviceDirectory);

                ServiceDirectory = serviceDirectory;
                DisplayName      = displayName;
                DicomServer server = ServiceLocator.Retrieve <DicomServer>();
                ServiceName = server.Name;

                GetService(serviceDirectory, displayName);
                if (!ServiceLocator.IsRegistered <SettingsChangedNotifier>())
                {
                    SettingsChangedNotifier configChangedNotifier = new SettingsChangedNotifier(settings);

                    configChangedNotifier.SettingsChanged += new EventHandler(configChangedNotifier_SettingsChanged);
                    configChangedNotifier.Enabled          = true;
                    ServiceLocator.Register <SettingsChangedNotifier>(configChangedNotifier);
                }
                else
                {
                    ServiceLocator.Retrieve <SettingsChangedNotifier>().SettingsChanged += new EventHandler(configChangedNotifier_SettingsChanged);
                }

                if (isLicensed)
                {
                    ConfigureRuleProcessor(settings);
                }
            }
            catch (Exception e)
            {
                if (_Options == null)
                {
                    _Options = new RuleProcessorOptions();
                }

                Logger.Global.Error(Source, e.Message);
            }

            ConfigureScriptProcessor(serviceDirectory, isLicensed);
            if (license != null)
            {
                license.LicenseChanged += new EventHandler(license_LicenseChanged);
            }
        }
Esempio n. 29
0
        public Main()
        {
            InitializeComponent();

            mode = 0;
            ToggleMenu();
            AdvancedSettings.Hide();
            transformResults.View        = View.Details;
            transformResults.MultiSelect = true;
            transformResults.LabelEdit   = true;
            peakBox.Text            = "40";
            baselineBox.Text        = "3";
            signalBox.Text          = "10";
            results.View            = View.Details;
            results.MultiSelect     = true;
            results.LabelEdit       = true;
            fileNameBox.MaximumSize = new System.Drawing.Size(230, 25);
            results.Columns.Add("Slope", -2, HorizontalAlignment.Left);
            results.Columns.Add("%", -2, HorizontalAlignment.Left);
            results.Columns.Add("R-squared", -2, HorizontalAlignment.Left);
            results.Columns.Add("Experiment", -2, HorizontalAlignment.Left);
            results.Columns.Add("Comments", -2, HorizontalAlignment.Left);

            transformResults.Columns.Add("Remaining substrate", -2, HorizontalAlignment.Left);
            transformResults.Columns.Add("Heat rate", -2, HorizontalAlignment.Left);

            transformTitlesList.Columns.Add("Filename", -2, HorizontalAlignment.Left);
            transformTitlesList.Columns.Add("Inj length", -2, HorizontalAlignment.Left);
            transformTitlesList.View  = View.Details;
            results.KeyDown          += results_KeyDown;
            transformResults.KeyDown += results_KeyDown;
            textBox1.Validating      += TextValidating;
            textBox3.Validating      += TextValidating;
            textBox2.Validating      += TextValidating;
            textBox4.Validating      += TextValidating;
            refValueBox.Validating   += TextValidating;
            peakDelay                       = 40;
            results.MouseClick             += SelectItems;
            transformTitlesList.MouseClick += SelectItems;

            //Nupud
            MinimizeButton.MouseClick  += MinimizeButton_Click;
            CloseButton.MouseClick     += CloseButton_Click;
            SelectButton.Image          = SelectList.Images[0];
            CalculateButton.MouseHover += Calculate_MouseHover;
            SelectButton.MouseHover    += Select_MouseHover;
            CalculateButton.MouseLeave += Calculate_MouseLeave;
            SelectButton.MouseLeave    += Select_MouseLeave;
            SelectButton.Click         += OpenDialog;
            this.MouseDown             += Form1_MouseDown;
            itcdata_BG.MouseDown       += Form1_MouseDown;
            resultsGraph.MouseDown     += Form1_MouseDown;
            CalculateButton.Image       = CalculateList.Images[0];
            transformationButton.Image  = TransformationButtonList.Images[0];
            activityButton.Image        = activityButtonList.Images[1];
        }
Esempio n. 30
0
 private static void Default(AdvancedSettings _settings)
 {
     Log.Info("xPL_Connector.AdvancedSettings.Default(): called");
     _settings.BlankDisplayWithVideo   = false;
     _settings.EnableDisplayAction     = false;
     _settings.EnableDisplayActionTime = 5;
     _settings.BlankDisplayWhenIdle    = false;
     _settings.BlankIdleTime           = 30;
     Log.Info("xPL_Connector.AdvancedSettings.Default(): completed");
 }
        public ActionResult AdvancedStyling(int widgetid)
        {
            var item = _contentManager.Get<CustomStyle>(widgetid);

            if (item != null)
            {

                string css = item.CssStyle;
                //parse
                if (string.IsNullOrWhiteSpace(css)) css = string.Empty;
                //strip out the px symbol
                css = css.Replace("px", "");
                var col = ParseStringTocssCollection(css);
                ViewBag.widgetid = widgetid;


                var mdl = new AdvancedSettings();


                return PartialView(mdl);
            }

            return null;
        }
        public ActionResult SaveAdvancedStyling(int widgetidadvanced, AdvancedSettings mdl)
        {

            if (ModelState.IsValid)
            {
                var item = _contentManager.Get<CustomStyle>(widgetidadvanced);
                if (item != null)
                {
                    string css = item.CssStyle;
                    if (string.IsNullOrWhiteSpace(css)) css = string.Empty;
                    //parse
                    var col = ParseStringTocssCollection(css);
                    //set properties

                    //serialize back 
                    item.CssStyle = CssCollectionTostring(col);

                    _repo.Update(item.Record);

                    return Json(new { s = "Saved settings!" });

                }
            }
            else
            {
                //model state is not valid
                return Json(new { s = PrepareErrMsg(ModelState) });

            }


         


            return null;
        }