private void widokZdjecia1_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData == Keys.Space)
     {
         int nastepne = Imageview.Zdjecie.indeks + 1;
         if (nastepne >= Thumbnailview.Ilosc)
         {
             nastepne = Thumbnailview.IloscKatalogow;
             MessageBox.Show("Nie ma ju¿ wiêcej zdjêæ w tym katalogu. Zostanie otwarte pierwsze.");
         }
         IZdjecie z = Thumbnailview.ZdjecieZIndeksem(nastepne);
         if (z != null)
         {
             Imageview.Wypelnij(new IZdjecie[1] {
                 z
             });
         }
     }
     else if (e.KeyData == Keys.Back)
     {
         int poprzednie = Imageview.Zdjecie.indeks - 1;
         if (poprzednie < Thumbnailview.IloscKatalogow)
         {
             poprzednie = Thumbnailview.Ilosc - 1;
             MessageBox.Show("To by³o pierwsze zdjêcie w katalogu. Zostanie otwarte ostatnie.");
         }
         IZdjecie z = Thumbnailview.ZdjecieZIndeksem(poprzednie);
         if (z != null)
         {
             Imageview.Wypelnij(new IZdjecie[1] {
                 z
             });
         }
     }
     else if (e.KeyData == Keys.R)
     {
         Rotate r = new Rotate(1);
         this.DodajOperacje(new PolecenieOperacji(r, r.PodajArgumenty().ToArray()));
     }
     else if (e.KeyData == Keys.L)
     {
         Rotate r = new Rotate(2);
         this.DodajOperacje(new PolecenieOperacji(r, r.PodajArgumenty().ToArray()));
     }
     else if (e.KeyData == (Keys.Control | Keys.S))
     {
         Imageview.ZapiszPlik();
     }
 }
Exemplo n.º 2
0
        void ReleaseDesignerOutlets()
        {
            if (Description != null)
            {
                Description.Dispose();
                Description = null;
            }

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

            if (Title != null)
            {
                Title.Dispose();
                Title = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (DecriptionLbl != null)
            {
                DecriptionLbl.Dispose();
                DecriptionLbl = null;
            }

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

            if (TitleLbl != null)
            {
                TitleLbl.Dispose();
                TitleLbl = null;
            }
        }
Exemplo n.º 4
0
        void ReleaseDesignerOutlets()
        {
            if (Imageview != null)
            {
                Imageview.Dispose();
                Imageview = null;
            }

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

            if (LblTitle != null)
            {
                LblTitle.Dispose();
                LblTitle = null;
            }
        }
 private void panele_onSelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         if (((TabControl)sender).SelectedTab == zdjecie1Tab && widokZdjecia1.czyZaladowaneZdjecie)
         {
             if (ZaznaczonoZdjecie != null)
             {
                 ZaznaczonoZdjecie(widokZdjecia1.Zdjecie);
             }
             Imageview.DrawMyRectangle(Imageview.selectedRectangle);
         }
         if (((TabControl)sender).SelectedTab == zdjecie1Tab)
         {
             if (WlaczonoWidokZdjecia != null)
             {
                 WlaczonoWidokZdjecia();
             }
         }
         if (((TabControl)sender).SelectedTab == miniatury1Tab)
         {
             if (WlaczonoWidokZdjecia != null)
             {
                 WylaczonoWidokZdjecia();
             }
             if (widokZdjecia1.czyZaladowaneZdjecie)
             {
                 Imageview.DrawMyRectangle(Imageview.selectedRectangle);
             }
         }
     } catch (FileNotFoundException)
     {
         MessageBox.Show("Wybrane zdjêcie nie mo¿e zostaæ odnalezione na dysku!", "B³¹d!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     catch (DirectoryNotFoundException)
     {
         MessageBox.Show("Katalog z wybranym zdjêciem nie mo¿e zostaæ odnaleziony!", "B³¹d!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Exemplo n.º 6
0
        void ReleaseDesignerOutlets()
        {
            if (AvailableField != null)
            {
                AvailableField.Dispose();
                AvailableField = null;
            }

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

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

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

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

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

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

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

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

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