Esempio n. 1
2
 public override Task<TupleValue[]> StackListArguments(PrintValues printValues, int threadId, uint lowFrameLevel, uint hiFrameLevel)
 {
     // CLRDBG supports stack frame formatting, so this should not be used
     throw new NotImplementedException();
 }
        private void PrintToDTP(PrintValues print)
        {
            string sDividerPartial = "-----------------------";
            string sDividerFull    = "====================================";

            //dtpPrinter.PrintReset();
            //dtpPrinter.SetCharacterSet(DTP_HM.CharacterSet.Korea);
            dtpPrinter.SetFontAlign(DTP_HM.FontAlign.Center);

            // dtpPrinter.SetFontSize(1, 1);
            // dtpPrinter.PrintLogo();

            dtpPrinter.SetFontSize(2, 2);
            dtpPrinter.PrintLine(print.Title);

            dtpPrinter.PrintLine(1, print.PatronNo);
            dtpPrinter.PrintLine(print.PatronName);

            dtpPrinter.PrintLine(1, print.FreeCouponAmt);

            dtpPrinter.PrintLine(1, "BELLOW BARCODE");
            dtpPrinter.PrintBarcode(print.DmStartNo);
            dtpPrinter.PrintLine(1, "barcarde: " + print.DmStartNo);
            dtpPrinter.PrintLine(0, print.PrintDateSeq);
            dtpPrinter.CutPaper(10);
            dtpPrinter.PrintSetStatus(1);
            dtpPrinter.PrintSetRealTime();
        }
Esempio n. 3
0
        /// <summary>
        /// Get variables for the given frame
        /// </summary>
        /// <param name="printValues"></param>
        /// <param name="threadId"></param>
        /// <param name="frameLevel"></param>
        /// <param name="resultClass"></param>
        /// <returns>Returns an array of results for variables</returns>
        public async Task <ValueListValue> StackListVariables(PrintValues printValues, int threadId, uint frameLevel)
        {
            string cmd = string.Format(@"-stack-list-variables {0}", (int)printValues);

            Results variablesResults = await ThreadFrameCmdAsync(cmd, ResultClass.done, threadId, frameLevel);

            return(variablesResults.Find <ValueListValue>("variables"));
        }
Esempio n. 4
0
        /// <summary>
        /// Get Stack arguments for a single frame
        /// </summary>
        /// <param name="printValues"></param>
        /// <param name="threadId"></param>
        /// <param name="frameLevel"></param>
        /// <returns>This returns an array of results for args, which have a name and a value, etc.</returns>
        public async Task <ListValue> StackListArguments(PrintValues printValues, int threadId, uint frameLevel)
        {
            TupleValue[] frameResults = await StackListArguments(printValues, threadId, frameLevel, frameLevel);

            Debug.Assert(frameResults.Length == 1);

            return(frameResults[0].Find <ListValue>("args"));
        }
Esempio n. 5
0
        /// <summary>
        /// Get locals for the give frame
        /// </summary>
        /// <param name="printValues">0 for no values, 1 for all values, 2 for simple values</param>
        /// <param name="threadId"></param>
        /// <param name="frameLevel"></param>
        /// <returns></returns>
        public async Task <ResultValue> StackListLocals(PrintValues printValues, int threadId, uint frameLevel)
        {
            string cmd = string.Format(@"-stack-list-locals {0}", (int)printValues);

            Results localsResults = await ThreadFrameCmdAsync(cmd, ResultClass.done, threadId, frameLevel);

            return(localsResults.Find("locals"));
        }
Esempio n. 6
0
        /// <summary>
        /// Get Stack arguments for mulitples frames
        /// </summary>
        /// <param name="printValues"></param>
        /// <param name="threadId"></param>
        /// <param name="lowFrameLevel"></param>
        /// <param name="hiFrameLevel"></param>
        /// <returns>This returns an array of results of frames, which contains a level and an args array. </returns>
        public virtual async Task <TupleValue[]> StackListArguments(PrintValues printValues, int threadId, uint lowFrameLevel, uint hiFrameLevel)
        {
            string  cmd = string.Format(@"-stack-list-arguments {0} {1} {2}", (int)printValues, lowFrameLevel, hiFrameLevel);
            Results argumentsResults = await ThreadCmdAsync(cmd, ResultClass.done, threadId);

            return(argumentsResults.Find <ListValue>("stack-args").IsEmpty()
                ? new TupleValue[0]
                : argumentsResults.Find <ResultListValue>("stack-args").FindAll <TupleValue>("frame"));
        }
        // Buttons For TEST --------------------------------------------------------------------------------------
        private void btnTest_Click(object sender, EventArgs e)
        {
            PrintValues data = new PrintValues();

            data.Title         = "GKL TEST";
            data.PatronNo      = "123456";
            data.PatronName    = "홍길동";
            data.FreeCouponAmt = "₩1,000,000";
            data.DmStartNo     = "1234567";
            data.PrintDateSeq  = "2017062300001";

            PrintToDTP(data);
        }
        private void Send2Device(string message)
        {
            /*
             * oMessage.device = "thermalPrinter"
             * oMessage.command = "print_waitingNumber"
             * oMessage.waitingNumber = sNumber
             */
            JObject cmd     = JObject.Parse(message);
            string  device  = (string)cmd["device"];
            string  command = (string)cmd["command"];

            if (device == "thermalPrinter")
            {
                if (command == "print_waitingNumber")
                {
                    PrintWaitingValue data = new PrintWaitingValue();
                    data.Title         = (string)cmd["title"];
                    data.WaitingNumber = (string)cmd["waitingNumber"];
                    data.PatientName   = (string)cmd["patientName"];
                    data.PatientNumber = (string)cmd["patientNumber"];
                    data.Contents1     = (string)cmd["contents1"];
                    data.Contents2     = (string)cmd["contents2"];
                    data.Footer        = (string)cmd["footer"];

                    PrintWaitingNumber(data);
                }
            }
            else
            {
                // Send2Web(JsonConvert.SerializeObject(result));

                PrintValues printData = new PrintValues();

                /*
                 * printData.Title = "GKL XMAS EVENT";
                 * printData.PatronNo = result.PATRON_NO.ToString();
                 * printData.PatronName = result.PATRON_NM;
                 * printData.DmStartNo = result.DM_START_NO;
                 * printData.FreeCouponAmt = result.FREE_COUPON_AMT;
                 * printData.PrintDateSeq = result.PRINT_DATE_SEQ;
                 *
                 * _printResult.PatronNo = result.PATRON_NO;
                 * _printResult.DmStatNo = result.DM_START_NO;
                 *
                 * PrintToDTP(printData);
                 */
            }
        }
Esempio n. 9
0
 public override Task <TupleValue[]> StackListArguments(PrintValues printValues, int threadId, uint lowFrameLevel, uint hiFrameLevel)
 {
     // CLRDBG supports stack frame formatting, so this should not be used
     throw new NotImplementedException();
 }
Esempio n. 10
0
 public override Task<TupleValue[]> StackListArguments(PrintValues printValues, int threadId, uint lowFrameLevel, uint hiFrameLevel)
 {
     // TODO: for clrdbg, we should get this from the original stack walk instead
     return Task<TupleValue[]>.FromResult(new TupleValue[0]);
 }
Esempio n. 11
0
        /// <summary>
        /// Get variables for the given frame
        /// </summary>
        /// <param name="printValues"></param>
        /// <param name="threadId"></param>
        /// <param name="frameLevel"></param>
        /// <param name="resultClass"></param>
        /// <returns>Returns an array of results for variables</returns>
        public async Task<ValueListValue> StackListVariables(PrintValues printValues, int threadId, uint frameLevel)
        {
            string cmd = string.Format(@"-stack-list-variables {0}", (int)printValues);

            Results variablesResults = await ThreadFrameCmdAsync(cmd, ResultClass.done, threadId, frameLevel);
            return variablesResults.Find<ValueListValue>("variables");
        }
Esempio n. 12
0
        /// <summary>
        /// Get Stack arguments for a single frame
        /// </summary>
        /// <param name="printValues"></param>
        /// <param name="threadId"></param>
        /// <param name="frameLevel"></param>
        /// <returns>This returns an array of results for args, which have a name and a value, etc.</returns>
        public async Task<ListValue> StackListArguments(PrintValues printValues, int threadId, uint frameLevel)
        {
            TupleValue[] frameResults = await StackListArguments(printValues, threadId, frameLevel, frameLevel);

            Debug.Assert(frameResults.Length == 1);

            return frameResults[0].Find<ListValue>("args");
        }
Esempio n. 13
0
        /// <summary>
        /// Get Stack arguments for mulitples frames
        /// </summary>
        /// <param name="printValues"></param>
        /// <param name="threadId"></param>
        /// <param name="lowFrameLevel"></param>
        /// <param name="hiFrameLevel"></param>
        /// <returns>This returns an array of results of frames, which contains a level and an args array. </returns>
        public virtual async Task<TupleValue[]> StackListArguments(PrintValues printValues, int threadId, uint lowFrameLevel, uint hiFrameLevel)
        {
            string cmd = string.Format(@"-stack-list-arguments {0} {1} {2}", (int)printValues, lowFrameLevel, hiFrameLevel);

            Results argumentsResults = await ThreadCmdAsync(cmd, ResultClass.done, threadId);
            return argumentsResults.Find<ListValue>("stack-args").IsEmpty()
                ? new TupleValue[0]
                : argumentsResults.Find<ResultListValue>("stack-args").FindAll<TupleValue>("frame");
        }
Esempio n. 14
0
        /// <summary>
        /// Get locals for the give frame
        /// </summary>
        /// <param name="printValues">0 for no values, 1 for all values, 2 for simple values</param>
        /// <param name="threadId"></param>
        /// <param name="frameLevel"></param>
        /// <returns></returns>
        public async Task<ResultValue> StackListLocals(PrintValues printValues, int threadId, uint frameLevel)
        {
            string cmd = string.Format(@"-stack-list-locals {0}", (int)printValues);

            Results localsResults = await ThreadFrameCmdAsync(cmd, ResultClass.done, threadId, frameLevel);
            return localsResults.Find("locals");
        }
Esempio n. 15
0
 static void PrintAllValues(PrintValues print, int number)
 {
     print(500);
     Console.WriteLine("I am the value of delegate");
 }
Esempio n. 16
0
 public override Task <TupleValue[]> StackListArguments(PrintValues printValues, int threadId, uint lowFrameLevel, uint hiFrameLevel)
 {
     // TODO: for clrdbg, we should get this from the original stack walk instead
     return(Task <TupleValue[]> .FromResult(new TupleValue[0]));
 }