示例#1
0
        /// <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);
        }
示例#2
0
 public KrentoMenuWindow(KrentoMenu menu)
     : base()
 {
     Text               = "Krento Menu";
     Name               = "KrentoMenu";
     this.menu          = menu;
     this.CanDrag       = false;
     this.TopMostWindow = true;
 }
示例#3
0
 /// <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);
     }
 }
示例#4
0
 public MenuAccessibleObject(KrentoMenu menu)
 {
     this.menu = menu;
 }