private void app_OnExtendModuleRequest(HttpContext t, ref bool b) { int siteId = CmsWebMaster.CurrentManageSite.SiteId; if (siteId <= 0) { b = false; return; } string filePath = PluginUtil.GetAttribute(this).WorkSpace + "site_" + siteId.ToString() + ".conf"; t.Handler = new CollectionExtend(Collector.Create(filePath)); t.Handler.ProcessRequest(t); b = true; }
private void Update(object sender, RoutedEventArgs e) { if (string.IsNullOrEmpty(_currentCollector.CollectorName)) { MessageWindow.ShowAlertMessage("Collector Name must not be empty!"); return; } if (_currentCollector.CollectorId == 0) { _currentCollector.Create(); return; } _currentCollector.Update(); }
private void btnAdd_Click(object sender, RoutedEventArgs e) { var item = Collector.FindByName(_newItem.CollectorName); if (item == null) { var result = _newItem.Create(); if (result.Success) { DialogResult = true; Close(); } else { MessageWindow.ShowAlertMessage(result.Message); } } else { MessageWindow.ShowNotifyMessage("Collector already exists!"); } }