Beispiel #1
0
 public PerforceService()
 {
     CacheExpireTimeInSeconds = 60;
     m_connectionManager = new ConnectionManager();
     m_connectionManager.ConnectionChanged += new EventHandler(connection_ConnectionChanged);
     m_connectionManager.LoginCanceled += new EventHandler(connectionManager_LoginCanceled);
 }
Beispiel #2
0
        /// <summary>
        /// Constuctor</summary>
        public Connections(ConnectionManager connectionManager)
        {
            InitializeComponent();

            m_connectionManager = connectionManager;
            ConnectionSelected = (m_connectionManager.RecentConnections.Count == 0) ?
                m_connectionManager.CurrentConnection : m_connectionManager.RecentConnections[0];
            UseAsDefaultConnection = (ConnectionSelected == m_connectionManager.DefaultConnection);
            if (m_connectionManager.RecentConnections.Count > 0)
                InitRecentConnections(m_connectionManager.RecentConnections);
            MinimumSize = new Size(2 * Width / 3, Height);
        }
Beispiel #3
0
        public PerforceService()
        {
            CacheExpireTimeInSeconds = 60;
            m_connectionManager = new ConnectionManager();
            m_connectionManager.ConnectionChanged += connection_ConnectionChanged;
            m_connectionManager.LoginCanceled += connectionManager_LoginCanceled;

            // GetEntryAssembly can be null if called from unmanaged code, like in UnitTests.
            Assembly assembly = Assembly.GetEntryAssembly();
            if (assembly == null)
                assembly = Assembly.GetCallingAssembly();
            if (assembly == null)
                assembly = Assembly.GetExecutingAssembly();
            ApplicationName = assembly.GetName().Name;
        }