예제 #1
0
 public void Image3_Clicked(object sender, EventArgs e)
 {
     Image3.ScaleTo(0.8);
     Image3.BorderWidth = 5;
     Image3.BorderColor = Xamarin.Forms.Color.Red;
     App.imsource       = Image3.Source;
 }
예제 #2
0
    IEnumerator IStart()
    {
        Hasbegin = true;

        Image1.DOFade(1, 1f);
        m_Text.DOFade(0, 1);
        yield return(new WaitForSeconds(1));

        m_Text.text = "Your Friend: Traitor! I'll kill you!";
        m_Text.DOFade(1, 1);
        yield return(new WaitForSeconds(4.5f));

        Image1.DOFade(0, 1f);
        Image2.DOFade(1, 1f);
        m_Text.DOFade(0, 1);
        yield return(new WaitForSeconds(1));

        m_Text.text = "You: I didin't betray you!\nIt's a misunderstanding";
        m_Text.DOFade(1, 1);
        yield return(new WaitForSeconds(3f));

        Image2.DOFade(0, 1f);
        Image3.DOFade(1, 1f);
        m_Text.DOFade(0, 1);
        yield return(new WaitForSeconds(1));

        m_Text.text = "Your Friend: I don't believe you any moreeeeeeee";
        m_Text.DOFade(1, 1);
        yield return(new WaitForSeconds(3f));

        BeginTime = Time.unscaledTime;
        SceneManager.LoadScene(1);
    }
예제 #3
0
        public override void Save()
        {
            if (_fileList1 != null)
            {
                _fileList1.IsLoaded = true;
            }
            if (_imageList1 != null)
            {
                _imageList1.IsLoaded = true;
            }
            CompletePath = GetCompletePath();
            if (IsNew)
            {
                if (ParentGroup == null)
                {
                    //OrderingNumber = this.DataCollection.CalculateNewRootOrderingNumber();
                }
                else
                {
                    //OrderingNumber = ParentGroup.CalculateNewOrderingNumber();
                }
            }
            //zorg dat in de db altijd relatieve urls blijven bestaan
            //if (Image1 != null) this.Image1 = Image1.Replace(Site.DomainName + "/", "");
            //if (Image2 != null) this.Image2 = Image2.Replace(Site.DomainName + "/", "");
            //if (Image3 != null) this.Image3 = Image3.Replace(Site.DomainName + "/", "");
            //if (Image4 != null) this.Image4 = Image4.Replace(Site.DomainName + "/", "");
            //if (Image5 != null) this.Image5 = Image5.Replace(Site.DomainName + "/", "");

            if (Image1 != null)
            {
                this.Image1 = Image1.Replace(Site.DomainName, "");
            }
            if (Image2 != null)
            {
                this.Image2 = Image2.Replace(Site.DomainName, "");
            }
            if (Image3 != null)
            {
                this.Image3 = Image3.Replace(Site.DomainName, "");
            }
            if (Image4 != null)
            {
                this.Image4 = Image4.Replace(Site.DomainName, "");
            }
            if (Image5 != null)
            {
                this.Image5 = Image5.Replace(Site.DomainName, "");
            }

            //this._extraFieldsJsonString = Utils.JSONSerializer.Serialize(this.ExtraFields);
            base.Save();

            string sql = String.Format("UPDATE DataCollection SET ModifiedDate=NOW() WHERE ID='{0}'", DataCollection.ID);

            DataBase.Get().Execute(sql);
        }
예제 #4
0
        void ReleaseDesignerOutlets()
        {
            if (BigImage != null)
            {
                BigImage.Dispose();
                BigImage = null;
            }

            if (Caption != null)
            {
                Caption.Dispose();
                Caption = null;
            }

            if (Description != null)
            {
                Description.Dispose();
                Description = null;
            }

            if (Image1 != null)
            {
                Image1.Dispose();
                Image1 = null;
            }

            if (Image3 != null)
            {
                Image3.Dispose();
                Image3 = null;
            }

            if (Label1 != null)
            {
                Label1.Dispose();
                Label1 = null;
            }

            if (Label3 != null)
            {
                Label3.Dispose();
                Label3 = null;
            }

            if (RepoName != null)
            {
                RepoName.Dispose();
                RepoName = null;
            }

            if (UserImage != null)
            {
                UserImage.Dispose();
                UserImage = null;
            }
        }
예제 #5
0
        async void animatePage1(uint duration)
        {
            await Task.WhenAll(
                Image1.RotateTo(307 * 360, duration),
                Image2.RotateXTo(251 * 360, duration),
                Image3.RotateYTo(199 * 360, duration)
                );

            //await Image1.RelRotateTo(307 * 360, duration);
        }
예제 #6
0
    // Start is called before the first frame update
    void Start()
    {
        //Changer = GameObject.Find("MainCamera");
        //Camerachanger = Changer.GetComponent<CameraChanger>();
        Image1.SetActive(false);
        Button1.SetActive(false);
        Image3.SetActive(false);
        Button3.SetActive(false);

        //Text1.SetActive(false);
    }
예제 #7
0
        /// <summary>
        /// Compares one image to another to calculate differences
        /// </summary>
        /// <param name="InputImage1"></param>
        /// <param name="InputImage2"></param>
        /// <param name="Tollerance"></param>
        /// <returns></returns>
        public static double CompareTo(this Bitmap InputImage1, Bitmap InputImage2, int Tollerance)
        {
            Bitmap Image1     = new Bitmap(InputImage1, new Size(128, 128));
            Bitmap Image2     = new Bitmap(InputImage2, new Size(128, 128));
            int    Image1Size = Image1.Width * Image1.Height;
            int    Image2Size = Image2.Width * Image2.Height;
            Bitmap Image3;

            if (Image1Size > Image2Size)
            {
                Image1 = new Bitmap(Image1, Image2.Size);
                Image3 = new Bitmap(Image2.Width, Image2.Height);
            }
            else
            {
                Image1 = new Bitmap(Image1, Image2.Size);
                Image3 = new Bitmap(Image2.Width, Image2.Height);
            }
            for (int x = 0; x < Image1.Width; x++)
            {
                for (int y = 0; y < Image1.Height; y++)
                {
                    Color Color1 = Image1.GetPixel(x, y);
                    Color Color2 = Image2.GetPixel(x, y);
                    int   r      = Color1.R > Color2.R ? Color1.R - Color2.R : Color2.R - Color1.R;
                    int   g      = Color1.G > Color2.G ? Color1.G - Color2.G : Color2.G - Color1.G;
                    int   b      = Color1.B > Color2.B ? Color1.B - Color2.B : Color2.B - Color1.B;
                    Image3.SetPixel(x, y, Color.FromArgb(r, g, b));
                }
            }
            int Difference = 0;

            for (int x = 0; x < Image1.Width; x++)
            {
                for (int y = 0; y < Image1.Height; y++)
                {
                    Color Color1 = Image3.GetPixel(x, y);
                    int   Media  = (Color1.R + Color1.G + Color1.B) / 3;
                    if (Media > Tollerance)
                    {
                        Difference++;
                    }
                }
            }
            double UsedSize = Image1Size > Image2Size ? Image2Size : Image1Size;
            double result   = Difference * 100 / UsedSize;

            return(Difference * 100 / UsedSize);
        }
예제 #8
0
        public void CompareImages(string bmp1, string bmp2, byte threshold = 3)
        {
            //get the full path of the images
            string image1Path = Path.Combine(sampleImagesFolder.FullName, bmp1);
            string image2Path = Path.Combine(sampleImagesFolder.FullName, bmp2);

            //compare the two
            Console.WriteLine("Comparing images: " + bmp1 + " and " + bmp2 + ", with a threshold of " + threshold);
            Bitmap InputImage1 = (Bitmap)Image.FromFile(image1Path);
            Bitmap InputImage2 = (Bitmap)Image.FromFile(image2Path);

            int size = 128; //128;

            Bitmap Image1 = new Bitmap(InputImage1, new Size(size, size));
            Bitmap Image2 = new Bitmap(InputImage2, new Size(size, size));

            //int Image1Size = Image1.Width * Image1.Height;
            //int Image2Size = Image2.Width * Image2.Height;

            int Image1Size = InputImage1.Width * InputImage1.Height;
            int Image2Size = InputImage2.Width * InputImage2.Height;


            Bitmap Image3;

            if (Image1Size > Image2Size)
            {
                Image1 = new Bitmap(Image1, Image2.Size);
                Image3 = new Bitmap(Image2.Width, Image2.Height);
            }
            else if (Image1Size < Image2Size)
            {
                Image1 = new Bitmap(Image1, Image1.Size);
                Image3 = new Bitmap(Image2.Width, Image2.Height);
            }
            else
            {
                Image1 = new Bitmap(Image1, Image1.Size);
                Image3 = new Bitmap(Image2.Width, Image2.Height);
            }
            for (int x = 0; x < Image1.Width; x++)
            {
                for (int y = 0; y < Image1.Height; y++)
                {
                    Color Color1 = Image1.GetPixel(x, y);
                    Color Color2 = Image2.GetPixel(x, y);
                    int   r      = Color1.R > Color2.R ? Color1.R - Color2.R : Color2.R - Color1.R;
                    int   g      = Color1.G > Color2.G ? Color1.G - Color2.G : Color2.G - Color1.G;
                    int   b      = Color1.B > Color2.B ? Color1.B - Color2.B : Color2.B - Color1.B;
                    Image3.SetPixel(x, y, Color.FromArgb(r, g, b));
                }
            }

            //Find first matched cordindates
            int xx = -1, yy = -1;

            int Difference = 0;

            for (int x = 0; x < Image1.Width; x++)
            {
                for (int y = 0; y < Image1.Height; y++)
                {
                    Color Color1 = Image3.GetPixel(x, y);
                    int   Media  = (Color1.R + Color1.G + Color1.B) / 3;
                    if (Media > threshold)
                    {
                        Difference++;
                    }
                    else
                    {
                        //if match parameter are not set then set
                        if ((xx == -1 && yy == -1))
                        {
                            xx = x;
                            yy = y;
                        }
                    }
                }
            }



            //int width = Image1Size > Image2Size ? Image1.Width : Image2.Width;
            //int height = Image1Size > Image2Size ? Image1.Height : Image2.Height;

            //int width = InputImage1.Width;
            //int height = InputImage1.Height;

            //int width2 = InputImage2.Width;
            //int height2 = InputImage2.Height;


            //for (int x = 0; x < width; x++)
            //{
            //    for (int y = 0; y < height; y++)
            //    {
            //        if (x < width2 && y < height2)
            //        {
            //            if ((xx == -1 && yy == -1))
            //            {
            //                if (InputImage1.GetPixel(x, y) == InputImage2.GetPixel(x, y))
            //                {
            //                    xx = x;
            //                    yy = y;
            //                    break;
            //                }
            //            }
            //        }
            //    }
            //}


            double UsedSize = Image1Size > Image2Size ? Image2Size : Image1Size;

            if (Difference > UsedSize)
            {
                UsedSize = Image1Size > Image2Size ? Image1Size : Image2Size;
            }
            double result = Difference * 100 / UsedSize;

            double matched = 100 - result;

            Console.WriteLine(string.Format("Images Matched : {0:0.0} %, Difference: {1:0.0} %, Crop image match coordinates are x:{2}, y:{3}", matched, result, xx, yy));
            Console.WriteLine("");
        }
예제 #9
0
        void ReleaseDesignerOutlets()
        {
            if (Caption != null)
            {
                Caption.Dispose();
                Caption = null;
            }

            if (Label1 != null)
            {
                Label1.Dispose();
                Label1 = null;
            }

            if (Image1 != null)
            {
                Image1.Dispose();
                Image1 = null;
            }

            if (Image2 != null)
            {
                Image2.Dispose();
                Image2 = null;
            }

            if (Label2 != null)
            {
                Label2.Dispose();
                Label2 = null;
            }

            if (Image3 != null)
            {
                Image3.Dispose();
                Image3 = null;
            }

            if (Label3 != null)
            {
                Label3.Dispose();
                Label3 = null;
            }

            if (Image4 != null)
            {
                Image4.Dispose();
                Image4 = null;
            }

            if (Label4 != null)
            {
                Label4.Dispose();
                Label4 = null;
            }

            if (Number != null)
            {
                Number.Dispose();
                Number = null;
            }

            if (IssueType != null)
            {
                IssueType.Dispose();
                IssueType = null;
            }
        }
예제 #10
0
 public void Onclick5()
 {
     Image3.SetActive(false);
     Button3.SetActive(false);
 }
예제 #11
0
 public void OnClick4()
 {
     Image3.SetActive(true);
     Button3.SetActive(true);
 }
예제 #12
0
 async void animatepage3()
 {
     await Image3.RelRotateTo(360, 5000);
 }
예제 #13
0
 async void animatePage3(uint duration)
 {
     await Image3.RelRotateTo(199 * 360, duration);
 }