Inheritance: IList, ICollection, IEnumerable
        //        private agsXMPP.XmppClientConnection dbco2;
        public loggednimbuzz(ListBox.ObjectCollection objectCollection, agsXMPP.XmppClientConnection dbcon)
        {
            // TODO: Complete member initialization
            InitializeComponent();
            this.objectCollection = objectCollection;
            this.dbcon = dbcon;
              //      dbcon.OnRosterItem += new XmppClientConnection.RosterHandler(dbcon_OnRosterItem);
            dbcon.OnMessage += new agsXMPP.protocol.client.MessageHandler(dcon_onmsg);

            dbcon.OnPresence += new agsXMPP.protocol.client.PresenceHandler(dbcon_onpresence);
        }
Exemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (listView3.Items.Count > 0)
     {
         grados = listView3.Items;
         this.Close();
     }
     else
     {
         MessageBox.Show("Defina grados para Indicador");
     }
 }
Exemplo n.º 3
0
        public LightSelector()
        {
            InitializeComponent();
            mState = new LightState(10);

            int counter = 1;
            foreach (Light l in mState.Lights)
            {
                mListbox.Items.Add("Light" + counter.ToString());
                counter++;
            }
            mObjectCollection = mListbox.Items;
        }
Exemplo n.º 4
0
 public LoggerSaver(string folderpath, ListBox.ObjectCollection collection)
 {
     DocumentFolder = folderpath;
     this.collection = collection;
     Date = DateTime.Now;
     try
     {
         Directory.CreateDirectory(DocumentFolder);
     }
     catch (System.Exception ex)
     {
         MessageBox.Show("Can not access directory: " + DocumentFolder + "\n" + ex.Message);
         Application.Exit();
     }
 }
Exemplo n.º 5
0
        private void main_Load(object sender, EventArgs e)
        {
            //Generate objects
            ItemFetcher.GenerateObjects();

            //Custom items (soul ring recipe etc)
            if (File.Exists("cache/items.custom.json"))
            {
                ItemFetcher.GenerateObjects("cache/items.custom.json", true);
            }

            //Hide while the startup happens
            this.Visible = false;
            backup = new ListBox.ObjectCollection(new ListBox());

            GListBox1.ImageList = new ImageList();
            GListBox1.ImageList.ImageSize = new System.Drawing.Size(32, 24);

            //Imageindex
            int n = 0;
             try
                {
            foreach (Item it in ItemFetcher.AllItems)
            {
                try { GListBox1.ImageList.Images.Add(it.Name, Image.FromFile("cache\\items\\" + it.DotaName + ".png")); }
                catch
                {
                    GListBox1.ImageList.Images.Add(it.Name, Image.FromFile("cache\\items\\" + it.img ));
                }
                    GListBox1.Items.Add(new GListBoxItem(it.Name, n));
                    it.ImageListIndex = n;
                    n++;

            }
            }
                catch (Exception ex)
             {
                 MessageBox.Show("Error while loading files. Please verify cache and try again.","",MessageBoxButtons.OK,MessageBoxIcon.Error);
                }

            //Backup for searching
            backup.AddRange(GListBox1.Items);

            if (tabControl1.TabCount == 0)
            {
                //Creating Default tabs
                AddNewBuildtab("Starting Items");
                AddNewBuildtab("Early Game");
                AddNewBuildtab("Core Items");
                AddNewBuildtab("Situational");
                AddNewBuildtab("Luxury");
            }
            else
            {
                foreach (BuildTab b in tabControl1.TabPages)
                {
                    b.ItemList.LargeImageList = GListBox1.ImageList;
                    b.ItemList.SmallImageList = GListBox1.ImageList;
                }
            }
            //Change the Picture and text to match hero and build
            Image pic = Image.FromFile(hero.ImagePath);
            this.HeroNameLabel.Text = hero.Name + " - " + title;
            pictureBox1.Image = pic;
            pictureBox1.SizeMode = PictureBoxSizeMode.StretchImage;
            //Enable Tad dragger
            tabDragger = new TabDragger(tabControl1, TabDragBehavior.TabDragArrange);

            this.Visible = true;

            this.Text = "DIRE - Build";
        }
Exemplo n.º 6
0
		protected override void SetUp ()
		{
			col = new ListBox.ObjectCollection (new ListBox ());
		}
Exemplo n.º 7
0
        private void _refreshOptimizationList(int selectObjectWithId)
        {
            listBoxOptimizations.Items.Clear();

            navMasterPath.resetPositions();
            PNavigator navMasterItems = new PNavigator(_data.Root, navMasterPath);

            if (navMasterItems.Pointer.Id != _data.Root.Id)
            {
                ListBox.ObjectCollection items = new ListBox.ObjectCollection(listBoxOptimizations);
                int selectIndex = -1;
                do
                {
                    IPObject obj = navMasterItems.Pointer;
                    if (obj != null)
                    {
                        RMasterItem item = new RMasterItem();
                        item.Title = formatMasterItem(obj);
                        item.Object = obj;
                        items.Add(item);

                        if (obj.Id == selectObjectWithId)
                            selectIndex = items.Count - 1;
                    }
                }
                while (navMasterItems.Navigate(0, NAV_DIRECTION.DOWN, false) != null);

                listBoxOptimizations.BeginUpdate();
                listBoxOptimizations.Items.Clear();
                listBoxOptimizations.Items.AddRange(items);
                if (selectIndex >= 0)
                    listBoxOptimizations.SelectedIndex = selectIndex;
                listBoxOptimizations.EndUpdate();
            }

            //listBoxOptimizations.EndUpdate();
        }
				public ParametersListPropertyDescriptor(ListBox.ObjectCollection list, int index, Parameters parameters, string name, string category)
					: base(name, null)
				{
					this.list=list;
					this.index=index;
					this.parameters=parameters;
					this.name=name;
					this.category=category;
				}
			public ValueAsProperty(ListBox.ObjectCollection list, int index, Parameters parameters)
			{
				this.list=list;
				this.index=index;
				this.parameters=parameters;
			}
			public NamePropertyDescriptor(ListBox.ObjectCollection list, int index, Parameters parameters, string name, string category, Type componentType)
				: base(name, null)
			{
				this.list=list;
				this.index=index;
				this.parameters=parameters;
				this.name=name;
				this.category=category;
				this.componentType=componentType;
			}
Exemplo n.º 11
0
        public ListBox()
        {
            _items = new ObjectCollection(this);

            BackColor = Color.White;
            BorderColor = Color.DarkGray;
            DisabledColor = Color.Gray;
            ItemHeight = DefaultItemHeight;
            HoverColor = Color.FromArgb(221, 238, 253);
            ScrollColor = Color.FromArgb(222, 222, 230);
            ScrollHoveredColor = Color.FromArgb(136, 136, 136);
            SelectionColor = Color.FromArgb(187, 222, 251);
            SelectionDisabledColor = Color.FromArgb(101, 203, 255);
            WrapText = true;

            Owner.UpClick += Application_UpClick;
        }
Exemplo n.º 12
0
		private void lnkAssistant_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
		{
			if (MsaType == MsaType.kInfl)
			{
				MGADialog dlg;
				// Get a wait cursor by setting the LinkLabel to use a wait cursor. See FWNX-700.
				// Need to use a wait cursor while creating dialog, but not when showing it.
				using (new WaitCursor(m_lnkAssistant))
					dlg = new MGAHtmlHelpDialog(m_cache, m_mediator, m_tbLexicalForm.Text);

				using (dlg)
				{
					if (dlg.ShowDialog() == DialogResult.OK)
					{
						Gloss = dlg.Result;
						m_MGAGlossListBoxItems = dlg.Items;
					}
				}
			}
			else if (MsaType == MsaType.kDeriv)
			{
				MessageBox.Show(LexText.Controls.LexTextControls.ksNoAssistForDerivAffixes,
					LexText.Controls.LexTextControls.ksNotice,
					MessageBoxButtons.OK, MessageBoxIcon.Information);
			}
		}
Exemplo n.º 13
0
 private void SetServices(ListBox.ObjectCollection services, decimal price)
 {
     //if (this.textBoxComment.Text.Contains("Wybrane usługi/dodatki: ")) {
     //    var beginIndex = this.textBoxComment.Text.IndexOf("Wybrane usługi/dodatki: ");
     //    var endIndex = this.textBoxComment.Text.IndexOf("; .") + 3;
     //    this.textBoxComment.Text = this.textBoxComment.Text.Remove(beginIndex, endIndex - beginIndex);
     //}
     //this.textBoxComment.Text += comment + ".\n\n";
     this.textBoxServicesPrice.Text = price.ToString();
     this.selectedServices = services;
 }
Exemplo n.º 14
0
 private void ReturnResults()
 {
     AdditionalTasks = lstItems.Items;
     Hide();
 }
Exemplo n.º 15
0
		private void lnkAssistant_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
		{
			if (MsaType == MsaType.kInfl)
			{
				using (MGA.MGADialog dlg = new SIL.FieldWorks.LexText.Controls.MGA.MGADialog(this.m_cache, this.m_mediator, tbLexicalForm.Text))
				{
					if (dlg.ShowDialog() == DialogResult.OK)
					{
						Gloss = dlg.Result;
						m_MGAGlossListBoxItems = dlg.Items;
					}
				}
			}
			else if (MsaType == MsaType.kDeriv)
			{
				MessageBox.Show(LexText.Controls.LexTextControls.ksNoAssistForDerivAffixes,
					LexText.Controls.LexTextControls.ksNotice,
					MessageBoxButtons.OK, MessageBoxIcon.Information);
			}
		}
Exemplo n.º 16
0
            private ListBox.ObjectCollection quicksort(ListBox.ObjectCollection list)
            {
                ListBox.ObjectCollection sorted = new ListBox.ObjectCollection(new ListBox());
                sorted.AddRange(list);

                if(sorted.Count <= 1)
                    return sorted;

                int random = randomNumberGenerator.Next(0, sorted.Count - 1);

                string pivot = (string)list[random];
                sorted.RemoveAt(random);

                ListBox.ObjectCollection lessThan = new ListBox.ObjectCollection(new ListBox());
                ListBox.ObjectCollection greaterThan = new ListBox.ObjectCollection(new ListBox());

                for(int i = 0; i < sorted.Count; ++i)
                    sortItem(sorted[i], pivot, lessThan, greaterThan);

                sorted = quicksort(lessThan);
                sorted.Add(pivot);
                sorted.AddRange(quicksort(greaterThan));

                return sorted;
            }