Exemple #1
0
            public static async Task <string> Execute(string exec, string value, string type)
            {
                Timer t = new Timer();

                if (exec == "Embed")
                {
                    if (type == "Message")
                    {
                        t.Run(true, String.Empty);                    //TIMER START
                    }
                    PopupDialog.Loading pl = new PopupDialog.Loading();
                    if (value.Length > 1000)
                    {
                        pl.Show(true, Data.Misc.PleaseWait, Data.Misc.PleaseWaitDetail);
                    }

                    Picker_Property.Reset_Picker(Data.Misc.Text);

                    var x      = Task.Run(() => Encrypt(value, type));
                    var result = await x;

                    if (x.IsCompleted == true)
                    {
                        pl.Show(false, String.Empty, String.Empty);
                    }
                    if (type == "Message")
                    {
                        t.Run(false, Data.Misc.T_Encrypt); //TIMER STOP
                    }
                    return(result);
                }
                else
                {
                    if (type == "Message")
                    {
                        t.Run(true, String.Empty);                    //TIMER START
                    }
                    var result = await Task.Run(() => Decrypt(value));

                    if (type == "Message")
                    {
                        t.Run(false, Data.Misc.T_Decrypt); //TIMER STOP
                    }
                    return(result);
                }
            }
Exemple #2
0
 public static async Task Message(StorageFile file)
 {
     Picker_Property.Reset_Picker("Text");
     GetData.Picker.Add(Data.Misc.Text, await FileIO.ReadTextAsync(file));
 }