示例#1
0
        public QueryControl2(WMIScripter parent)
        {
            QueryControl2.CheckForIllegalCrossThreadCalls = false;
            InitializeComponent();
            this.wmiScripterForm = parent;
            this.QueryCondition = new QueryConditionForm(this);
            this.NamespaceCount = 0;

            this.VBScriptCode = new VBScriptCodeGeneration(this, this.wmiScripterForm);
            this.CSharpCode = new CSharpCodeGeneration(this, this.wmiScripterForm);
            this.VBNetCode = new VBNetCodeGeneration(this, this.wmiScripterForm);
            this.PSCode = new PowershellCodeGeneration(this, this.wmiScripterForm);

            this.ClassList.DrawMode = DrawMode.OwnerDrawFixed;
            this.ClassList.DrawItem += new DrawItemEventHandler(this.ClassList_DrawItem);

            this.NamespaceList.DrawMode = DrawMode.OwnerDrawFixed;
            this.NamespaceList.DrawItem += new DrawItemEventHandler(this.NamespaceList_DrawItem);

            this.CodeLanguage.Items.Add(CSHARP);
            this.CodeLanguage.Items.Add(POWERSHELL);
            this.CodeLanguage.Items.Add(VBSCRIPT);
            this.CodeLanguage.Items.Add(VBNET);
            this.CodeLanguage.Text = VBSCRIPT;
        }
        public ExploreWmiControl(WMIScripter parent)
        {
            ExploreWmiControl.CheckForIllegalCrossThreadCalls = false;
            InitializeComponent();
            this.wmiScripterForm = parent;
            this.NamespaceCount = 0;

            this.VBScriptCode = new VBScriptCodeGeneration(this, this.wmiScripterForm);
            this.CSharpCode = new CSharpCodeGeneration(this, this.wmiScripterForm);
            this.VBNetCode = new VBNetCodeGeneration(this, this.wmiScripterForm);
            this.PSCode = new PowershellCodeGeneration(this, this.wmiScripterForm);

            this.CodeLanguage.Items.Add(CSHARP);
            this.CodeLanguage.Items.Add(POWERSHELL);
            this.CodeLanguage.Items.Add(VBSCRIPT);
            this.CodeLanguage.Items.Add(VBNET);
            this.CodeLanguage.Text = VBSCRIPT;

            this.Symbols = new ImageList();

            System.Reflection.Assembly a = System.Reflection.Assembly.Load("WMIScripter");
            Stream str = a.GetManifestResourceStream("WMIScripter.Art.ClassIcon.png");
            this.Symbols.Images.Add("classSymbol", new System.Drawing.Bitmap(str));
            str = a.GetManifestResourceStream("WMIScripter.Art.NamespaceIcon.png");
            this.Symbols.Images.Add("namespaceSymbol", new System.Drawing.Bitmap(str));
            str = a.GetManifestResourceStream("WMIScripter.Art.MethodIcon.png");
            this.Symbols.Images.Add("methodSymbol", new System.Drawing.Bitmap(str));
            str = a.GetManifestResourceStream("WMIScripter.Art.PropertyIcon.png");
            this.Symbols.Images.Add("propertySymbol", new System.Drawing.Bitmap(str));
            this.wmiTreeView.ImageList = Symbols;
            str.Close();
        }
示例#3
0
        public MethodControl2(WMIScripter parent)
        {
            InitializeComponent();
            this.NamespaceCount = 0;
            this.wmiScripterForm = parent;

            this.VBScriptCode = new VBScriptCodeGeneration(this, this.wmiScripterForm);
            this.CSharpCode = new CSharpCodeGeneration(this, this.wmiScripterForm);
            this.VBNetCode = new VBNetCodeGeneration(this, this.wmiScripterForm);
            this.PSCode = new PowershellCodeGeneration(this, this.wmiScripterForm);

            this.ClassList.DrawMode = DrawMode.OwnerDrawFixed;
            this.ClassList.DrawItem += new DrawItemEventHandler(this.ClassList_DrawItem);

            this.NamespaceList.DrawMode = DrawMode.OwnerDrawFixed;
            this.NamespaceList.DrawItem += new DrawItemEventHandler(this.NamespaceList_DrawItem);

            this.MethodList.DrawMode = DrawMode.OwnerDrawFixed;
            this.MethodList.DrawItem += new DrawItemEventHandler(MethodList_DrawItem);

            this.InstanceList.DrawMode = DrawMode.OwnerDrawFixed;
            this.InstanceList.DrawItem += new DrawItemEventHandler(InstanceList_DrawItem);

            this.CodeLanguage.Items.Add(CSHARP);
            this.CodeLanguage.Items.Add(POWERSHELL);
            this.CodeLanguage.Items.Add(VBSCRIPT);
            this.CodeLanguage.Items.Add(VBNET);
            this.CodeLanguage.Text = VBSCRIPT;

            this.InitialAddClassesToList();
        }
示例#4
0
        public EventControl2(WMIScripter parent)
        {
            InitializeComponent();
            this.NamespaceCount = 0;
            this.QueryCounter = 0;
            this.wmiScripterForm = parent;

            this.VBScriptCode = new VBScriptCodeGeneration(this, this.wmiScripterForm);
            this.CSharpCode = new CSharpCodeGeneration(this, this.wmiScripterForm);
            this.VBNetCode = new VBNetCodeGeneration(this, this.wmiScripterForm);
            this.PSCode = new PowershellCodeGeneration(this, this.wmiScripterForm);

            this.ClassList.DrawMode = DrawMode.OwnerDrawFixed;
            this.ClassList.DrawItem += new DrawItemEventHandler(this.ClassList_DrawItem);

            this.NamespaceList.DrawMode = DrawMode.OwnerDrawFixed;
            this.NamespaceList.DrawItem += new DrawItemEventHandler(this.NamespaceList_DrawItem);

            this.TargetInstanceList.DrawMode = DrawMode.OwnerDrawFixed;
            this.TargetInstanceList.DrawItem += new DrawItemEventHandler(TargetInstanceList_DrawItem);

            this.CodeLanguage.Items.Add(CSHARP);
            this.CodeLanguage.Items.Add(POWERSHELL);
            this.CodeLanguage.Items.Add(VBSCRIPT);
            this.CodeLanguage.Items.Add(VBNET);
            this.CodeLanguage.Text = VBSCRIPT;

            // Holds the event queries that are supported by event providers.
            SupportedEventQueries = new string[MAXEVENTQUERIES];
            SupportedEventQueries.Initialize();

            this.InitialAddClassesToList();
            this.Asynchronous.Visible = false;
        }