Ignore:
Timestamp:
Sep 29, 2011, 5:38:55 PM (13 years ago)
Author:
bayral
Message:

piwigo.upload retrieve data, and ready to upload

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/PiwigoLib/PiwigoUpload/MainForm.cs

    r12256 r12262  
    1717        {
    1818            InitializeComponent();
     19            selectedPwgCategoryListBindingSource.DataSource = ModelManager.Instance.lstCat;
     20            modelManagerBaseBindingSource.DataSource = ModelManager.Instance;
    1921        }
    2022
    21         private void Form1_Load(object sender, EventArgs e)
     23        private void MainForm_Load(object sender, EventArgs e)
    2224        {
    2325            string[] args = Environment.GetCommandLineArgs();
     
    3840                }                   
    3941            }
     42
     43            MainAppHelper.BuildAlbumTree(AlbumsTV, ModelManager.Instance.lstAlbumLocaux);
     44
    4045        }
    4146
     
    4651            {
    4752                String strUri= tbServer.Text.Replace("\\","/");
     53                if (!strUri.StartsWith("http"))
     54                {
     55                    strUri = "http://" + strUri;
     56                }
    4857                if (!strUri.EndsWith("/ws.php"))
    4958                {
     
    7685            try
    7786            {
    78 
    79                 Int32 newid = 0;
    80                 String msg = String.Empty;
    81                 Boolean rc;
    82                 // rc = PwgServiceProvider.Instance.PwgCategoriesService.AddCategory("test_cat", 1, ref  newid, ref msg);
    83                 //List<PwgCategory> lstCat = PwgServiceProvider.Instance.PwgCategoriesService.GetAdminListOfCategory();
    84                 //Console.WriteLine(String.Format("newid : {0} message : {1}", newid,msg));
    85                 //rc = PwgServiceProvider.Instance.PwgCategoriesService.UpdateCategoryInfo(newid, "test2", "rename cat");
    86                 //Boolean rc = PwgServiceProvider.Instance.PwgCategoriesService.DeleteCategory(newid, sess.SecurityToken, PwgCategoryPhotoDeletionModeEnum.None);
    87                 //rc = PwgServiceProvider.Instance.PwgCategoriesService.MoveCategory(new List<Int32>() { newid }, PwgCategory.RootCategoryId, sess.SecurityToken);
    88 
    89                 //lstCat = PwgServiceProvider.Instance.PwgCategoriesService.GetAdminListOfCategory();
    90 
    91                 //FileInfo fiBig = new FileInfo("C:\\Users\\bayral\\Downloads\\49133_1636405570_2648232_n.jpg");
    92                 //FileInfo fiThumb = new FileInfo(MakeThumb(fiBig, "C:\\Users\\bayral\\Downloads\\49133_1636405570_2648232_n_thum.jpg", 64));
    93                 //FileInfo fiLow = new FileInfo(MakeThumb(fiBig, "C:\\Users\\bayral\\Downloads\\49133_1636405570_2648232_n_low.jpg", 256));
    94 
    95                 //FileInfo fiBig = new FileInfo("C:\\temp\\Oryx.jpg");
    96                 //FileInfo fiThumb = new FileInfo(MakeThumb(fiBig, "C:\\temp\\Oryx_thumb.jpg", 64));
    97                 //FileInfo fiLow = new FileInfo(MakeThumb(fiBig, "C:\\temp\\Oryx_low.jpg", 256));
    98 
    99                 //PwgImageAdded imgAdd = PwgServiceProvider.Instance.PwgImagesService.addImageByMultiPartForm(fiBig, null, 1, "benoit", "byarl", "test upload", 0, new List<PwgTag>() { new PwgTag() { Name = "Benoit" }, new PwgTag() { Name = "Noé" } });
    100                 //rc = PwgServiceProvider.Instance.PwgImagesService.addImage(fiBig, fiLow, fiThumb, "Benoit", "bayral", DateTime.Now, "demo", new List<string>() { "1" }, new List<string>() { "Benoit" }, PwgConfidentLevelEnum.All);
    101                 //rc = PwgServiceProvider.Instance.PwgImagesService.DeleteImage(319, sess.SecurityToken);
    102 
    103                 //PwgImageInfo info = PwgServiceProvider.Instance.PwgImagesService.getImageInfo(imgAdd.Id, null, null);
    104 
    105                 //PwgImageRate imgRate = PwgServiceProvider.Instance.PwgImagesService.RateImage(1, 5);
    106 
    107 
     87                ServiceFactory.GetByType<UploadToPiwigo>().runService();
    10888            }
    10989            catch (ApplicationException aex)
     
    11393        }
    11494
    115         private void Form1_FormClosing(object sender, FormClosingEventArgs e)
     95        private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
    11696        {
    11797            try
Note: See TracChangeset for help on using the changeset viewer.