Esempio n. 1
0
    public TShellViewModel (T model, string processName)
      : base (model)
    {
      ProcessName = processName;

      TypeName = GetType ().Name;

      m_ModalCount = 0;

      m_DataComm = TDataComm.CreateDefault;

      m_Communication = new TMessagingComm<TDataComm> (m_DataComm);
      m_Communication.Handle += OnCommunicationHandle;
    }
Esempio n. 2
0
    public TShellViewModel (IShellPresentation presentation)
      : base (new TShellModel ())
    {
      TypeName = GetType ().Name;

      if (presentation.NotNull ()) {
        presentation.ViewModel = this;
      }

      m_Process = new Dictionary<TProcess.TName, Process> ();

      m_DataComm = TDataComm.CreateDefault;

      m_Communication = new TMessagingComm<TDataComm> (m_DataComm);
      m_Communication.Handle += OnCommunicationHandle; // Attach event handler for incoming messages

      var filePath = System.Environment.CurrentDirectory;
      var fileName = TNames.SettingsIniFileName;

      IniFileManager = TIniFileManager.CreatDefault;
      IniFileManager.SelectPath (filePath, fileName);
    }