public void ShowMessage(string text, ShowMessageIcon icon) { var DialogWindow = new ShowMessageWindow() { ShowMessageText = text, IconDialog = icon, Owner = App.ActiveWindow, ShowInTaskbar = false }; DialogWindow.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterOwner; DialogWindow.ShowDialog(); }
public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { System.Diagnostics.Debugger.Break(); ShowMessageWindow.ShowMessage(parameter.ToString(), "Convert"); if ((values != null) && (values.Length == 3)) { if ((values[2] != null) && (values[1] != values[2])) { return(String.Format("{0} : {1}", values[1], values[2])); } else { return(values[1].ToString()); } } else { return(values); } }
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) { System.Diagnostics.Debugger.Break(); ShowMessageWindow.ShowMessage(parameter.ToString(), "ConvertBack"); if (value != null) { string s = value as string; if (s.Contains(" : ")) { return(s.Split(new string[] { " : " }, StringSplitOptions.None)); } else { return(s.Split(new string[] { " : " }, StringSplitOptions.None)); } } else { return(new object[] { value }); } }
private IEnumerator MoveWindowRoutine(Vector3 startPosition, Vector3 endPosition, float animationDuration = 1f, bool movingIn = true) { isMoving = true; if (movingIn == true) { ShowMessageWindow?.Invoke(); } float animationTime = 0f; while (animationTime < animationDuration) { animationTime += Time.deltaTime; float lerpTime = animationTime / animationDuration; lerpTime = lerpTime * lerpTime * lerpTime * (lerpTime * (lerpTime * 6 - 15) + 10); // smoother step panelRectTransform.anchoredPosition = Vector3.Lerp(startPosition, endPosition, lerpTime); yield return(null); } isMoving = false; if (movingIn == false) { HideMessageWindow?.Invoke(); } }