Пример #1
0
 private void toolStripButtonDirectories_Click(object sender, EventArgs e)
 {
     if (!_Editor.Project.IsEmptyProject)
     {
         var oldList = new List <Pat.ProjectDirectoryDesc>(_Editor.Project.Settings.Directories);
         var dialog  = new ProjectDirectoryEditForm(_Editor.Project.Settings, true);
         if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         {
             _Editor.Project.ImageList.ReloadAllResources();
             _Editor.AnimationListUI.Activate();
         }
         else
         {
             _Editor.Project.Settings.Directories = oldList;
         }
     }
 }
Пример #2
0
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var setting = new Pat.ProjectSettings()
            {
                Directories = new List <Pat.ProjectDirectoryDesc>()
                {
                    new Pat.ProjectDirectoryDesc()
                    {
                        Name  = "images",
                        Usage = Pat.ProjectDirectoryUsage.Image,
                    },
                },
            };
            var f = new ProjectDirectoryEditForm(setting, true);

            Application.Run(f);
        }