Пример #1
0
        private async void PinToStart(object sender, RoutedEventArgs e)
        {
            if (ActionBlocked)
            {
                return;
            }
            ActionBlocked = true;

            await PinRecord(SelectedRecord);

            PM.Save();

            UpdatePinData();
            ActionBlocked = false;
        }
Пример #2
0
        private async void PinDevToStart(object sender, RoutedEventArgs e)
        {
            if (ActionBlocked)
            {
                return;
            }
            ActionBlocked = true;

            PinManager PM = new PinManager();

            PinRecord[] Records = CurrRecords.Where(x => x.DevId == SelectedRecord.DevId && 0 < x.TreeLevel).ToArray();

            if (5 < Records.Length)
            {
                bool            Canceled = true;
                StringResources stx      = StringResources.Load("Message");
                await Popups.ShowDialog(UIAliases.CreateDialog(
                                            string.Format(stx.Str("ConfirmMassPin"), Records.Length)
                                            , () => Canceled = false
                                            , stx.Str("Yes"), stx.Str("No")
                                            ));

                if (Canceled)
                {
                    ActionBlocked = false;
                    return;
                }
            }

            foreach (PinRecord Record in Records)
            {
                await PinRecord(Record);
            }

            PM.Save();
            UpdatePinData();
            ActionBlocked = false;
        }