本文整理汇总了C#中IComponentChangeService类的典型用法代码示例。如果您正苦于以下问题:C# IComponentChangeService类的具体用法?C# IComponentChangeService怎么用?C# IComponentChangeService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IComponentChangeService类属于命名空间,在下文中一共展示了IComponentChangeService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SuperGridActionList
/// <summary>
/// SuperGridActionList
/// </summary>
/// <param name="superGrid">Associated SuperGridControl</param>
public SuperGridActionList(SuperGridControl superGrid)
: base(superGrid)
{
_SuperGrid = superGrid;
_ChangeService = Component.Site.GetService(typeof(IComponentChangeService)) as IComponentChangeService;
}
示例2: KryptonSplitContainerActionList
/// <summary>
/// Initialize a new instance of the KryptonSplitContainerActionList class.
/// </summary>
/// <param name="owner">Designer that owns this action list instance.</param>
public KryptonSplitContainerActionList(KryptonSplitContainerDesigner owner)
: base(owner.Component)
{
_splitContainer = owner.Component as KryptonSplitContainer;
// Assuming we were correctly passed an actual component...
if (_splitContainer != null)
{
// Get access to the actual Orientation propertry
PropertyDescriptor orientationProp = TypeDescriptor.GetProperties(_splitContainer)["Orientation"];
// If we succeeded in getting the property
if (orientationProp != null)
{
// Decide on the next action to take given the current setting
if ((Orientation)orientationProp.GetValue(_splitContainer) == Orientation.Vertical)
_action = "Horizontal splitter orientation";
else
_action = "Vertical splitter orientation";
}
}
// Cache service used to notify when a property has changed
_service = (IComponentChangeService)GetService(typeof(IComponentChangeService));
}
示例3: Initialize
public override void Initialize(IComponent c)
{
base.Initialize(c);
((NamedComponent) c).Name = c.Site.Name;
this.Service = (IComponentChangeService) this.GetService(typeof(IComponentChangeService));
this.Service.ComponentRename += new System.ComponentModel.Design.ComponentRenameEventHandler(this.ComponentRenameEventHandler);
}
示例4: ChangeToolStripParentVerb
internal ChangeToolStripParentVerb(string text, ToolStripDesigner designer)
{
this._designer = designer;
this._provider = designer.Component.Site;
this._host = (IDesignerHost) this._provider.GetService(typeof(IDesignerHost));
this.componentChangeSvc = (IComponentChangeService) this._provider.GetService(typeof(IComponentChangeService));
}
示例5: GenButtons
public void GenButtons(object sender, EventArgs e)
{
if (schedule == null)
{
schedule = this.Component as AjaxSchedule;
}
if (schedule.ScheduleButtons.Count == 0)
{
if (host == null)
{
host = (IDesignerHost)this.GetService(typeof(IDesignerHost));
}
if (svcCompChange == null)
{
svcCompChange = (IComponentChangeService)this.GetService(typeof(IComponentChangeService));
}
DesignerTransaction trans = host.CreateTransaction("Generate buttons");
this.addButton(AjaxScheduleButtonType.PreviousYear, "<<");
this.addButton(AjaxScheduleButtonType.Previous, "<");
this.addButton(AjaxScheduleButtonType.NextYear, ">>");
this.addButton(AjaxScheduleButtonType.Next, ">");
this.addButton(AjaxScheduleButtonType.Today, "today");
this.addButton(AjaxScheduleButtonType.Month, "month");
this.addButton(AjaxScheduleButtonType.Week, "week");
this.addButton(AjaxScheduleButtonType.Day, "day");
trans.Commit();
MessageBox.Show("generate buttons successful!");
}
}
示例6: Initialize
public override void Initialize(IComponent component)
{
base.Initialize(component);
changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService));
// Update your designer verb whenever ComponentChanged event occurs.
if (changeService != null)
changeService.ComponentChanged += new ComponentChangedEventHandler(OnComponentChanged);
}
示例7: CustomInitialize
/// <summary>
/// Makes sure local variables are valid.
/// </summary>
private void CustomInitialize()
{
if (this._DesignerHost == null)
this._DesignerHost = this.GetService(typeof(IDesignerHost)) as IDesignerHost;
if (this._ComponentChangeService == null)
this._ComponentChangeService = this._DesignerHost.GetService(typeof(IComponentChangeService)) as IComponentChangeService;
}
示例8: Initialize
public override void Initialize(System.ComponentModel.IComponent component)
{
base.Initialize(component);
this._changeService = (IComponentChangeService)this.GetService(typeof(IComponentChangeService));
this._changeService.ComponentRemoving += new ComponentEventHandler(OnRemoving);
this.Verbs.Add(new DesignerVerb("Add TabControl", new EventHandler(OnAddTabControl)));
this.Verbs.Add(new DesignerVerb("Remove TabControl", new EventHandler(OnRemoveTabControl)));
}
示例9: fmEasilyReportDesigner
public fmEasilyReportDesigner(IReport rpt, IDesignerHost designerHost)
{
InitializeComponent();
designReport = rpt;
tempReport = rpt.Copy();
componentChangeService = designerHost.GetService(typeof(IComponentChangeService)) as IComponentChangeService;
}
示例10: KryptonContextMenuActionList
/// <summary>
/// Initialize a new instance of the KryptonContextMenuActionList class.
/// </summary>
/// <param name="owner">Designer that owns this action list instance.</param>
public KryptonContextMenuActionList(KryptonContextMenuDesigner owner)
: base(owner.Component)
{
// Remember the context menu instance
_contextMenu = owner.Component as KryptonContextMenu;
// Cache service used to notify when a property has changed
_service = (IComponentChangeService)GetService(typeof(IComponentChangeService));
}
示例11: Exec
public override void Exec()
{
//System.Reflection.Assembly ass = System.Reflection.Assembly.Load(new System.Reflection.AssemblyName("System.Management.Automation"));
System.Reflection.Assembly ass = System.Reflection.Assembly.Load("System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");
//System.Reflection.Assembly ass = System.Reflection.Assembly.LoadWithPartialName("System.Management.Automation");
if (ass == null)
{
MessageBox.Show("PowerShell has not been detected. You need to download and install PowerShell from the Microsoft website in order to use this feature."
, "BIDS Helper PowerShell Window"
, MessageBoxButtons.OK
, MessageBoxIcon.Stop);
return;
}
try
{
ApplicationObject.StatusBar.Animate(true, vsStatusAnimation.vsStatusAnimationDeploy);
ApplicationObject.StatusBar.Progress(true, "Launching Powershell...", 0, 1);
this.changesvc = (IComponentChangeService)currentDB.Site.GetService(typeof(IComponentChangeService));
//int iErrorCnt = 0;
EnvDTE80.Windows2 toolWins;
EnvDTE.Window toolWin;
object objTemp = null;
toolWins = (Windows2)ApplicationObject.Windows;
toolWin = toolWins.CreateToolWindow2(AddInInstance
, typeof(BIDSHelper.SSAS.PowerShellControl).Assembly.Location
, typeof(BIDSHelper.SSAS.PowerShellControl).FullName
, currentDB.Name + ": PowerShell Window", "{" + typeof(BIDSHelper.SSAS.PowerShellControl).GUID.ToString() + "}"
, ref objTemp);
BIDSHelper.SSAS.PowerShellControl ctrl = (SSAS.PowerShellControl)objTemp;
ctrl.CurrentDB = currentDB;
ctrl.ToolWindows = toolWins;
EnvDTE.Properties prop = this.ApplicationObject.get_Properties("FontsAndColors", "TextEditor");
ctrl.SetFont((string)prop.Item("FontFamily").Value, (float)Convert.ToDouble(prop.Item("FontSize").Value));
//setting IsFloating and Linkable to false makes this window tabbed
toolWin.IsFloating = false;
toolWin.Linkable = false;
toolWin.Visible = true;
this.changesvc.OnComponentChanging(this.currentDB, null);
this.changesvc.OnComponentChanged(this.currentDB, null, null, null);
}
catch (Exception ex)
{
System.Windows.Forms.MessageBox.Show(ex.Message);
}
finally
{
ApplicationObject.StatusBar.Animate(false, vsStatusAnimation.vsStatusAnimationDeploy);
ApplicationObject.StatusBar.Progress(false, "Launching Powershell...", 2, 2);
}
}
示例12: KryptonSeparatorActionList
/// <summary>
/// Initialize a new instance of the KryptonSeparatorActionList class.
/// </summary>
/// <param name="owner">Designer that owns this action list instance.</param>
public KryptonSeparatorActionList(KryptonSeparatorDesigner owner)
: base(owner.Component)
{
// Remember the link label instance
_separator = owner.Component as KryptonSeparator;
// Cache service used to notify when a property has changed
_service = (IComponentChangeService)GetService(typeof(IComponentChangeService));
}
示例13: KryptonGroupBoxActionList
/// <summary>
/// Initialize a new instance of the KryptonGroupBoxDesigner class.
/// </summary>
/// <param name="owner">Designer that owns this action list instance.</param>
public KryptonGroupBoxActionList(KryptonGroupBoxDesigner owner)
: base(owner.Component)
{
// Remember the control instance
_groupBox = owner.Component as KryptonGroupBox;
// Cache service used to notify when a property has changed
_service = (IComponentChangeService)GetService(typeof(IComponentChangeService));
}
示例14: KryptonNumericUpDownActionList
/// <summary>
/// Initialize a new instance of the KryptonNumericUpDownActionList class.
/// </summary>
/// <param name="owner">Designer that owns this action list instance.</param>
public KryptonNumericUpDownActionList(KryptonNumericUpDownDesigner owner)
: base(owner.Component)
{
// Remember the text box instance
_numericUpDown = owner.Component as KryptonNumericUpDown;
// Cache service used to notify when a property has changed
_service = (IComponentChangeService)GetService(typeof(IComponentChangeService));
}
示例15: KryptonRadioButtonActionList
/// <summary>
/// Initialize a new instance of the KryptonRadioButtonActionList class.
/// </summary>
/// <param name="owner">Designer that owns this action list instance.</param>
public KryptonRadioButtonActionList(KryptonRadioButtonDesigner owner)
: base(owner.Component)
{
// Remember the radio button instance
_radioButton = owner.Component as KryptonRadioButton;
// Cache service used to notify when a property has changed
_service = (IComponentChangeService)GetService(typeof(IComponentChangeService));
}