Beispiel #1
0
        public override void Initialize(MethodInvoker OnInitializeDone)
        {
            this.OnInitializeDone = OnInitializeDone;

            UseWaitCursor = true;
            Nodes.Clear();

            //Before we do anything here we need to make sure there is going to be a library classification
            string classification = MOG_Filename.GetProjectLibraryClassificationString();

            if (classification.Length > 0)
            {
                //Before we do anything here we need to make sure there is going to be a library classification
                MOG_Project project = MOG_ControllerProject.GetProject();
                if (project != null)
                {
                    if (!project.ClassificationExists(classification))
                    {
                        //Oh no there's not one!  No big deal, just create it.
                        if (project.ClassificationAdd(classification))
                        {
                            MOG_Properties props = MOG_Properties.OpenClassificationProperties(classification);
                            if (props != null)
                            {
                                // This is a library
                                props.IsLibrary = true;

                                props.AssetIcon = "Images\\FileTypes\\MOG Library.bmp";
                                props.ClassIcon = "Images\\FileTypes\\MOG Library Folder.bmp";

                                // And we want to checkout all assets to a dir under the project name
                                props.SyncTargetPath = "{AssetClassificationPath.Full}";
                                props.Close();
                            }
                        }
                    }
                }
            }
            mWorker                     = new BackgroundWorker();
            mWorker.DoWork             += InitializeLibraryClassificationList_Worker;
            mWorker.RunWorkerCompleted += OnWorkerCompleted;

            mWorker.RunWorkerAsync();
        }