예제 #1
0
        public override void OnInitialized(EventArgs e)
        {
            base.OnInitialized(e);
            LoadSettings();
            var form = new MainForm(Configuration);

            this.MainForm = form;
            if (interfaceElement != null)
            {
                form.ReadXml(interfaceElement);
                interfaceElement = null;
            }

            form.Initialize();
            this.BadgeLabel = null;
            this.MainForm.Show();

            if (!Configuration.Servers.Any())
            {
                Application.Instance.AsyncInvoke(delegate
                {
                    var action = new Actions.AddServer {
                        AutoConnect = true
                    };
                    action.Execute();
                });
            }
            else
            {
                foreach (var server in Configuration.Servers)
                {
                    if (server.ConnectOnStartup)
                    {
                        server.Connect();
                    }
                }
            }
        }
예제 #2
0
 public override void OnInitialized(EventArgs e)
 {
     base.OnInitialized(e);
     LoadSettings();
     var form = new MainForm(Configuration);
     this.MainForm = form;
     if (interfaceElement != null)
     {
         form.ReadXml(interfaceElement);
         interfaceElement = null;
     }
     
     form.Initialize();
     this.BadgeLabel = null;
     this.MainForm.Show();
     
     if (!Configuration.Servers.Any())
     {
         Application.Instance.AsyncInvoke(delegate
         {
             var action = new Actions.AddServer {
                 AutoConnect = true
             };
             action.Execute();
         });
     }
     else
     {
         foreach (var server in Configuration.Servers)
         {
             if (server.ConnectOnStartup)
                 server.Connect();
         }
     }
 }