Exemple #1
0
        private void on_btnImportPublicKey_clicked(object sender, EventArgs e)
        {
            FileSelector f = new FileSelector("Select Public Key");

            try {
                if (f.Run() == (int)ResponseType.Ok)
                {
                    txtPublicKey.Buffer.Text = File.ReadAllText(f.Filename);
                }
                f.Destroy();
            }
            catch (Exception) {
                f.Destroy();
                Gui.ShowMessageDialog("The selected file is not valid.", base.Dialog, Gtk.MessageType.Error, ButtonsType.Ok);
            }
        }
Exemple #2
0
        void on_m_SendFileMenuItem_activate(object o, EventArgs e)
        {
            FileSelector dialog = new FileSelector("Select file to send");

            dialog.Show();
            if (dialog.Run() == (int)Gtk.ResponseType.Ok)
            {
                network.SendFile(selectedNode, dialog.Filename);
            }
            dialog.Destroy();
        }
Exemple #3
0
 void on_m_SendFileMenuItem_activate(object o, EventArgs e)
 {
     FileSelector dialog = new FileSelector ("Select file to send");
     dialog.Show ();
     if (dialog.Run () == (int)Gtk.ResponseType.Ok) {
         network.SendFile (selectedNode, dialog.Filename);
     }
     dialog.Destroy ();
 }
 private void on_btnImportPublicKey_clicked(object sender, EventArgs e)
 {
     FileSelector f = new FileSelector("Select Public Key");
     try {
         if (f.Run() == (int)ResponseType.Ok) {
             txtPublicKey.Buffer.Text = File.ReadAllText(f.Filename);
         }
         f.Destroy();
     }
     catch (Exception) {
         f.Destroy();
         Gui.ShowMessageDialog ("The selected file is not valid.",base.Dialog, Gtk.MessageType.Error,ButtonsType.Ok);
     }
 }