Inheritance: MonoBehaviour
Esempio n. 1
0
 private void button1_Click_1(object sender, EventArgs e)
 {
     COMINFO.com1 = textBox1.Text;
     COMINFO.com2 = textBox2.Text;
     Start s = new Start();
     s.run();
 }
        public void TestBolsterAllies()
        {
            Start game = new Start();
            game.beginGame();
            Legacy legacy = new Legacy();

            List<int> firstList = new List<int>();
            foreach (Hero hero in GameEngine.getHeroes())
            {
                firstList.Add(hero.hand.Count());
            }

            Card bolster = new Card("Images\\Hero\\Legacy\\BolsterAllies.png");
            legacy.BolsterAllies(bolster);

            List<int> secondList = new List<int>();
            foreach (Hero hero in GameEngine.getHeroes())
            {
                secondList.Add(hero.hand.Count());
            }

            for(int i = 0; i < secondList.Count(); i++)
            {
                Assert.AreEqual(secondList[i], firstList[i] + 1);
            }
        }
Esempio n. 3
0
    public override void OutStart(Start node)
    {
        base.OutStart(node);

        dotLines[dotLines.Count - 1] = dotLines[dotLines.Count - 1].Replace('|', ' ');
        for (int i = dotLines.Count - 2; i >= 0; i--)
            for (int j = 0; j < dotLines[i].Length; j++)
                if (dotLines[i][j] == '|')
                {
                    if (j >= dotLines[i + 1].Length || dotLines[i + 1][j] == ' ')
                        dotReplace(i, j, ' ');
                }

        ConsoleColor color = Console.ForegroundColor;
        Console.ForegroundColor = treecolor;

        Console.CursorTop -= dotLines.Count;
        for (int i = 0; i < dotLines.Count; i++)
        {
            Console.Write(dotLines[i]);
            Console.CursorTop++;
            Console.CursorLeft = 0;
        }

        Console.ForegroundColor = color;
    }
Esempio n. 4
0
        public async void Initialize()
        {
            var client = new Client();
            var venue = new Venue();
            var start = new Start();

            if (RetrieveSettings("onTheWay") != "yes")
            {
                AppointmentStore store = await AppointmentManager.RequestStoreAsync(AppointmentStoreAccessType.AllCalendarsReadOnly);

                FindAppointmentsOptions options = new FindAppointmentsOptions();
                options.MaxCount = 100;
                options.FetchProperties.Add(AppointmentProperties.Subject);
                options.FetchProperties.Add(AppointmentProperties.Location);
                options.FetchProperties.Add(AppointmentProperties.AllDay);
                options.FetchProperties.Add(AppointmentProperties.StartTime);
                options.FetchProperties.Add(AppointmentProperties.Duration);
                IReadOnlyList<Appointment> appointments = await store.FindAppointmentsAsync(DateTime.Now, TimeSpan.FromHours(2), options);

                if (appointments.Count > 0)
                {
                    var i = 0;

                    while((appointments[i].AllDay) && (i < appointments.Count))
                        i++;
                    if (!appointments[i].AllDay)
                    {
                        SaveSettings("clientName", appointments[i].Subject);
                        SaveSettings("venueName", appointments[i].Location);
                        SaveSettings("startTime", appointments[i].StartTime.ToString());
                        SaveSettings("localID", appointments[i].LocalId);
                    }
                    else
                    {
                        SaveSettings("clientName", "Client");
                        SaveSettings("venueName", "Venue");
                        SaveSettings("startTime", DateTime.Now.ToString());
                        SaveSettings("localID", null);
                    }
                }
                else
                {
                    SaveSettings("clientName", "Client");
                    SaveSettings("venueName", "Venue");
                    SaveSettings("startTime", DateTime.Now.ToString());
                    SaveSettings("localID", null);
                }
            }

            client.ClientName = RetrieveSettings("clientName");
            clientNameTextBox.DataContext = client;

            venue.VenueName = RetrieveSettings("venueName");
            venueNameTextBox.DataContext = venue;

            start.StartTime = DateTime.Parse(RetrieveSettings("startTime"));
            //startDatePicker.DataContext = new DateTimeOffset();

        }
Esempio n. 5
0
 void start()
 {
     while (true)
     {
         Start s = new Start("10000");
         while (s.working == true) ;
     }
 }
		private static void Handle_Start (
					Shell Dispatch, string[] args, int index) {
			Start		Options = new Start ();

			var Registry = new Goedel.Registry.Registry ();

			Options.Address.Register ("address", Registry, (int) TagType_Start.Address);
			Options.PortalStore.Register ("log", Registry, (int) TagType_Start.PortalStore);
			Options.Verify.Register ("verify", Registry, (int) TagType_Start.Verify);

			// looking for parameter Param.Name}
			if (index < args.Length && !IsFlag (args [index][0] )) {
				// Have got the parameter, call the parameter value method
				Options.Address.Parameter (args [index]);
				index++;
				}

#pragma warning disable 162
			for (int i = index; i< args.Length; i++) {
				if 	(!IsFlag (args [i][0] )) {
					throw new System.Exception ("Unexpected parameter: " + args[i]);}			
				string Rest = args [i].Substring (1);

				TagType_Start TagType = (TagType_Start) Registry.Find (Rest);

				// here have the cases for what to do with it.

				switch (TagType) {
					case TagType_Start.PortalStore : {
						int OptionParams = Options.PortalStore.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.PortalStore.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_Start.Verify : {
						int OptionParams = Options.Verify.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.Verify.Parameter (args[i]);
								}
							}
						break;
						}
					default : throw new System.Exception ("Internal error");
					}
				}

#pragma warning restore 162
			Dispatch.Start (Options);

			}
Esempio n. 7
0
        private void ChooseNumber(Start _)
        {
            mySecretNumber = generator.Next(1, 101);

            Console.WriteLine("Chooser: Pssst -- I have something to guess: {0}", mySecretNumber);

            // indicate we are ready to wait for tries
            Context.Parent.Tell(new Started());
        }
        public void TestDangerSense()
        {
            Start testGame = new Start();
            testGame.beginGame();
            Legacy testLegacy = new Legacy();

            Card testDanger = new Card("Images\\Hero\\Legacy\\DangerSense.png");
            testLegacy.DangerSense(testDanger);
            Assert.True(testLegacy.immuneToEnvironment);
        }
Esempio n. 9
0
        public void ItShouldHandleStart()
        {
            var sampleGuid = Guid.NewGuid();
            var sampleCommand = new Start { Id = sampleGuid };
            var expectedEvent = new Started { Id = sampleGuid };

            sut.Publish(sampleCommand);

            publishedEvent.ShouldBeEquivalentTo(expectedEvent);
        }
 public void TestInitialization()
 {
     //GameEngine testEngine = new GameEngine();
     Start test = new Start();
     test.beginGame();
     bool pass =(GameEngine.getPlayers() != null)
              && (GameEngine.getHeroes() != null) && (GameEngine.getVillain() != null) &&
                 (GameEngine.getEnvironment() != null);
     Assert.True(pass);
 }
        public void TestBackFistStrike()
        {
            Start testGame = new Start();
            testGame.beginGame();
            Legacy testLegacy = new Legacy();

            Card testStrike = new Card("Images\\Hero\\Legacy\\BackFistStrike.png");
            testLegacy.BackFistStrike(testStrike);
            Assert.AreEqual(GameEngine.getVillain().lifeTotal, 35); //change to 36 when done individually, 35 with all are executed, change when static problem fixed...
        }
        public void TestBattalion()
        {
            Start game = new Start();
            game.beginGame();
            BaronBlade test = new BaronBlade();
            Card battleCard = new Card("Images\\Villain\\BaronBlade\\BladeBattalion.png");
            test.BladeBattalion(battleCard);

            Assert.AreEqual(GameEngine.getVillain().getMinions()[0].ToString(), (new BladeBattalion()).ToString());
        }
        public void TestPlatform()
        {
            Start game = new Start();
            game.beginGame();
            BaronBlade test = new BaronBlade();
            Card platCard = new Card("Images\\Villain\\BaronBlade\\MobileDefencePlatform.png");
            test.MobileDefencePlatform(platCard);

            Assert.AreEqual(GameEngine.getVillain().getMinions()[0].ToString(), (new MobileDefensePlatform()).ToString());
        }
        public void TestFleshRepairNanites()
        {
            Start game = new Start();
            game.beginGame();

            BaronBlade test = new BaronBlade();
            Card nanoCard = new Card("Images\\Villain\\BaronBlade\\FleshRepairNanites.png");
            test.FleshRepairNanites(nanoCard);

            Assert.AreEqual(GameEngine.getVillain().lifeTotal, 50);
        }
Esempio n. 15
0
        public void ItShouldHandleStart()
        {
            var sampleGuid = Guid.NewGuid();
            var sampleCommand = new Start { Id = sampleGuid };
            var expectedEvent = new Started { Id = sampleGuid };

            sut.Publish(sampleCommand);

            var publishedEvent = publishedEvents.Single(@event => @event.GetType() == typeof(Started));
            publishedEvent.Should().BeOfType<Started>();
            publishedEvent.ShouldBeEquivalentTo(expectedEvent);
        }
        public void testTRex()
        {
            Start testGame = new Start();
            testGame.beginGame();
            InsulaPrimus testEnvo = new InsulaPrimus();
            Card testRex = new Card("Images\\Environment\\InsulaPrimus\\2-EnragedTRex.png");
            Assert.NotNull(testRex);
            testEnvo.EnragedTRex(testRex);
            testEnvo.addMinion(new EnragedTRex());

            Assert.AreEqual(GameEngine.getEnvironment().getMinions().ToString(), testEnvo.getMinions().ToString());
        }
        public void TestHastenDoom()
        {
            Start game = new Start();
            game.beginGame();
            BaronBlade test = new BaronBlade();
            Card hastenCard = new Card("Images\\Villain\\BaronBlade\\HastenDoom.png");
            test.HastenDoom(hastenCard);

            for(int i=0; i < GameEngine.getHeroes().Count; i++){
            Assert.AreEqual(GameEngine.getHeroes()[i].lifeTotal, 32);
            }
        }
        public void testPtero()
        {
            Start testGame = new Start();
            testGame.beginGame();
            InsulaPrimus testEnvo = new InsulaPrimus();
            Card testPtero = new Card("Images\\Environment\\InsulaPrimus\\2-PterodactylThief.png");
            Assert.NotNull(testPtero);
            testEnvo.PterodactylThief(testPtero);
            testEnvo.addMinion(new PterodactylThief());

            Assert.AreEqual(GameEngine.getEnvironment().getMinions().ToString(), testEnvo.getMinions().ToString());
        }
        public void testObsidian()
        {
            Start testGame = new Start();
            testGame.beginGame();
            InsulaPrimus testEnvo = new InsulaPrimus();
            Card testObsidian = new Card("Images\\Environment\\InsulaPrimus\\3-ObsidianField.png");

            testEnvo.ObsidianField(testObsidian);

            Assert.True(GameEngine.obsidianInPlay);
            //fix this test
            Assert.True(false);
             //Assert.AreEqual(DamageEffects.GlobalDamageAmplification, 1);
        }
        public void TestElbowSmash()
        {
            Start game = new Start();
            game.beginGame();
            Haka haka = (Haka)ObjectMother.TestHero();
            BaronBlade baron = (BaronBlade)ObjectMother.TestVillain();
            GameEnvironment env = (GameEnvironment)ObjectMother.TestEnvironment();

            Minion min1 = ObjectMother.TestMinion();
            GameEngine.getVillain().addMinion(min1);

            Minion min2 = ObjectMother.TestMinion();
            GameEngine.getEnvironment().addMinion(min2);

            Card elbowSmash = new Card("Images\\Hero\\Haka\\ElbowSmash.png");
        }
        public void TestDominion()
        {
            GameEngine.TearDownGameEngine();
            Start game = new Start();

            game.beginGame();

            Haka haka= (Haka)GameEngine.getHeroes().Find(x => x.GetType() == typeof(Haka));
            Card envCard = new Card("Images\\Environment\\InsulaPrimus\\2-PterodactylThief.png");
            envCard.cardType = Card.CardType.Environment;
            GameEngine.getEnvironment().cardsOnField.Add(envCard);

            Card dominion = new Card("Images\\Hero\\Haka\\3-Dominion.png");
            haka.Dominion(dominion);

            GameEngine.getEnvironment().cardsOnField.Find(x=> x.cardType== Card.CardType.Environment).SendToGraveyard(GameEngine.getEnvironment(), GameEngine.getEnvironment().cardsOnField);
        }
 public void TestMobileDefenseExecute()
 {
     Start game = new Start();
     game.beginGame();
     Minion minionTest = new PoweredRemoteTurret();
     GameEngine.getVillain().addMinion(minionTest);
     List<Minion> minions = GameEngine.getVillain().getEndPhaseMinions();
     for (int i = 0; i < minions.Count; i++)
     {
         minions[i].executeEffect();
     }
     for (int i = 0; i < GameEngine.getHeroes().Count; i++)
     {
         //Assert.AreEqual(GameEngine.getHeroes()[i].lifeTotal, 32);
         //fix static for test methods
         Assert.True(true);
     }
 }
Esempio n. 23
0
        public void DoIt()
        {
            bus.Subscribe<Started>("foo", started =>
            {
                Console.WriteLine("Started received: {0}", started.Id);
                bus.Publish(new Stop { Id = started.Id });
            });

            bus.Subscribe<Stopped>("foo", stopped =>
            {
                Console.WriteLine("Stopped received: {0}", stopped.Id);
            });

            Console.WriteLine("press key to send message");
            Console.ReadKey();

            var start = new Start { Id = Guid.NewGuid() };
            bus.Publish(start);
        }
    public void AnalyzeDrivePlaysList(List<Plays> DrivePlays, Start StartDrive, End EndDrive)
    {
        List<double> expectedPointsList = new List<double>();
        List<double> epChangeList = new List<double>();

        foreach (Plays play in DrivePlays)
        {//get rid of 0 kickoff, can have 0 but will fix later
            if (play.MarkovExpPts != 0) {
                expectedPointsList.Add(play.MarkovExpPts);
            }
        }

        for (int i = 0; i < expectedPointsList.Count; ++i) {
            if (i != 0)
            {
                //vauleNow - ValueLast
                double epChange = (expectedPointsList[i]) - (expectedPointsList[i - 1]);
                epChangeList.Add(epChange);
            }
        }
    }
Esempio n. 25
0
        // To run, it is necessary to first set permissions (as root)
        // netsh http add urlacl url=http://+:80/.well-known user=VOODOO\Phillip

        // netsh http add urlacl url="http://prismproof.org:80/.well-known/MeshService/" user=VOODOO\Phillip

        /// <summary>
        /// Start the mesh server
        /// </summary>
        /// <param name="Options"></param>
        public override void Start(Start Options) {

            // Create the provider object.
            var MeshServiceProvider = new PublicMeshServiceProvider(Options.Address.Value, 
                Options.MeshStore.Value, Options.PortalStore.Value);


            // Create the server, add the provider, create service port.
            var Server = new JPCServer();
            var HostReg = Server.Add(MeshServiceProvider);

            // Create the interface dispatcher for the provider.
            var Interface = new PublicMeshService(MeshServiceProvider, null);
            var InterfaceReg = HostReg.Add (Interface);

            // Register the network port.
            InterfaceReg.AddService(Options.Address.Value);

            // Run until abort
            Server.RunBlocking();
            }
        public void TestEnduringIntercession()
        {
            GameEngine.TearDownGameEngine();
            Start game = new Start();
            game.beginGame();

            Haka haka = (Haka)GameEngine.getHeroes().Find(x => x.GetType() == typeof(Haka));
            Legacy legacy= (Legacy)GameEngine.getHeroes().Find(x => x.GetType() == typeof(Legacy));
            InsulaPrimus env = (InsulaPrimus)GameEngine.getEnvironment();
            Card enduringIntercessionCard = new Card("Images\\Hero\\Haka\\3-EnduringIntercession.png");

            haka.EnduringIntercession(enduringIntercessionCard);

            DamageEffects.DealDamage(env, new List<Targetable>(){legacy, haka},4, DamageEffects.DamageType.Melee);
            Assert.AreEqual(legacy.maxHealth, legacy.lifeTotal);
            Assert.AreEqual(haka.maxHealth - 8, haka.lifeTotal); //haka takes his own and legacy's damage

            //test that damage wasn't absorbed for damage not from environment
            var hakaTotal = haka.lifeTotal;
            DamageEffects.DealDamage(legacy, new List<Targetable>() { legacy, haka }, 4, DamageEffects.DamageType.Melee);
            Assert.AreEqual(legacy.maxHealth -4, legacy.lifeTotal); //legacy did take 4 damage
            Assert.AreEqual(hakaTotal - 4, haka.lifeTotal); //haka takes ONLY his own damage
        }
Esempio n. 27
0
        public override IEnumerable <JToken> ExecuteFilter(JToken root, IEnumerable <JToken> current, bool errorWhenNoMatch)
        {
            if (Step == 0)
            {
                throw new JsonException("Step cannot be zero.");
            }

            foreach (JToken t in current)
            {
                JArray a = t as JArray;
                if (a != null)
                {
                    // set defaults for null arguments
                    int stepCount  = Step ?? 1;
                    int startIndex = Start ?? ((stepCount > 0) ? 0 : a.Count - 1);
                    int stopIndex  = End ?? ((stepCount > 0) ? a.Count : -1);

                    // start from the end of the list if start is negative
                    if (Start < 0)
                    {
                        startIndex = a.Count + startIndex;
                    }

                    // end from the start of the list if stop is negative
                    if (End < 0)
                    {
                        stopIndex = a.Count + stopIndex;
                    }

                    // ensure indexes keep within collection bounds
                    startIndex = Math.Max(startIndex, (stepCount > 0) ? 0 : int.MinValue);
                    startIndex = Math.Min(startIndex, (stepCount > 0) ? a.Count : a.Count - 1);
                    stopIndex  = Math.Max(stopIndex, -1);
                    stopIndex  = Math.Min(stopIndex, a.Count);

                    bool positiveStep = (stepCount > 0);

                    if (IsValid(startIndex, stopIndex, positiveStep))
                    {
                        for (int i = startIndex; IsValid(i, stopIndex, positiveStep); i += stepCount)
                        {
                            yield return(a[i]);
                        }
                    }
                    else
                    {
                        if (errorWhenNoMatch)
                        {
                            throw new JsonException("Array slice of {0} to {1} returned no results.".FormatWith(CultureInfo.InvariantCulture,
                                                                                                                Start != null ? Start.GetValueOrDefault().ToString(CultureInfo.InvariantCulture) : "*",
                                                                                                                End != null ? End.GetValueOrDefault().ToString(CultureInfo.InvariantCulture) : "*"));
                        }
                    }
                }
                else
                {
                    if (errorWhenNoMatch)
                    {
                        throw new JsonException("Array slice is not valid on {0}.".FormatWith(CultureInfo.InvariantCulture, t.GetType().Name));
                    }
                }
            }
        }
Esempio n. 28
0
 /// <summary>
 /// Check if two <see cref="SasIPRange"/> instances are equal.
 /// </summary>
 /// <param name="other">The instance to compare to.</param>
 /// <returns>True if they're equal, false otherwise.</returns>
 public bool Equals(SasIPRange other) =>
 ((IsEmpty(Start) && IsEmpty(other.Start)) ||
  (Start != null && Start.Equals(other.Start))) &&
 ((IsEmpty(End) && IsEmpty(other.End)) ||
  (End != null && End.Equals(other.End)));
Esempio n. 29
0
 /// <summary>
 /// Creates a string representation of an <see cref="SasIPRange"/>.
 /// </summary>
 /// <returns>
 /// A string representation of an <see cref="SasIPRange"/>.
 /// </returns>
 public override string ToString() =>
 IsEmpty(Start) ? string.Empty :
 IsEmpty(End) ? Start.ToString() :
 Start.ToString() + "-" + End.ToString();
Esempio n. 30
0
 public override int GetHashCode() =>
 (Start?.GetHashCode() ?? 0) ^ (End?.GetHashCode() ?? 0);
		private static void Usage () {

				Console.WriteLine ("MatheMatical Mesh Server");
				Console.WriteLine ("");

				{
#pragma warning disable 219
					Start		Dummy = new Start ();
#pragma warning restore 219

					Console.Write ("{0}start ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Address.Usage (null, "address", UsageFlag));
					Console.Write ("[{0}] ", Dummy.MeshStore.Usage ("mesh", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.PortalStore.Usage ("mesh", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verify.Usage ("verify", "value", UsageFlag));
					Console.WriteLine ();

				}

				{
#pragma warning disable 219
					About		Dummy = new About ();
#pragma warning restore 219

					Console.Write ("{0}about ", UsageFlag);
					Console.WriteLine ();

					Console.WriteLine ("    Report version and build date");

				}

			} // Usage 
Esempio n. 32
0
 public override int GetHashCode()
 {
     return(Start.GetHashCode() ^ End.GetHashCode());
 }
Esempio n. 33
0
 public DateTimeRange Subtract(TimeSpan timeSpan)
 {
     return(new DateTimeRange(Start.SafeSubtract(timeSpan), End.SafeSubtract(timeSpan)));
 }
Esempio n. 34
0
        private void Mainform_Load(object sender, EventArgs e)
        {
            Start s = new Start();

            pnl_form.Controls.Add(s);
        }
Esempio n. 35
0
 public override string ToString()
 {
     return(Start.Date == End.Date
         ? $"{Start.DateOnly()} {Start.TimeOfDay:%h\\:mm} - {End.TimeOfDay:%h\\:mm}"
         : $"{Start.DateAndTime()} - {(IsFinished ? End.DateAndTime() : "now")}");
 }
Esempio n. 36
0
 public string ToString(bool datesOnly)
 {
     return(Start.Date == End.Date
         ? $"{Start.DateOnly()}"
         : $"{Start.DateOnly()} - {(IsFinished ? End.DateOnly() : "now")}");
 }
Esempio n. 37
0
 public IntPtr GetOffset(IntPtr ptr)
 {
     return((IntPtr)(ptr.ToInt64() - Start.ToInt64()));
 }
Esempio n. 38
0
 public bool Fits(IntPtr ptr)
 {
     return((Start.ToInt64() <= ptr.ToInt64()) &&
            ptr.ToInt64() <= End.ToInt64());
 }
Esempio n. 39
0
        // <CreateEventSnippet>
        private async void CreateEvent(object sender, EventArgs e)
        {
            IsWorking = true;

            var timeZoneString =
                Xamarin.Forms.Device.RuntimePlatform == Xamarin.Forms.Device.UWP ?
                App.UserTimeZone.StandardName : App.UserTimeZone.DisplayName;

            // Initialize a new Event object with the required fields
            var newEvent = new Event
            {
                Subject = Subject,
                Start   = new DateTimeTimeZone
                {
                    DateTime = Start.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss"),
                    TimeZone = timeZoneString
                },
                End = new DateTimeTimeZone
                {
                    DateTime = End.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss"),
                    TimeZone = timeZoneString
                }
            };

            // If there's a body, add it
            if (!string.IsNullOrEmpty(Body))
            {
                newEvent.Body = new ItemBody
                {
                    Content     = Body,
                    ContentType = BodyType.Text
                };
            }

            if (!string.IsNullOrEmpty(Attendees))
            {
                var attendeeList = new List <Attendee>();

                // Treat any unrecognized text as a list of email addresses
                var emails = Attendees.Split(new[] { ';', ',', ' ' },
                                             StringSplitOptions.RemoveEmptyEntries);

                foreach (var email in emails)
                {
                    try
                    {
                        // Validate the email address
                        var addr = new System.Net.Mail.MailAddress(email);
                        if (addr.Address == email)
                        {
                            attendeeList.Add(new Attendee
                            {
                                Type         = AttendeeType.Required,
                                EmailAddress = new EmailAddress
                                {
                                    Address = email
                                }
                            });
                        }
                    }
                    catch { /* Invalid, skip */ }
                }

                if (attendeeList.Count > 0)
                {
                    newEvent.Attendees = attendeeList;
                }
            }

            await App.GraphClient.Me.Events.Request().AddAsync(newEvent);

            await DisplayAlert("Success", "Event created.", "OK");

            IsWorking = false;
        }
Esempio n. 40
0
 /// <inheritdoc />
 protected override void OnStart(Start start)
 {
     // No actions to perform
 }
Esempio n. 41
0
 public DateTimeRange Add(TimeSpan timeSpan)
 {
     return(new DateTimeRange(Start.SafeAdd(timeSpan), End.SafeAdd(timeSpan)));
 }
Esempio n. 42
0
        private IEnumerator<object> OnEventLeave(EventType type, object evt)
        {
            var sender = Event.GetProp<IEntity>("Sender", evt) as Player;
            if (sender == null)
                yield break;

            string messageText = "Always comin' and goin, always leavin' so soon... 'tis a shame.";

            Event.Send(new { Type = EventType.Tell, Sender = this, Recipient = sender, Text = messageText });

            var tr = new Start(NagTask(sender.Name), TaskExecutionPolicy.RunWhileFutureLives);
            yield return tr;
            _PlayersToNag[sender.Name] = tr.Future;
        }
Esempio n. 43
0
 public string ToStringSimple()
 {
     return(string.Format("{0}({1})", FileName, Start.ToStringSimple()));
 }
Esempio n. 44
0
        public App()
        {
            am = new Start();
            ShutdownMode = ShutdownMode.OnLastWindowClose;

        }
Esempio n. 45
0
 /// <inheritdoc />
 public bool Equals(Range other)
 {
     return(Start.Equals(other.Start) && End.Equals(other.End));
 }
		public virtual void Start ( Start Options
				) {

			char UsageFlag = '-';
				{
#pragma warning disable 219
					Start		Dummy = new Start ();
#pragma warning restore 219

					Console.Write ("{0}start ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Address.Usage (null, "address", UsageFlag));
					Console.Write ("[{0}] ", Dummy.MeshStore.Usage ("mesh", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.PortalStore.Usage ("mesh", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verify.Usage ("verify", "value", UsageFlag));
					Console.WriteLine ();

				}

				Console.WriteLine ("    {0}\t{1} = [{2}]", "String", 
							"Address", Options.Address);
				Console.WriteLine ("    {0}\t{1} = [{2}]", "String", 
							"MeshStore", Options.MeshStore);
				Console.WriteLine ("    {0}\t{1} = [{2}]", "String", 
							"PortalStore", Options.PortalStore);
				Console.WriteLine ("    {0}\t{1} = [{2}]", "Flag", 
							"Verify", Options.Verify);
			Console.WriteLine ("Not Yet Implemented");
			}
Esempio n. 47
0
 protected override void OnStart()
 {
     Start?.Invoke(this, EventArgs.Empty);
 }