static public Form_send2mykindle getInstance()
 {
     if(instance == null)
     {
         instance = new Form_send2mykindle();
     }
     return instance;
 }
Esempio n. 2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            AppDomain.CurrentDomain.AssemblyResolve += (sender, args) =>
            {
                String resourceName = "send2mykindle." +
                                      new AssemblyName(args.Name).Name + ".dll";
                using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resourceName))
                {
                    Byte[] assemblyData = new Byte[stream.Length];

                    stream.Read(assemblyData, 0, assemblyData.Length);

                    return(Assembly.Load(assemblyData));
                }
            };
            //Application.Run(new Form_send2mykindle());
            Application.Run(Form_send2mykindle.getInstance());
        }
Esempio n. 3
0
 private void sendWaitWindow_FormClosing(object sender, FormClosingEventArgs e)
 {
     Form_send2mykindle.getInstance().sendCancel();
 }
Esempio n. 4
0
 private void buttonCancel_Click(object sender, EventArgs e)
 {
     Form_send2mykindle.getInstance().sendCancel();
     this.Close();
 }