Пример #1
0
        public PrivateMessageForm(PluginManager pluginManager)
        {
            _pluginManager = pluginManager;
            InitializeComponent();

            commandTextBox.Focus();
        }
Пример #2
0
        public ServerForm(PluginManager pluginManager)
        {
            _pluginManager = pluginManager;
            InitializeComponent();

            commandTextBox.Focus();
        }
Пример #3
0
        public ChannelForm(Channel channel, PluginManager pluginManager)
        {
            InitializeComponent();

            Channel = channel;

            HookEvents();

            nickListBox.UserList = Channel.Users;

            commandTextBox.Focus();
            _pluginManager = pluginManager;
        }
Пример #4
0
        public MainViewModel(PluginManager pluginManager)
        {
            _pluginManager = pluginManager;
            Panels = new MTObservableCollection<IrcViewModel>();

            System.Windows.DependencyObject dep = new System.Windows.DependencyObject();
            if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(dep))
            {
                //Executes in Design mode. Use for mockups.
                Panels.Add(new ServerViewModel());
                return;
            }

            Settings.Default.SettingsSaving += Default_SettingsSaving;
            ServerManager.Instance.ServerAdded += Instance_ServerCreated;

            LoadSettings();

            List<ServerSettings> servers = IrcSettingsManager.Instance.GetAutoConnectServers();
            if (servers.Count == 0)
            {

            }

            foreach (ServerSettings server in servers)
            {
                if (server.Nick == null)
                    server.Nick = Settings.Default.FirstNick;

                Server newServer = ServerManager.Instance.Create(new ConnectionArgs(server.Nick, server.Url, server.Ssl));
                newServer.JoinSelf += Server_JoinSelf;
                newServer.Connect();
            }

            _pluginManager.LoadPlugins(Path.Combine(Environment.CurrentDirectory, "plugins"));
            //PluginManager.LoadPlugins(Settings.Default.UserPluginDirectory);
            RandomMessages.Load();
        }
Пример #5
0
 public MainForm(PluginManager pluginManager)
 {
     _pluginManager = pluginManager;
     InitializeComponent();
 }