~ubuntu-branches/ubuntu/trusty/smuxi/trusty

« back to all changes in this revision

Viewing changes to src/Frontend-STFL/Frontend.cs

  • Committer: Package Import Robot
  • Author(s): Mirco Bauer, 2900227
  • Date: 2014-03-16 17:05:21 UTC
  • mfrom: (35.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140316170521-x2vtcgek0fmu3m7g
Tags: 0.11~rc5-1
[2900227] Imported Upstream version 0.11~rc5

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
        private static Version            _EngineVersion;
43
43
        private static MainWindow         _MainWindow;
44
44
        private static FrontendConfig     _FrontendConfig;
 
45
        private static Session            _LocalSession;
45
46
        private static Session            _Session;
46
47
        private static UserConfig         _UserConfig;
47
48
        private static FrontendManager    _FrontendManager;
100
101
            }
101
102
        }
102
103
        
 
104
        public static bool IsLocalEngine {
 
105
            get {
 
106
                return _LocalSession != null && _Session == _LocalSession;
 
107
            }
 
108
        }
 
109
        
103
110
        public static FrontendManager FrontendManager {
104
111
            get {
105
112
                return _FrontendManager;
173
180
        {
174
181
            Engine.Engine.Init();
175
182
            _EngineVersion = Engine.Engine.Version;
176
 
            Session = new Engine.Session(Engine.Engine.Config,
 
183
            _LocalSession = new Engine.Session(Engine.Engine.Config,
177
184
                                         Engine.Engine.ProtocolManagerFactory,
178
185
                                         "local");
 
186
            Session = _LocalSession;
179
187
            Session.RegisterFrontendUI(_MainWindow.UI);
180
188
            _UserConfig = Session.UserConfig;
181
189
            ConnectEngineToGUI();
257
265
        {
258
266
            if (_FrontendManager != null) {
259
267
                _FrontendManager.IsFrontendDisconnecting = true;
 
268
                if (IsLocalEngine) {
 
269
                    try {
 
270
                        // we don't shutdown the remote session
 
271
                        Session.Shutdown();
 
272
                    } catch (Exception ex) {
 
273
#if LOG4NET
 
274
                        _Logger.Error("Quit(): Exception", ex);
 
275
#endif
 
276
                    }
 
277
                }
260
278
            }
261
279
            
262
280
            /*