/// <summary> /// Initializes a new instance of the <see cref="ToyBase"/> class. /// </summary> /// <param name="currentFolder">The current folder.</param> public ToyBase(string currentFolder) : base() { KrentoMenuItem item; Text = "Krento Toy"; Name = "KrentoToy"; toyEnabled = true; this.currentFolder = currentFolder; settingFileName = Path.Combine(currentFolder, "config.ini"); this.BottomMostWindow = true; popupMenu = new KrentoMenu(); item = popupMenu.AddItem(); item.Caption = SR.StoneAbout; item.Name = "About"; item.Execute += new EventHandler(AboutToy_Execute); item = popupMenu.AddItem(); item.Caption = SR.HideToy; item.Name = "HideToy"; item.Execute += new EventHandler(HideToy_Execute); item = popupMenu.AddItem(); item.Caption = SR.Delete; item.Name = "Delete"; item.Execute += new EventHandler(DeleteToy_Execute); }
public KrentoMenuWindow(KrentoMenu menu) : base() { Text = "Krento Menu"; Name = "KrentoMenu"; this.menu = menu; this.CanDrag = false; this.TopMostWindow = true; }
/// <summary> /// Releases unmanaged and - optionally - managed resources /// </summary> /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param> protected override void Dispose(bool disposing) { try { if (disposing) { if (popupMenu != null) { popupMenu.Dispose(); popupMenu = null; } } } finally { base.Dispose(disposing); } }
public MenuAccessibleObject(KrentoMenu menu) { this.menu = menu; }