예제 #1
0
파일: MainForm.cs 프로젝트: ramnaresh/SMO
        private void scriptToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ListView.SelectedItems.Count == 0)
            {
                return;
            }

            object      selectedObject   = this.ListView.SelectedItems[0].Tag;
            IScriptable scriptableObject = selectedObject as IScriptable;

            if (scriptableObject != null)
            {
                StringCollection strings = scriptableObject.Script();
                TextOutputForm   frm     = new TextOutputForm(strings);
                frm.ShowDialog(this);
            }
        }
예제 #2
0
파일: MainForm.cs 프로젝트: rcdosado/SMO
        private void scriptToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.ListView.SelectedItems.Count == 0)
            {
                return;
            }

            object selectedObject = this.ListView.SelectedItems[0].Tag;
            IScriptable scriptableObject = selectedObject as IScriptable;
            if (scriptableObject != null)
            {
                StringCollection strings = scriptableObject.Script();
                TextOutputForm frm = new TextOutputForm(strings);
                frm.ShowDialog(this);
            }
        }