Exemplo n.º 1
0
 protected override void OnStop()
 {
     if (Form != null)
     {
         Form.Close();
     }
     if (StorageEngine != null)
     {
         StorageEngine.Close();
     }
     if (Program.StorageEngineServer != null)
     {
         Program.StorageEngineServer.Stop();
     }
 }
Exemplo n.º 2
0
        protected override void OnStart(string[] args)
        {
            string FileName = ConfigurationSettings.AppSettings["FileName"];
            int port = int.Parse(ConfigurationSettings.AppSettings["Port"]);
            int boundedCapacity = int.Parse(ConfigurationSettings.AppSettings["BoundedCapacity"]);
            Service = this;

            StorageEngine = STSdb.FromFile(FileName);
            TcpServer = new TcpServer(port);
            Program.StorageEngineServer = new StorageEngineServer(StorageEngine, TcpServer);
            Program.StorageEngineServer.Start();

            Form = new MainForm();
            Application.Run(Form);
            Program.StorageEngineServer.Stop();
            StorageEngine.Close();
        }
Exemplo n.º 3
0
        protected override void OnStart(string[] args)
        {
            string FileName        = ConfigurationSettings.AppSettings["FileName"];
            int    port            = int.Parse(ConfigurationSettings.AppSettings["Port"]);
            int    boundedCapacity = int.Parse(ConfigurationSettings.AppSettings["BoundedCapacity"]);

            Service = this;

            StorageEngine = STSdb.FromFile(FileName);
            TcpServer     = new TcpServer(port);
            Program.StorageEngineServer = new StorageEngineServer(StorageEngine, TcpServer);
            Program.StorageEngineServer.Start();

            Form = new MainForm();
            Application.Run(Form);
            Program.StorageEngineServer.Stop();
            StorageEngine.Close();
        }
 public override void Finish()
 {
     engine.Close();
 }
Exemplo n.º 5
0
 public void Close()
 {
     Persist();
     _engine.Close();
 }
Exemplo n.º 6
0
 public override void Close()
 {
     engine.Close();
 }
Exemplo n.º 7
0
 public void Close()
 {
     _storageEngine.Close();
 }