예제 #1
0
                public static void PARSE(string pLine)
                {
                    if (pLine == null)
                    {
                        return;
                    }

                    ENVITM itm = new ENVITM();

                    ++indx_;

                    if (!pLine.StartsWith("//"))
                    {
                        string[] arr_ = ToolString.breakList(pLine);

                        itm.key = (arr_.Length > 0 ? arr_[0] : string.Empty).Trim();
                        itm.val = (arr_.Length > 1 ? arr_[1] : string.Empty);
                    }
                    else
                    {
                        itm.key       = "dummy_" + indx_;
                        itm.val       = pLine;
                        itm.isComment = true;
                    }

                    if (itm.key != string.Empty)
                    {
                        envKeys_[itm.key] = itm;
                    }
                }
예제 #2
0
                internal bool tryOpen()
                {
                    try
                    {
                        if (mmSocket == null)
                        {
                            mmSocket = new TcpClient();
                        }

                        if (mmSocket != null && !mmSocket.Connected)
                        {
                            string addr_ = CurrentVersion.ENV.getPrinter();

                            string[] arr_ = ToolString.breakList(':', addr_);

                            mmSocket.Connect(arr_[0], int.Parse(arr_[1]));

                            return(writeLine(" ", false));
                        }
                    }
                    catch (Exception exc)
                    {
                    }
                    return(false);
                }