private void ToggleAnimation() { this.Visibility = Visibility.Visible; if (Shown) { InputTB.Focus(FocusState.Programmatic); } var maskAnimation = _compositor.CreateScalarKeyFrameAnimation(); maskAnimation.InsertKeyFrame(1f, Shown ? 1f : 0f); maskAnimation.Duration = TimeSpan.FromMilliseconds(400); var offsetAnimation = _compositor.CreateScalarKeyFrameAnimation(); offsetAnimation.InsertKeyFrame(1f, Shown ? 0f : -150f); offsetAnimation.Duration = TimeSpan.FromMilliseconds(400); var batch = _compositor.CreateScopedBatch(CompositionBatchTypes.Animation); _maskVisual.StartAnimation("Opacity", maskAnimation); _barVisual.StartAnimation("Offset.y", offsetAnimation); batch.Completed += (sender, e) => { if (!Shown) { this.Visibility = Visibility.Collapsed; } else { } }; batch.End(); }
void ShowInput(bool Multiline) { if (this.IsDisposed) { return; } if (this.InvokeRequired) { ShowInput_d SI = new ShowInput_d(ShowInput); this.Invoke(SI, new object[] { Multiline }); } else { InputTB.Text = ""; BaseSplit.Panel2Collapsed = false; InputTB.Multiline = Multiline; if (Multiline) { InputTB.Height = BaseSplit.Panel2.Height - 70; InputTB.ScrollBars = ScrollBars.Both; InputLbl.Text = "Enter your input below and press the 'Submit' button:"; } else { InputLbl.Text = "Enter your input below and press hit the enter key or press the 'Submit' button:"; } OutputTB.SelectionStart = OutputTB.Text.Length; OutputTB.ScrollToCaret(); InputTB.Focus(); } }
void StartExecution() { DisableAllButtons(); StatusTB.Text = "Executing..."; OutputTB.Text = ""; Input = InputTB.GetText(); T = new Thread(ExecuteCommand); T.Start(); }
private async void ExecuteBttn_Click(object sender, EventArgs _) { if (InputTB.Text.Length == 0) { MessageBox.Show("No Command Provided!"); return; } OutputTB.AppendText(await exec.CommandExec(InputTB.Text)); InputTB.Clear(); }
void StartExecution() { DisableAllButtons(); StatusTB.Text = "Executing..."; OutputTB.ClearData(); InputString = InputTB.GetText(); InputBytes = InputTB.GetBytes(); //Input = InputTB.GetText(); T = new Thread(ExecuteCommand); T.Start(); }
private void EncodeOutToEncodeInBtn_Click(object sender, EventArgs e) { if (ShouldGetBytesFromResult()) { InputTB.SetBytes(OutputTB.GetBytes()); } else { InputTB.SetText(OutputTB.GetText()); } }
private void EncodeOutToEncodeInBtn_Click(object sender, EventArgs e) { if (OutputTB.IsBinary) { InputTB.SetBytes(OutputTB.GetBytes()); } else { InputTB.SetText(OutputTB.GetText()); } }
private async void ToggleAnimation() { this.Visibility = Visibility.Visible; if (Shown) { InputTB.Focus(FocusState.Programmatic); } await ContentGrid.WaitForNonZeroSizeAsync(); _contentVisual.CenterPoint = new Vector3((float)(ContentGrid.ActualWidth / 2f), (float)(ContentGrid.ActualHeight / 2f), 1f); var maskAnimation = _compositor.CreateScalarKeyFrameAnimation(); maskAnimation.InsertKeyFrame(1f, Shown ? 1f : 0f); maskAnimation.Duration = TimeSpan.FromMilliseconds(400); var contentAnimation = _compositor.CreateVector3KeyFrameAnimation(); contentAnimation.InsertKeyFrame(0f, Shown ? new Vector3(1.2f, 1.2f, 1f) : new Vector3(1f, 1f, 1f)); contentAnimation.InsertKeyFrame(1f, Shown ? new Vector3(1f, 1f, 1f) : new Vector3(1.2f, 1.2f, 1f)); contentAnimation.Duration = TimeSpan.FromMilliseconds(400); var batch = _compositor.CreateScopedBatch(CompositionBatchTypes.Animation); _maskVisual.StartAnimation("Opacity", maskAnimation); _contentVisual.StartAnimation("Opacity", maskAnimation); _contentVisual.StartAnimation("Scale", contentAnimation); batch.Completed += (sender, e) => { if (!Shown) { this.Visibility = Visibility.Collapsed; } }; batch.End(); }