Beispiel #1
0
        internal void CreateOptionFromClipboard()
        {
            var data = ClipboardHelpers.GetExcelData();

            if (data == null)
            {
                Toaster.Warning(Properties.Resources.pasteFailTitle, Properties.Resources.pasteFailMessage);
                return;
            }
            if (data.Length < 5)
            {
                Toaster.Warning(Properties.Resources.pasteFailTitle, Properties.Resources.pasteFailIncompleteMessage);
            }

            var option = new Option
            {
                LongText = data[1],
                Unit     = data[2],
                Prices   = new ObservableCollection <Price>
                {
                    new Price {
                        From = 0, To = 0, PricePerUnit = double.Parse(data[5])
                    },
                }
            };

            Service.ShowOptionWindow(option);
        }
Beispiel #2
0
        public void ShowInfo(string title, string body, InfoType type)
        {
            switch (type)
            {
            case InfoType.Success:
                Toaster.Success(body);
                break;

            case InfoType.Info:
                Toaster.Info(body);
                break;

            case InfoType.Warn:
                Toaster.Warning(body);
                break;

            case InfoType.Error:
                Toaster.Error(body);
                break;
            }
        }