Esempio n. 1
0
 public List<string> GetParticipants(Current current)
 {
     lock (this)
     {
         return this.ListenerPrxs.Keys.Select(key => key).ToList();
     }
 }
Esempio n. 2
0
 public override void NotifyPost_async(AMD_Listener_NotifyPost cb, Post newPost, Current current)
 {
     lock (this)
     {
         this._jobQueue.Add(cb, newPost, this._output);
     }
 }
Esempio n. 3
0
 dispatch__(IceInternal.Incoming inc, Current current)
 {
     try
     {
         DispatchStatus status = dispatch(inc);
         if(status != DispatchStatus.DispatchAsync)
         {
             //
             // Make sure 'inc' owns the connection etc.
             //
             inc.killAsync();
         }
         return status;
     }
     catch(ResponseSentException)
     {
         return DispatchStatus.DispatchAsync;
     }
     catch(System.Exception)
     {
         try
         {
             inc.killAsync();
             throw;
         }
         catch(ResponseSentException)
         {
             return DispatchStatus.DispatchAsync;
         }
     }
 }
        public override MessageDto Send(MessageDto messageDto, Current current)
        {
            var message = MessageMapper.Map(messageDto);
            var response = messageReceiver.Send(message);

            return MessageMapper.Map(response).As<MessageDto>();
        }
 /// <summary>
 /// Method getUserHint
 /// </summary>
 /// <returns>A string</returns>
 /// <param name="boxModuleIceIdentity">A  string</param>
 /// <param name="__current">An Ice.Current</param>
 public override string getUserHint(string boxModuleIceIdentity, Current __current)
 {
     BoxModule box = modulesManager.getBoxModuleByIdentity(boxModuleIceIdentity);
     if(box!=null)
     {
         return box.UserHint;
     }
     throw new BoxModuleNotExistError();
 }
 /// <summary>
 /// Method getProjectIdentifier
 /// </summary>
 /// <returns>A string</returns>
 /// <param name="boxModuleIceIdentity">A  string</param>
 /// <param name="__current">An Ice.Current</param>
 public override int getProjectIdentifier(string boxModuleIceIdentity, Current __current)
 {
     BoxModule box = modulesManager.getBoxModuleByIdentity(boxModuleIceIdentity);
     if(box!=null)
     {
         return box.ProjectIdentifier;
     }
     throw new BoxModuleNotExistError();
 }
 /// <summary>
 /// Method unlockBoxModule
 /// </summary>
 /// <param name="boxModuleIceIdentity">A string</param>
 /// <param name="__current">An Ice.Current</param>
 public override void unlockBoxModule(String boxModuleIceIdentity, Current __current)
 {
     BoxModule box = modulesManager.getBoxModuleByIdentity(boxModuleIceIdentity);
     if(box!=null)
     {
         box.Unlock();
     }
     else throw new BoxModuleNotExistError();
 }
Esempio n. 8
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize() {
            paused = false;
            // TODO: Add your initialization logic here
            rnd = new Random();
            current = new Current();
            reset();


            base.Initialize();
        }
Esempio n. 9
0
        public void Kick(string nick, Current current)
        {
            lock (this)
            {
                string topic = current.ctx[SESSIONCTXPROP.value];

                if (this.ListenerPrxs.ContainsKey(nick))
                    RoomFactory.Instance.LeaveRoom(nick, topic);
                else
                    throw new IChatException(string.Concat("Member not exist in room: ", nick));
            }
        }
Esempio n. 10
0
        public static void Main()
        {
            Current c1 = new Current();
            Saving s1 = new Saving();

            c1.accept();
            s1.accept();

            Console.WriteLine(c1);
            Console.WriteLine(s1);
               Console.ReadLine();
        }
Esempio n. 11
0
        public static void Main()
        {
            Current c1 = new Current();
            Saving s1 = new Saving();

            c1.accept();
            s1.accept();

            c1.display();
            s1.display();
               // Console.ReadLine();
        }
Esempio n. 12
0
        public override void LeaveRoom(Current current)
        {
            lock (this)
            {
                string author = current.ctx[AUTHORCTXPROP.value];
                string topic = current.ctx[SESSIONCTXPROP.value];

                if (!this.ListenerPrxs.ContainsKey(author))
                    throw new IllegalChatSessionException("Your session is expired or deleted", author);

                RoomFactory.Instance.LeaveRoom(author, topic);
            }
        }
Esempio n. 13
0
        public override void Say(string message, Current current)
        {
            lock (this)
            {
                string author = current.ctx[AUTHORCTXPROP.value];

                if (!this.ListenerPrxs.ContainsKey(author))
                    throw new IllegalChatSessionException("You are not a member", current.ctx[SESSIONCTXPROP.value]);

                Post post = new Post(current.ctx[AUTHORCTXPROP.value], message, 0);

                foreach (string key in this.ListenerPrxs.Keys)
                {
                    IListenerCallback listenerCallback = new ListenerCallback();
                    this.ListenerPrxs[key].begin_NotifyPost(post).whenCompleted(listenerCallback.SayCallback,
                                                                     listenerCallback.FailureCallback);
                }
            }
        }
 /// <summary>
 /// Method writeMsg
 /// </summary>
 /// <param name="type">A  Ferda.ModulesManager.MsgType</param>
 /// <param name="name">A  string</param>
 /// <param name="message">A  string</param>
 /// <param name="__current">An Ice.Current</param>
 public override void writeMsg(MsgType type, String name, String message, Current __current)
 {
     switch(type)
     {
         case MsgType.Error:
             MessageBox.Show(
                 message,
                 name,
                 MessageBoxButtons.OK,
                 MessageBoxIcon.Error);
             break;
         case MsgType.Warning:
             MessageBox.Show(
                 message,
                 name,
                 MessageBoxButtons.OK,
                 MessageBoxIcon.Warning);
             break;
         case MsgType.Debug:
             MessageBox.Show(
                 message,
                 name,
                 MessageBoxButtons.OK,
                 MessageBoxIcon.None);
             break;
         case MsgType.Info:
             MessageBox.Show(
                 message,
                 name,
                 MessageBoxButtons.OK,
                 MessageBoxIcon.Information);
             break;
         default:
             MessageBox.Show(
                 message,
                 name,
                 MessageBoxButtons.OK,
                 MessageBoxIcon.None);
             break;
     }
 }
Esempio n. 15
0
        static void Main()
        {
            Person frodo = new Person("Frodo", "Frodev", 33);
            Trainer gandalfcho = new Trainer("Gandalf", "Vutsov", 1056);
            JuniourTrainer merry = new JuniourTrainer("Merriadok", "Kuzmich", 27);
            SeniorTrainer pippin = new SeniorTrainer("Peregrin", "Tukinsen", 26);
            Graduate sam = new Graduate("Samwise", "Smoke-a-lot", 29, "8020", 4.50d);
            Dropout boromir = new Dropout("Boromir", "Penev", 45, "2786", 3.55d, "Slain by orcs.");
            Current barzohodcho = new Current("Aragorn", "NaAratornMalkiq-CeliqtImJinsTakuvHamav", 230, "0007", 5.70d, "OOP");
            Online legolascho = new Online("Legolas", "Papadopoulus", 1050, "1230", 5.50d, "Стрелба с лък от кон на челна стойка");
            Onsite gimbaldun = new Onsite("Gimly", "Gloinski", 404, "1459", 5.25d, "OOP Axethrowing Exceptions", 7);

            gandalfcho.CreateCourse("OOP");
            merry.CreateCourse("Обездка на пони for dummies");
            pippin.CreateCourse("Fencing");

            List<Person> persons = new List<Person>()
            {
                frodo,
                gandalfcho,
                merry,
                pippin,
                sam,
                boromir,
                barzohodcho,
                legolascho,
                gimbaldun
            };

            var currentStudents = persons
                .Where(person => person is Current)
                .OrderBy(person => ((Student)person).AverageGrade);

            foreach (var currentStudent in currentStudents)
            {
                Console.WriteLine(currentStudent);
            }

            pippin.DeleteCourse("Fencing");
        }
 /// <summary>
 /// Method writeMsg writes message to console
 /// </summary>
 /// <param name="type">A Ferda.ModulesManager.MsgType saying type of message</param>
 /// <param name="name">Name of message</param>
 /// <param name="message">Text of message</param>
 /// <param name="__current">An Ice.Current</param>
 public override void writeMsg(MsgType type, String name, String message, Current __current)
 {
     string msg = name + ": " + message;
     switch(type)
     {
         case MsgType.Error:
             Console.Error.WriteLine("Error: "+msg);
             break;
         case MsgType.Warning:
             Console.Error.WriteLine("Warning: "+msg);
             break;
         case MsgType.Debug:
             Console.WriteLine("Debug: "+msg);
             break;
         case MsgType.Info:
             Console.WriteLine("Info: "+msg);
             break;
         default:
             Console.WriteLine(msg);
             break;
     }
 }
Esempio n. 17
0
 public static MessageBoxResult Show(string msg, string tip, MessageBoxButton msgButton) =>
 Current.Show(msg, tip, msgButton);
Esempio n. 18
0
 public override System.Threading.Tasks.Task<Ice.OutputStream> dispatch__(IceInternal.Incoming inc, Current current)
 {
     return dispatch(inc);
 }
 public override GeneratingStruct getGenerationInfo(Current __current)
 {
     return this.generationInfoValue;
 }
Esempio n. 20
0
        GetChunkSize(IReadChunkBytes Source, out int chunkSize)
        {
            int BytesRead;
            int Size;
            int Current;

            GlobalLog.Enter("GetChunkSize");
            Size = 0;

            //
            // Loop while we have data. If we run out of data and exit the loop
            // at the bottom, then we've run out of data and haven't found the
            // length.

            Current   = Source.NextByte;
            BytesRead = 0;

            if (Current == 10 || Current == 13)
            {
                GlobalLog.Print(" Got Char: " + Current.ToString());
                BytesRead++;
                Current = Source.NextByte;
            }

            while (Current != -1)
            {
                // Get the next byte, and decode it.

                if (Current >= '0' && Current <= '9')
                {
                    // Normalize it to 0 based.

                    Current -= '0';
                }
                else
                {
                    // If we're here, this might be a hex digit.
                    // If it is, normalize it to 10 based.

                    if (Current >= 'a' && Current <= 'f')
                    {
                        Current -= 'a';
                    }
                    else
                    {
                        if (Current >= 'A' && Current <= 'F')
                        {
                            Current -= 'A';
                        }
                        else
                        {
                            // Done with the decoding. If we haven't actually
                            // decoded a digit yet, we'll end up returning
                            // 0, which will signal the error.


                            // Push back the byte we read and didn't use.

                            Source.NextByte = Current;

                            chunkSize = Size;

                            // Return how many bytes we took.

                            GlobalLog.Print("*Size* = " + Size.ToString());
                            GlobalLog.Leave("GetChunkSize", BytesRead);
                            return(BytesRead);
                        }
                    }

                    // If we get here we've had an A-F digit, add 10
                    // to it to normalize it.

                    Current += 10;
                }

                // Update the size and our state.

                Size *= 16;
                Size += Current;

                BytesRead++;
                Current = Source.NextByte;
            }

            chunkSize = Size;
            GlobalLog.Print("*Size* = " + Size.ToString());
            GlobalLog.Leave("GetChunkSize", -1);
            return(-1);
        }
 public void peerDisconnected(string peerId, Current current)
 {
     Trace.TraceError("DefaultTerkUserServantHelper.peerDisconnected()");
     //terkCommunicator.getPeerConnectionEventDistributorHelper().publishPeerDisconnectedEvent(peerId);
 }
Esempio n. 22
0
 /// <summary>
 /// 清理当前回话数据
 /// </summary>
 public static void Dispose()
 {
     Current.Dispose();
 }
Esempio n. 23
0
 /// <summary>
 /// 根据给定的语言键值,显示语言字符串;
 /// </summary>
 /// <param name="languageKey"></param>
 public static void ShowLanguageString(string languageKey) => Current?.Show(LanguageService.FindResourceString(languageKey));
Esempio n. 24
0
 public System.ReadOnlyMemory <byte> ReceiveBytes(int size, Current current)
 {
     Debug.Assert(size <= _bytes.Length);
     return(new System.ReadOnlyMemory <byte>(_bytes, 0, size));
 }
Esempio n. 25
0
 public void Shutdown(Current current) => current.Adapter.Communicator.ShutdownAsync();
Esempio n. 26
0
 /// <summary>
 /// To call when the .xml file has changed and you want to reload it
 /// </summary>
 public static void Import()
 {
     _listOfEnv.Clear();
     _currentEnv = null;
     Current.ReComputeProPath();
 }
Esempio n. 27
0
 public void SendBytes(byte[] seq, Current current)
 {
 }
Esempio n. 28
0
        private async Task ArgumentHandler(string[] args)
        {
            Arguments = string.Join(" ", args);
            while (args.Length > 0)
            {
                switch (args[0])
                {
                case "--install":
                    if (args.Length < 2 || string.IsNullOrEmpty(args[1]))
                    {
                        Utils.SendNotify(string.Format((string)Current.FindResource("App:InvalidArgument"), "--install"));
                    }
                    else
                    {
                        await OneClickInstaller.InstallAsset(args[1]);
                    }

                    if (CloseWindowOnFinish)
                    {
                        await Task.Delay(5 * 1000);

                        Current.Shutdown();
                    }

                    Update = false;
                    GUI    = false;
                    args   = Shift(args, 2);
                    break;

                case "--no-update":
                    Update = false;
                    args   = Shift(args);
                    break;

                case "--language":
                    if (args.Length < 2 || string.IsNullOrEmpty(args[1]))
                    {
                        Utils.SendNotify(string.Format((string)Current.FindResource("App:InvalidArgument"), "--language"));
                    }
                    else
                    {
                        if (Languages.LoadLanguage(args[1]))
                        {
                            ModAssistant.Properties.Settings.Default.LanguageCode = args[1];
                            ModAssistant.Properties.Settings.Default.Save();
                            Languages.UpdateUI(args[1]);
                        }
                    }

                    args = Shift(args, 2);
                    break;

                case "--register":
                    if (args.Length < 3 || string.IsNullOrEmpty(args[1]))
                    {
                        Utils.SendNotify(string.Format((string)Current.FindResource("App:InvalidArgument"), "--register"));
                    }
                    else
                    {
                        OneClickInstaller.Register(args[1], true, args[2]);
                    }

                    Update = false;
                    GUI    = false;
                    args   = Shift(args, 3);
                    break;

                case "--unregister":
                    if (args.Length < 2 || string.IsNullOrEmpty(args[1]))
                    {
                        Utils.SendNotify(string.Format((string)Current.FindResource("App:InvalidArgument"), "--unregister"));
                    }
                    else
                    {
                        OneClickInstaller.Unregister(args[1], true);
                    }

                    Update = false;
                    GUI    = false;
                    args   = Shift(args, 2);
                    break;

                case "--runforever":
                    while (true)
                    {
                    }

                default:
                    Utils.SendNotify((string)Current.FindResource("App:UnrecognizedArgument"));
                    args = Shift(args);
                    break;
                }
            }
        }
Esempio n. 29
0
 /// <summary>
 /// Open an actual handle to the current thread rather than the pseudo one used for Current
 /// </summary>
 /// <returns>The thread object</returns>
 public static NtThread OpenCurrent()
 {
     return new NtThread(Current.DuplicateHandle());
 }
Esempio n. 30
0
        public bool IsInRole(string role)
        {
            Roles r;

            return(Enum.TryParse(role, out r) && Current.IsInRole(r));
        }
Esempio n. 31
0
 public static void ShowError(string error) => Current.ShowError(error);
 public override ProgressBarPrx startProgress(ProgressTaskPrx task, string name, string hint, Current current__)
 {
     return null;
 }
Esempio n. 33
0
        /*
         * Make the passed in play the active play. (note that the internal code calls
         * this the 'current' play because 'active' overlaps with an existing Unity
         * field.
         */
        private void AssignCurrentPlay(JSONNode play, bool waitingIfEmpty = false)
        {
            // remove any existing play
            if (current != null) {

                if (onPlayCompleted != null) onPlayCompleted(this, current.play);

                current = null;
            }

            if (play == null) {
                // nothing to play now

                if (waitingIfEmpty) {
                    // status = 'waiting'
                    // nothing to play... waiting

                } else {
                    // status = 'idle'

                    exhausted = true;

                    if (onPlaysExhausted != null) onPlaysExhausted(this);

                }

            } else {
                current = new Current {
                    play = play,
                    canSkip = false,
                    started = false,
                    retryCount = 0
                };

                // status = active

                if (onPlayActive != null) onPlayActive(this, current.play);
            }
        }
Esempio n. 34
0
File: Node.cs Progetto: faboo/faux
        public static Node FromPath(Current project, string path)
        {
            if(project.FileInPath(path)) {
                if(Directory.Exists(path)) {
                    return new Folder {
                        Name = Path.GetFileName(path),
                        Project = project,
                    };
                }
                else {
                    return new File {
                        Name = Path.GetFileName(path),
                        RealPath = project.GetFileSubPath(path),
                        Project = project,
                    };
                }
            }
            else {
                if(Directory.Exists(path)) {
                    var folder = new ExternalFolder {
                        Name = Path.GetFileName(path),
                        RealPath = path,
                        Project = project,
                    };

                    folder.Update();

                    return folder;
                }
                else {
                    return new ExternalFile {
                        Name = Path.GetFileName(path),
                        RealPath = path,
                        Project = project,
                    };
                }
            }
        }
Esempio n. 35
0
File: BI.cs Progetto: nail-lian/ice
 public string callB(Current current) => "B";
Esempio n. 36
0
 public static MessageBoxResult Show(string msg, MessageBoxButton msgBtn) =>
 Current?.Show(msg, msgBtn) ?? MessageBoxResult.OK;
Esempio n. 37
0
File: Node.cs Progetto: faboo/faux
 public virtual void SetProject(Current project)
 {
     Project = project;
 }
Esempio n. 38
0
File: BI.cs Progetto: nail-lian/ice
 public string callA(Current current) => "A";
Esempio n. 39
0
 public static void SetItem <T>(string name, T value)
 {
     Current.SetItem(name, value);
 }
Esempio n. 40
0
 public Tile First()
 {
     return(Current.First());
 }
Esempio n. 41
0
 public void Remove(Tile tile)
 {
     Current.Remove(tile);
     History.Add(tile);
 }
Esempio n. 42
0
 public void Reset()
 {
     Current?.Clear();
     History?.Clear();
 }
 public void peerConnectedNoProxy(string peerId, PeerAccessLevel peerAccessLevel, Current current)
 {
     Trace.TraceError("DefaultTerkUserServantHelper.peerConnectedNoProxy()");
     //terkCommunicator.getPeerConnectionEventDistributorHelper().publishPeerConnectedNoProxyEvent(peerId, peerAccessLevel);
 }
        public Current GetCurrentObservation()
        {
            var results = Helper.GetJsonData<CurrentRoot>(new Uri(_conditionsUrl));

            var myCurrent = new Current{
                FeelsLikeTempatureC = double.Parse(results.current_observation.feelslike_c),
                FeelsLikeTempatureF = double.Parse(results.current_observation.feelslike_f),
                Precipitation1Hr = double.Parse(results.current_observation.precip_1hr_in),
                PrecipitationToday = double.Parse(results.current_observation.precip_today_in),
                RelativeHumidity = double.Parse(results.current_observation.relative_humidity.Replace("%", "")),
                TempatureC = results.current_observation.temp_c,
                TempatureF = results.current_observation.temp_f,
                VisibilityMiles = double.Parse(results.current_observation.visibility_mi),
                WeatherConditions = results.current_observation.weather,
                WindConditions = results.current_observation.wind_string,
                WindDegrees = results.current_observation.wind_degrees,
                WindDirection = results.current_observation.wind_dir,
                WindGustMph = double.Parse(results.current_observation.wind_gust_mph),
                WindMph = results.current_observation.wind_mph
            };

            return myCurrent;
        }
 public override CategoriesStruct getCategories(Current __current)
 {
     return this.categoriesValue;
 }
Esempio n. 46
0
 public override string GetRoomName(Current current)
 {
     return this.Topic;
 }
Esempio n. 47
0
 public ValueTask ShutdownAsync(Current current, CancellationToken cancel)
 {
     current.Communicator.ShutdownAsync();
     return(default);
Esempio n. 48
0
 public static MessageBoxResult Show(string msg) => Current.Show(msg);
Esempio n. 49
0
 private void Open(string file)
 {
     System.IO.Directory.SetCurrentDirectory(System.IO.Path.GetDirectoryName(file));
     Project = new Current(file, shouldSave);
     Settings.Current.LastProject = file;
     macros.Project = Project;
     //Commands.Clear();
     //Commands.Add(Settings.Current.Commands);
     //Commands.Add(Project.Commands);
 }
 public override HypothesisStruct[] getHypothesesValue(Current __current)
 {
     return this.hypothesesValue;
 }
Esempio n. 51
0
 /// <summary>
 /// Create a new Current object.
 /// </summary>
 /// <param name="dateOfBusiness">Initial value of the DateOfBusiness property.</param>
 public static Current CreateCurrent(global::System.DateTime dateOfBusiness)
 {
     Current current = new Current();
     current.DateOfBusiness = dateOfBusiness;
     return current;
 }
Esempio n. 52
0
        /// <summary> Filters the current stream. </summary>
        private static void CmdFilter(string[] args)
        {
            var sw = Stopwatch.StartNew();

            if (args.Length == 0)
            {
                Console.WriteLine("Usage: filter <expression>");
                Console.WriteLine("Filters the current stream according to expressions. Examples:");
                Console.WriteLine("  filter Type == 'abc' ");
                Console.WriteLine("  filter Date < '2015-05-07' ");
                Console.WriteLine("  filter Error");
                return;
            }

            Func <uint, JObject, bool> condition;

            if (args.Length == 1)
            {
                var name = args[0];
                condition = (s, j) =>
                {
                    var p = j[name];
                    if (p == null)
                    {
                        return(false);
                    }
                    var jv = p as JValue;
                    if (jv == null)
                    {
                        return(true);
                    }
                    if (jv.Type == JTokenType.Boolean)
                    {
                        return((bool)jv.Value);
                    }
                    if (jv.Type == JTokenType.String)
                    {
                        return(!string.IsNullOrEmpty((string)jv.Value));
                    }
                    if (jv.Type == JTokenType.Integer)
                    {
                        return(0 != (int)jv.Value);
                    }
                    if (jv.Type == JTokenType.Float)
                    {
                        return(Math.Abs((double)jv.Value) > 0.001);
                    }
                    if (jv.Type == JTokenType.Null)
                    {
                        return(false);
                    }
                    return(true);
                };
            }
            else if (args.Length == 3)
            {
                var data = Expression.Parameter(typeof(JObject));
                var seq  = Expression.Parameter(typeof(uint));

                var left    = ParseOperand(args[0], seq, data);
                var op      = args[1];
                var right   = ParseOperand(args[2], seq, data);
                var compare = Expression.Call(typeof(Program), nameof(CompareJValue), new Type[0], left, right);

                Expression result;

                switch (op)
                {
                case "==":
                    result = Expression.Equal(compare, Expression.Constant(0));
                    break;

                case "<":
                    result = Expression.LessThan(compare, Expression.Constant(0));
                    break;

                case "<=":
                    result = Expression.LessThanOrEqual(compare, Expression.Constant(0));
                    break;

                case ">":
                    result = Expression.GreaterThan(compare, Expression.Constant(0));
                    break;

                case ">=":
                    result = Expression.GreaterThanOrEqual(compare, Expression.Constant(0));
                    break;

                case "!=":
                    result = Expression.NotEqual(compare, Expression.Constant(0));
                    break;

                default:
                    Console.WriteLine("Unknown comparison: {0}", op);
                    return;
                }

                var lambda = Expression.Lambda <Func <uint, JObject, bool> >(result, seq, data);
                condition = lambda.Compile();
            }
            else
            {
                Console.WriteLine("Could not parse expression.");
                return;
            }

            var list = Current.Where(s => condition(s.Sequence, s.Event)).ToArray();

            if (list.Length == 0)
            {
                Console.WriteLine("No events match the condition. Filter not applied.");
                return;
            }

            Console.WriteLine("Kept {0}/{1} events in {2:F2} s.",
                              list.Length, Current.Count, sw.ElapsedMilliseconds / 1000.0);

            Current = list;
            Peek(Current);
        }
 public void forcedLogoutNotification(Current current)
 {
     Trace.TraceError("DefaultTerkUserServantHelper.forcedLogoutNotification()");
 }
Esempio n. 54
0
 private static void OnExit(object sender, ExitEventArgs e)
 {
     Config.Save();
     Current.Shutdown(0);
 }
Esempio n. 55
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Current EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToCurrent(Current current)
 {
     base.AddObject("Current", current);
 }
Esempio n. 56
0
 public static bool ContainsItem(string name)
 {
     return(Current.ContainsItem(name));
 }
 void UpdateVariables()
 {
     current = Session["Current"] as Current;
 }
Esempio n. 58
0
 public static object GetItem(string name)
 {
     return(Current.GetItem(name));
 }
 /// <summary>
 ///     Initialise a truck object
 /// </summary>
 public Truck()
 {
     ConstantsValues = new Constants();
     CurrentValues   = new Current();
     Positioning     = new PositionData();
 }
Esempio n. 60
0
 /// <summary>
 /// 初始化回话
 /// </summary>
 public static void Initialize()
 {
     Current.Initialize();
 }