Example #1
0
        public MainWindow()
        {
            bool createdNew = true;

            mutex = new Mutex(true, "WSComm", out createdNew);

            if (createdNew)
            {
                InitializeComponent();

                caseWSCollection = (CaseWSCollection)FindResource("casewscollection");

                m_CargoHostEndPoint_Impl = new CargoHostEndPoint(ConfigurationManager.AppSettings["host"],
                                                                 Int32.Parse(ConfigurationManager.AppSettings["port"]));

                m_WSServer_Impl = new WSServer(m_CargoHostEndPoint_Impl,
                                               ConfigurationManager.AppSettings["Alias"],
                                               ConfigurationManager.AppSettings["ConnectionUri"],
                                               ConfigurationManager.AppSettings["AllowedIPList"],
                                               ConfigurationManager.AppSettings["UserProfiles"],
                                               Boolean.Parse(ConfigurationManager.AppSettings["EnableArchiveDecision"]));

                m_WSServer_Impl.CaseListUpdateEvent += new WSServer.CaseListUpdateHandler(UpdateCaseList);
                m_WSServer_Impl.HostStatusEvent     += new WSServer.HostStatusHandler(UpdateHostStatus);

                if (Boolean.Parse(ConfigurationManager.AppSettings["EnableTIP"]))
                {
                    m_TIPClientManager_Impl = new TIPClientManager(m_WSServer_Impl,
                                                                   ConfigurationManager.AppSettings["Alias"],
                                                                   ConfigurationManager.AppSettings["CTITemplateDirectory"]);
                }

                CargoHostNameText.Text = ConfigurationManager.AppSettings["host"] + ": Disconnected";

                if (Boolean.Parse(ConfigurationManager.AppSettings["EnableMCArea"]))
                {
                    MCAreaEnable_Click(this, new RoutedEventArgs());
                }
                else
                {
                    MCAreaDisable_Click(this, new RoutedEventArgs());
                }
            }
            else
            {
                Process current = Process.GetCurrentProcess();
                foreach (Process process in Process.GetProcessesByName(current.ProcessName))
                {
                    SetForegroundWindow(process.MainWindowHandle);
                }

                Application.Current.Shutdown();
            }
        }
Example #2
0
 public TIPClientManager(WSServer wsServer, string alias, string ctiTemplateDir)
 {
     m_Shutdown                = false;
     m_AliasElementTag         = "HostAlias";
     m_Alias                   = alias;
     m_WSServer                = wsServer;
     m_CTITemplateDirectory    = ctiTemplateDir;
     m_TIPManagers             = new List <TIPClient>();
     wsServer.TIPClientManager = this;
     CreateLocalTIPDirectories();
 }
Example #3
0
 public TIPClientManager(WSServer wsServer, string alias, string ctiTemplateDir)
 {
     m_Shutdown = false;
     m_AliasElementTag = "HostAlias";
     m_Alias = alias;
     m_WSServer = wsServer;
     m_CTITemplateDirectory = ctiTemplateDir;
     m_TIPManagers = new List<TIPClient>();
     wsServer.TIPClientManager = this;
     CreateLocalTIPDirectories();
 }
Example #4
0
        public TIPClient(string alias, string ctiCaseDir, string ftiImageDir, string ctiTemplateDir, WSServer wsServer)
        {
            m_Alias    = alias;
            m_WSServer = wsServer;

            m_CTIDirectory   = ctiCaseDir;
            m_FTIDirectory   = ftiImageDir;
            m_CTITemplateDir = ctiTemplateDir;

            m_FTIFiles = new Dictionary <string, string>();
            m_CTICases = new Dictionary <string, string>();
        }
Example #5
0
        public TIPClient(string alias, string ctiCaseDir, string ftiImageDir, string ctiTemplateDir, WSServer wsServer)
        {
            m_Alias = alias;
            m_WSServer = wsServer;

            m_CTIDirectory = ctiCaseDir;
            m_FTIDirectory = ftiImageDir;
            m_CTITemplateDir = ctiTemplateDir;

            m_FTIFiles = new Dictionary<string, string>();
            m_CTICases = new Dictionary<string, string>();
        }
 public CaseChangeCallback_Impl(WSServer wsServer)
 {
     m_WSServer = wsServer;
 }
 public ManualCodingCallback_Impl(WSServer wsServer) :
     base()
 {
     m_WSServer = wsServer;
 }
Example #8
0
 public AnalystCallback_Impl(WSServer wsServer) :
     base()
 {
     m_WSServer = wsServer;
 }
Example #9
0
 public CaseChangeCallback_Impl(WSServer wsServer)
 {
     m_WSServer = wsServer;
 }