void ReleaseDesignerOutlets()
        {
            if (AccountText != null)
            {
                AccountText.Dispose();
                AccountText = null;
            }

            if (OfflineSwitch != null)
            {
                OfflineSwitch.Dispose();
                OfflineSwitch = null;
            }
        }
Exemple #2
0
        public MSNBulk(string p)
        {
            setPath(p);

            Msg          = new TTwaitMsg(path);
            senders      = new AccountText(path);
            senders.Once = false;
            names        = new AccountText("names");
            names.Once   = false;
            if (ConfigurationManager.AppSettings["order"] == "1")
            {
                this.senders.Order = true;
            }

            if (ConfigurationManager.AppSettings["autoReLoad"] == "1")
            {
                this.senders.Once = false;
            }

            if (ConfigurationManager.AppSettings["online"] == "1")
            {
                this.online = true;
            }

            if (ConfigurationManager.AppSettings["autoReload"] == "1")
            {
                this.autoReload = true;
            }

            if (ConfigurationManager.AppSettings["trace"] == "1")
            {
                string tracefile = string.Format("had/trace_{0}.txt", this.path);
                if (File.Exists(tracefile))
                {
                    File.Delete(tracefile);
                }
                filetrace = new FileTraceListener(tracefile);
                Trace.Listeners.Add(filetrace);
            }
            //Settings.SavePath = "mcl";
            Settings.NoSave = true;//ConfigurationManager.AppSettings["nosave"] == "1";


            cc.ControlEvent += new ConsoleCtrl.ControlEventHandler(cc_ControlEvent);
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);


            setFileName();
        }
        public MSNBulkAdd(string p)
        {
            Settings.NoSave = true;

            setPath(p);
            AccountText.Directory = path;
            senders           = new AccountText("sender");
            tos               = new AccountText("tos");
            this.senders.Once = false;

            threadcount = int.Parse(ConfigurationManager.AppSettings["addThreadCount"]);

            min = int.Parse(ConfigurationManager.AppSettings["addMin"]);
            max = int.Parse(ConfigurationManager.AppSettings["addMax"]);

            cc.ControlEvent += new ConsoleCtrl.ControlEventHandler(cc_ControlEvent);
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);


            openFile();
        }