Example #1
0
        public MapEntPropertiesView(Editor e)
            : base()
        {
            editor = e;
            engine = e.engine;

            Text = "MapEnt properties";

            enttypes = new ListBox();
            enttypes.Location = new System.Drawing.Point(10, 10);
            enttypes.Items.Clear();
            foreach (string s in MapEnt.enttypes)
                enttypes.Items.Add(s);
            enttypes.Show();

            Controls.Add(enttypes);

            entprops = new TextBox[5];
            int x = 10;
            int y = enttypes.Bottom + 5;

            for (int i = 0; i < numprops; i++) {
                entprops[i] = new TextBox();
                entprops[i].Location = new System.Drawing.Point(x, y);
                entprops[i].Show();
                Controls.Add(entprops[i]);
                y = entprops[i].Bottom + 5;
            }
        }
Example #2
0
        private void SelectBabys()
        {
            lst           = new ListBox();
            lst.Dock      = System.Windows.Forms.DockStyle.Fill;
            this.listform = new Form();
            listform.Size = new Size(200, 100);
            for (int i = 0; i < this.alBabyInfo.Count; i++)
            {
                neusoft.neuFC.Object.neuObject obj;
                obj = (neusoft.neuFC.Object.neuObject) this.alBabyInfo[i];
                lst.Items.Add(obj.ID + "  " + obj.Name);
            }

            lst.Visible = true;
            lst.Show();
            lst.KeyDown      += new KeyEventHandler(lst_KeyDown);
            lst.DoubleClick  += new EventHandler(lst_DoubleClick);
            listform.Closing += new CancelEventHandler(listform_Closing);
            listform.Controls.Add(lst);
            listform.Text            = "请选择婴儿信息";
            listform.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
            listform.TopMost         = true;

            listform.Show();
            listform.Location = this.chkIsBaby.PointToScreen(new Point(this.chkIsBaby.Width / 2 + this.chkIsBaby.Left, this.chkIsBaby.Height + this.chkIsBaby.Top));
            try
            {
                lst.SelectedIndex = 0;
                lst.Focus();
                lst.LostFocus += new EventHandler(lst_LostFocus);
            }
            catch {}
            return;
        }
Example #3
0
        private void InternalExecute()
        {
            if (_listBox.Items.Count == 1)
            {
                ExecuteItem(_listBox.Items[0] as Item);
                Done();
            }
            else
            {
                _listBox.Show();
                _listBox.Focus();

                if (_listBox.Items.Count > 0)
                {
                    _listBox.SelectedIndex = 0;
                }
            }
        }
Example #4
0
        private void SelectPatient()
        {
            lst      = new ListBox();
            lst.Dock = System.Windows.Forms.DockStyle.Fill;

            this.listform = new Form();
            //用窗口显示
            try
            {
                this.listform.Close();
            }
            catch {}
            listform.Size            = new Size(200, 100);
            listform.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;

            for (int i = 0; i < this.alInpatientNos.Count; i++)
            {
                neusoft.neuFC.Object.neuObject obj;
                obj = (neusoft.neuFC.Object.neuObject) this.alInpatientNos[i];
                lst.Items.Add(obj.ID + "  " + obj.Name + "  " + obj.Memo);
            }

            lst.Visible      = true;
            lst.DoubleClick += new EventHandler(lst_DoubleClick);
            lst.KeyDown     += new KeyEventHandler(lst_KeyDown);
            lst.Show();

            listform.Controls.Add(lst);

            listform.TopMost = true;

            listform.Show();
            listform.Location = this.txtInputCode.PointToScreen(new Point(this.txtInputCode.Width / 2 + this.txtInputCode.Left, this.txtInputCode.Height + this.txtInputCode.Top));
            try
            {
                lst.SelectedIndex = 0;
                lst.Focus();
                lst.LostFocus += new EventHandler(lst_LostFocus);
            }
            catch {}
            return;
        }
Example #5
0
//GET LEADERBOARD
        /// <summary>
        /// Creates a listBox that stores leaderboard. Queries are used with contraints to get information from Parse.com
        /// </summary>
        async private void get_leaderboard()
        {
            var query = from gameScore in ParseObject.GetQuery("GameScore")
                        orderby gameScore.Get <string>("score") descending
                        select gameScore;

            var query_top_five = query.Limit(5);
            //var query_highscore = query.
            IEnumerable <ParseObject> results_top_five = await query_top_five.FindAsync();

            int i = 1;

            foreach (var record in results_top_five)
            {
                var score      = record.Get <Int64>("score");
                var playerName = record.Get <String>("playerName");
                listBox_leaderboard.Items.Add(i + ". " + playerName + " " + score);
                i++;
                //Console.Write(score);
            }
            listBox_leaderboard.Items.Add(".........");
            listBox_leaderboard.Show();
        }
Example #6
0
        /// <summary>
        /// 选择病人
        /// </summary>
        private void SelectPatient()
        {
            lst      = new System.Windows.Forms.ListBox();
            lst.Dock = System.Windows.Forms.DockStyle.Fill;
            lst.Items.Clear();
            this.listform = new System.Windows.Forms.Form();
            //用窗口显示

            listform.Size            = new Size(300, 200);
            listform.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
            Neusoft.HISFC.Models.Base.Employee        user        = this.orderManagement.Operator as Neusoft.HISFC.Models.Base.Employee;
            Neusoft.HISFC.BizLogic.Manager.Department managerDept = new Neusoft.HISFC.BizLogic.Manager.Department();
            for (int i = 0; i < this.alInfo.Count; i++)
            {
                Neusoft.FrameWork.Models.NeuObject obj;
                obj = (Neusoft.FrameWork.Models.NeuObject) this.alInfo[i];
                bool b = false;
                if (this.isShowOwnDept)//过滤病区-科室
                {
                    b = false;
                    if (user.EmployeeType.ID.ToString() == "N")//护士站
                    {
                        Neusoft.FrameWork.Models.NeuObject dept = new Neusoft.FrameWork.Models.NeuObject();
                        ArrayList alDept = managerDept.GetDeptFromNurseStation(user.Nurse);
                        if (alDept == null)
                        {
                        }
                        else
                        {
                            for (int k = 0; k < alDept.Count; i++)
                            {
                                dept = alDept[k] as Neusoft.FrameWork.Models.NeuObject;
                                if (dept.ID == obj.User01)
                                {
                                    b = true;
                                    break;
                                }
                            }
                        }
                    }
                    else
                    {
                        if (user.Dept.ID == obj.User01)//科室对应上
                        {
                            b = true;
                        }
                    }
                }
                else
                {
                    b = true;
                }
                if (b)
                {
                    try
                    {
                        lst.Items.Add(obj);
                    }
                    catch { }
                }
            }
            if (lst.Items.Count == 1)
            {
                try
                {
                    this.listform.Close();
                }
                catch { }
                try
                {
                    this.selectedEvents();
                }
                catch { }
                return;
            }

            if (lst.Items.Count <= 0)
            {
                this.NoInfo();
                this.selectedEvents();
                return;
            }

            lst.Visible      = true;
            lst.DoubleClick += new EventHandler(lst_DoubleClick);
            lst.KeyDown     += new KeyEventHandler(lst_KeyDown);
            lst.Show();

            listform.Controls.Add(lst);
            listform.TopMost = true;
            listform.Owner   = this.FindForm();
            listform.Show();

            #region 设置显示位置
            Point    tp      = new Point(0, this.Height);
            Point    p       = this.PointToScreen(tp);
            Screen[] screens = Screen.AllScreens;
            int      width   = screens[0].Bounds.Width;
            int      height  = screens[0].Bounds.Height;

            if (width - p.X < listform.Width)
            {
                tp = new Point(tp.X - listform.Width + this.Width, tp.Y);
            }
            if (height - p.Y < listform.Height)
            {
                tp = new Point(tp.X, tp.Y - this.Height - listform.Height - 4);
            }
            listform.Location = this.PointToScreen(tp);
            #endregion

            try
            {
                lst.SelectedIndex = 0;
                lst.Focus();
                lst.LostFocus += new EventHandler(lst_LostFocus);
            }
            catch { }
            return;
        }
            public CompletionToolTipWindow(ListBox completions)
            {
                _completions = completions;

                FormBorderStyle = FormBorderStyle.None;
                StartPosition = FormStartPosition.Manual;
                TopMost = true;
                ShowInTaskbar = false;
                Opacity = 0.9;

                Controls.Add(completions);

                Width = Math.Max(completions.PreferredSize.Width, 150);
                Height = Math.Min(completions.PreferredHeight, 100);
                completions.Height = Height;
                completions.Width = Width;

                completions.Show();
            }
        private void SelectPatient()
        {
            lst      = new ListBox();
            lst.Dock = System.Windows.Forms.DockStyle.Fill;

            this.listform = new System.Windows.Forms.Form();
            //用窗口显示
            try
            {
                //this.listform.Close();
            }
            catch { }
            listform.Size            = new Size(200, 100);
            listform.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
            Neusoft.HISFC.Models.Base.Employee        user        = new Neusoft.HISFC.Models.Base.Employee();
            Neusoft.HISFC.BizLogic.Manager.Department managerDept = new Neusoft.HISFC.BizLogic.Manager.Department();
            for (int i = 0; i < this.alInpatientNos.Count; i++)
            {
                Neusoft.FrameWork.Models.NeuObject obj;
                obj = (Neusoft.FrameWork.Models.NeuObject) this.alInpatientNos[i];
                Neusoft.HISFC.Models.RADT.InStateEnumService VisitStatus = new Neusoft.HISFC.Models.RADT.InStateEnumService();
                VisitStatus.ID = obj.Memo;
                bool b = false;
                switch (this.myShowState)//过滤患者状态
                {
                case enuShowState.InHos:
                    if (obj.Memo == "I")
                    {
                        b = true;
                    }
                    break;

                case enuShowState.OutHos:
                    if (obj.Memo == "B" || obj.Memo == "O" || obj.Memo == "P" || obj.Memo == "N")
                    {
                        b = true;
                    }
                    break;

                case enuShowState.BeforeArrived:
                    if (obj.Memo == "R")
                    {
                        b = true;
                    }
                    break;

                case enuShowState.AfterArrived:
                    if (obj.Memo != "R")
                    {
                        b = true;
                    }
                    break;

                case enuShowState.InhosBeforBalanced:
                    if (obj.Memo == "B" || obj.Memo == "I" || obj.Memo == "P" || obj.Memo == "R")
                    {
                        b = true;
                    }
                    break;

                case enuShowState.InhosAfterBalanced:
                    if (obj.Memo == "O")
                    {
                        b = true;
                    }
                    break;

                case enuShowState.InBalanced:
                    if (obj.Memo == "B")
                    {
                        b = true;
                    }
                    break;

                default:
                    b = true;
                    break;
                }
                if (b && this.isRestrictOwnDept)//过滤病区-科室
                {
                    b = false;
                    if (user.EmployeeType.ID.ToString() == "N")//护士站
                    {
                        Neusoft.FrameWork.Models.NeuObject dept = new Neusoft.FrameWork.Models.NeuObject();
                        ArrayList alDept = managerDept.GetDeptFromNurseStation(user.Nurse);
                        if (alDept == null)
                        {
                        }
                        else
                        {
                            for (int k = 0; k < alDept.Count; i++)
                            {
                                dept = alDept[k] as Neusoft.FrameWork.Models.NeuObject;
                                if (dept.ID == obj.User01)
                                {
                                    b = true;
                                    break;
                                }
                            }
                        }
                    }
                    else
                    {
                        if (user.Dept.ID == obj.User01)//科室对应上
                        {
                            b = true;
                        }
                    }
                }
                if (b)
                {
                    //显示住院流水号,姓名,在院状态
                    try
                    {
                        lst.Items.Add(obj.ID + "  " + obj.Name + "  " + VisitStatus.Name);
                    }
                    catch
                    {
                        lst.Items.Add(obj.ID + "  " + obj.Name + "  " + obj.Memo);
                    }
                    this.strInpatientNo = obj.ID;
                }
            }
            if (lst.Items.Count == 1)
            {
                try
                {
                    this.listform.Close();
                }
                catch { }
                try
                {
                    this.Text = this.strInpatientNo.Substring(4, 10);
                    this.myEvent();
                }
                catch { }
                return;
            }

            //			if(lst.Items.Count <=0) return;
            if (lst.Items.Count <= 0)
            {
                this.strInpatientNo = "";
                this.myEvent();
                return;
            }

            lst.Visible      = true;
            lst.DoubleClick += new EventHandler(lst_DoubleClick);
            lst.KeyDown     += new KeyEventHandler(lst_KeyDown);
            lst.Show();

            listform.Controls.Add(lst);

            listform.TopMost = true;

            listform.Show();
            listform.Location = this.txtInputCode.PointToScreen(new Point(this.txtInputCode.Width / 2 + this.txtInputCode.Left, this.txtInputCode.Height + this.txtInputCode.Top));
            try
            {
                lst.SelectedIndex = 0;
                lst.Focus();
                lst.LostFocus += new EventHandler(lst_LostFocus);
            }
            catch { }
            return;
        }
Example #9
0
        public static void AutoCompleteTextBox(TextBox txtControl, ListBox lstControl, 
            List<string> lstAutoCompleteList, KeyEventArgs txtControlKEA)
        {
            Point cp;
            GetCaretPos(out cp);
            List<string> lstTemp = new List<string>();
            //Positioning the Listbox on TextBox by Type Insertion Cursor position
            lstControl.SetBounds(cp.X + txtControl.Location.X, cp.Y + txtControl.Location.Y + 20, 150, 50);

            var TempFilteredList = lstAutoCompleteList.Where
                (n => n.StartsWith(GetLastString(txtControl.Text))).Select(r => r);

            lstTemp = TempFilteredList.ToList<string>();
            if (lstTemp.Count != 0 && GetLastString(txtControl.Text) != "")
            {
                lstControl.DataSource = lstTemp;
                lstControl.Show();
                lstControl.BringToFront();
            }
            else
            {
                lstControl.Hide();
            }

            //Code for focusing ListBox Items While Pressing Down and UP Key.
            if (txtControlKEA.KeyCode == Keys.Down)
            {
                lstControl.SelectedIndex = 0;
                lstControl.Focus();
                txtControlKEA.Handled = true;
            }
            else if (txtControlKEA.KeyCode == Keys.Up)
            {
                lstControl.SelectedIndex = lstControl.Items.Count - 1;
                lstControl.Focus();
                txtControlKEA.Handled = true;
            }

            //text box key press event
            txtControl.KeyPress += (s, kpeArgs) =>
            {

                if (kpeArgs.KeyChar == (char)Keys.Enter)
                {
                    if (lstControl.Visible)
                    {
                        lstControl.Focus();
                    }
                    kpeArgs.Handled = true;
                }
                else if (kpeArgs.KeyChar == (char)Keys.Escape)
                {
                    lstControl.Visible = false;
                    kpeArgs.Handled = true;
                }
                else if (kpeArgs.KeyChar == (char)Keys.Tab)
                {
                    txtControl.Text = ((ListBox)s).SelectedItem.ToString();
                    txtControl.Select(txtControl.Text.Length, 0);
                    txtControl.Focus();
                    lstControl.Hide();
                }
            };

            txtControl.LostFocus += (s, eventArgs) =>
                {
                    if (!lstControl.Focused)
                        lstControl.Hide();
                };

            //listbox keyup event
            lstControl.KeyUp += (s, kueArgs) =>
            {
                if (kueArgs.KeyCode == Keys.Tab)
                {
                    //string StrLS = GetLastString(txtControl.Text);
                    //int LIOLS = txtControl.Text.LastIndexOf(StrLS);
                    //string TempStr = txtControl.Text.Remove(LIOLS);
                    //txtControl.Text = TempStr + ((ListBox)s).SelectedItem.ToString();
                    txtControl.Text = ((ListBox)s).SelectedItem.ToString();
                    txtControl.Select(txtControl.Text.Length, 0);
                    txtControl.Focus();
                    lstControl.Hide();
                }
                else if (kueArgs.KeyCode == Keys.Escape)
                {
                    lstControl.Hide();
                    txtControl.Focus();
                }
            };
        }
        private void SelectPatient()
        {
            lst      = new ListBox();
            lst.Dock = System.Windows.Forms.DockStyle.Fill;
            lst.Items.Clear();
            this.listform = new System.Windows.Forms.Form();
            //用窗口显示
            try
            {
                //this.listform.Close();
            }
            catch { }
            listform.Size            = new Size(300, 200);
            listform.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
            Neusoft.HISFC.Models.Base.Employee        user        = this.orderManagement.Operator as Neusoft.HISFC.Models.Base.Employee;
            Neusoft.HISFC.BizLogic.Manager.Department managerDept = new Neusoft.HISFC.BizLogic.Manager.Department();
            for (int i = 0; i < this.alSeeNo.Count; i++)
            {
                Neusoft.FrameWork.Models.NeuObject obj;
                obj = (Neusoft.FrameWork.Models.NeuObject) this.alSeeNo[i];
                bool b = false;
                if (this.isRestrictOwnDept)//过滤病区-科室
                {
                    b = false;
                    if (user.EmployeeType.ID.ToString() == "N")//护士站
                    {
                        Neusoft.FrameWork.Models.NeuObject dept = new Neusoft.FrameWork.Models.NeuObject();
                        ArrayList alDept = managerDept.GetDeptFromNurseStation(user.Nurse);
                        if (alDept == null)
                        {
                        }
                        else
                        {
                            for (int k = 0; k < alDept.Count; i++)
                            {
                                dept = alDept[k] as Neusoft.FrameWork.Models.NeuObject;
                                if (dept.ID == obj.User01)
                                {
                                    b = true;
                                    break;
                                }
                            }
                        }
                    }
                    else
                    {
                        if (user.Dept.ID == obj.User01)//科室对应上
                        {
                            b = true;
                        }
                    }
                }
                else
                {
                    b = true;
                }
                if (b)
                {
                    //显示看诊序号,姓名,看诊日期(去掉时间),看诊科室
                    try
                    {
                        lst.Items.Add(obj.ID + "  " + obj.Name + "  " + obj.User02 + "  " + obj.Memo.Substring(0, obj.Memo.IndexOf(" ")) + "  " + obj.User03);//+"  " + managerDept.GetDeptmentById(obj.User01).Name);
                    }
                    catch
                    {
                        lst.Items.Add(obj.ID + "  " + obj.Name + "  " + obj.User02 + "  " + obj.Memo + "  " + obj.User03);
                    }
                    this.strSeeNo = obj.ID;
                }
            }
            if (lst.Items.Count == 1)
            {
                try
                {
                    this.listform.Close();
                }
                catch { }
                try
                {
                    this.Text = this.strSeeNo.Substring(4, 10);
                    this.myEvents();
                }
                catch { }
                return;
            }

            if (lst.Items.Count <= 0)
            {
                this.strSeeNo = "";
                this.myEvents();
                return;
            }

            lst.Visible      = true;
            lst.DoubleClick += new EventHandler(lst_DoubleClick);
            lst.KeyDown     += new KeyEventHandler(lst_KeyDown);
            lst.Show();

            listform.Controls.Add(lst);

            listform.TopMost = true;

            listform.Show();
            listform.Location = this.txtInputCode.PointToScreen(new Point(this.txtInputCode.Width / 2 + this.txtInputCode.Left, this.txtInputCode.Height + this.txtInputCode.Top));
            try
            {
                lst.SelectedIndex = 0;
                lst.Focus();
                lst.LostFocus += new EventHandler(lst_LostFocus);
            }
            catch { }
            return;
        }
Example #11
0
        public AgentGUI( string caption )
        {
            m_Id = ++m_IdCounter;
            RadioGroupUpdater[] tmpOld = m_UpdaterList;
            m_UpdaterList = new RadioGroupUpdater[m_Id];
            if ( tmpOld != null )
                for ( int i = 0; i < tmpOld.Length; i++ )
                    m_UpdaterList[i] = tmpOld[i];
            m_UpdaterList[m_Id-1] = new RadioGroupUpdater( SyncPlayerSelectors );

            this.Text = caption;
            this.Width = 430;
            this.Height = 340;
            this.MaximizeBox = false;
            this.FormBorderStyle = FormBorderStyle.FixedSingle;

            m_GroupBoxPlayer = new GroupBox();
            m_GroupBoxPlayer.Text = "Play as";
            m_GroupBoxPlayer.Width = 100;
            m_GroupBoxPlayer.Height = 150;
            m_GroupBoxPlayer.Left = 10;
            m_GroupBoxPlayer.Top = 25;
            m_GroupBoxPlayer.Show();
            this.Controls.Add( m_GroupBoxPlayer );

            m_PlayerLight = new RadioButton();
            m_PlayerLight.Text = "Light";
            m_PlayerLight.Width = 50;
            m_PlayerLight.Left = 25;
            m_PlayerLight.Top = 50;
            m_PlayerLight.Checked = true;
            m_PlayerLight.CheckedChanged += new EventHandler( m_PlayerSelect_Click );
            m_PlayerLight.Show();
            m_GroupBoxPlayer.Controls.Add( m_PlayerLight );

            m_PlayerDark = new RadioButton();
            m_PlayerDark.Text = "Dark";
            m_PlayerDark.Width = 50;
            m_PlayerDark.Left = 25;
            m_PlayerDark.Top = 80;
            m_PlayerDark.CheckedChanged += new EventHandler( m_PlayerSelect_Click );
            m_PlayerDark.Show();
            m_GroupBoxPlayer.Controls.Add( m_PlayerDark );

            m_PlayerNone = new RadioButton();
            m_PlayerNone.Text = "None";
            m_PlayerNone.Width = 50;
            m_PlayerNone.Left = 25;
            m_PlayerNone.Top = 20;
            m_PlayerNone.CheckedChanged += new EventHandler( m_PlayerSelect_Click );
            m_PlayerNone.Show();
            m_GroupBoxPlayer.Controls.Add( m_PlayerNone );

            m_PlayerBoth = new RadioButton();
            m_PlayerBoth.Text = "Both";
            m_PlayerBoth.Width = 50;
            m_PlayerBoth.Left = 25;
            m_PlayerBoth.Top = 110;
            m_PlayerBoth.CheckedChanged += new EventHandler( m_PlayerSelect_Click );
            m_PlayerBoth.Show();
            m_GroupBoxPlayer.Controls.Add( m_PlayerBoth );

            m_EvaluatorLabel = new Label();
            m_EvaluatorLabel.Text = "Evaluator";
            m_EvaluatorLabel.Left = 10;
            m_EvaluatorLabel.Top = 190;
            m_EvaluatorLabel.AutoSize = true;
            m_EvaluatorLabel.Show();
            this.Controls.Add( m_EvaluatorLabel );

            m_PluginSelector = new ComboBox();
            m_PluginSelector.DropDownStyle = ComboBoxStyle.DropDownList;
            m_PluginSelector.Left = 10;
            m_PluginSelector.Top = 210;
            m_PluginSelector.Width = 100;
            m_PluginSelector.Items.Add( "None" );
            m_PluginSelector.SelectedIndex = 0;
            m_PluginSelector.Show();
            this.Controls.Add( m_PluginSelector );

            m_LearnPanel = new Panel();
            m_LearnPanel.BorderStyle = BorderStyle.None;
            m_LearnPanel.Left = 5;
            m_LearnPanel.Top = 240;
            m_LearnPanel.Width = 100;
            m_LearnPanel.Height = 25;
            m_LearnPanel.Show();
            this.Controls.Add( m_LearnPanel );

            m_Learn = new CheckBox();
            m_Learn.Text = "Learn";
            m_Learn.Left = 5;
            m_Learn.Top = 0;
            m_Learn.Checked = false;
            m_Learn.CheckedChanged += new EventHandler( m_Learn_CheckedChanged );
            m_Learn.Show();
            m_LearnPanel.Controls.Add( m_Learn );
            if (m_Id == 1)
                m_Learn.Checked = true;

            m_PossibilitiesLabel = new Label();
            m_PossibilitiesLabel.Text = "Possible moves and score";
            m_PossibilitiesLabel.Left = 130;
            m_PossibilitiesLabel.Top = 10;
            m_PossibilitiesLabel.AutoSize = true;
            m_PossibilitiesLabel.Show();
            this.Controls.Add( m_PossibilitiesLabel );

            m_PossibilitiesList = new ListBox();
            m_PossibilitiesList.Left = 130;
            m_PossibilitiesList.Top = 30;
            m_PossibilitiesList.Width = 280;
            m_PossibilitiesList.Height = 250;
            m_PossibilitiesList.Show();
            this.Controls.Add( m_PossibilitiesList );

            m_NumberPossibilitiesLabel = new Label();
            m_NumberPossibilitiesLabel.Text = "Possibilities: 0";
            m_NumberPossibilitiesLabel.Left = 130;
            m_NumberPossibilitiesLabel.Top = 280;
            m_NumberPossibilitiesLabel.AutoSize = true;
            m_NumberPossibilitiesLabel.Show();
            this.Controls.Add( m_NumberPossibilitiesLabel );

            SyncAllSelectors();
            SyncAllSelectors();
        }
            public CompletionToolTipWindow(ListBox completions,TextBox documentation)
            {
                _completions = completions;
                _documentation = documentation;

                FormBorderStyle = FormBorderStyle.None;
                StartPosition = FormStartPosition.Manual;
                TopMost = true;
                ShowInTaskbar = false;
                BackColor = Color.White;
                Opacity = 0.9;

                Controls.Add(completions);
                Controls.Add(documentation);

                Width = completions.PreferredSize.Width;
                Height = completions.Height + documentation.Height;
                completions.Width = Width;
                documentation.Width = Width;
                documentation.Location = new Point(completions.Location.X,completions.Location.Y + completions.Height);

                completions.Show();
                documentation.Show();
            }