Exemplo n.º 1
0
        public List <PrintItem> NewPrintItemListForImport(List <PrintItem> printItemList)
        {
            List <PrintItem> newPrintItemList = new List <PrintItem>();

            foreach (var printItem in printItemList)
            {
                string userDataPath          = MatterHackers.MatterControl.DataStorage.ApplicationDataStorage.ApplicationUserDataPath;
                string partName              = Path.GetFileName(printItem.FileLocation);
                string pathToRenameForImport = Path.Combine(userDataPath, "data", "QueueItems");

                PrintItem newPrintItem = new PrintItem();
                newPrintItem.DateAdded             = printItem.DateAdded;
                newPrintItem.Name                  = printItem.Name;
                newPrintItem.PrintCount            = printItem.PrintCount;
                newPrintItem.PrintItemCollectionID = printItem.PrintItemCollectionID;
                newPrintItem.ReadOnly              = printItem.ReadOnly;
                newPrintItem.Protected             = printItem.Protected;

                if (printItem.FileLocation.Contains("[QueueItems]"))
                {
                    newPrintItem.FileLocation = Path.Combine(pathToRenameForImport, partName);
                }
                else
                {
                    newPrintItem.FileLocation = printItem.FileLocation;
                }

                newPrintItemList.Add(newPrintItem);
            }

            return(newPrintItemList);
        }
Exemplo n.º 2
0
        private async Task <PrintItemWrapper> MakeCopyForQueue()
        {
            var printItemWrapper = await this.GetPrintItemWrapperAsync();

            // Handle non-existing files
            if (!File.Exists(printItemWrapper.FileLocation))
            {
                return(null);
            }

            PrintItem printItemToCopy = printItemWrapper.PrintItem;
            string    fileName        = Path.ChangeExtension(Path.GetRandomFileName(), Path.GetExtension(printItemToCopy.FileLocation));
            string    newFileLocation = Path.Combine(ApplicationDataStorage.Instance.ApplicationLibraryDataPath, fileName);

            // Handle file read/write errors
            try
            {
                File.Copy(printItemToCopy.FileLocation, newFileLocation);
            }
            catch (Exception ex)
            {
                string errorMessage = string.Format("Unable to duplicate file for queue: {0}\r\n{1}", printItemToCopy.FileLocation, ex.Message);
                Trace.WriteLine(errorMessage);

                return(null);
            }

            return(new PrintItemWrapper(new PrintItem(printItemToCopy.Name, newFileLocation)
            {
                Protected = printItemToCopy.Protected
            }));
        }
Exemplo n.º 3
0
        void mergeAndSavePartsBackgroundWorker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
        {
            string filePath = e.Result as string;

            if (filePath != null)
            {
                PrintItem printItem = new PrintItem();
                printItem.Commit();

                printItem.Name                  = string.Format("{0}", word);
                printItem.FileLocation          = Path.GetFullPath(filePath);
                printItem.PrintItemCollectionID = LibraryData.Instance.LibraryCollection.Id;
                printItem.Commit();

                PrintItemWrapper printItemWrapper = new PrintItemWrapper(printItem);

                LibraryData.Instance.AddItem(printItemWrapper);

                // and save to the queue
                {
                    QueueData.Instance.AddItem(printItemWrapper);
                }
            }

            //Exit after save
            UiThread.RunOnIdle(CloseOnIdle);
        }
        public void PrintItemsExemptTest()
        {
            // Arrange
            _fileRepositoryMock
            .Setup(mock => mock.ReadLines(It.IsAny <string>()))
            .Returns(
                new List <string>
            {
                $"print-item1 19.99 {exemptString}",
                "print-item2 29.99",
                $"print-item3 39.99 {exemptString}"
            });

            var jobsFileRepository = new JobsFileRepository(_fileRepositoryMock.Object);

            // Act
            var job = jobsFileRepository.ReadJobFromFile("fakeFilePath");

            // Assert
            var expectedOuput = Job.Create(
                false,
                new List <PrintItem>
            {
                PrintItem.Create("print-item1", 19.99m, true),
                PrintItem.Create("print-item2", 29.99m, false),
                PrintItem.Create("print-item3", 39.99m, true)
            });

            Assert.That(job, Is.EqualTo(expectedOuput).Using(new JobEqualityComparer()));
        }
        private void PreLoadItemToQueue(PrintItem printItem)
        {
            string fileDest = printItem.FileLocation;

            if (!string.IsNullOrEmpty(fileDest) &&
                File.Exists(fileDest))
            {
                var printItemToAdd = new PrintItemWrapper(printItem);

                // check if there is a thumbnail image for this file and load it into the user cache if so
                string justThumbFile           = printItem.Name + ".png";
                string applicationUserDataPath = StaticData.Instance.MapPath(Path.Combine("OEMSettings", "SampleParts"));
                string thumbnailSourceFile     = Path.Combine(applicationUserDataPath, justThumbFile);
                if (File.Exists(thumbnailSourceFile))
                {
                    string thumbnailDestFile = PartThumbnailWidget.GetImageFileName(printItemToAdd);

                    Directory.CreateDirectory(Path.GetDirectoryName(thumbnailDestFile));

                    // copy it to the right place
                    File.Copy(thumbnailSourceFile, thumbnailDestFile);
                }

                QueueData.Instance.AddItem(printItemToAdd);
            }
        }
        private PrintItem ReadPrintItem(string line)
        {
            var printItemParts = line.Split(' ');

            var lineParts = printItemParts.Length;

            if (lineParts != 2 && lineParts != 3)
            {
                throw new InvalidOperationException($"Print item line {line} does not contain enough data");
            }

            decimal itemCost;

            if (!decimal.TryParse(printItemParts[1], out itemCost))
            {
                throw new InvalidOperationException($"Cannot parse the cost for item {line}");
            }

            var exempt = lineParts == 3 && string.Equals(
                printItemParts[2],
                taxExemptLine,
                StringComparison.OrdinalIgnoreCase);

            //TO DO
            return(PrintItem.Create(
                       printItemParts[0],
                       itemCost,
                       exempt));
        }
Exemplo n.º 7
0
        public void compileString()
        {
            for (int i = 0; i < printList.items.Count; i++)
            {
                PrintItem thisItem = printList.items[i];

                if (thisItem.stringExpr == null)
                {
                    printNumericExpression(thisItem.numExpr);
                }
                else
                {
                    printStringExpression(thisItem.stringExpr);
                }

                if (i < printList.separators.Count)
                {
                    PrintList.printseparator thisSeparator = printList.separators[i];
                    if (thisSeparator == PrintList.printseparator.COMMA)
                    {
                        printLiteral(",");
                    }
                    if (thisSeparator == PrintList.printseparator.SEMICOLON)
                    {
                        printLiteral(";");
                    }
                }
            }
            printLiteral("\r\n");
        }
Exemplo n.º 8
0
        public void SetObjectFromCombo()
        {
            if (selectingobject)
            {
                return;
            }
            if (CurrentList.Count == 0)
            {
                return;
            }
            if (ComboSelection.SelectedIndex > CurrentList.Count - 1)
            {
                return;
            }
            ReportItem ritem = CurrentList[ComboSelection.SelectedIndex];

            if (!(ritem is PrintItem))
            {
                return;
            }

            PrintItem nitem = (PrintItem)ritem;

            SubReportEdit.SelectPrintItem(nitem);
        }
Exemplo n.º 9
0
 private static void writeNormal(PrintItem item)
 {
     writeDefaultHeader(item);
     Console.ForegroundColor = ConsoleColor.DarkGreen;
     Console.WriteLine(item.message);
     Console.ForegroundColor = ConsoleColor.Gray;
 }
Exemplo n.º 10
0
 private static void writeRed(PrintItem item)
 {
     writeDefaultHeader(item);
     Console.ForegroundColor = ConsoleColor.Red;
     Console.WriteLine(item.message);
     Console.ForegroundColor = ConsoleColor.Gray;
 }
Exemplo n.º 11
0
        private async void MergeAndSavePartsToStl()
        {
            if (MeshGroups.Count > 0)
            {
                partSelectButtonWasClicked = viewControls3D.ActiveButton == ViewControls3DButtons.PartSelect;


                processingProgressControl.ProcessType     = "Saving Parts:".Localize();
                processingProgressControl.Visible         = true;
                processingProgressControl.PercentComplete = 0;
                LockEditControls();

                // we sent the data to the asynch lists but we will not pull it back out (only use it as a temp holder).
                PushMeshGroupDataToAsynchLists(true);

                string fileName = "TextCreator_{0}".FormatWith(Path.ChangeExtension(Path.GetRandomFileName(), ".amf"));
                string filePath = Path.Combine(ApplicationDataStorage.Instance.ApplicationLibraryDataPath, fileName);

                processingProgressControl.RatioComplete = 0;
                await Task.Run(() => mergeAndSavePartsBackgroundWorker_DoWork(filePath));

                PrintItem printItem = new PrintItem();

                printItem.Name         = string.Format("{0}", word);
                printItem.FileLocation = Path.GetFullPath(filePath);

                PrintItemWrapper printItemWrapper = new PrintItemWrapper(printItem);

                // and save to the queue
                QueueData.Instance.AddItem(printItemWrapper);

                //Exit after save
                UiThread.RunOnIdle(CloseOnIdle);
            }
        }
Exemplo n.º 12
0
        private void ViewButton_Click(object sender, EventArgs e)
        {
            this.rightButtonOverlay.SlideOut();
            PrintItem printItem = DataStorage.Datastore.Instance.dbSQLite.Table <DataStorage.PrintItem>().Where(v => v.Id == this.printTask.PrintItemId).Take(1).FirstOrDefault();

            if (printItem != null)
            {
                string pathAndFile = printItem.FileLocation;
                if (File.Exists(pathAndFile))
                {
                    bool shiftKeyDown = Keyboard.IsKeyDown(Keys.ShiftKey);
                    if (shiftKeyDown)
                    {
                        OpenPartPreviewWindow(printItem, View3DWidget.AutoRotate.Disabled);
                    }
                    else
                    {
                        OpenPartPreviewWindow(printItem, View3DWidget.AutoRotate.Enabled);
                    }
                }
                else
                {
                    PrintItemWrapper itemWrapper = new PrintItemWrapper(printItem);
                    ShowCantFindFileMessage(itemWrapper);
                }
            }
        }
Exemplo n.º 13
0
        public void LoadCalibrationPrints()
        {
            if (this.ActivePrinter.Make != null && this.ActivePrinter.Model != null)
            {
                // Load the calibration file names
                List <string> calibrationPrintFileNames = LoadCalibrationPartNamesForPrinter(this.ActivePrinter.Make, this.ActivePrinter.Model);

                var libraryProvider = new LibraryProviderSQLite(null, null, null, "Local Library");
                libraryProvider.EnsureSamplePartsExist(calibrationPrintFileNames);

                var queueItems = QueueData.Instance.GetItemNames();

                // Finally, ensure missing calibration parts are added to the queue if missing
                var filenamesWithoutExtensions = calibrationPrintFileNames.Select(f => Path.GetFileNameWithoutExtension(f));
                foreach (string nameOnly in filenamesWithoutExtensions)
                {
                    if (queueItems.Contains(nameOnly))
                    {
                        continue;
                    }

                    // Find the first library item with the given name and add it to the queue
                    PrintItem libraryItem = libraryProvider.GetLibraryItems(nameOnly).FirstOrDefault();
                    if (libraryItem != null)
                    {
                        QueueData.Instance.AddItem(new PrintItemWrapper(libraryItem));
                    }
                }

                libraryProvider.Dispose();
            }
        }
Exemplo n.º 14
0
        public List <PrintItem> NewPrintItemListToExport(List <PrintItem> printItemList)
        {
            List <PrintItem> newPrintItemList = new List <PrintItem>();

            foreach (var printItem in printItemList)
            {
                string pathToRenameForExport = printItem.FileLocation;
                string partName         = Path.GetFileName(pathToRenameForExport);
                string exportedFilePath = "[QueueItems]\\" + partName;

                PrintItem newPrintItem = new PrintItem();
                newPrintItem.DateAdded             = printItem.DateAdded;
                newPrintItem.Name                  = printItem.Name;
                newPrintItem.PrintCount            = printItem.PrintCount;
                newPrintItem.PrintItemCollectionID = printItem.PrintItemCollectionID;
                newPrintItem.ReadOnly              = printItem.ReadOnly;
                newPrintItem.Protected             = printItem.Protected;

                if (pathToRenameForExport.Contains("C:\\"))
                {
                    newPrintItem.FileLocation = exportedFilePath;
                }
                else
                {
                    newPrintItem.FileLocation = printItem.FileLocation;
                }
                newPrintItemList.Add(newPrintItem);
            }

            return(newPrintItemList);
        }
Exemplo n.º 15
0
    void exchange(int i, int j)
    {
        PrintItem temp = itemList[i];

        itemList[i] = itemList[j];
        itemList[j] = temp;
    }
Exemplo n.º 16
0
 private void txtBarcode_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         string[] barcode = txtBarcode.Text.Split(';');
         //Label of PREMAC 6-4-9 have more 2 fields
         lbData = new PrintItem
         {
             Item_Number   = barcode[0].Trim(),
             Item_Name     = barcode[1].Trim(),
             SupplierName  = barcode[2].Trim(),
             Invoice       = barcode[3].Trim(),
             Delivery_Date = DateTime.Parse(barcode[4].Trim()),
             Delivery_Qty  = int.Parse(barcode[5].Trim()),
             SupplierCD    = string.Empty,
             Remark        = string.Empty
         };
         if (barcode.Length > 7)
         {
             if (!string.IsNullOrEmpty(barcode[6]))
             {
                 lbData.SupplierCD = barcode[6].Trim();
             }
             if (!string.IsNullOrEmpty(barcode[7]))
             {
                 lbData.Remark = barcode[7].Trim();
             }
         }
         txtInsInvoice.Text = lbData.Invoice;
         txtInQty.Text      = lbData.Delivery_Qty.ToString();
         txtLabelQty.Focus();
     }
 }
Exemplo n.º 17
0
        private void SubmitForm()
        {
            string newName = textToAddWidget.ActualTextEditWidget.Text;

            if (newName != "")
            {
                string fileName        = Path.ChangeExtension(Path.GetRandomFileName(), ".amf");
                string fileNameAndPath = Path.Combine(ApplicationDataStorage.Instance.ApplicationLibraryDataPath, fileName);

                PrintItem printItem = new PrintItem();
                printItem.Name                  = newName;
                printItem.FileLocation          = Path.GetFullPath(fileNameAndPath);
                printItem.PrintItemCollectionID = LibraryData.Instance.LibraryCollection.Id;
                printItem.Commit();

                PrintItemWrapper printItemWrapper = new PrintItemWrapper(printItem);
                QueueData.Instance.AddItem(printItemWrapper);

                if (addToLibraryOption.Checked)
                {
                    LibraryData.Instance.AddItem(printItemWrapper);
                }

                functionToCallOnSaveAs(printItemWrapper);
                CloseOnIdle();
            }
        }
Exemplo n.º 18
0
 private static void writeDefaultHeader(PrintItem item)
 {
     Console.Write("[" + item.dateTimenow + ":" + item.milliSecond + "] [");
     Console.ForegroundColor = ConsoleColor.Green;
     Console.Write(item.className + "." + item.methodName);
     Console.ForegroundColor = ConsoleColor.Gray;
     Console.Write("] » ");
 }
Exemplo n.º 19
0
        private PrintItem GetPrintItemFromFile(string fileName, string displayName)
        {
            PrintItem item = new PrintItem();

            item.FileLocation = fileName;
            item.Name         = displayName;
            return(item);
        }
Exemplo n.º 20
0
 public static void Print(int copies)
 {
     for (int i = 1; i <= copies; ++i)
     {
         Console.WriteLine("{0}:{1} from thread<{2}>", i, PrintItem.Read(), Thread.CurrentThread.ManagedThreadId);
         Worker.DoWork(i);
     }
 }
Exemplo n.º 21
0
        public void Delete()
        {
            PrintItem.Delete();

            // Reset the Id field after calling delete to clear the association and ensure that future db operations
            // result in inserts rather than update statements on a missing row
            this.PrintItem.Id = 0;
        }
Exemplo n.º 22
0
        private static void AddStlOrGcode(LibraryProviderSQLite libraryToAddTo, string loadedFileName, string extension)
        {
            PrintItem printItem = new PrintItem();

            printItem.Name                  = Path.GetFileNameWithoutExtension(loadedFileName);
            printItem.FileLocation          = Path.GetFullPath(loadedFileName);
            printItem.PrintItemCollectionID = libraryToAddTo.baseLibraryCollection.Id;
            printItem.Commit();

            if (MeshFileIo.ValidFileExtensions().Contains(extension))
            {
                List <MeshGroup> meshToConvertAndSave = MeshFileIo.Load(loadedFileName);

                try
                {
                    PrintItemWrapper printItemWrapper = new PrintItemWrapper(printItem);
                    SaveToLibraryFolder(printItemWrapper, meshToConvertAndSave, false);
                    libraryToAddTo.AddItem(printItemWrapper);
                }
                catch (System.UnauthorizedAccessException)
                {
                    UiThread.RunOnIdle(() =>
                    {
                        //Do something special when unauthorized?
                        StyledMessageBox.ShowMessageBox(null, "Oops! Unable to save changes, unauthorized access", "Unable to save");
                    });
                }
                catch
                {
                    UiThread.RunOnIdle(() =>
                    {
                        StyledMessageBox.ShowMessageBox(null, "Oops! Unable to save changes.", "Unable to save");
                    });
                }
            }
            else             // it is not a mesh so just add it
            {
                PrintItemWrapper printItemWrapper = new PrintItemWrapper(printItem);
                if (false)
                {
                    libraryToAddTo.AddItem(printItemWrapper);
                }
                else                 // save a copy to the library and update this to point at it
                {
                    string sourceFileName = printItem.FileLocation;
                    string newFileName    = Path.ChangeExtension(Path.GetRandomFileName(), Path.GetExtension(printItem.FileLocation));
                    string destFileName   = Path.Combine(ApplicationDataStorage.Instance.ApplicationLibraryDataPath, newFileName);

                    File.Copy(sourceFileName, destFileName, true);

                    printItemWrapper.FileLocation = destFileName;
                    printItemWrapper.PrintItem.Commit();

                    // let the queue know that the item has changed so it load the correct part
                    libraryToAddTo.AddItem(printItemWrapper);
                }
            }
        }
Exemplo n.º 23
0
        public PrintQueueItem(string displayName, string fileLocation)
        {
            PrintItem printItem = new PrintItem();

            printItem.Name         = displayName;
            printItem.FileLocation = fileLocation;
            this.PrintItemWrapper  = new PrintItemWrapper(printItem);
            ConstructPrintQueueItem();
        }
Exemplo n.º 24
0
 private static void writeSpecialLineWithHeaderHead(PrintItem item)
 {
     writeDefaultHeader(item);
     Console.ForegroundColor = item.colorOne;
     Console.Write(item.headerText);
     Console.ForegroundColor = item.colorTwo;
     Console.WriteLine(item.message);
     Console.ForegroundColor = ConsoleColor.Gray;
 }
Exemplo n.º 25
0
 /// <summary>
 /// Enqueues an item
 /// </summary>
 /// <param name="item"></param>
 private static void enQueueItem(PrintItem item)
 {
     if (loggin)
     {
         lock (queItem.SyncRoot)
         {
             queItem.Enqueue(item);
         }
     }
 }
Exemplo n.º 26
0
 public void MoveSelectedToBottom()
 {
     if (SelectedIndex >= 0 && SelectedIndex < Count)
     {
         int       currentIndex    = SelectedIndex;
         PrintItem replacementItem = new PrintItem(SelectedPrintItem.Name, SelectedPrintItem.FileLocation);
         QueueData.Instance.RemoveAt(SelectedIndex);
         this.SelectedIndex = currentIndex;
     }
 }
Exemplo n.º 27
0
 public void RemoveAllSdCardFiles()
 {
     for (int i = ItemCount - 1; i >= 0; i--)
     {
         PrintItem printItem = PrintItems[i].PrintItem;
         if (printItem.FileLocation == QueueData.SdCardFileName)
         {
             RemoveAt(i);
         }
     }
 }
Exemplo n.º 28
0
 private static void writeSpecialColorLine(PrintItem item)
 {
     Console.Write("[" + item.dateTimenow + ":" + item.milliSecond + "] [");
     Console.ForegroundColor = item.colorOne;
     Console.Write(item.className + "." + item.methodName);
     Console.ForegroundColor = ConsoleColor.Gray;
     Console.Write("] » ");
     Console.ForegroundColor = item.colorTwo;
     Console.WriteLine(item.message);
     Console.ForegroundColor = ConsoleColor.Gray;
 }
Exemplo n.º 29
0
        public PrintItemWrapper(PrintItem printItem, List <ProviderLocatorNode> sourceLibraryProviderLocator = null)
        {
            this.PrintItem = printItem;

            if (FileLocation != null)
            {
                this.fileType = Path.GetExtension(FileLocation).ToUpper();
            }

            SourceLibraryProviderLocator = sourceLibraryProviderLocator;
        }
Exemplo n.º 30
0
        public PrintItemWrapper(PrintItem printItem, ILibraryContainer sourceLibraryProviderLocator = null)
        {
            this.printer   = printer;
            this.PrintItem = printItem;

            if (FileLocation != null)
            {
                this.fileType = Path.GetExtension(FileLocation).ToUpper();
            }

            SourceLibraryProviderLocator = sourceLibraryProviderLocator;
        }
Exemplo n.º 31
0
    public static void Main()
    {
        int T = int.Parse(Console.ReadLine());
        while (T--> 0)
        {
            string[] tokens = Console.ReadLine().Split();
            int n = int.Parse(tokens[0]);
            int m = int.Parse(tokens[1]);
            tokens = Console.ReadLine().Split();
            Queue<PrintItem> queue = new Queue<PrintItem>();
            PriorityQueue priority_queue = new PriorityQueue();

            for (int i = 0; i < n; i++)
            {
                int pr = int.Parse(tokens[i]);
                PrintItem item = new PrintItem(i, pr);
                queue.Enqueue(item);
                priority_queue.Enqueue(item);
            }
            priority_queue.buildHeap();

            int count = 0;
            PrintItem highPItem = priority_queue.extractMin(); ;
            while (queue.Count > 0)
            {
                PrintItem item = queue.Dequeue();
                if (item.Priority == highPItem.Priority)
                { // add its print time
                    count++;
                    if (item.Index == m)
                        break;
                    highPItem = priority_queue.extractMin();
                }
                else // we did not get high priority item push into queue
                {
                    queue.Enqueue(item);
                }
            }
            Console.WriteLine(count);
        }
    }
Exemplo n.º 32
0
Arquivo: Out.cs Projeto: habb0/Bfly
 private static void writePlain(PrintItem item)
 {
     Console.WriteLine(item.message);
 }
Exemplo n.º 33
0
    int heapSearch(PrintItem PrintItem)
    {
        for (int i = 0; i < heapSize; i++)
        {
            PrintItem aPrintItem = itemList[i];

            if (PrintItem.Index == aPrintItem.Index)
                return i;
        }

        return -1;
    }
 //Must go to the Draw Engine
 public static void PrintOnPosition(int row, int col, ConsoleColor color = ConsoleColor.DarkGray)
 {
     PrintItem toPrint = new PrintItem(" ", col, row, color, true);
     stuffToPrint.Enqueue(toPrint);
 }
Exemplo n.º 35
0
Arquivo: Out.cs Projeto: habb0/Bfly
 /// <summary>
 /// Enqueues an item
 /// </summary>
 /// <param name="item"></param>
 private static void enQueueItem(PrintItem item)
 {
     if (loggin)
     {
         lock (queItem.SyncRoot)
         {
             queItem.Enqueue(item);
         }
     }
 }
 public static void PrintStringOnPosition(int row, int col, string phrase, ConsoleColor color = ConsoleColor.White)
 {
     PrintItem toPrint = new PrintItem(phrase, col, row, color);
     stuffToPrint.Enqueue(toPrint);
 }
Exemplo n.º 37
0
Arquivo: Out.cs Projeto: habb0/Bfly
 private static void printEmpty(PrintItem item)
 {
     Console.WriteLine();
 }
Exemplo n.º 38
0
Arquivo: Out.cs Projeto: habb0/Bfly
 private static void fileWriter(PrintItem item)
 {
     writeToFile(item.headerText, item.message);
 }
Exemplo n.º 39
0
Arquivo: Out.cs Projeto: habb0/Bfly
 private static void writeDefaultHeader(PrintItem item)
 {
     Console.Write("[" + item.dateTimenow + ":" + item.milliSecond + "] [");
     Console.ForegroundColor = ConsoleColor.Green;
     Console.Write(item.className + "." + item.methodName);
     Console.ForegroundColor = ConsoleColor.Gray;
     Console.Write("] » ");
 }
Exemplo n.º 40
0
Arquivo: Out.cs Projeto: habb0/Bfly
 private static void writeNormal(PrintItem item)
 {
     writeDefaultHeader(item);
     Console.ForegroundColor = ConsoleColor.DarkGreen;
     Console.WriteLine(item.message);
     Console.ForegroundColor = ConsoleColor.Gray;
 }
Exemplo n.º 41
0
 public int find(PrintItem PrintItem)
 {
     return heapSearch(PrintItem);
 }
Exemplo n.º 42
0
Arquivo: Out.cs Projeto: habb0/Bfly
 private static void writeSpecialColorLine(PrintItem item)
 {
     Console.Write("[" + item.dateTimenow + ":" + item.milliSecond + "] [");
     Console.ForegroundColor = item.colorOne;
     Console.Write(item.className + "." + item.methodName);
     Console.ForegroundColor = ConsoleColor.Gray;
     Console.Write("] » ");
     Console.ForegroundColor = item.colorTwo;
     Console.WriteLine(item.message);
     Console.ForegroundColor = ConsoleColor.Gray;
 }
Exemplo n.º 43
0
Arquivo: Out.cs Projeto: habb0/Bfly
 private static void writeSpecialLineWithHeaderHead(PrintItem item)
 {
     writeDefaultHeader(item);
     Console.ForegroundColor = item.colorOne;
     Console.Write(item.headerText);
     Console.ForegroundColor = item.colorTwo;
     Console.WriteLine(item.message);
     Console.ForegroundColor = ConsoleColor.Gray;
 }
Exemplo n.º 44
0
Arquivo: Out.cs Projeto: habb0/Bfly
 private static void writeRed(PrintItem item)
 {
     writeDefaultHeader(item);
     Console.ForegroundColor = ConsoleColor.Red;
     Console.WriteLine(item.message);
     Console.ForegroundColor = ConsoleColor.Gray;
 }
Exemplo n.º 45
0
 // requires public
 public void Enqueue(PrintItem PrintItem)
 {
     heapSize++;
     itemList.Add(PrintItem);
 }