Esempio n. 1
0
 public void UnpackRTI()
 {
     if (TaskObjectCount < 1)
     {
         return;
     }
     if (!MissingRTI(OldID))
     {
         return;
     }
     if (RTIRequested)
     {
         return;
     }
     RTIRequested = true;
     lock (ExportCommand.fileWriterLock) File.WriteAllText(ExportCommand.dumpDir + OldID + ".0.rti", "requested");
     Exporting.AttemptMoveTo(SimPosition);
     lock (Importing.ExportHolder) Importing.ExportHolder.Add(OldID);
     Thread.Sleep(3000);
     if (!Exporting.PutItemToTaskInv(Client, OldLocalID, _rezed, "SimExportUnpackCopy"))
     {
         lock (ExportCommand.fileWriterLock)
         {
             string nomod = ExportCommand.dumpDir + OldID + ".rti_status";
             if (!File.Exists(nomod))
             {
                 File.WriteAllText(nomod, "nomod");
                 this.MustUseAgentCopy = true;
             }
         }
     }
     Thread.Sleep(3000);
 }
Esempio n. 2
0
            public void CreateWorkflow(UUID agentSyncFolderHolder)
            {
                string taskFile = ExportCommand.dumpDir + OldID + ".task";

                if (File.Exists(taskFile))
                {
                    string taskDataS = File.ReadAllText(taskFile);
                    if (string.IsNullOrEmpty(taskDataS) || taskDataS.Length < 30)
                    {
                        sourceObjectinventory = new List <InventoryBase>();
                        TaskItemsToCreate     = new List <TaskItemToCreate>();
                        TaskInvComplete       = true;
                        return;
                    }
                }
                if (CogbotHelpers.IsNullOrZero(AgentSyncFolder))
                {
                    AgentSyncFolder = Exporting.FolderCalled(OldID.ToString(), agentSyncFolderHolder);
                }
                if (TaskItemsToCreate != null)
                {
                    return;
                }
                TaskItemsToCreate = new List <TaskItemToCreate>();
                if (IsLocalScene)
                {
                    return;
                }

                Client.Objects.ObjectProperties += TaskInventoryItemReceived;
            }
Esempio n. 3
0
            public bool EnsureTaskInv(bool useCache)
            {
                if (File.Exists(ExportCommand.assetDumpDir + OldID + ".object"))
                {
                    return(true);
                }

                var o = Rezed;

                if (MissingTASK(OldID) && o != null)
                {
                    var taskinv = o.TaskInventory;
                    if (taskinv == null)
                    {
                        return(false);
                    }
                    Exporting.SaveTaskOSD(OldID, taskinv);
                }
                string taskFile = ExportCommand.dumpDir + OldID + ".task";

                if (!File.Exists(taskFile))
                {
                    return(false);
                }
                string taskDataS = File.ReadAllText(taskFile);

                if (string.IsNullOrEmpty(taskDataS) || taskDataS.Length < 30)
                {
                    sourceObjectinventory = new List <InventoryBase>();
                    TaskItemsToCreate     = new List <TaskItemToCreate>();
                    TaskInvComplete       = true;
                    return(true);
                }
                var agentSyncFolderHolder = Exporting.FolderCalled("TaskInvHolder");

                CreateWorkflow(agentSyncFolderHolder);
                LoadTaskOSD(Importing.WriteLine);
                var ti = SourceTaskInventory(useCache);

                foreach (InventoryBase i in ti)
                {
                    InventoryItem item = i as InventoryItem;
                    if (item == null)
                    {
                        continue;
                    }
                    if (CogbotHelpers.IsNullOrZero(item.AssetUUID))
                    {
                        return(false);
                    }
                }
                return(true);
            }
Esempio n. 4
0
        public void Export(bool repeatLast)
        {
            if (PlatformUtils.IsDesktop)
            {
                app.BeginLogTask(true);
            }

            var selectedFormat = (ExportFormat)dialog.SelectedIndex;

            Exporting?.Invoke();

            if (!repeatLast)
            {
                lastExportFilename = null;
            }

            switch (selectedFormat)
            {
            case ExportFormat.WavMp3: ExportWavMp3(); break;

            case ExportFormat.VideoPianoRoll: ExportVideo(true); break;

            case ExportFormat.VideoOscilloscope: ExportVideo(false); break;

            case ExportFormat.Nsf: ExportNsf(); break;

            case ExportFormat.Rom: ExportRom(); break;

            case ExportFormat.Midi: ExportMidi(); break;

            case ExportFormat.Text: ExportText(); break;

            case ExportFormat.FamiTracker: ExportFamiTracker(); break;

            case ExportFormat.FamiTone2Music: ExportFamiTone2Music(false); break;

            case ExportFormat.FamiStudioMusic: ExportFamiTone2Music(true); break;

            case ExportFormat.FamiTone2Sfx: ExportFamiTone2Sfx(false); break;

            case ExportFormat.FamiStudioSfx: ExportFamiTone2Sfx(true); break;

            case ExportFormat.Share: ExportShare(); break;
            }

            if (PlatformUtils.IsDesktop)
            {
                app.EndLogTask();
            }
        }
Esempio n. 5
0
 public ChartOptions()
 {
     XAxis          = new XAxis();
     YAxis          = new YAxis();
     Series         = new SerieCollection();
     Appearance     = new Appearance.Appearance();
     Lang           = new Localization();
     Exporting      = new Exporting();
     Colors         = new ColorSet();
     Legend         = new Legend();
     AjaxDataSource = new AJAXSource();
     Tooltip        = new ToolTip();
     ClientId       = "";
 }
Esempio n. 6
0
        public void Export(FamiStudioForm parentForm, bool repeatLast)
        {
            var dlgLog = new LogProgressDialog(parentForm);

            using (var scopedLog = new ScopedLogOutput(dlgLog, LogSeverity.Info))
            {
                var selectedFormat = (ExportFormat)dialog.SelectedIndex;

                Exporting?.Invoke();

                if (!repeatLast)
                {
                    lastExportFilename = null;
                }

                switch (selectedFormat)
                {
                case ExportFormat.WavMp3: ExportWavMp3(); break;

                case ExportFormat.Video: ExportVideo(); break;

                case ExportFormat.Nsf: ExportNsf(); break;

                case ExportFormat.Rom: ExportRom(); break;

                case ExportFormat.Midi: ExportMidi(); break;

                case ExportFormat.Text: ExportText(); break;

                case ExportFormat.FamiTracker: ExportFamiTracker(); break;

                case ExportFormat.FamiTone2Music: ExportFamiTone2Music(false); break;

                case ExportFormat.FamiStudioMusic: ExportFamiTone2Music(true); break;

                case ExportFormat.FamiTone2Sfx: ExportFamiTone2Sfx(false); break;

                case ExportFormat.FamiStudioSfx: ExportFamiTone2Sfx(true); break;
                }

                if (dlgLog.HasMessages)
                {
                    Log.LogMessage(LogSeverity.Info, "Done!");
                    Log.ReportProgress(1.0f);
                }

                dlgLog.StayModalUntilClosed();
            }
        }
Esempio n. 7
0
 public List <InventoryBase> SourceTaskInventory(bool useCache)
 {
     // get
     {
         List <InventoryBase> regenObjInv = useCache ? this.sourceObjectinventory : null;
         bool improve = !useCache;
         if (regenObjInv == null)
         {
             if (IsLocalScene)
             {
                 if (TaskItemsToCreate == null)
                 {
                     return(null);
                 }
                 bool improvementM = false;
                 if (sourceObjectinventory != null)
                 {
                     //return objectinventory;
                 }
                 regenObjInv = new List <InventoryBase>();
                 lock (TaskItemsToCreate)
                 {
                     foreach (var toCreate in LockInfo.CopyOf(TaskItemsToCreate))
                     {
                         bool improvement;
                         var  item = toCreate.ToInventoryBase(out improvement, improve);
                         if (improvement)
                         {
                             improvementM = true;
                         }
                         regenObjInv.Add(item);
                     }
                     AssignObjectNums();
                 }
                 if (improvementM)
                 {
                     Exporting.SaveTaskOSD(OldID, regenObjInv);
                 }
                 return(sourceObjectinventory = regenObjInv);
             }
             if (!RequestNewTaskInventory().WaitOne(TimeSpan.FromSeconds(10)))
             {
                 Importing.WriteLine("Unable to retrieve TaskInv for " + ToString());
             }
         }
         return(sourceObjectinventory = regenObjInv);
     }
 }
 public ChartObject()
 {
     Chart         = new Chart();
     Accessibility = new Accessibility();
     Title         = new Title();
     Subtitle      = new Title();
     XAxis         = new XAxis();
     YAxis         = new YAxis();
     Tooltip       = new Tooltip();
     PlotOptions   = new PlotOptions();
     Series        = null;
     Credits       = new Credits();
     Legend        = new Legend();
     Responsive    = new Responsive();
     Exporting     = new Exporting();
     Pane          = new Pane();
 }
Esempio n. 9
0
 private void MoveToKnownObjects()
 {
     lock (ORPHANS)
     {
         if (ORPHANS.Count > 0)
         {
             foreach (PrimToCreate orphan in ORPHANS)
             {
                 Exporting.AddMoveTo(orphan.SimPosition);
             }
             return;
         }
     }
     foreach (PrimToCreate parent in parents)
     {
         Exporting.AddMoveTo(parent.SimPosition);
     }
 }
Esempio n. 10
0
        /// <summary>
        /// Return false when the object is still in the world
        /// </summary>
        /// <param name="objID"></param>
        /// <returns></returns>
        public bool KillTaskObject(UUID objID, out bool inWorld)
        {
            Vector3 where;
            inWorld = Exporting.IsExisting(objID, out where);
            if (!inWorld)
            {
                return(true);
            }
            Exporting.AttemptMoveTo(where);
            Thread.Sleep(3000);
            SimObject O = WorldObjects.GetSimObjectFromUUID(objID);

            if (O == null)
            {
                return(false);
            }
            Exporting.KillInWorld(objID);
            return(true);
        }
Esempio n. 11
0
        public ExportMovieList(List <MovieTreeList> source)
        {
            InitializeComponent();
            var templates = Exporting.GetExportTemplates("movie");

            if (templates.Count > 0)
            {
                var submenu = new BarSubItem(this.barManager1, "Templates");
                foreach (var template in templates)
                {
                    var menu = new BarButtonItem(this.barManager1, template.name);
                    menu.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.popupMenuExportTo_ItemClick);
                    submenu.AddItem(menu);
                }
                this.popupMenuExportTo.AddItem(submenu);
            }
            this.treeList1.DataSource = source;
            this.Text = string.Format("Movie List ({0})", source.Count);
        }
Esempio n. 12
0
        private void btnExport_Click_1(object sender, EventArgs e)
        {
            if (this.dropDownExportTo.Text == "Export to ...")
            {
                XtraMessageBox.Show("Please select export format", "Error");
                return;
            }

            var form = new SimpleBrowseForm();

            form.ShowDialog(this);
            if (form.DialogResult == DialogResult.OK)
            {
                var ext = Path.HasExtension(form.getInput());

                switch (this.dropDownExportTo.Text)
                {
                case "HTML":
                    this.treeList1.ExportToHtml(ext ? form.getInput() : Path.Combine(form.getInput(), "MovieList.html"));
                    break;

                case "PDF":
                    this.treeList1.ExportToPdf(ext ? form.getInput() : Path.Combine(form.getInput(), "MovieList.pdf"));
                    break;

                case "XML":
                    this.treeList1.ExportToXml(ext ? form.getInput() : Path.Combine(form.getInput(), "MovieList.xml"));
                    break;

                default:
                    // Should never happen
                    //XtraMessageBox.Show("Selected method is not supported!", "Error!");
                    Exporting.ExportMoviesTemplate(this.dropDownExportTo.Text, form.getInput());
                    break;
                }
            }
            else
            {
                return;
            }
        }
Esempio n. 13
0
 /// <summary>
 /// Options for the exporting module.
 /// </summary>
 /// <param name="exporting"></param>
 /// <returns></returns>
 public Highcharts SetExporting(Exporting exporting)
 {
     _Exporting = exporting;
     return(this);
 }
Esempio n. 14
0
 /// <summary>
 /// Options for the exporting module.
 /// </summary>
 /// <param name="exporting"></param>
 /// <returns></returns>
 public HighStock SetExporting(Exporting exporting)
 {
     this.exporting = exporting;
     return(this);
 }
 internal ExportingConfigurator(Exporting exporting)
 {
     this.exporting = exporting;
 }
Esempio n. 16
0
        private void CountReady(ImportSettings settings)
        {
            Exporting.GiveStatus();
            int readyObjects          = 0;
            int readyObjectsForDelete = 0;
            int unreadyObjs           = 0;
            int unreadyObjsMustReRez  = 0;
            int requestedShort        = 0;

            foreach (var file in Directory.GetFiles(ExportCommand.dumpDir, "*.*.rti"))
            {
                if (!file.EndsWith("rti"))
                {
                    //rti_status
                    continue;
                }
                string rtiData  = File.ReadAllText(file);
                var    contents = rtiData.Split(',');
                if (contents.Length < 2)
                {
                    requestedShort++;
                    continue;
                }
                UUID objID, holderID;
                if (!UUID.TryParse(contents[0], out objID) || !UUID.TryParse(contents[1], out holderID))
                {
                    Failure("SHORT: " + file + " " + rtiData);
                    requestedShort++;
                    continue;
                }
                // var uuidstr = Path.GetFileName(file).Split('.');
                // var objNum = int.Parse(uuidstr[1]);
                string completeStr = ExportCommand.IsComplete(objID, false, true, settings);
                Vector3 where;
                bool inWorld = Exporting.IsExisting(objID, out where);
                if (string.IsNullOrEmpty(completeStr))
                {
                    readyObjects++;
                    if (inWorld)
                    {
                        Exporting.AttemptMoveTo(where);
                        Thread.Sleep(3000);
                        Exporting.KillInWorld(objID);
                        Importing.APrimToCreate(holderID);
                        readyObjectsForDelete++;
                    }
                    else
                    {
                        Importing.APrimToCreate(holderID);
                        Importing.APrimToCreate(objID);
                    }
                }
                else
                {
                    unreadyObjs++;
                    if (!inWorld)
                    {
                        unreadyObjsMustReRez++;
                        Failure("REREZ: " + completeStr + " " + rtiData);
                        Importing.APrimToCreate(holderID).MustUseAgentCopy = true;
                        File.Delete(ExportCommand.dumpDir + holderID + ".rti_status");
                        File.Delete(file);
                    }
                    else
                    {
                        MustExport.Add(objID);
                        MustExport.Add(holderID);
                        Importing.APrimToCreate(holderID);
                        Failure("RTIDATA: " + completeStr + " " + rtiData);
                        Exporting.AddMoveTo(where);
                    }
                }
            }
            Success("readyObjects = " + readyObjects);
            Success("readyObjectsForDelete = " + readyObjectsForDelete);
            Success("unreadyObjs = " + unreadyObjs);
            Success("unreadyObjsMustReRez = " + unreadyObjsMustReRez);
            Success("requestedShort = " + requestedShort);
        }
Esempio n. 17
0
        public void ImportTaskObjects(ImportSettings importSettings)
        {
            DateTime lastProgressNotice    = DateTime.Now;
            int      incomplete            = 0;
            var      agentSyncFolderHolder = Exporting.FolderCalled("TaskInvHolder");
            int      created = 0;
            var      tos     = LocalScene.TaskObjects;

            foreach (var file in Directory.GetFiles(ExportCommand.dumpDir, "*.taskobj"))
            {
                string[]     c  = File.ReadAllText(file).Split(',');
                TaskFileInfo to = new TaskFileInfo()
                {
                    OldLid        = uint.Parse(c[0]),
                    RezzedID      = UUID.Parse(c[2]),
                    OldTaskHolder = UUID.Parse(c[3]),
                    AssetUUID     = UUID.Parse(c[4]),
                    TaskItemID    = UUID.Parse(c[5])
                };
                tos.Add(to);
                created++;
            }
            foreach (TaskFileInfo o in tos)
            {
                var r = o.Rezzed;
                if (r != null)
                {
                    r.SetIsAsset();
                }
            }

            foreach (TaskFileInfo o in tos)
            {
                PrimToCreate oInsideOf = o.InsideOf;
                if (oInsideOf == null)
                {
                    continue;
                }
                List <InventoryBase> taskInv = oInsideOf.SourceTaskInventory(true);
                if (taskInv == null)
                {
                    continue;
                }
                foreach (var b in taskInv)
                {
                    InventoryItem i = b as InventoryItem;
                    if (i == null)
                    {
                        continue;
                    }
                    if (CogbotHelpers.IsNullOrZero(i.AssetUUID))
                    {
                        if (i.UUID == o.TaskItemID)
                        {
                            i.RezzID   = o.RezzedID;
                            o.IsPlaced = true;
                            break;
                        }
                    }
                }
            }
            foreach (TaskFileInfo o in tos)
            {
                if (!o.IsPlaced)
                {
                    Failure("UNPLACED: " + o);
                }
            }
            // this makes sure we know that late found childs are assets
            foreach (PrimToCreate parent in LockInfo.CopyOf(parents))
            {
                if (parent.IsAsset)
                {
                    parent.SetIsAsset();
                }
            }
        }
Esempio n. 18
0
        private int ImportTaskFiles0(ImportSettings importSettings, bool createObjects)
        {
            //if (IsLocalScene) return 0;
            DateTime lastProgressNotice    = DateTime.Now;
            int      incomplete            = 0;
            var      agentSyncFolderHolder = Exporting.FolderCalled("TaskInvHolder");
            int      created = 0;

            foreach (var file in Directory.GetFiles(ExportCommand.dumpDir, "*.task"))
            {
                string fileUUID = Path.GetFileNameWithoutExtension(Path.GetFileName(file));
                var    ptc      = APrimToCreate(UUID.Parse(fileUUID));
                if (++created % 25 == 0)
                {
                    WriteLine("tasked " + created);
                }
                if (ptc.PackedInsideNow)
                {
                    continue;
                }
                //  if (ptc.TaskInvComplete) continue;
                if ((ptc.Prim.RegionHandle != importSettings.CurSim.Handle) && importSettings.Contains("CheckRegion"))
                {
                    KillID(ptc.OldID);
                    continue;
                }
                string taskDataS = File.ReadAllText(file);
                if (string.IsNullOrEmpty(taskDataS) || taskDataS.Length < 30)
                {
                    ptc.TaskInvComplete = true;
                    continue;
                }
                ptc.CreateWorkflow(agentSyncFolderHolder);
                if (!ptc.LoadTaskOSD(WriteLine))
                {
                    //Failure("FAILED: LoadOSD " + ptc);
                    incomplete++;
                    continue;
                }
                if (!ptc.SyncToAgentFolder(WriteLine, createObjects))
                {
                    //Failure("FAILED: SyncToAgentFolder " + ptc);
                    if (ptc.succeeded == 0)
                    {
                        continue;
                    }
                }
                if (!ptc.SyncToObject(WriteLine, createObjects))
                {
                    //Failure("FAILED: SyncToObject " + ptc);
                    if (ptc.succeeded == 0)
                    {
                        continue;
                    }
                }
                if (!ptc.Complete)
                {
                    Failure("INCOMPLETE: " + ptc);
                    incomplete++;
                }
                else
                {
                    Success("COMPLETE: " + ptc);
                }
                if (!IsLocalScene)
                {
                    Success("............");
                }
                if (lastProgressNotice.AddSeconds(30) < DateTime.Now)
                {
                    lastProgressNotice = DateTime.Now;
                    WriteLine("Task created " + created + " incomplete=" + incomplete);
                }
            }
            return(incomplete);
        }
Esempio n. 19
0
 /// <summary>
 /// Options for the exporting module.
 /// </summary>
 /// <param name="exporting"></param>
 /// <returns></returns>
 public Highstock SetExporting(Exporting exporting)
 {
     _Exporting = exporting;
     return(this);
 }
Esempio n. 20
0
 /// <summary>
 /// Options for the exporting module.
 /// </summary>
 /// <param name="exporting"></param>
 /// <returns></returns>
 public new Highstock SetExporting(Exporting exporting)
 {
     base.SetExporting(exporting);
     return(this);
 }