Пример #1
0
    ////////////////////////////////////////////////////////////////////////////    

    #endregion 
    
		#region //// Methods ///////////
			
		////////////////////////////////////////////////////////////////////////////
		protected override void Initialize()
    {
      base.Initialize();                                               
            
      // Controls setup.
            
      window = new Window(manager);
      window.Init();      
      window.Text = "Addon Controls";
      window.Width = 480;
      window.Height = 200;      
      window.Center();
      window.Visible = true;

      button = new Button(manager);
      button.Init();
      button.Text = "DEFAULT";
      button.Width = 72;
      button.Height = 24;
      button.Left = (window.ClientWidth / 2) - 4 - button.Width;
      button.Top = window.ClientHeight - button.Height - 32;
      button.Anchor = Anchors.Bottom;
      button.Parent = window;  
      button.Focused = true;
            
      // Here we construct our custom button.
      custom = new CustomButton(manager);
      custom.Init();
      custom.Text = "CUSTOM";
      custom.Width = 72;
      custom.Height = 24;
      custom.Left = (window.ClientWidth / 2) + 4;
      custom.Top = window.ClientHeight - button.Height - 32;
      custom.Anchor = Anchors.Bottom;
      custom.Parent = window;
      custom.Cursor = manager.Skin.Cursors["Custom.Cursor"].Resource;
            
      manager.Add(window);
    }