Ejemplo n.º 1
0
 public ImportScriptPageViewModel()
 {
     _gridVisibility    = "Hidden";
     _messageVisibility = "Hidden";
     _scriptDb          = new ScriptDb();
     _masterScriptDb    = new MasterScriptDb();
 }
        public ScriptsWindowViewModel()
        {
            _scriptsDb      = new ScriptDb();
            _masterScriptDb = new MasterScriptDb();
            var savedScripts = _masterScriptDb.GetMasterScript().Result.Scripts;

            ScriptsCollection = new ObservableCollection <Script>(savedScripts);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Create raven context when Studio starts, in this way when we click on rebbon AHK window appears immediately
        /// </summary>
        public void Execute()
        {
            RavenContext.Current.CreateSession();
            var masterScriptDb = new MasterScriptDb();
            var masterScript   = masterScriptDb.GetMasterScript().Result;

            //ProcessScript.ExportScript(Path.Combine(masterScript.Location, masterScript.Name), new List<Script>());
        }
Ejemplo n.º 4
0
        public ScriptsWindowViewModel()
        {
            _scriptsDb      = new ScriptDb();
            _masterScriptDb = new MasterScriptDb();
            var savedScripts = _scriptsDb.GetAllScripts().Result;

            foreach (var script in savedScripts)
            {
                ScriptsCollection.Add(script);
            }
        }
Ejemplo n.º 5
0
 public AddScriptViewModel()
 {
     _scriptName        = string.Empty;
     _scriptDescription = string.Empty;
     _scriptContent     = string.Empty;
     _message           = string.Empty;
     _messageVisibility = "Hidden";
     _messageColor      = string.Empty;
     _scriptDb          = new ScriptDb();
     _masterScriptDb    = new MasterScriptDb();
     _isDisabled        = false;
 }
Ejemplo n.º 6
0
 public ScriptsWindowViewModel()
 {
     _scriptsDb      = new ScriptDb();
     _masterScriptDb = new MasterScriptDb();
     try
     {
         var savedScripts = _masterScriptDb.GetMasterScript().Result.Scripts;
         ScriptsCollection = new ObservableCollection <Script>(savedScripts);
     }
     catch (Exception ex)
     {
         Log.Logger.Error($"{Constants.GetMasterScript}: {Constants.Message}: {ex.Message}\n " +
                          $"{Constants.StackTrace}: {ex.StackTrace}\n {Constants.InnerException}: {ex.InnerException}");
     }
 }