Inheritance: MonoBehaviour
Exemple #1
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            string mshs = picMHSFalse.CurrentRow.Cells["MaHS"].Value.ToString();

            if (XepLopDAO.Instance.CheckExist(mshs) == false)
            {
                if (HocSinhDAO.Instance.deleteHocSinh(mshs))
                {
                    toolStripProgressBar1.Minimum = 0;
                    toolStripProgressBar1.Maximum = 110;
                    toolStripProgressBar1.Value   = 0;
                    toolStripProgressBar1.Step    = 10;
                    timer1.Start();
                    //MessageBox.Show("Xóa thành công học sinh có mã " + mshs + " !", "Thông báo", MessageBoxButtons.OK);
                    loadStu();
                    Reset.ResetAllControls(navigationPage2);
                    Reset.ResetAllControls(navigationPageAddHocSinh);
                    Reset.ResetFocus(txtMahocsinh, txtNhapthongtincantimkiem);
                }
            }
            else
            {
                MessageBox.Show("Học sinh đã có lớp, không thể xóa được!!", "Thông báo", MessageBoxButtons.OK);
            }
        }
Exemple #2
0
 void OnGUI()
 {
     if (Input.anyKeyDown)
     {
         Event e = Event.current;
         if (e.isKey)
         {
             currentKey = e.keyCode;
             string s = currentKey.ToString();
             if (s == "F10")
             {
                 Next.F10();
             }
             if (s == "F11")
             {
                 Step.F11();
             }
             if (s == "F9")
             {
                 Run.F9();
             }
             if (s == "F6")
             {
                 BreakControl.F6();
             }
             if (s == "F5")
             {
                 Reset.F5();
             }
         }
     }
 }
Exemple #3
0
        public object Get(Reset request)
        {
            //Uncomment if you want this feature
            //throw new NotSupportedException("Disabling for Demo site. Based on the XSS attacks I know it will only be a matter of time before someone pulls the trigger.");

            var questionsd = new Dictionary <string, string>(RestQuestions);

            JavascriptQuestions.ForEach(questionsd.Add);

            var questions = new List <Question>();

            questions.AddRange(RestQuestions.ConvertAll(kvp => ToQuestion(kvp.Key, kvp.Value, new List <string> {
                "rest", "http"
            })));
            questions.AddRange(JavascriptQuestions.ConvertAll(kvp => ToQuestion(kvp.Key, kvp.Value, new List <string> {
                "javascript", "jquery"
            })));


            RedisManager.Exec(r => r.FlushAll());

            var mythz = Repository.GetOrCreateUser(new User {
                DisplayName = "mythz"
            });

            questions.ForEach(q => q.UserId = mythz.Id);

            questions.ForEach(q => Repository.StoreQuestion(q));

            return(new ResetResponse());
        }
 public Pool(Create onCreate, Reset onReset, IsEqual equalityCheck)
 {
     this.m_Pool        = new List <T>(0);
     this.onCreate      = onCreate;
     this.onReset       = onReset;
     this.equalityCheck = equalityCheck;
 }
Exemple #5
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            string magv = dGVGiaovien.CurrentRow.Cells["colMagiaovien"].Value.ToString();

            if (magv != "")
            {
                if (ClassDAO.Instance.CheckGVCNinClass(magv) == false)
                {
                    if (GiaoVienDAO.Instance.XoaGiaoVien(magv))
                    {
                        //MessageBox.Show("Xóa thành công", "Thông báo");
                        toolStripProgressBar1.Minimum = 0;
                        toolStripProgressBar1.Maximum = 110;
                        toolStripProgressBar1.Value   = 0;
                        toolStripProgressBar1.Step    = 10;
                        timer1.Start();
                        LoadGiaoVien();
                    }
                    else
                    {
                        MessageBox.Show("Xóa thất bại", "Thông báo");
                    }
                }
                else
                {
                    MessageBox.Show("Giáo viên hiện tại đã chủ nhiệm không thể xóa", "Thông báo");
                }
            }
            else
            {
                MessageBox.Show("Trống rồi sao xóa đây !!!", "Thông báo");
            }
            Reset.ResetFocus(txtMagiaovien, txtNhapthongtincantimkiem);
        }
Exemple #6
0
        private void Reload()
        {
            _original = File.Exists(_filename) ? KsAnim.FromFile(_filename) : KsAnim.CreateEmpty();

            if (_wrappers != null)
            {
                for (var i = 0; i < _wrappers.Length; i++)
                {
                    _wrappers[i].Set(null);
                }

                Reset?.Invoke(this, EventArgs.Empty);
            }

            if (_parent != null)
            {
                Initialize(_parent);
                Set(_currentPosition);
            }

            if (_holder != null && _holder.TryGetTarget(out var holder))
            {
                holder.RaiseSceneUpdated();
            }
        }
Exemple #7
0
        /// <summary>
        /// plays a splat sound then restarts the scene
        /// </summary>
        /// <returns></returns>
        private IEnumerator PlayerFallDeath()
        {
            playerSplatSfx.Play(0);
            playerRigidbody.isKinematic = true;
            yield return(new WaitForSeconds(playerSplatSfx.clip.length));

            Reset.ResetScene();
        }
Exemple #8
0
 public void addResetMethod(Reset reset, string id)
 {
     if (resetList.ContainsKey(id))
     {
         resetList.Remove(id);
     }
     resetList.Add(id, reset);
 }
Exemple #9
0
        public void CommandReset()
        {
            var command = new Reset(0);
            var bytes   = command.GetBytes();

            Assert.AreEqual(bytes.Length, 1);
            Assert.AreEqual(bytes[0], Reset.Id);
        }
        public object Any(Reset request)
        {
            VirtualFiles.DeleteFiles(VirtualFiles.GetDirectory(UploadsDir).GetAllMatchingFiles("*.png"));
            File.ReadAllLines("~/imgur/preset-urls.txt".MapHostAbsolutePath()).ToList()
            .ForEach(url => WriteImage(new MemoryStream(url.Trim().GetBytesFromUrl())));

            return(HttpResult.Redirect("/imgur/"));
        }
Exemple #11
0
 private void Refresh_Click_1(object sender, EventArgs e)
 {
     InputHeight.Text = "0";
     InputWeight.Text = "0";
     Description.Text = "";
     Result.Text      = "0";
     Reset.Begin();
 }
Exemple #12
0
        public void InitializesCorrectly(string instruction, ResetCommand expComm, int expSubj, int expObj)
        {
            var reset = new Reset(instruction);

            Assert.Equal(expComm, reset.Command);
            Assert.Equal(expSubj, reset.Subject);
            Assert.Equal(expObj, reset.Object);
        }
Exemple #13
0
        public object Any(Reset request)
        {
            VirtualFiles.DeleteFiles(VirtualFiles.GetDirectory(UploadsDir).GetAllMatchingFiles("*.png"));
            VirtualFileSources.GetFile("preset-urls.txt").ReadAllText().ReadLines().ToList()
            .ForEach(url => WriteImage(new MemoryStream(url.Trim().GetBytesFromUrl())));

            return(HttpResult.Redirect("/"));
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            Response.ExpiresAbsolute = DateTime.Now.AddMonths(-1);

            try
            {
                if (IsPostBack != null)
                {
                    string userID    = Request.QueryString["ui"];
                    string code      = Request.QueryString["sp"];
                    string codePart  = code;
                    string myString  = codePart.ToString();
                    string subString = myString.Substring(0, 32);
                    objReset = new Reset();
                    DisableControls();


                    objEntReset = objReset.checkAunthentication(userID, subString);
                    string clientValue = md5.CalculateMD5Hash(txtAnswerCheck.Text.Trim());


                    if (txtAnswerCheck.Text != "")
                    {
                        if (objEntReset != null && subString == clientValue.ToUpper())
                        {
                            clsUserDetails obj = new clsUserDetails();
                            obj.GetUserDetails(int.Parse(userID));
                            if (subString == objEntReset.userAns && userID == objEntReset.userID)
                            {
                                EnableControls();
                                lblReset.Text              = "Please Reset Your Password.";
                                hplLogin.Enabled           = true;
                                btnUpdate.Enabled          = true;
                                lblPasswordMessage.Enabled = true;
                                lblPasswordMessage.Text    = "Password Must contain atleast 8 characters, including 1 digit, 1 Symbol &amp; 1 UPPERCASE character";
                            }
                            else
                            {
                                lblPasswordMessage.Text = "Unable to reset your password, please check your security answer.";
                                btnUpdate.Enabled       = false;
                            }
                        }
                        else
                        {
                            lblPasswordMessage.Text = "Unable to reset your password, please check your security answer.";
                            lblReset.Text           = "";
                            btnUpdate.Enabled       = false;
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                logger.Error(ex);
                lblPasswordMessage.Text = "";
            }
        }
Exemple #15
0
        public override bool Execute(RunInput input)
        {
            Host = input.BuildHost();

            if (input.CheckFlag)
            {
                EnvironmentChecker.ExecuteAllEnvironmentChecks(Host.Services)
                .GetAwaiter().GetResult()
                .Assert();
            }


            var assembly = typeof(RunCommand).GetTypeInfo().Assembly;

            AssemblyLoadContext.GetLoadContext(assembly).Unloading += context => Shutdown();

            Console.CancelKeyPress += (sender, eventArgs) =>
            {
                Shutdown();
                eventArgs.Cancel = true;
            };

            using (Host)
            {
                Host.Start();

                Started.Set();

                var shutdownMessage = "Press CTRL + C to quit";

                // TODO -- do this with a flag
                //Console.WriteLine("Running all environment checks...");
                //host.ExecuteAllEnvironmentChecks();

                IHostingEnvironment service = Host.Services.GetService <IHostingEnvironment>();

                Console.WriteLine("Hosting environment: " + service.EnvironmentName);
                Console.WriteLine("Content root path: " + service.ContentRootPath);
                ICollection <string> addresses = Host.ServerFeatures.Get <IServerAddressesFeature>()?.Addresses;
                if (addresses != null)
                {
                    foreach (string str in addresses)
                    {
                        Console.WriteLine("Now listening on: " + str);
                    }
                }
                if (!string.IsNullOrEmpty(shutdownMessage))
                {
                    Console.WriteLine(shutdownMessage);
                }


                Reset.Wait();
            }


            return(true);
        }
Exemple #16
0
 private void PvsP_CheckedChanged(object sender, EventArgs e)
 {
     against_computer = false;
     p2.Text          = "Player 1";
     p1.Text          = "Player 2";
     Reset.PerformClick();
     New.PerformClick();
     //test.Text = "player 1 turn";
 }
Exemple #17
0
 private void Reset_Click(object sender, EventArgs e)
 {
     label1.Text    = "";
     password1.Text = "";
     password2.Text = "";
     password2.Hide();
     Check.Hide();
     Reset.Hide();
 }
Exemple #18
0
 private void PvsC_CheckedChanged(object sender, EventArgs e)
 {
     against_computer = true;
     p2.Text          = "Player 1";
     p1.Text          = "Computer";
     Reset.PerformClick();
     New.PerformClick();
     //test.Text = "";
 }
 void ResetAnswer()
 {
     if (!ModuleSolved)
     {
         Reset.AddInteractionPunch(.2f);
         Input    = new int[] { -1, -1, -1, -1, -1, -1 };
         Keyboard = 0;
     }
 }
Exemple #20
0
 // Start is called before the first frame update
 void Start()
 {
     //bossPosition = GameObject.FindWithTag("bossObject").transform.position;
     joystick      = FindObjectOfType <Joystick>();
     resetbtn      = FindObjectOfType <Reset>();
     rb2d          = GameObject.FindWithTag("Player").GetComponent <Rigidbody2D>();
     heroTransform = GameObject.FindWithTag("Player").transform;
     anim          = GameObject.FindWithTag("Player").GetComponent <Animator>();
 }
Exemple #21
0
            public static MutableString Digest(RubyContext /*!*/ context, object self, [DefaultProtocol, NotNull] MutableString /*!*/ str)
            {
                Update.Target(Update, context, self, str);
                MutableString value = Finish.Target(Finish, context, self);

                Reset.Target(Reset, context, self);

                return(value);
            }
Exemple #22
0
 private void EUser_Click(object sender, EventArgs e)
 {
     showinputs();
     hidebuttons();
     Action.Text = "Save Changes";
     Reset.Text  = "Reset Changes";
     Action.Show();
     Reset.Show();
 }
Exemple #23
0
 private void AUser_Click(object sender, EventArgs e)
 {
     showinputs();
     hidebuttons();
     Action.Text = "Add User";
     Reset.Text  = "Reset";
     Action.Show();
     Reset.Show();
 }
 public void MessageReceived(object message)
 {
     Stats.Add(message);
     Received.Add(message);
     if (_waitForReceived != null && _waitForReceived(message))
     {
         Reset.Set();
     }
 }
Exemple #25
0
 private void VUser_Click(object sender, EventArgs e)
 {
     ViewUsersRequests.Show();
     hidebuttons();
     Action.Text = "Remove User";
     Reset.Text  = "Edit User";
     Action.Show();
     Reset.Show();
 }
        protected void OnCollectionChangedReset()
        {
            var eventArgs = new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset);

            using (BlockReentrancy()) {
                CollectionChanged?.Invoke(this, eventArgs);
                Reset?.Invoke(this, eventArgs);
            }
        }
Exemple #27
0
        public void Execute(Dictionary <string, string> arguments)
        {
            Console.WriteLine("[*] Action: Reset User Password (AoratoPw)\r\n");

            string newPassword = "";
            string dc          = "";
            string targetUser  = null;

            if (arguments.ContainsKey("/new"))
            {
                newPassword = arguments["/new"];
            }
            if (String.IsNullOrEmpty(newPassword))
            {
                Console.WriteLine("\r\n[X] New password must be supplied with /new:X !\r\n");
                return;
            }

            if (arguments.ContainsKey("/dc"))
            {
                dc = arguments["/dc"];
            }

            if (arguments.ContainsKey("/targetuser"))
            {
                targetUser = arguments["/targetuser"];
            }

            if (arguments.ContainsKey("/ticket"))
            {
                string kirbi64 = arguments["/ticket"];

                if (Helpers.IsBase64String(kirbi64))
                {
                    byte[]   kirbiBytes = Convert.FromBase64String(kirbi64);
                    KRB_CRED kirbi      = new KRB_CRED(kirbiBytes);
                    Reset.UserPassword(kirbi, newPassword, dc, targetUser);
                }
                else if (File.Exists(kirbi64))
                {
                    byte[]   kirbiBytes = File.ReadAllBytes(kirbi64);
                    KRB_CRED kirbi      = new KRB_CRED(kirbiBytes);
                    Reset.UserPassword(kirbi, newPassword, dc, targetUser);
                }
                else
                {
                    Console.WriteLine("\r\n[X]/ticket:X must either be a .kirbi file or a base64 encoded .kirbi\r\n");
                }
                return;
            }
            else
            {
                Console.WriteLine("\r\n[X] A /ticket:X needs to be supplied!\r\n");
                return;
            }
        }
Exemple #28
0
        public static void Init()
        {
            try
            {
                AppDomain.CurrentDomain.UnhandledException +=
                    delegate(object sender, UnhandledExceptionEventArgs eventArgs)
                {
                    try
                    {
                        var ex = sender as Exception;
                        if (ex != null)
                        {
                            Global.Logger.AddItem(new LogItem(ex));
                        }
                    }
                    catch (Exception ex)
                    {
                        Console.WriteLine(ex);
                    }
                };

                GameObjects.Initialize();

                CustomEvents.Game.OnGameLoad += delegate
                {
                    try
                    {
                        _champion = LoadChampion();

                        if (_champion != null)
                        {
                            if (Global.Reset.Enabled)
                            {
                                Reset.Force(Global.Name, Global.Reset.MaxAge, Weights.RestoreDefaultWeights);
                            }
                            Update.Check(
                                Global.Name, Assembly.GetExecutingAssembly().GetName().Version, Global.UpdatePath, 10000);
                            Core.Init(_champion, 50);
                            Core.Boot();
                        }
                        else
                        {
                            Console.WriteLine("No champion for: " + ObjectManager.Player.ChampionName);
                        }
                    }
                    catch (Exception ex)
                    {
                        Global.Logger.AddItem(new LogItem(ex));
                    }
                };
            }
            catch (Exception ex)
            {
                Global.Logger.AddItem(new LogItem(ex));
            }
        }
        public object Any(Reset request)
        {
            Db.DropAndCreateTable <TestPlan>();
            Db.DropAndCreateTable <TestRun>();
            Db.DropAndCreateTable <TestResult>();
            Db.DropAndCreateTable <UserAuth>();
            Db.DropAndCreateTable <UserAuthDetails>();

            return("OK");
        }
Exemple #30
0
 private void AdminI_Load(object sender, EventArgs e)
 {
     Action.Hide();
     Reset.Hide();
     ViewUsersRequests.Hide();
     Sendtoc.Hide();
     Sendtol.Hide();
     SendNotice.Hide();
     noticeInfo.Hide();
 }
 private void Awake()
 {
     theTransform = transform;
     GameObject gO  = GameObject.FindWithTag("Rip");
     ripAnim = gO.GetComponent<Animator>();
     ripSprite = gO.GetComponent<SpriteRenderer>();
     playerCtrl = GetComponent<PlayerControl>();
     anim = GetComponent<Animator>();
     gO = GameObject.FindWithTag("Scripts");
     custom = gO.GetComponent<CustomPlayClipAtPoint>();
     reset = gO.GetComponent<Reset>();
     currentH = HEALTH;
 }
 private void Awake()
 {
     theTransform = transform;
     anim = GetComponent<Animator>();
     playerH = GetComponent<PlayerHealth>();
     rigid = GetComponent<Rigidbody2D>();
     positions = GameObject.FindWithTag("Scripts").GetComponent<Positions>();
     reset = GameObject.FindWithTag("Scripts").GetComponent<Reset>();
     enemies = GameObject.FindGameObjectsWithTag("Enemy");
     tips = GameObject.FindWithTag("UI").GetComponent<HelpfulTips>();
     showPanels = GameObject.FindWithTag("UI").GetComponent<ShowPanels>();
     scenes = GameObject.FindWithTag("Scripts").GetComponent<Scenes>();
     if (!isRight)
         reset.ResetHelmet();
     rigid.gravityScale = 0f;
     GetComponentInChildren<SpriteRenderer>().enabled = false;
 }
        public object Get(Reset request)
        {
            //Uncomment if you want this feature
            //throw new NotSupportedException("Disabling for Demo site. Based on the XSS attacks I know it will only be a matter of time before someone pulls the trigger.");

            var questionsd = new Dictionary<string, string>(RestQuestions);
            JavascriptQuestions.ForEach(questionsd.Add);

            var questions = new List<Question>();
            questions.AddRange(RestQuestions.Map(kvp => ToQuestion(kvp.Key, kvp.Value, new List<string> { "rest", "http" })));
            questions.AddRange(JavascriptQuestions.Map(kvp => ToQuestion(kvp.Key, kvp.Value, new List<string> { "javascript", "jquery" })));


            RedisManager.Exec(r => r.FlushAll());

            var mythz = Repository.GetOrCreateUser(new User { DisplayName = "mythz" });
            questions.ForEach(q => q.UserId = mythz.Id);

            questions.ForEach(q => Repository.StoreQuestion(q));

            return new ResetResponse();
        }
        public object Any(Reset request)
        {
            VirtualFiles.DeleteFiles(VirtualFiles.GetDirectory(UploadsDir).GetAllMatchingFiles("*.png"));
            File.ReadAllLines("~/imgur/preset-urls.txt".MapHostAbsolutePath()).ToList()
                .ForEach(url => WriteImage(new MemoryStream(url.Trim().GetBytesFromUrl())));

            return HttpResult.Redirect("/imgur/");
        }
Exemple #35
0
 public override void Execute(GameModel gameState)
 {
     NextCommand = new Reset();
 }
		private static void Handle_Reset (
					Shell Dispatch, string[] args, int index) {
			Reset		Options = new Reset ();

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



#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_Reset TagType = (TagType_Reset) Registry.Find (Rest);

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

				switch (TagType) {
					default : throw new System.Exception ("Internal error");
					}
				}

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

			}
Exemple #37
0
        void ResetHandler(Reset reset)
        {
            Tracer.Trace("SickLRF::ResetHandler()");

            _internalPort.Post(new Exception("External Reset Requested"));
            reset.ResponsePort.Post(DefaultSubmitResponseType.Instance);
        }
		private static void Usage () {

				Console.WriteLine ("brief");
				Console.WriteLine ("");

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

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

					Console.WriteLine ("    Delete all test profiles");

				}

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

					Console.Write ("{0}device ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.DeviceID.Usage (null, "id", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceDescription.Usage (null, "dd", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Default.Usage ("default", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Create new device profile");

				}

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

					Console.Write ("{0}personal ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Portal.Usage (null, "portal", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Description.Usage (null, "pd", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Next.Usage ("next", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceNew.Usage ("new", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceUDF.Usage ("dudf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceID.Usage ("did", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceDescription.Usage ("dd", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Create new personal profile");

				}

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

					Console.Write ("{0}register ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.UDF.Usage (null, "udf", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage (null, "portal", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Register the specified profile at a new portal");

				}

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

					Console.Write ("{0}sync ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Synchronize local copies of Mesh profiles with the server");

				}

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

					Console.Write ("{0}escrow ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Quorum.Usage ("quorum", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Shares.Usage ("shares", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Create a set of key escrow shares");

				}

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

					Console.Write ("{0}export ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.File.Usage (null, "file", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Export the specified profile data to the specified file");

				}

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

					Console.Write ("{0}import ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.File.Usage (null, "file", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Import the specified profile data to the specified file");

				}

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

					Console.Write ("{0}list ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    List all profiles on the local machine");

				}

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

					Console.Write ("{0}dump ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Describe the specified profile");

				}

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

					Console.Write ("{0}pending ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Get list of pending connection requests");

				}

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

					Console.Write ("{0}connect ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Portal.Usage (null, "portal", UsageFlag));
					Console.Write ("[{0}] ", Dummy.PIN.Usage ("pin", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceNew.Usage ("new", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceUDF.Usage ("dudf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceID.Usage ("did", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceDescription.Usage ("dd", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Connect to an existing profile registered at a portal");

				}

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

					Console.Write ("{0}accept ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.DeviceUDF.Usage (null, "udf", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Accept a pending connection");

				}

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

					Console.Write ("{0}complete ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Complete a pending connection request");

				}

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

					Console.Write ("{0}password ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Add a web application profile to a personal profile");

				}

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

					Console.Write ("{0}pwadd ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Site.Usage (null, "site", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Username.Usage (null, "user", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Password.Usage (null, "password", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Add password entry");

				}

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

					Console.Write ("{0}pwget ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Site.Usage (null, "site", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Lookup password entry");

				}

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

					Console.Write ("{0}pwdelete ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Site.Usage (null, "site", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Delete password entry");

				}

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

					Console.Write ("{0}pwdump ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.JSON.Usage (null, "json", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Describe password entry");

				}

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

					Console.Write ("{0}mail ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.address.Usage (null, "address", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Add a mail application profile to a personal profile");

				}

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

					Console.Write ("{0}ssh ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Host.Usage (null, "host", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Client.Usage (null, "client", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Add a ssh application profile to a personal profile");

				}

			} // Usage 
        /// <summary>
        /// Erase all test profiles
        /// </summary>
        /// <param name="Options">Command line parameters</param>
        public override void Reset(Reset Options) {

            }
Exemple #40
0
 void Awake()
 {
     r = GetComponent<Reset>();
 }
 /// <summary>
 /// Erase all test profiles
 /// </summary>
 /// <param name="Options">Command line parameters</param>
 public override void Reset(Reset Options) {
     RegistrationMachine.Erase();
     }
Exemple #42
0
 public object Any(Reset request)
 {
     ResetUsers((OrmLiteAuthRepository)TryResolve<IAuthRepository>());
     return "OK";
 }
		private static void Usage () {

				Console.WriteLine ("brief");
				Console.WriteLine ("");

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

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

					Console.WriteLine ("    Delete all test profiles");

				}

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

					Console.Write ("{0}device ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.DeviceID.Usage (null, "id", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceDescription.Usage (null, "dd", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Default.Usage ("default", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Create new device profile");

				}

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

					Console.Write ("{0}personal ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Portal.Usage (null, "portal", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Description.Usage (null, "pd", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Verbose.Usage ("verbose", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.Report.Usage ("report", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceNew.Usage ("new", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceUDF.Usage ("dudf", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceID.Usage ("did", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.DeviceDescription.Usage ("dd", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Create new personal profile");

				}

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

					Console.Write ("{0}label ", UsageFlag);
					Console.Write ("[{0}] ", Dummy.Portal.Usage ("portal", "value", UsageFlag));
					Console.Write ("[{0}] ", Dummy.UDF.Usage ("udf", "value", UsageFlag));
					Console.WriteLine ();

					Console.WriteLine ("    Create new security label");

				}

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

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

					Console.WriteLine ("    Add user to a label");

				}

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

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

					Console.WriteLine ("    Remove user from a label");

				}

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

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

					Console.WriteLine ("    Create a new label key and recryption keys");

				}

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

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

					Console.WriteLine ("    Encrypt a data file to a label");

				}

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

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

					Console.WriteLine ("    Decrypt a data file");

				}

			} // Usage 
        void ResetHandler(Reset reset)
        {
            Tracer.Trace("TrackRoamerBrickProximityBoardService::ResetHandler()");

            _pbCommanderDataEventsPort.Post(new Exception("External Reset Requested"));
            reset.ResponsePort.Post(DefaultSubmitResponseType.Instance);
        }
        public object Any(Reset request)
        {
            Directory.GetFiles(AssertDir(UploadsDir)).ToList().ForEach(File.Delete);
            Directory.GetFiles(AssertDir(ThumbnailsDir)).ToList().ForEach(File.Delete);
            ImageSizes.ForEach(x => 
                Directory.GetFiles(AssertDir(UploadsDir.CombineWith(x))).ToList().ForEach(File.Delete));
            File.ReadAllLines("~/preset-urls.txt".MapHostAbsolutePath()).ToList()
                .ForEach(url => WriteImage(new MemoryStream(url.Trim().GetBytesFromUrl())));

            return HttpResult.Redirect("/");
        }
		public virtual void Reset ( Reset Options
				) {

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

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

					Console.WriteLine ("    Delete all test profiles");

				}

			Console.WriteLine ("Not Yet Implemented");
			}