private void NewFile(object obj)
 {
     ColorList.Clear();
     for (int i = 0; i < 50; i++)
     {
         for (int j = 0; j < 50; j++)
         {
             LiteBrite f = new LiteBrite("WHITE", i, j);
             ColorList.Add(f);
         }
     }
 }
Beispiel #2
0
 private void ClearInput(bool flag = true)
 {
     InputName         = string.Empty;
     InputPriceText    = string.Empty;
     ProductCode       = string.Empty;
     MaterialText      = string.Empty;
     SizeText          = string.Empty;
     Processing0Text   = string.Empty;
     PieceWeightText   = string.Empty;
     PackageText       = string.Empty;
     SelectedColorText = string.Empty;
     ColorList.Clear();
     if (flag)
     {
         SelectedItem = null;
     }
 }
        private void RandomFile(object obj)
        {
            ColorList.Clear();
            List <string> ranColorList = new List <string>
            {
                "Azure", "Gold", "Magenta", "Tan", "Violet", "Plum", "Maroon", "Red", "Orange", "Pink",
                "Yellow", "Blue", "Purple", "Green", "Brown", "Black", "Navy", "SkyBlue"
            };
            Random rnd = new Random();

            for (int i = 0; i < 50; i++)
            {
                for (int j = 0; j < 50; j++)
                {
                    int randIndex = rnd.Next(ranColorList.Count());


                    string    s = ranColorList.ElementAt(randIndex).ToString();
                    LiteBrite f = new LiteBrite(s, j, i);
                    ColorList.Add(f);
                }
            }
        }
Beispiel #4
0
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                if (components != null)
                {
                    components.Dispose();
                }

                if (ImageListControl != null)
                {
                    ImageListControl.Items.Clear();
                }

                if (ImagesList != null)
                {
                    ImagesList.Clear();
                }

                if (ColorList != null)
                {
                    ColorList.Clear();
                }

                if (OpacityList != null)
                {
                    OpacityList.Clear();
                }

                if (PreOpacityList != null)
                {
                    PreOpacityList.Clear();
                }
            }
            base.Dispose(disposing);
        }
 /// <summary>
 /// Sets the bitmap to be read and clears the saved colors so the new image can be proccessed.
 /// </summary>
 /// <param name="bitmap"></param>
 public void SetBitmap(Bitmap bitmap)
 {
     currentBitmap = bitmap;
     ColorList.Clear();
 }