Exemple #1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.activity_main);

            receiver = new CompleteReceiver();

            var toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);

            SetSupportActionBar(toolbar);
            SupportActionBar.Title = "Главная";

            id       = Intent.GetIntExtra("id", 0);
            password = Intent.GetStringExtra("key");

            List_Files = FindViewById <ListView>(Resource.Id.ListFiles);
            var Add_Button = FindViewById <FloatingActionButton>(Resource.Id.AddButton);

            info_text                 = FindViewById <TextView>(Resource.Id.text_informal);
            Add_Button.Click         += AddButtonOnClick;
            List_Files.ItemClick     += List_Files_ItemClick;
            List_Files.ItemLongClick += List_Files_ItemLongClick;

            support_func = new SupportCryptoFunction(this);
            LoadData();
        }
Exemple #2
0
 protected override void OnDestroy()
 {
     base.OnDestroy();
     if (receiver != null)
     {
         UnregisterReceiver(receiver);
         receiver = null;
     }
 }
Exemple #3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.layout_detailpage);

            receiver = new CompleteReceiver();

            Title = "Описание";
            information_about_file = JsonConvert.DeserializeObject <ModelDataFile>(Intent.GetStringExtra("about_file"));
            password = Intent.GetStringExtra("key");

            var File_Name = FindViewById <TextView>(Resource.Id.Name_File);

            File_Name.Text = information_about_file.FileName;
            var File_Type = FindViewById <TextView>(Resource.Id.Type_File);

            File_Type.Text = information_about_file.FileType;
            var File_Size = FindViewById <TextView>(Resource.Id.Size_File);

            File_Size.Text = EncryptionDecryptionService.ConvertToSizeWithName(information_about_file.FileSize);
            var File_Date = FindViewById <TextView>(Resource.Id.Date_File);

            File_Date.Text = information_about_file.FileDate;
            var File_SHA = FindViewById <TextView>(Resource.Id.File_SHA);

            File_SHA.Text = information_about_file.FileSHA;
            var File_Pash = FindViewById <TextView>(Resource.Id.File_Path);

            File_Pash.Text = information_about_file.FilePath;

            var Delete_Button   = FindViewById <Button>(Resource.Id.Button_Delete);
            var Decrypto_Button = FindViewById <Button>(Resource.Id.Button_Decrypto);

            Delete_Button.Click   += Delete_Button_Click;
            Decrypto_Button.Click += Decrypto_Button_Click;

            support_func = new SupportCryptoFunction(this);
        }