Ejemplo n.º 1
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="InfoWindow" /> class.
        /// </summary>
        public InfoWindow()
        {
            this.InitializeComponent();

            this.actionControl = new ActionFolderLogic();
            this.actionControl.Running += this.actionControl_Running;
            this.actionControl.ScriptError += this.ActionControlScriptError;
            this.grdActionFolders.DataSource = this.actionControl.ActionFolders;
            this.grdActionFolders.ReadOnly = true;

            this.scriptLogic = new ScriptLogic();

            this.cboScript.DataSource = this.scriptLogic.BuildScriptModels().Select(x => x.ScriptName).ToList();

            // Set up the delays for the ToolTip.
            this.toolTip1.AutoPopDelay = 5000;
            this.toolTip1.InitialDelay = 1000;
            this.toolTip1.ReshowDelay = 500;

            // Force the ToolTip text to be displayed whether or not the form is active.
            this.toolTip1.ShowAlways = true;

            // Set up the ToolTip text for the Button and Checkbox.
            this.toolTip1.SetToolTip(this.btnAdd, "Create an action folder");
            this.toolTip1.SetToolTip(this.btnRemove, "Remove the selected action folder");
            this.toolTip1.SetToolTip(this.txtFolder, "What folder to monitor for added files?");
            this.toolTip1.SetToolTip(this.txtFileType, "What kind of file type to monitor?");
            this.toolTip1.SetToolTip(this.cboScript, "What script to run against the newly added file?");
            this.toolTip1.SetToolTip(this.grdConfigs, "Here are all the config values for the script to run.");
            this.toolTip1.SetToolTip(this.chkActive, "Is the action folder active or not?");

            this.SetDisplay();
            this.Hide();
        }
Ejemplo n.º 2
0
 /// <summary>Initializes a new instance of the <see cref="ScriptManager"/> class.</summary>
 public ScriptManager()
 {
     this.InitializeComponent();
     this.scriptLogic = new ScriptLogic();
     this.RefreshGrid();
     this.saveFileDialog1.InitialDirectory = System.Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
 }