Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     var i = MainForm.Conf.MediaDirectories.Max(p => p.ID) + 1;
     var mdc = new MediaDirectoryConfig
                   {
                       Config = new configurationDirectory {Entry = "", DeleteFilesOlderThanDays = MainForm.Conf.DeleteFilesOlderThanDays, Enable_Storage_Management = MainForm.Conf.Enable_Storage_Management, MaxMediaFolderSizeMB = MainForm.Conf.MaxMediaFolderSizeMB,StopSavingOnStorageLimit = MainForm.Conf.StopSavingOnStorageLimit, ID=i}
                   };
     if (mdc.ShowDialog(this) == DialogResult.OK)
     {
         var l = Directories.ToList();
         l.Add(mdc.Config);
         Directories = l.ToArray();
         RenderDirectoryList();
     }
 }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            var i   = MainForm.Conf.MediaDirectories.Max(p => p.ID) + 1;
            var mdc = new MediaDirectoryConfig
            {
                Config = new configurationDirectory {
                    Entry = "", DeleteFilesOlderThanDays = MainForm.Conf.DeleteFilesOlderThanDays, Enable_Storage_Management = MainForm.Conf.Enable_Storage_Management, MaxMediaFolderSizeMB = MainForm.Conf.MaxMediaFolderSizeMB, StopSavingOnStorageLimit = MainForm.Conf.StopSavingOnStorageLimit, ID = i
                }
            };

            if (mdc.ShowDialog(this) == DialogResult.OK)
            {
                var l = Directories.ToList();
                l.Add(mdc.Config);
                Directories = l.ToArray();
                RenderDirectoryList();
            }
        }
Exemplo n.º 3
0
        void CDirectoryEntryEdit(object sender, EventArgs e)
        {
            var oe = ((DirectoryEventRow)sender);

            string d = oe.Directory.Entry;
            var c = new MediaDirectoryConfig {Config = oe.Directory};
            if (c.ShowDialog(this)==DialogResult.OK)
            {
                Directories[oe.Index] = c.Config;
                if (d!=c.Config.Entry)
                {
                    //directory changed
                    MessageBox.Show(this, LocRm.GetString("MediaDirectoryChanged"));
                }
            }
            c.Dispose();

            RenderDirectoryList();
        }
Exemplo n.º 4
0
        private void CDirectoryEntryEdit(object sender, EventArgs e)
        {
            var oe = ((DirectoryEventRow)sender);

            string d = oe.Directory.Entry;
            var    c = new MediaDirectoryConfig {
                Config = oe.Directory
            };

            if (c.ShowDialog(this) == DialogResult.OK)
            {
                Directories[oe.Index] = c.Config;
                if (d != c.Config.Entry)
                {
                    //directory changed
                    MessageBox.Show(this, LocRm.GetString("MediaDirectoryChanged"));
                }
            }
            c.Dispose();


            RenderDirectoryList();
        }