Пример #1
0
        private void VisualClientList_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
        {
            int x = e.X - 8;
            int y = e.Y - 40;

            int xBlock = x / 4;
            int yBlock = y / 4;

            if (m_Grid[xBlock, yBlock])
            {
                // Issue 10 - Update the code to Net Framework 3.5 - http://code.google.com/p/pandorasbox3/issues/detail?id=10 - Smjert
                List <ClientEntry> clients;
                m_Table.TryGetValue(new Point(xBlock, yBlock), out clients);
                // Issue 10 - End

                if (clients == null || clients.Count == 0)
                {
                    return;
                }

                m_GoPoint = new Point(xBlock * 32 + 16, yBlock * 32 + 16);

                string title = string.Format("{0} clients - Go there", clients.Count);
                System.Text.StringBuilder sb = new System.Text.StringBuilder();

                foreach (ClientEntry entry in clients)
                {
                    sb.AppendFormat("{0} [Acc: {1}]\r\n", entry.Name, entry.Account);
                }

                PopUpForm.PopUp(this, title, sb.ToString(), false, new PopUpCallback(OnGo));
            }
        }
Пример #2
0
        public static void PopUp(Form owner, string title, string message, bool toolTipMode, PopUpCallback callback)
        {
            var form = new PopUpForm();

            form.m_Title       = title;
            form.m_Message     = message;
            form.m_ToolTipMode = toolTipMode;
            form.m_Callback    = callback;

            form.Calculate();

            form.ShowDialog(owner);
        }
Пример #3
0
		public static void PopUp( Form owner, string title, string message, bool toolTipMode, PopUpCallback callback )
		{
			PopUpForm form = new PopUpForm();

			form.m_Title = title;
			form.m_Message = message;
			form.m_ToolTipMode = toolTipMode;
			form.m_Callback = callback;

			form.Calculate();

			form.ShowDialog( owner );
		}