Exemple #1
0
        public Bitmap Load(string strImageName, Color keycolor)
        {
            Bitmap Load_result;

            try {
                Load_result = (Bitmap)Bitmap.FromFile(strImageName);
                Load_result.MakeTransparent(keycolor);
            }
            catch {
                MessageBox.Show("An image file was not found." + Keys.Enter + "Please make sure that the file " + strImageName + " exists.", ".Netterpillars", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                Load_result = null;
            }
            return(Load_result);
        }
Exemple #2
0
        public Bitmap Load(string strImageName)
        {
            Bitmap Load_result;
            Color  BackColor;

            try {
                Load_result = (Bitmap)Bitmap.FromFile(strImageName);
                // The transparent color (keycolor) was not informed, then it will be the color of the first pixel
                BackColor = Load_result.GetPixel(0, 0);
                Load_result.MakeTransparent(BackColor);
            }
            catch {
                MessageBox.Show("An image file was not found." + Keys.Enter + "Please make sure that the file " + strImageName + " exists.", ".Netterpillars", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                Load_result = null;
            }
            return(Load_result);
        }
Exemple #3
0
 public void Load_Process(int seqid, TProtocol iprot, TProtocol oprot)
 {
   Load_args args = new Load_args();
   args.Read(iprot);
   iprot.ReadMessageEnd();
   Load_result result = new Load_result();
   try {
     iface_.Load(args.InputStream);
   } catch (InvalidRequestException ire) {
     result.Ire = ire;
   }
   oprot.WriteMessageBegin(new TMessage("Load", TMessageType.Reply, seqid)); 
   result.Write(oprot);
   oprot.WriteMessageEnd();
   oprot.Transport.Flush();
 }
Exemple #4
0
 public void recv_Load()
 {
   TMessage msg = iprot_.ReadMessageBegin();
   if (msg.Type == TMessageType.Exception) {
     TApplicationException x = TApplicationException.Read(iprot_);
     iprot_.ReadMessageEnd();
     throw x;
   }
   Load_result result = new Load_result();
   result.Read(iprot_);
   iprot_.ReadMessageEnd();
   if (result.__isset.ire) {
     throw result.Ire;
   }
   return;
 }