Ejemplo n.º 1
0
        private async void ToggleMuteExecute()
        {
            var notifySettings = _full.NotifySettings as TLPeerNotifySettings;
            if (notifySettings != null)
            {
                var muteUntil = notifySettings.MuteUntil == int.MaxValue ? 0 : int.MaxValue;
                var settings = new TLInputPeerNotifySettings
                {
                    MuteUntil = muteUntil,
                    IsShowPreviews = notifySettings.IsShowPreviews,
                    IsSilent = notifySettings.IsSilent,
                    Sound = notifySettings.Sound
                };

                var response = await ProtoService.UpdateNotifySettingsAsync(new TLInputNotifyPeer { Peer = _item.ToInputPeer() }, settings);
                if (response.IsSucceeded)
                {
                    notifySettings.MuteUntil = muteUntil;
                    RaisePropertyChanged(() => AreNotificationsEnabled);
                    Full.RaisePropertyChanged(() => Full.NotifySettings);

                    var dialog = CacheService.GetDialog(_item.ToPeer());
                    if (dialog != null)
                    {
                        dialog.NotifySettings = _full.NotifySettings;
                        dialog.RaisePropertyChanged(() => dialog.NotifySettings);
                        dialog.RaisePropertyChanged(() => dialog.Self);
                    }

                    CacheService.Commit();
                }
            }
        }
Ejemplo n.º 2
0
        public void Handle(TLUpdateNotifySettings message)
        {
            var notifyPeer = message.Peer as TLNotifyPeer;
            if (notifyPeer != null)
            {
                var peer = notifyPeer.Peer;
                if (peer is TLPeerChannel && peer.Id == Item.Id)
                {
                    Execute.BeginOnUIThread(() =>
                    {
                        Full.NotifySettings = message.NotifySettings;
                        Full.RaisePropertyChanged(() => Full.NotifySettings);
                        RaisePropertyChanged(() => AreNotificationsEnabled);

                        //var notifySettings = updateNotifySettings.NotifySettings as TLPeerNotifySettings;
                        //if (notifySettings != null)
                        //{
                        //    _suppressUpdating = true;
                        //    MuteUntil = notifySettings.MuteUntil.Value;
                        //    _suppressUpdating = false;
                        //}
                    });
                }
            }
        }
Ejemplo n.º 3
0
        private void buttFul_Click(object sender, EventArgs e)
        {
            PanelZasad.Visible = false;
            Full full = new Full();

            full.MdiParent = this;
            full.Show();
            this.LayoutMdi(MdiLayout.Cascade);
            full.Dock = DockStyle.Fill;
        }
        private async void SendExecute()
        {
            if (_shortName != _selectedItem?.Set.ShortName && !string.IsNullOrWhiteSpace(_shortName))
            {
                var stickerSet = _stickersService.GetStickerSetByName(_shortName);
                if (stickerSet == null)
                {
                    var stickerResponse = await ProtoService.GetStickerSetAsync(new TLInputStickerSetShortName { ShortName = _shortName });

                    if (stickerResponse.IsSucceeded)
                    {
                        stickerSet = stickerResponse.Result;
                    }
                }

                if (stickerSet != null)
                {
                    SelectedItem = Items.FirstOrDefault(x => x.Set.Id == stickerSet.Set.Id) ?? stickerSet;
                }
                else
                {
                    // TODO
                    return;
                }
            }

            var set      = SelectedItem?.Set;
            var inputSet = set != null ? new TLInputStickerSetID {
                Id = set.Id, AccessHash = set.AccessHash
            } : (TLInputStickerSetBase) new TLInputStickerSetEmpty();

            var response = await ProtoService.SetStickersAsync(_item.ToInputChannel(), inputSet);

            if (response.IsSucceeded)
            {
                if (set != null)
                {
                    _stickersService.GetGroupStickerSetById(set);
                }

                Full.StickerSet    = set;
                Full.HasStickerSet = set != null;
                Full.RaisePropertyChanged(() => Full.StickerSet);
                Full.RaisePropertyChanged(() => Full.HasStickerSet);

                NavigationService.GoBack();
            }
            else
            {
                // TODO
            }
        }
Ejemplo n.º 5
0
 public FullWrapper(Full root)
 {
     BaseInfo = root;
     Vip      = false;
     if (root.player.vip_time != "0000-00-00 00:00:00")
     {
         var viptime = DateTime.Parse(root.player.vip_time);
         if (viptime > DateTime.Now)
         {
             Vip = true;
         }
     }
 }
Ejemplo n.º 6
0
 private void Form1_Load(object sender, EventArgs e)
 {
     System.IO.Directory.CreateDirectory(@"C:\temp");
     Full.Hide();
     if (!Directory.Exists(@"C:\hh"))
     {
         Directory.CreateDirectory(@"C:\hh");
     }
     if (!Directory.Exists(@"C:\key"))
     {
         Directory.CreateDirectory(@"C:\key");
     }
 }
Ejemplo n.º 7
0
        public void Add(ulong x, ulong y, ulong z, byte c)
        {
            ulong f = Fuse(x, y, z);

            if (Voxels.ContainsKey(f))
            {
                Voxels[f] = c;
            }
            else
            {
                Voxels.Add(f, c);
                Full.Add(f);
            }
        }
Ejemplo n.º 8
0
        public string Print(bool fullFlag = true)
        {
            var str = new StringBuilder();

            if (fullFlag)
            {
                Full.ForEach(p => str.Append(p.Print()));
            }
            else
            {
                Last.ForEach(p => str.Append(p.Print()));
            }
            return(str.ToString());
        }
Ejemplo n.º 9
0
        public string QueryString()
        {
            string queryToRet = "?";

            if (BlockSize != null)
            {
                queryToRet += "&" + String.Format(BLOCK_SIZE, BlockSize);
            }
            if (TimeBetweenBlocks != null)
            {
                queryToRet += "&" + String.Format(TIME_BETWEEN_BLOCKS, TimeBetweenBlocks);
            }
            queryToRet += Full.QueryString("Full") + Validator.QueryString("Validator") + History.QueryString("History");
            return(queryToRet.Remove(1, 1));
        }
Ejemplo n.º 10
0
        public override Task  ExecuteAsync(CancellationToken cancellationToken)
        {
            if (Full.IsNotNull())
            {
                if (SemanticVersion.TryParse(Full, out var version))
                {
                    UpdateVersion(version.ToString());
                }
                else
                {
                    Logger.ConsoleMessageLine(m => m.Prompt().span(s => s.text("Invalid version.").color(ConsoleColor.Red)));
                }
                return(Task.CompletedTask);
            }

            var currentVersion = SemanticVersion.Parse(_roboNuGetFile.PackageVersion);

            if (NextPatch)
            {
                currentVersion.Patch++;
                UpdateVersion(currentVersion.ToString());
                return(Task.CompletedTask);
            }

            if (NextMinor)
            {
                currentVersion.Minor++;
                currentVersion.Patch = 0;
                UpdateVersion(currentVersion.ToString());
                return(Task.CompletedTask);
            }

            if (NextMajor)
            {
                currentVersion.Major++;
                currentVersion.Minor = 0;
                currentVersion.Patch = 0;
                UpdateVersion(currentVersion.ToString());
                return(Task.CompletedTask);
            }

            Logger.Error("Invalid arguments.");

            return(Task.CompletedTask);
        }
Ejemplo n.º 11
0
        public string GetImageUrl(string region, ImageTypes typeToLoad)
        {
            switch (typeToLoad)
            {
            case ImageTypes.Splash:
                return(BaseUrl + "/img/champion/splash/" + Full.Replace(".png", "_0.jpg"));

            case ImageTypes.Item:
                return(BaseUrl + VersionUrl + "/img/item/" + Full);

            case ImageTypes.Loading:
                return(BaseUrl + "/img/champion/loading/" + Full.Replace(".png", "_0.jpg"));

            case ImageTypes.Square:
                return(BaseUrl + VersionUrl + "/img/champion/" + Full);
            }
            return(Group == "item" ? ItemUrl + Full : ChampionSquareUrl + Full);
        }
Ejemplo n.º 12
0
        private void Watch_Click(object sender, EventArgs e)
        {
            Full.Show();
            Node <Client> c = NodeFind(FindRadio());

            c.GetInfo().sendData("screen");
            string[] screen = c.GetInfo().GetData().Split('#');
            Screen.SetBounds(0, 0, int.Parse(screen[0]) / 2, int.Parse(screen[1]) / 2);
            this.Width       = (int.Parse(screen[0]) / 2) + 50;
            this.Height      = (int.Parse(screen[1]) / 2) + 125;
            this.Tabs.Width  = (int.Parse(screen[0]) / 2) + 50;
            this.Tabs.Height = (int.Parse(screen[1]) / 2) + 125;
            Watch.SetBounds(15, Screen.Height + 50, 49, 26);

            Stop.SetBounds(188, Screen.Height + 50, 46, 26);
            Full.SetBounds(276, Screen.Height + 50, 75, 23);
            //watch = true;
            Thread WS = new Thread(new ThreadStart(ScreenWatch));

            WS.Start();
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Gets the health check.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <returns></returns>
        public object Get(HealthCheckDto request)
        {
            HealthCheck result;

            switch (request.Scope)
            {
            case "monitoring":
                result = new Monitoring(); break;

            case "full":
                result = new Full(); break;

            default:
                result = new HealthCheck(); break;
            }

            Response.AddHeader("x-node-id", result.NodeId);
            Response.AddHeader("x-node-status", result.NodeStatus.ToString());

            return(result);
        }
Ejemplo n.º 14
0
 internal static UIDialogResult ShowDialog(UIMode uiMode, SerializableException exception, Report report)
 {
     if (uiMode == UIMode.Minimal)
     {
         return(new Minimal().ShowDialog(report));
     }
     if (uiMode == UIMode.Normal)
     {
         using (var ui = new Normal())
         {
             return(ui.ShowDialog(report));
         }
     }
     if (uiMode == UIMode.Full)
     {
         using (var ui = new Full())
         {
             return(ui.ShowDialog(exception, report));
         }
     }
     throw NBugConfigurationException.Create(() => Settings.UIMode,
                                             "Parameter supplied for settings property is invalid.");
 }
Ejemplo n.º 15
0
 public Slow(Equity equity, int periodCount, int smaPeriodCountD)
     : base(equity, periodCount, smaPeriodCountD)
 {
     _fullStochasticsIndicator = new Full(equity, periodCount, SmaPeriodCountK, smaPeriodCountD);
 }
Ejemplo n.º 16
0
 public Sequencing <T> Get(ISelect <T[], T[]> select)
 => new Sequencing <T>(Full.Select(select), Near.Select(select), Far.Select(select));
Ejemplo n.º 17
0
 public void Add(IPowerHistoryEntry entry)
 {
     Full.Add(entry);
     Last.Add(entry);
 }
 public void Validate()
 {
     Full.ValidateRequired("Full");
 }
Ejemplo n.º 19
0
 public override string ToString()
 {
     return(Full.ToString("X8"));
 }
Ejemplo n.º 20
0
        // Module defining this command


        // Optional custom code for this activity


        /// <summary>
        /// Returns a configured instance of System.Management.Automation.PowerShell, pre-populated with the command to run.
        /// </summary>
        /// <param name="context">The NativeActivityContext for the currently running activity.</param>
        /// <returns>A populated instance of System.Management.Automation.PowerShell</returns>
        /// <remarks>The infrastructure takes responsibility for closing and disposing the PowerShell instance returned.</remarks>
        protected override ActivityImplementationContext GetPowerShell(NativeActivityContext context)
        {
            System.Management.Automation.PowerShell invoker       = global::System.Management.Automation.PowerShell.Create();
            System.Management.Automation.PowerShell targetCommand = invoker.AddCommand(PSCommandName);

            // Initialize the arguments

            if (Name.Expression != null)
            {
                targetCommand.AddParameter("Name", Name.Get(context));
            }

            if (Path.Expression != null)
            {
                targetCommand.AddParameter("Path", Path.Get(context));
            }

            if (Category.Expression != null)
            {
                targetCommand.AddParameter("Category", Category.Get(context));
            }

            if (Component.Expression != null)
            {
                targetCommand.AddParameter("Component", Component.Get(context));
            }

            if (Functionality.Expression != null)
            {
                targetCommand.AddParameter("Functionality", Functionality.Get(context));
            }

            if (Role.Expression != null)
            {
                targetCommand.AddParameter("Role", Role.Get(context));
            }

            if (Detailed.Expression != null)
            {
                targetCommand.AddParameter("Detailed", Detailed.Get(context));
            }

            if (Full.Expression != null)
            {
                targetCommand.AddParameter("Full", Full.Get(context));
            }

            if (Examples.Expression != null)
            {
                targetCommand.AddParameter("Examples", Examples.Get(context));
            }

            if (Parameter.Expression != null)
            {
                targetCommand.AddParameter("Parameter", Parameter.Get(context));
            }

            if (Online.Expression != null)
            {
                targetCommand.AddParameter("Online", Online.Get(context));
            }

            if (ShowWindow.Expression != null)
            {
                targetCommand.AddParameter("ShowWindow", ShowWindow.Get(context));
            }


            return(new ActivityImplementationContext()
            {
                PowerShellInstance = invoker
            });
        }
Ejemplo n.º 21
0
 protected void OnFull(ContainerFullEventArgs e)
 {
     Full?.Invoke(this, e);
 }
 public RequesterConfigurationBusinessModel ToData()
 {
     return(new RequesterConfigurationBusinessModel(Account, Full.ToData(), Validator.ToData(), History.ToData(), ParseNullable(MinimumCandidatureStake), TimeBetweenBlocks, BlockSize));
 }
Ejemplo n.º 23
0
 public int CompareTo(ObjectGuid guid)
 {
     return(Full.CompareTo(guid.Full));
 }
Ejemplo n.º 24
0
 // Use this for initialization
 void Start()
 {
     ful = new Full(testAction);
 }
Ejemplo n.º 25
0
 public override int GetHashCode()
 {
     return(Full.GetHashCode());
 }
Ejemplo n.º 26
0
 private void Sort()
 {
     mainlist.Sort();
     Full.Sort();
     SortThis(mainlist);
 }
Ejemplo n.º 27
0
 protected string OnFull(ContainerEventArgs e)
 {
     Full?.Invoke(this, e);
     return(EventReturnString);
 }