コード例 #1
0
 public void UpdateTerminal(Terminals terminal, int userId, int tenantId)
 {
     terminal.DateUpdated = DateTime.UtcNow;
     terminal.UpdatedBy   = userId;
     _currentDbContext.Entry(terminal).State = EntityState.Modified;
     _currentDbContext.SaveChanges();
 }
コード例 #2
0
    void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag == StringManager.Tags.player)
        {
            if (SingletonManager.MainTerminalController.GetTerminalState(TerminalType.MAIN_TERMINAL) == TerminalState.Unlocked)
            {
                TerminalInformation tInformation = SingletonManager.MainTerminalController.GetTerminalInformation((int)TerminalType.TERMINAL_GENERATOR);
                if (tInformation.isActivated == true)
                {
                    return;
                }

                // todo open door to generator room
                m_Door.GetComponent <DoorBehaviour>().ChangeDoorState(DoorBehaviour.DoorState.OPENING_STUCKED);

                // INFO: terminal-three
                TerminalInformation information = new TerminalInformation();
                information.isActivated = true;
                information.isCollected = false;
                SingletonManager.MainTerminalController.SetTerminalInformation((int)TerminalType.TERMINAL_THREE, information);

                // INFO: terminal-generator
                information.isActivated = true;
                information.isCollected = false;
                SingletonManager.MainTerminalController.SetTerminalInformation((int)TerminalType.TERMINAL_GENERATOR, information);

                // update display for terminal three
                Terminals terminal     = SingletonManager.MainTerminalController.GetTerminalByType(TerminalType.TERMINAL_GENERATOR);
                Transform displayState = terminal.m_terminal.transform.FindChild("display_2states");
                displayState.GetComponent <Renderer>().material.SetTextureOffset("_MainTex", new Vector2(0.0f, 0.0f));

                SingletonManager.XmlSave.Save();
            }
        }
    }
コード例 #3
0
 public static SharedFavorite ConvertFromFavorite(Terminals.FavoriteConfigurationElement Favorite)
 {
     SharedFavorite fav = new SharedFavorite();
     fav.Colors = Favorite.Colors;
     fav.ConnectToConsole = Favorite.ConnectToConsole;
     fav.DesktopShare = Favorite.DesktopShare;
     fav.DesktopSize = Favorite.DesktopSize;
     fav.DomainName = Favorite.DomainName;
     fav.Name = Favorite.Name;
     fav.Port = Favorite.Port;
     fav.Protocol = Favorite.Protocol;
     fav.RedirectClipboard = Favorite.RedirectClipboard;
     fav.RedirectDevices = Favorite.RedirectDevices;
     fav.RedirectedDrives = Favorite.RedirectedDrives;
     fav.RedirectPorts = Favorite.RedirectPorts;
     fav.RedirectPrinters = Favorite.RedirectPrinters;
     fav.RedirectSmartCards = Favorite.RedirectSmartCards;
     fav.ServerName = Favorite.ServerName;
     fav.DisableWallPaper = Favorite.DisableWallPaper;
     fav.Sounds = Favorite.Sounds;
     fav.Tags = Favorite.Tags;
     fav.ConsoleBackColor = Favorite.ConsoleBackColor;
     fav.ConsoleCols = Favorite.ConsoleCols;
     fav.ConsoleCursorColor = Favorite.ConsoleCursorColor;
     fav.ConsoleFont = Favorite.ConsoleFont;
     fav.ConsoleRows = Favorite.ConsoleRows;
     fav.ConsoleTextColor = Favorite.ConsoleTextColor;
     fav.VMRCAdministratorMode = Favorite.VMRCAdministratorMode;
     fav.VMRCReducedColorsMode = Favorite.VMRCReducedColorsMode;
     return fav;
 }
コード例 #4
0
ファイル: XmlGrammar.cs プロジェクト: hamish-milne/Lexico
        public XmlGrammar()
            : base("xml")
        {
            EnableMatchEvents = false;
            var comment = new GroupParser("<!--", "-->");
            var ws      = Terminals.Repeat(Char.IsWhiteSpace, 1);
            var ows     = Terminals.Repeat(Char.IsWhiteSpace, 0);
            var wsc     = -(ws | comment);

            var name      = Terminals.Repeat(new RepeatCharItem(Char.IsLetter, 1, 1), new RepeatCharItem(Char.IsLetterOrDigit, 0));
            var namedName = Terminals.Repeat(new RepeatCharItem(Char.IsLetter, 1, 1), new RepeatCharItem(Char.IsLetterOrDigit, 0)).WithName("name");

            var text           = new UntilParser("<", 1).WithName("text");
            var attributeValue = new StringParser {
                QuoteCharacters = new [] { '"' }, Name = "value"
            };
            var attribute  = (namedName & ows & "=" & ows & attributeValue);
            var attributes = (ws & (+attribute).SeparatedBy(ws).WithName("attributes")).Optional();

            var content = new RepeatParser {
                Separator = wsc
            };

            var startTag = "<" & namedName & attributes & ows;
            var endTag   = "</" & name & ">";
            var obj      = (startTag & ("/>" | (">" & wsc & content & wsc & endTag))).WithName("object");
            var cdata    = ("<![CDATA[" & new UntilParser("]]>", 0, skip: true)).WithName("cdata");

            content.Inner = obj | text | cdata;

            var declaration = "<?" & name & attributes & ows & "?>";

            Inner = declaration & wsc & obj & wsc;
        }
コード例 #5
0
        public void Simple()
        {
            var input = "  hello ( parsing world )  ";

            // optional repeating whitespace
            var ws = Terminals.WhiteSpace.Repeat(0);

            // parse a value with or without brackets
            var valueParser = Terminals.Set('(')
                              .Then(Terminals.Set(')').Inverse().Repeat().Until(ws.Then(')')).Named("value"))
                              .Then(Terminals.Set(')'))
                              .SeparatedBy(ws)
                              .Or(Terminals.WhiteSpace.Inverse().Repeat().Named("value"));

            // our grammar
            var grammar = new Grammar(
                ws
                .Then(valueParser.Named("first"))
                .Then(valueParser.Named("second"))
                .Then(Terminals.End)
                .SeparatedBy(ws)
                );

            var match = grammar.Match(input);

            Assert.True(match.Success, match.ErrorMessage);
            Assert.Equal("hello", match["first"]["value"].Text);
            Assert.Equal("parsing world", match["second"]["value"].Text);
        }
コード例 #6
0
        public ActionResult Edit([Bind(Include = "TerminalId,TerminalName,TermainlSerial,WarehouseId,IsActive")] Terminals terminals)
        {
            // get properties of tenant
            caTenant tenant = caCurrent.CurrentTenant();

            // get properties of user
            caUser user = caCurrent.CurrentUser();

            // get current warehouse
            TenantLocations Warehouse = caCurrent.CurrentWarehouse();

            if (ModelState.IsValid)
            {
                Terminals newTerminal = _terminalServices.GetTerminalById(terminals.TerminalId);

                newTerminal.TerminalName   = terminals.TerminalName;
                newTerminal.TermainlSerial = terminals.TermainlSerial;
                newTerminal.WarehouseId    = terminals.WarehouseId;
                newTerminal.IsActive       = terminals.IsActive;

                _terminalServices.UpdateTerminal(newTerminal, user.UserId, tenant.TenantId);
                return(RedirectToAction("Index"));
            }
            ViewBag.WarehouseId = new SelectList(_tenantLocationServices.GetTenantLocationListById(Warehouse.WarehouseId, tenant.TenantId), "WarehouseId", "WarehouseName", terminals.WarehouseId);
            return(View(terminals));
        }
コード例 #7
0
        // GET: Terminals/Edit/5
        public ActionResult Edit(int?id)
        {
            if (!caSession.AuthoriseSession())
            {
                return(Redirect((string)Session["ErrorUrl"]));
            }

            // get properties of tenant
            caTenant tenant = caCurrent.CurrentTenant();

            // get current warehouse
            TenantLocations Warehouse = caCurrent.CurrentWarehouse();

            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Terminals terminals = _terminalServices.GetTerminalById((int)id);

            if (terminals == null)
            {
                return(HttpNotFound());
            }

            ViewBag.WarehouseId = new SelectList(_tenantLocationServices.GetTenantLocationListById(Warehouse.WarehouseId, tenant.TenantId), "WarehouseId", "WarehouseName", terminals.WarehouseId);
            return(View(terminals));
        }
コード例 #8
0
        void Update_Terminals()
        {
            Terminals.Clear();
            List <BOL.Terminal.objTerminal> List = DAL.Terminal.Terminal_Repository.GetActiveTerminals();

            List.ForEach(x => Terminals.Add(x));
        }
コード例 #9
0
ファイル: SimpleMaths.cs プロジェクト: teo-tsirpanis/Farkle
        static SimpleMaths()
        {
            var number = Terminals.Double("Number");

            var expression = Nonterminal.Create <double>("Expression");

            expression.SetProductions(
                number.AsIs(),
                expression.Extended().Append("+").Extend(expression).Finish((x1, x2) => x1 + x2),
                expression.Extended().Append("-").Extend(expression).Finish((x1, x2) => x1 - x2),
                expression.Extended().Append("*").Extend(expression).Finish((x1, x2) => x1 * x2),
                expression.Extended().Append("/").Extend(expression).Finish((x1, x2) => x1 / x2),
                "-".Appended().Extend(expression).WithPrecedence(out var NEG).Finish(x => - x),
                expression.Extended().Append("^").Extend(expression).Finish(Math.Pow),
                "(".Appended().Extend(expression).Append(")").AsIs());

            var opScope = new OperatorScope(
                new LeftAssociative("+", "-"),
                new LeftAssociative("*", "/"),
                new PrecedenceOnly(NEG),
                new RightAssociative("^"));

            Designtime = expression.WithOperatorScope(opScope);
            Runtime    = Designtime.Build();
        }
コード例 #10
0
        public IHttpActionResult VerifyAcknowlegement(Guid id, int count, string serialNo)
        {
            serialNo = serialNo.Trim().ToLower();

            Terminals terminal = TerminalServices.GetTerminalBySerial(serialNo);

            if (terminal == null)
            {
                return(Unauthorized());
            }

            TerminalsLog log = TerminalServices.GetTerminalLogByLogId(id);

            if (log == null)
            {
                return(BadRequest());
            }

            log.Ack           = true;
            log.RecievedCount = count;

            TerminalServices.UpdateTerminalLog(log);

            if (log.SentCount != count)
            {
                return(BadRequest());
            }

            return(Ok("Success"));
        }
コード例 #11
0
        public override void ChangeDesktopSize(Terminals.DesktopSize Size)
        {
            int height = Favorite.DesktopSizeHeight, width = Favorite.DesktopSizeWidth;
            ConnectionManager.GetSize(ref height, ref width, this, Favorite.DesktopSize);

            try
            {

                if(Size == DesktopSize.AutoScale)
                {
                    axMsRdpClient2.AdvancedSettings3.SmartSizing = true;
                    axMsRdpClient2.DesktopWidth = width;
                    axMsRdpClient2.DesktopHeight = height;
                    return;
                }
                if(Size == DesktopSize.FullScreen)
                {
                    axMsRdpClient2.FullScreen = true;
                    axMsRdpClient2.DesktopWidth = width;
                    axMsRdpClient2.DesktopHeight = height;
                    return;
                }
                axMsRdpClient2.DesktopWidth = width;
                axMsRdpClient2.DesktopHeight = height;

            }
            catch(Exception exc)
            {
                string f = "";
            }
        }
コード例 #12
0
ファイル: Terminal.cs プロジェクト: LarcekGiglamesh/Dark-Moon
    void UpdateTerminalScreen(TerminalType type)
    {
        Terminals terminal     = SingletonManager.MainTerminalController.GetTerminalByType(type);
        Transform displayState = terminal.m_terminal.transform.FindChild("display_2states");

        displayState.GetComponent <Renderer>().material.SetTextureOffset("_MainTex", new Vector2(0.5f, 0.0f));
    }
コード例 #13
0
 public void AddFinalSymble()
 {
     if (Terminals.Select(x => x.Value).All(y => y != "$"))
     {
         Terminals.Add("$".ToTerminal());
     }
 }
コード例 #14
0
ファイル: Grammar.cs プロジェクト: Pacman29/CompilerCourse
 protected bool Equals(Grammar other)
 {
     return(Terminals.SequenceEqual(other.Terminals) &&
            NonTerminals.SequenceEqual(other.NonTerminals) &&
            string.Equals(Start, other.Start) &&
            Rules.SequenceEqual(other.Rules));
 }
コード例 #15
0
ファイル: TableGenerator.cs プロジェクト: CCTUnifor/Compiler
        public int GetIndexTerminal(Token f)
        {
            if (f is EmptyToken)
            {
                return(-1);
            }

            var i = Terminals.ToList().IndexOf(f.ToTerminalToken());

            if (i >= 0)
            {
                return(i);
            }

            if (f.IsIdentifier())
            {
                return(GetIndexTerminal("ide".ToTerminal()));
            }
            if (f.IsNumber())
            {
                return(GetIndexTerminal("num".ToTerminal()));
            }

            return(-1);
        }
コード例 #16
0
        /// <summary>
        /// Interprets the given words into a logical model.
        /// We follow a fixed y = x format according the requirements.
        /// </summary>
        private static AssignmentExpression InterpretAssignmentExpression(Terminals data, IProcessingData context)
        {
            string targetWord = data.Current;

            data.MoveNext();
            // A -> b_REF
            if (data.IsEndReached)
            {
                return(InterpretAsDirectBooleanAssignment(targetWord, context));
            }
            string assignmentSymbol = data.Current;

            data.MoveNext();
            if (!AssignmentSymbol.Contains(assignmentSymbol) || data.IsEndReached)
            {
                return(null);
            }
            // A -> b_REF O B
            if (context.OutputRegisters.ContainsBoolean(targetWord))
            {
                BooleanExpression sourceExpression = St.Boolean.Interpreter.InterpretBooleanExpression(data, context);
                return(new Boolean(targetWord, sourceExpression, context));
            }
            // A -> n_REF O N
            else if (context.OutputRegisters.ContainsInteger(targetWord))
            {
                string numerical = data.Current;
                NumericalExpression sourceExpression = St.Numerical.Interpreter.AsNumericalExpression(numerical, context);
                return(new Numerical(targetWord, sourceExpression, context));
            }
            return(null); // not valid
        }
コード例 #17
0
        RuleSet Chomskey5_Terminals(RuleSet rs, List<char> newVars) {
            var newRs = new RuleSet();
            var translate = new Dictionary<char, char>();

            foreach (var r in rs) {
                var newVals = new List<string>(r.Value.Length);
                foreach (string ibody in r.Value) {
                    string newBody = ibody;
                    if (ibody.Length == 2) {

                        var c2Replaces = new List<char>();
                        if (Terminals.Contains(newBody[0]))
                            c2Replaces.Add(newBody[0]);
                        if (Terminals.Contains(newBody[1]))
                            c2Replaces.Add(newBody[1]);

                        foreach (var c2Replace in c2Replaces) {
                            if (translate.TryGetValue(c2Replace, out char nl)) { } else {
                                nl = Utils.NextFreeCapitalLetter(newVars.Union(Terminals).ToArray(), c2Replace.ToString().ToUpper()[0]);
                                newVars.Add(nl);
                                translate.Add(c2Replace, nl);
                            }
                            newBody = newBody.Replace(c2Replace, nl);
                        }
                    } //end if body.Length = 2
                    newVals.Add(newBody);
                } //next body
                newRs.Add(r.Key, newVals.ToArray());
            } //next r

            foreach (var la in translate)
                newRs.Add(la.Value, new string[] { la.Key.ToString() });

            return newRs;
        } //end function
コード例 #18
0
        public IHttpActionResult PostTerminalGeoLocation(TerminalGeoLocationViewModel geoLocation)
        {
            string serialNo = geoLocation.SerialNo.Trim().ToLower();

            Terminals terminal = TerminalServices.GetTerminalBySerial(serialNo);

            if (terminal == null)
            {
                return(Unauthorized());
            }
            else
            {
                geoLocation.TerminalId = terminal.TerminalId;
                geoLocation.TenantId   = terminal.TenantId;
            }

            int res = TerminalServices.SaveTerminalGeoLocation(geoLocation);

            if (res > 0)
            {
                return(Ok("Success"));
            }
            else
            {
                return(BadRequest("Unable to save records"));
            }
        }
コード例 #19
0
        public void Initialize(MarkdownGrammar grammar)
        {
            var inner = grammar.Encoding.Replacements();

            Add("**" & Terms.ows & +((inner | Terminals.Set("*\n\r").Inverse())) & "**");
            Add("__" & Terms.ows & +((inner | Terminals.Set("_\n\r").Inverse())) & "__");
        }
コード例 #20
0
ファイル: Program.cs プロジェクト: Samitova/FlightPanel
        /// <summary>
        /// Recieve all information from user about flight for adding or editing
        /// </summary>
        /// <returns>flight</returns>
        private static Flight AskForFlight()
        {
            string       temp = string.Empty, flightNumber;
            Terminals    terminal = Terminals.A;
            Airlines     airline = Airlines.Airunes;
            DateTime     departDate = DateTime.Now, arrivDate = DateTime.Now;
            Cities       arrival = Cities.Berlin, departure = Cities.Berlin;
            Gates        gate   = Gates.G1;
            FlightStatus status = FlightStatus.Unknown;

            Console.WriteLine("Enter the flight number");
            flightNumber = Console.ReadLine().Trim();

            CheckEnum(out airline, "airline");

            CheckDate(out departDate, "departure");

            CheckDate(out arrivDate, "arrival");

            CheckEnum(out departure, "departure port");

            CheckEnum(out arrival, "arrival port");

            CheckEnum(out terminal, "terminal");

            CheckEnum(out gate, "gate");

            CheckEnum(out status, "flight status");

            return(new Flight(airline, flightNumber, departDate, arrivDate, departure, arrival, terminal, gate, status));
        }
コード例 #21
0
ファイル: Program.cs プロジェクト: Samitova/FlightPanel
        /// <summary>
        /// Get new terminal
        /// </summary>
        /// <returns>Terminal</returns>
        private static Terminals GetNewTerminal()
        {
            Terminals terminal = Terminals.A;

            CheckEnum(out terminal, "terminal");
            return(terminal);
        }
コード例 #22
0
        private static Grammar MakeParser()
        {
            // Literals
            var ws    = Terminals.WhiteSpace.Repeat(0);
            var comma = ws.Then(Terminals.Set(','), ws);
            var subExpressionAccess = ws.Then(Terminals.Set('.'), ws);
            var number = new NumberParser
            {
                AllowDecimal  = true,
                AllowExponent = true,
                AllowSign     = true,
                ValueType     = typeof(float)
            };

            var identifier = Terminals.Letter.Or(Terminals.Set(_identifierAllowedCharacters))
                             .Then(Terminals.LetterOrDigit.Or(Terminals.Set(_identifierAllowedCharacters)).Repeat(0));

            // Expressions
            var expression    = new UnaryParser();
            var subExpression = expression.Named(ElementAST.SubExpressionRoot)
                                .Then(subExpressionAccess, identifier.Named(ElementAST.SubExpressionName));
            var arguments = expression.Named(ElementAST.CallArgument).Repeat(0).SeparatedBy(comma);
            var call      = expression.Named(ElementAST.Callee)
                            .Then(ws, Terminals.Set('('), ws, arguments.Named(ElementAST.CallArguments), ws,
                                  Terminals.Set(')'));

            expression.Inner = new AlternativeParser(
                number.Named(ElementAST.NumberExpression),
                identifier.Named(ElementAST.VariableExpression),
                subExpression.Named(ElementAST.SubExpression),
                call.Named(ElementAST.CallExpression)
                );

            // Functions
            var portType = ws.Then(Terminals.Literal(":"), ws, identifier.Named(ElementAST.PortType)).Optional();
            var port     = identifier.Named(ElementAST.PortName).Then(portType).Named(ElementAST.Port);
            var ports    = port.Repeat(0).SeparatedBy(comma);
            var fnInputs = Terminals.Set('(')
                           .Then(ws, ports.Named(ElementAST.FunctionInputs), ws, Terminals.Set(')')).Optional();
            var fnOutputs   = Terminals.Literal("->").Then(ws, ports.Named(ElementAST.FunctionOutputs)).Or(portType);
            var fnSignature = identifier.Named(ElementAST.FunctionName).Then(ws, fnInputs, ws, fnOutputs, ws);

            // Statements
            var statement = new UnaryParser();
            var body      = Terminals.Set('{').Then(ws, statement.Then(ws).Repeat(0).Named(ElementAST.FunctionBody), ws,
                                                    Terminals.Set('}'));
            var assign = Terminals.Set('=').Then(ws, expression.Named(ElementAST.AssignmentStatement), ws,
                                                 Terminals.Set(';'));

            statement.Inner = fnSignature
                              .Then(body.Or(assign).Or(Terminals.Set(';').Named(ElementAST.TypeStatement)))
                              .Named(ElementAST.Statement);

            var start = ws.Then(statement, ws).Repeat(0);

            start.Until = Terminals.End;

            return(new Grammar(start));
        }
コード例 #23
0
        /// <summary>
        /// Registers a terminal with a depot.
        /// </summary>
        /// <param name="depot"></param>
        /// <returns>A unique id for the terminal</returns>
        public string CreateTerminal(IDepot depot)
        {
            var terminal = new TerminalMetadata(depot);

            Terminals.Add(terminal);

            return(terminal.Id);
        }
コード例 #24
0
ファイル: Axon.cs プロジェクト: yilmazdurmaz/NeuralNetwork
 public AxonGene GetGenes()
 {
     return(new AxonGene
     {
         ActivationFunction = ActivationFunction.GetType(),
         Weights = Terminals.Select(d => d.Weight).ToList()
     });
 }
コード例 #25
0
ファイル: Grammar.cs プロジェクト: martindevans/Hermes
        public Lexer CreateLexer(string input)
        {
            var terminals = Terminals.ToList();

            terminals.AddRange(whitespace);

            return(new Lexer(input, terminals));
        }
コード例 #26
0
ファイル: TerminalFileModel.cs プロジェクト: grintaux/Files
 public void AddTerminal(Terminal terminal)
 {
     //Ensure terminal is not already in List
     if (Terminals.FirstOrDefault(x => x.Name.Equals(terminal.Name, StringComparison.OrdinalIgnoreCase)) == null)
     {
         Terminals.Add(terminal);
     }
 }
コード例 #27
0
        public void Initialize(MarkdownGrammar grammar)
        {
            var prefix = Terms.sp.Repeat(0, 3);
            var value  = Terminals.Set("\n\r").Inverse().Repeat(1).WithName("value");
            var suffix = Terminals.Eol & ((+Terminals.Literal("=")).Named("h1") | (+Terminals.Literal("-")).Named("h2")) & Terms.ows & Terminals.Eol;

            this.Add(prefix, value, suffix, -Terms.blankLine);
        }
コード例 #28
0
ファイル: CodeEncoding.cs プロジェクト: rajeshwarn/Creek
        public void Initialize(MarkdownGrammar grammar)
        {
            var parens = +(Terminals.Set("\\").Not() & Terminals.Literal("`"));

            Add(new BalancedParser {
                Surrounding = parens
            } /*, (parens & new RepeatParser().Until(Terminals.Literal("`"), true) & parens)*/);
        }
コード例 #29
0
        public BnfGrammar(bool enhanced = true)
            : base("bnf")
        {
            if (enhanced)
            {
#if CORECLR
                foreach (var property in typeof(Terminals).GetTypeInfo().DeclaredProperties)
#else
                foreach (var property in typeof(Terminals).GetProperties())
#endif
                {
#if CORECLR
                    if (typeof(Parser).GetTypeInfo().IsAssignableFrom(property.PropertyType.GetTypeInfo()))
#else
                    if (typeof(Parser).IsAssignableFrom(property.PropertyType))
#endif
                    {
                        var parser = property.GetValue(null, null) as Parser;
                        baseLookup[property.Name] = parser.Named(property.Name);
                    }
                }
            }

            var lineEnd = sws & +(sws & Terminals.Eol);

            literal = (
                (sq & (+!sq).WithName("value").Optional() & sq)
                | (dq & (+!dq).WithName("value").Optional() & dq)
                ).WithName("parser");


            RuleNameParser = "<" & Terminals.Set('>').Inverse().Repeat().WithName("name") & ">";

            RuleParser = new AlternativeParser();             // defined later

            TermParser      = literal | (ruleName = RuleNameParser.Named("parser"));
            TermParser.Name = "term";
            if (enhanced)
            {
                TermParser.Items.Add('(' & sws & RuleParser & sws & ')');
                TermParser.Items.Add(repeatRule   = ('{' & sws & RuleParser & sws & '}').WithName("parser"));
                TermParser.Items.Add(optionalRule = ('[' & sws & RuleParser & sws & ']').WithName("parser"));
            }

            list = (TermParser & -(~((+Terminals.SingleLineWhiteSpace).WithName("ws")) & TermParser)).WithName("parser");

            listRepeat = (list.Named("list") & ws & '|' & sws & ~(RuleParser.Named("expression"))).WithName("parser");
            RuleParser.Items.Add(listRepeat);
            RuleParser.Items.Add(list);

            rule         = (~lineEnd & sws & RuleNameParser.Named("ruleName") & ws & ruleSeparator & sws & RuleParser & lineEnd).WithName("parser");
            Expresssions = new AlternativeParser();
            Expresssions.Items.Add(rule);

            this.Inner = ws & +Expresssions & ws;

            AttachEvents();
        }
コード例 #30
0
 public TermReportGroup(string alias, TermReportGroupType groupType, IEnumerable <Terminal> terminals)
 {
     Alias     = alias;
     GroupType = groupType;
     if (terminals != null)
     {
         Terminals.UnionWith(terminals);
     }
 }
コード例 #31
0
        public void RemoveTerminal(string connectionId)
        {
            var x = Terminals.SingleOrDefault(i => i.ConnectionId == connectionId);

            if (x != null)
            {
                Terminals.Remove(x);
            }
        }
コード例 #32
0
        public override void GetReferences(Dictionary <ModelCode, List <long> > references, TypeOfReference refType)
        {
            if (Terminals != null && Terminals.Count > 0 && (refType == TypeOfReference.Target || refType == TypeOfReference.Both))
            {
                references[ModelCode.CONDUCTEQUIP_TERMINALS] = Terminals.GetRange(0, Terminals.Count);
            }

            base.GetReferences(references, refType);
        }
コード例 #33
0
 public override void ChangeDesktopSize(Terminals.DesktopSize Size)
 {
 }
コード例 #34
0
 public abstract void ChangeDesktopSize(Terminals.DesktopSize Size);
コード例 #35
0
 public void OpenConnectionInNewWindow(Terminals.Connections.IConnection Connection)
 {
     if(Connection != null) {
         PopupTerminal pop = new PopupTerminal();
         Terminals.Connections.IConnection conn = CurrentConnection;
         tcTerminals.Items.SuspendEvents();
         tcTerminals.RemoveTab(CurrentConnection.TerminalTabPage);
         pop.AddTerminal(conn.TerminalTabPage);
         pop.MainForm = this;
         //pop.Controls.Add(conn.TerminalTabPage);
         //pop.WindowState = FormWindowState.Maximized;
         //pop.FormBorderStyle = FormBorderStyle.None;
         tcTerminals.Items.ResumeEvents();
         pop.Show();
         //conn.TerminalTabPage.Focus();
     }
 }
コード例 #36
0
 public void ChangeDesktopSize(Terminals.DesktopSize Size)
 {
 }