コード例 #1
0
 public Form1()
 {
     InitializeComponent();
     CustomToolTip tip = new CustomToolTip();
     tip.SetToolTip(button1, "text");
     tip.SetToolTip(button2, "writing");
     button1.Tag = Properties.Resources.pelican; // pull image from the resources file
     button2.Tag = Properties.Resources.pelican2;       
 }
コード例 #2
0
        //-------------------------------------------------------------
        public SuggestedGameInternetControl(DTO_Suggestion dto, KobberLan parent)
        //-------------------------------------------------------------
        {
            //Init control
            InitializeComponent();

            kobberLan              = parent;
            dto_suggestion         = dto;
            Likes                  = new List <IPAddress>();
            label_GameTitle.Text   = dto.title;
            pictureBox_Cover.Image = dto.imageCover;

            //Set mouseover tooltip
            CustomToolTip tip = new CustomToolTip(dto, this);

            tip.InitImage(dto.imageBig);
            tip.SetToolTip(pictureBox_Cover, "Details");

            //Check for startup value
            if (!(string.IsNullOrEmpty(dto.startGame) && string.IsNullOrEmpty(dto.startServer)))
            {
                button_Play.Enabled = true;
            }

            //Show popup notification about the new game
            kobberLan.Invoke(new Action(() =>
            {
                kobberLan.ShowBallonTip("Kobberlan internet suggested", "Game: " + dto_suggestion.title);
            }));
        }
コード例 #3
0
ファイル: frmMainTabs.cs プロジェクト: TJF0700/AGAddOnVault
        private void picBox_MouseHoverHandler(object sender, EventArgs e)
        {
            var pb = (PictureBox)sender;

            myToolTip.NInfo = (NodeInfo)pb.Tag;
            myToolTip.SetToolTip(pb, "ROM");
        }
コード例 #4
0
        //-------------------------------------------------------------
        public SuggestedGameControl(DTO_Suggestion dto, KobberLan parent)
        //-------------------------------------------------------------
        {
            //Init control
            InitializeComponent();

            finishedDownloaded = false;
            kobberLan          = parent;
            dto_suggestion     = dto;
            Likes = new List <IPAddress>();
            label_GameTitle.Text   = dto.title;
            pictureBox_Cover.Image = dto.imageCover;
            state = TorrentState.Starting;

            if (dto.torrent == null)
            {
                button_Get.Enabled = false;
                button_Get.Visible = false;
            }
            else //Internet suggestion
            {
                button_Get.Enabled = true;
                button_Get.Visible = true;
            }

            //Set mouseover tooltip
            CustomToolTip tip = new CustomToolTip(dto, this);

            tip.InitImage(dto.imageBig);
            tip.SetToolTip(pictureBox_Cover, "Details");

            //-------------------------------------------------------------
            //Check for startup value
            //-------------------------------------------------------------
            if (!(string.IsNullOrEmpty(dto.startGame) && string.IsNullOrEmpty(dto.startServer)))
            {
                button_Play.Visible = true;
                button_Play.Enabled = false;

                //-------------------------------------------------------------
                //Check if player already got the game
                //-------------------------------------------------------------
                var path = Helper.GetDirection();
                if (Directory.Exists(path + "\\" + dto_suggestion.key))
                {
                    button_Play.Enabled = true;
                }
            }

            //Show popup notification about the new game
            kobberLan.Invoke(new Action(() =>
            {
                kobberLan.ShowBallonTip("Kobberlan game suggested", "Game: " + dto_suggestion.title);
            }));
        }
コード例 #5
0
ファイル: MainView.cs プロジェクト: RuXeR97/ForgetMeNot
 public void InitializeToolTips(string[] text, int height, int width)
 {
     if (text == null)
     {
         return;
     }
     for (int i = 0; i < text.Length; i++)
     {
         ToolTip toolTip = new CustomToolTip(height, width);
         toolTip.SetToolTip(DayButtons[i], text[i]);
     }
 }
コード例 #6
0
        //-------------------------------------------------------------
        public SuggestedGameOwnerControl(DTO_Suggestion dto, string pathHDD, KobberLan parent, bool ownSuggestions = false)
        //-------------------------------------------------------------
        {
            //Init control
            InitializeComponent();

            torrentPeers = new List <string>();
            torrentPeers.Add("127.0.0.1"); // Inclusive owner
            torrentDownloadCompleted = new List <string>();
            torrentDownloadStarted   = new List <string>();

            ingame                 = new List <string>();
            metaProgress           = 0;
            state                  = TorrentState.Starting;
            kobberLan              = parent;
            path                   = pathHDD;
            dto_suggestion         = dto;
            Likes                  = new List <IPAddress>();
            label_GameTitle.Text   = dto.title;
            pictureBox_Cover.Image = dto.imageCover;

            //Set mouseover tooltip
            CustomToolTip tip = new CustomToolTip(dto, this);

            tip.InitImage(dto.imageBig);
            tip.SetToolTip(pictureBox_Cover, "Details");
            torrentShared = false;

            //Check for startup value
            if (!(string.IsNullOrEmpty(dto.startGame) && string.IsNullOrEmpty(dto.startServer)))
            {
                button_Play.Enabled = true;
            }

            //Hide peers/downloads/remove if not own suggestions
            this.ownSuggestions = ownSuggestions;
            if (!ownSuggestions)
            {
                pictureBox_Downloaded.Visible = false;
                pictureBox_Peers.Visible      = false;
                label_Downloading.Visible     = false;
                label_Peers.Visible           = false;
                button_Clear.Visible          = false;
            }
        }